From 4c047fd997f050cac2bb9e19af508b1ec65e61ef Mon Sep 17 00:00:00 2001 From: Jackie Date: Tue, 12 Jul 2022 20:43:27 +0200 Subject: [PATCH] Changes to TransactionOverrides to support EIP1559 --- ethers/contract.nim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ethers/contract.nim b/ethers/contract.nim index 15673f8..100d316 100644 --- a/ethers/contract.nim +++ b/ethers/contract.nim @@ -18,7 +18,10 @@ type address: Address TransactionOverrides* = object nonce*: ?UInt256 + chainId*: ?UInt256 gasPrice*: ?UInt256 + maxFee*: ?UInt256 + maxPriorityFee*: ?UInt256 gasLimit*: ?UInt256 ContractError* = object of EthersError @@ -59,9 +62,12 @@ proc createTransaction(contract: Contract, Transaction( to: contract.address, data: data, + nonce: overrides.nonce, + chainId: overrides.chainId, gasPrice: overrides.gasPrice, + maxFee: overrides.maxFee, + maxPriorityFee: overrides.maxPriorityFee, gasLimit: overrides.gasLimit, - nonce: overrides.nonce ) proc decodeResponse(T: type, multiple: static bool, bytes: seq[byte]): T =