Net apis.
This commit is contained in:
parent
e6adbdd303
commit
819608d510
@ -16,6 +16,13 @@ use Web3\Methods\EthMethod;
|
||||
|
||||
class Listening extends EthMethod
|
||||
{
|
||||
/**
|
||||
* validators
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $validators = [];
|
||||
|
||||
/**
|
||||
* inputFormatters
|
||||
*
|
||||
|
@ -17,6 +17,13 @@ use Web3\Formatters\BigNumberFormatter;
|
||||
|
||||
class PeerCount extends EthMethod
|
||||
{
|
||||
/**
|
||||
* validators
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $validators = [];
|
||||
|
||||
/**
|
||||
* inputFormatters
|
||||
*
|
||||
|
@ -16,6 +16,13 @@ use Web3\Methods\EthMethod;
|
||||
|
||||
class Version extends EthMethod
|
||||
{
|
||||
/**
|
||||
* validators
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $validators = [];
|
||||
|
||||
/**
|
||||
* inputFormatters
|
||||
*
|
||||
|
@ -99,10 +99,11 @@ class Net
|
||||
} else {
|
||||
$methodObject = $this->methods[$method];
|
||||
}
|
||||
$inputs = $methodObject->transform($arguments, $methodObject->inputFormatters);
|
||||
$methodObject->arguments = $inputs;
|
||||
|
||||
$this->provider->send($methodObject, $callback);
|
||||
if ($methodObject->validate($arguments)) {
|
||||
$inputs = $methodObject->transform($arguments, $methodObject->inputFormatters);
|
||||
$methodObject->arguments = $inputs;
|
||||
$this->provider->send($methodObject, $callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user