eth_getTransactionByBlockNumberAndIndex

This commit is contained in:
sc0Vu 2017-12-14 19:01:38 +08:00
parent f13217e44d
commit 3b330384cd
2 changed files with 36 additions and 0 deletions

View File

@ -199,6 +199,17 @@ class Eth
] ]
] ]
], ],
'eth_getTransactionByBlockNumberAndIndex' => [
'params' => [
[
'validators' => [
QuantityValidator::class, TagValidator::class
]
], [
'validators' => QuantityValidator::class
]
]
],
]; ];
/** /**

View File

@ -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 * testUnallowedMethod
* *