Fix encoding of gas price in transaction

Hardhat network doesn't support gas price
that is not a QUANTITY.
This commit is contained in:
Mark Spanbroek 2021-12-02 14:38:43 +01:00 committed by markspanbroek
parent a381a21c64
commit c657134018
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ proc `%`*(x: EthSend): JsonNode =
if x.gas.isSome: if x.gas.isSome:
result["gas"] = %x.gas.unsafeGet result["gas"] = %x.gas.unsafeGet
if x.gasPrice.isSome: if x.gasPrice.isSome:
result["gasPrice"] = %x.gasPrice.unsafeGet result["gasPrice"] = %Quantity(x.gasPrice.unsafeGet)
if x.value.isSome: if x.value.isSome:
result["value"] = %x.value.unsafeGet result["value"] = %x.value.unsafeGet
if x.data.len > 0: if x.data.len > 0: