diff --git a/src/Eth.php b/src/Eth.php index 9e70c84..9401f33 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -199,6 +199,17 @@ class Eth ] ] ], + 'eth_getTransactionByBlockNumberAndIndex' => [ + 'params' => [ + [ + 'validators' => [ + QuantityValidator::class, TagValidator::class + ] + ], [ + 'validators' => QuantityValidator::class + ] + ] + ], ]; /** diff --git a/test/unit/EthTest.php b/test/unit/EthTest.php index 8876652..096e51c 100644 --- a/test/unit/EthTest.php +++ b/test/unit/EthTest.php @@ -633,6 +633,31 @@ class EthTest extends TestCase }); } + /** + * testGetTransactionByBlockNumberAndIndex + * + * @return void + */ + public function testGetTransactionByBlockNumberAndIndex() + { + $eth = $this->eth; + + $eth->getTransactionByBlockNumberAndIndex('0xe8', '0x0', function ($err, $transaction) { + if ($err !== null) { + return $this->fail($err->getMessage()); + } + if (isset($transaction->result)) { + $this->assertTrue(is_string($transaction->result)); + } else { + if (isset($transaction->error)) { + $this->fail($transaction->error->message); + } else { + $this->assertTrue(true); + } + } + }); + } + /** * testUnallowedMethod *