eth_coinbase.
This commit is contained in:
parent
44780a9821
commit
413c1abb68
@ -24,6 +24,7 @@ class Eth
|
||||
private $methods = [
|
||||
'eth_protocolVersion' => [],
|
||||
'eth_syncing' => [],
|
||||
'eth_coinbase' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -72,6 +72,28 @@ class EthTest extends TestCase
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testCoinbase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testCoinbase()
|
||||
{
|
||||
$eth = $this->web3->eth;
|
||||
|
||||
$eth->coinbase(function ($err, $coinbase) {
|
||||
if ($err !== null) {
|
||||
// infura banned us to use coinbase
|
||||
return $this->assertTrue($err->getCode() === 405);
|
||||
}
|
||||
if (isset($coinbase->result)) {
|
||||
$this->assertTrue(is_string($coinbasse->result));
|
||||
} else {
|
||||
$this->fail($coinbase->error->message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* testUnallowedMethod
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user