eth_getFilterLogs
This commit is contained in:
parent
4d701c80c2
commit
afb3fa52ff
@ -290,6 +290,13 @@ class Eth
|
||||
]
|
||||
]
|
||||
],
|
||||
'eth_getFilterLogs' => [
|
||||
'params' => [
|
||||
[
|
||||
'validators' => QuantityValidator::class
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user