You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example response from Eth: Client RPC error response [uri] / [method] eth_estimateGas [error code] -32602 [error message] invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go struct field CallArgs.value of type *hexutil.Big
Method EthQ::hexValUnpadded() must return a string without leading zeros. For example, 0.2 ether (200000000000000000 wei) should be converted to 0x2c68af0bb140000 instead of 0x02c68af0bb140000.
Suggesting changes:
--- src/DataType/EthQ.php
+++ src/DataType/EthQ.php
@@ -282,7 +282,7 @@ class EthQ extends EthD
*/
public function hexValUnpadded()
{
- return '0x' . $this->value->toHex($this->value->is_negative);
+ return '0x' . ltrim($this->value->toHex($this->value->is_negative), '0');
}
The text was updated successfully, but these errors were encountered:
Example response from Eth: Client RPC error response [uri] / [method] eth_estimateGas [error code] -32602 [error message] invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go struct field CallArgs.value of type *hexutil.Big
Method EthQ::hexValUnpadded() must return a string without leading zeros. For example, 0.2 ether (200000000000000000 wei) should be converted to 0x2c68af0bb140000 instead of 0x02c68af0bb140000.
Suggesting changes:
The text was updated successfully, but these errors were encountered: