Eth gasPrice output formatter.
This commit is contained in:
parent
04c5ac24f6
commit
828f554eb6
@ -13,6 +13,7 @@ namespace Web3\Methods\Eth;
|
|||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Web3\Methods\EthMethod;
|
use Web3\Methods\EthMethod;
|
||||||
|
use Web3\Formatters\BigNumberFormatter;
|
||||||
|
|
||||||
class GasPrice extends EthMethod
|
class GasPrice extends EthMethod
|
||||||
{
|
{
|
||||||
@ -35,7 +36,9 @@ class GasPrice extends EthMethod
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $outputFormatters = [];
|
protected $outputFormatters = [
|
||||||
|
BigNumberFormatter::class
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* defaultValues
|
* defaultValues
|
||||||
|
@ -126,7 +126,7 @@ class EthApiTest extends TestCase
|
|||||||
if ($err !== null) {
|
if ($err !== null) {
|
||||||
return $this->fail($err->getMessage());
|
return $this->fail($err->getMessage());
|
||||||
}
|
}
|
||||||
$this->assertTrue(is_string($gasPrice));
|
$this->assertTrue(is_numeric($gasPrice->toString()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user