eth_gasPrice.
This commit is contained in:
parent
d0a97a1472
commit
b87e3e9de8
@ -27,6 +27,7 @@ class Eth
|
||||
'eth_coinbase' => [],
|
||||
'eth_mining' => [],
|
||||
'eth_hashrate' => [],
|
||||
'eth_gasPrice' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user