1. Check current sender balance :
Use BlockchainAddressData to check your balance and transaction count .
Use BlockchainAddressData to check your balance and transaction count .
In[]:=
ds=Dataset[BlockChainAddressData[(*senderaddress*),BlockchainBase{"Ethereum","Testnet"}]]
2. Create the transaction object :
Use BlockchainTransaction to build the transaction object using the preceding transaction count .
Use BlockchainTransaction to build the transaction object using the preceding transaction count .
In[]:=
ethTX=BlockchainTransaction[<|"BlockchainBase"->{"Ethereum","Testnet"},"TransactionCount"->ds["TransactionCount"],"Address"->(*destinationaddress*),"Amount"->Quantity[0.002,"Ether"],"GasPrice"->Quantity[1,"Wei"]|>]
The transaction exists locally until it is submitted to the Ethereum blockchain .
3. Sign the transaction :
Use BlockchainTransactionSign to sign the transaction with the private key .
Use BlockchainTransactionSign to sign the transaction with the private key .
In[]:=
ethTXSign=BlockchainTransactionSign[ethTX,"CAAB89C53A5C8344E7AD79C4EE99B764DDA09F7B1083779470F6C14CA919757D"]
4. Submit the transaction:
Use BlockchainTransactionSubmit to send the transaction to the blockchain.
Use BlockchainTransactionSubmit to send the transaction to the blockchain.
In[]:=
ethTXSubmit=BlockchainTransactionSubmit[ethTxSign]
After the transaction is submitted, you must wait for it to be included in a block . The block can then be mined and added to the blockchain .