diff --git a/ethers/transaction.nim b/ethers/transaction.nim index 910d9aa..abd1e3f 100644 --- a/ethers/transaction.nim +++ b/ethers/transaction.nim @@ -5,6 +5,7 @@ type Transaction* = object sender*: ?Address to*: Address data*: seq[byte] + value*: UInt256 nonce*: ?UInt256 chainId*: ?UInt256 gasPrice*: ?UInt256 @@ -17,6 +18,7 @@ func `$`*(transaction: Transaction): string = if sender =? transaction.sender: result &= "from: " & $sender & ", " result &= "to: " & $transaction.to & ", " + result &= "value: " & $transaction.value & ", " result &= "data: 0x" & $transaction.data.toHex if nonce =? transaction.nonce: result &= ", nonce: 0x" & $nonce.toHex diff --git a/ethers/wallet.nim b/ethers/wallet.nim index 9b86217..32dc65a 100644 --- a/ethers/wallet.nim +++ b/ethers/wallet.nim @@ -97,6 +97,7 @@ proc signTransaction*(wallet: Wallet, tx: tx.Transaction): Future[seq[byte]] {.a s.chainId = ChainId(chainId.truncate(uint64)) s.gasLimit = GasInt(gasLimit.truncate(uint64)) + s.value = tx.value s.nonce = nonce.truncate(uint64) s.to = some EthAddress(tx.to) s.payload = tx.data