diff --git a/src/Methods/Net/Listening.php b/src/Methods/Net/Listening.php index 2e9945c..8354358 100644 --- a/src/Methods/Net/Listening.php +++ b/src/Methods/Net/Listening.php @@ -16,6 +16,13 @@ use Web3\Methods\EthMethod; class Listening extends EthMethod { + /** + * validators + * + * @var array + */ + protected $validators = []; + /** * inputFormatters * diff --git a/src/Methods/Net/PeerCount.php b/src/Methods/Net/PeerCount.php index 1983dfe..85f6582 100644 --- a/src/Methods/Net/PeerCount.php +++ b/src/Methods/Net/PeerCount.php @@ -17,6 +17,13 @@ use Web3\Formatters\BigNumberFormatter; class PeerCount extends EthMethod { + /** + * validators + * + * @var array + */ + protected $validators = []; + /** * inputFormatters * diff --git a/src/Methods/Net/Version.php b/src/Methods/Net/Version.php index cf34149..f33f64c 100644 --- a/src/Methods/Net/Version.php +++ b/src/Methods/Net/Version.php @@ -16,6 +16,13 @@ use Web3\Methods\EthMethod; class Version extends EthMethod { + /** + * validators + * + * @var array + */ + protected $validators = []; + /** * inputFormatters * diff --git a/src/Net.php b/src/Net.php index cdc9290..6b52b2b 100644 --- a/src/Net.php +++ b/src/Net.php @@ -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); + } } }