diff --git a/ethers/signer.nim b/ethers/signer.nim index bf6ea7b..3405056 100644 --- a/ethers/signer.nim +++ b/ethers/signer.nim @@ -58,7 +58,7 @@ method populateTransaction*(signer: Signer, populated.nonce = some(await signer.getTransactionCount(BlockTag.pending)) if transaction.chainId.isNone: populated.chainId = some(await signer.getChainId()) - if transaction.gasPrice.isNone: + if transaction.gasPrice.isNone and (transaction.maxFee.isNone or transaction.maxPriorityFee.isNone): populated.gasPrice = some(await signer.getGasPrice()) if transaction.gasLimit.isNone: populated.gasLimit = some(await signer.estimateGas(populated)) diff --git a/ethers/transaction.nim b/ethers/transaction.nim index c80a54b..910d9aa 100644 --- a/ethers/transaction.nim +++ b/ethers/transaction.nim @@ -8,6 +8,8 @@ type Transaction* = object nonce*: ?UInt256 chainId*: ?UInt256 gasPrice*: ?UInt256 + maxFee*: ?UInt256 + maxPriorityFee*: ?UInt256 gasLimit*: ?UInt256 func `$`*(transaction: Transaction): string =