eth_gasPrice.

This commit is contained in:
sc0Vu 2017-12-13 16:17:20 +08:00
parent d0a97a1472
commit b87e3e9de8
2 changed files with 22 additions and 0 deletions

View File

@ -27,6 +27,7 @@ class Eth
'eth_coinbase' => [],
'eth_mining' => [],
'eth_hashrate' => [],
'eth_gasPrice' => [],
];
/**

View File

@ -136,6 +136,27 @@ class EthTest extends TestCase
});
}
/**
* testGasPrice
*
* @return void
*/
public function testGasPrice()
{
$eth = $this->web3->eth;
$eth->gasPrice(function ($err, $gasPrice) {
if ($err !== null) {
return $this->fail($err->getMessage());
}
if (isset($gasPrice->result)) {
$this->assertTrue(is_string($gasPrice->result));
} else {
$this->fail($gasPrice->error->message);
}
});
}
/**
* testUnallowedMethod
*