eth_getTransactionReceipt

This commit is contained in:
sc0Vu 2017-12-14 19:04:47 +08:00
parent 3b330384cd
commit d5a2d4c041
2 changed files with 32 additions and 0 deletions

View File

@ -210,6 +210,13 @@ class Eth
] ]
] ]
], ],
'eth_getTransactionReceipt' => [
'params' => [
[
'validators' => BlockHashValidator::class
]
]
],
]; ];
/** /**

View File

@ -658,6 +658,31 @@ class EthTest extends TestCase
}); });
} }
/**
* testGetTransactionReceipt
*
* @return void
*/
public function testGetTransactionReceipt()
{
$eth = $this->eth;
$eth->getTransactionReceipt('0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238', 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
* *