eth_getTransactionByBlockHashAndIndex
This commit is contained in:
parent
8e4d9067f8
commit
f13217e44d
@ -190,6 +190,15 @@ class Eth
|
||||
]
|
||||
]
|
||||
],
|
||||
'eth_getTransactionByBlockHashAndIndex' => [
|
||||
'params' => [
|
||||
[
|
||||
'validators' => BlockHashValidator::class
|
||||
], [
|
||||
'validators' => QuantityValidator::class
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -608,6 +608,31 @@ class EthTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testGetTransactionByBlockHashAndIndex
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testGetTransactionByBlockHashAndIndex()
|
||||
{
|
||||
$eth = $this->eth;
|
||||
|
||||
$eth->getTransactionByBlockHashAndIndex('0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238', '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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user