diff --git a/ethers/wallet.nim b/ethers/wallet.nim index abab62b..37f7d1b 100644 --- a/ethers/wallet.nim +++ b/ethers/wallet.nim @@ -51,6 +51,8 @@ method provider*(wallet: Wallet): Provider = else: raise newException(WalletError, "Wallet has no provider") +#TODO add other methods defined in signer. Currently you have to specify nonce, gaslimit, gasPrice. + method populateTransaction*(wallet: Wallet, tx: transaction.Transaction): Future[transaction.Transaction] {.async.} = var populated = tx if tx.nonce.isNone: @@ -130,4 +132,9 @@ proc signTransaction*(wallet: Wallet, tx: transaction.Transaction): Future[strin s.payload = tx.data signTransaction(s, wallet.privateKey) - return "0x" & rlp.encode(s).toHex \ No newline at end of file + return "0x" & rlp.encode(s).toHex + + +#TODO add functionality to sign messages + +#TODO add functionality to create wallets from Mnemoniks or Keystores \ No newline at end of file diff --git a/testmodule/testWallet.nim b/testmodule/testWallet.nim index a9a0439..7165133 100644 --- a/testmodule/testWallet.nim +++ b/testmodule/testWallet.nim @@ -9,6 +9,10 @@ proc transfer*(erc20: Erc20, recipient: Address, amount: UInt256) {.contract.} suite "Wallet": + #TODO add more tests. I am not sure if I am testing everything currently + #TODO take close look at current signing tests. I am not 100% sure they are correct and work + #TODO add setup/teardown if required. Currently doing all nonces manually + test "Can create Wallet with private key": discard Wallet.new(pk1)