diff --git a/src/Eth.php b/src/Eth.php index 25d12e7..5eea5fd 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -283,6 +283,13 @@ class Eth ] ] ], + 'eth_getFilterChanges' => [ + 'params' => [ + [ + 'validators' => QuantityValidator::class + ] + ] + ], ]; /** diff --git a/test/unit/EthTest.php b/test/unit/EthTest.php index 0a12ffa..48263bf 100644 --- a/test/unit/EthTest.php +++ b/test/unit/EthTest.php @@ -943,6 +943,32 @@ class EthTest extends TestCase }); } + /** + * testGetFilterChanges + * + * @return void + */ + public function testGetFilterChanges() + { + $eth = $this->eth; + + $eth->getFilterChanges('0x01', function ($err, $filter) { + if ($err !== null) { + // infura banned us to get filter changes + return $this->assertTrue($err->getCode() === 405); + } + if (isset($filter->result)) { + $this->assertTrue(is_string($filter->result)); + } else { + if (isset($filter->error)) { + $this->assertTrue(is_string($filter->error->message)); + } else { + $this->assertTrue(true); + } + } + }); + } + /** * testUnallowedMethod *