Skip to main content

Simple Transaction

Once you have created your account and requested funds from the faucet you are ready to send your first transaction.

Online Faucet

You can request test funds from the Shimmer Testnet Faucet.

Example Code

The following example will:

  1. Create a wallet.
  2. Get Alice's account which was created in the first guide.
  3. Send 1 SMR to an address using the Account.send_amount(addresses_with_amount, options) function. Make sure to update the code sample to send to the address of your choice.
  1. Instantiate a Wallet, get Alice's Account which was created in the first guide and sync it.
  2. Sync the account with the node to get the latest transactions by calling the Account.sync() function.
  3. Send 1 SMR to an address using the Account.send() function. Make sure to update the code sample to send to the address of your choice.
sdk/examples/how_tos/simple_transaction/simple_transaction.rs
loading...

Expected Output

Block sent: https://explorer.shimmer.network/testnet/block/0x47ec97658791954b9bcd5e47e6791396e3f340b82e81fe2cc7218f52ebec3804

Full Example Code

sdk/examples/how_tos/simple_transaction/simple_transaction.rs
loading...