Add eth_getBlockByNumber default values.
This commit is contained in:
parent
7091a60418
commit
4df52132d0
@ -14,6 +14,7 @@ namespace Web3\Methods\Eth;
|
||||
use InvalidArgumentException;
|
||||
use Web3\Methods\EthMethod;
|
||||
use Web3\Validators\QuantityValidator;
|
||||
use Web3\Validators\TagValidator;
|
||||
use Web3\Validators\BooleanValidator;
|
||||
use Web3\Formatters\OptionalQuantityFormatter;
|
||||
use Web3\Formatters\BooleanFormatter;
|
||||
@ -26,7 +27,9 @@ class GetBlockByNumber extends EthMethod
|
||||
* @var array
|
||||
*/
|
||||
protected $validators = [
|
||||
QuantityValidator::class, BooleanValidator::class
|
||||
[
|
||||
QuantityValidator::class, TagValidator::class
|
||||
], BooleanValidator::class
|
||||
];
|
||||
|
||||
/**
|
||||
@ -50,7 +53,9 @@ class GetBlockByNumber extends EthMethod
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultValues = [];
|
||||
protected $defaultValues = [
|
||||
0 => 'latest'
|
||||
];
|
||||
|
||||
/**
|
||||
* construct
|
||||
|
Loading…
Reference in New Issue
Block a user