diff --git a/src/Eth.php b/src/Eth.php index 5eea5fd..4e532fc 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -290,6 +290,13 @@ class Eth ] ] ], + 'eth_getFilterLogs' => [ + 'params' => [ + [ + 'validators' => QuantityValidator::class + ] + ] + ], ]; /** diff --git a/test/unit/EthTest.php b/test/unit/EthTest.php index 48263bf..895a599 100644 --- a/test/unit/EthTest.php +++ b/test/unit/EthTest.php @@ -969,6 +969,32 @@ class EthTest extends TestCase }); } + /** + * testGetFilterLogs + * + * @return void + */ + public function testGetFilterLogs() + { + $eth = $this->eth; + + $eth->getFilterLogs('0x01', function ($err, $logs) { + if ($err !== null) { + // infura banned us to get filter logs + return $this->assertTrue($err->getCode() === 405); + } + if (isset($logs->result)) { + $this->assertTrue(is_array($logs->result)); + } else { + if (isset($logs->error)) { + $this->assertTrue(is_string($logs->error->message)); + } else { + $this->assertTrue(true); + } + } + }); + } + /** * testUnallowedMethod *