Send Tokens
Testnet Faucet
On a testnet, getting tokens is usually done via a faucet. You can get tokens for testing purposes using the Secret Network faucet.
Query Account Balance
After receiving tokens to your address, you can view your account's balance by typing:
Get your <secret-address>
using:
You can also supply your address with the following command:
Note: When querying an account balance with zero tokens, you will get the error: No account with address <secret-address> was found in the state.
This can also happen if you fund the account before your node is fully synced. These are both normal.
Send Tokens
Use the following command to send tokens from one account to another:
Note: The amount
argument accepts the format <value|coin_name>
. You may want to cap the maximum gas consumed by transactions via the --gas
flag.
If you pass --gas=auto
, the gas supply is automatically estimated before transaction execution.
Inaccurate gas estimates may occur in-between the end of the simulation and the actual execution of a transaction. An adjustment needs to be applied on top of the original estimate for the transaction to be broadcasted successfully. Adjustment are controlled via the --gas-adjustment
flag, with a default value of 1.0.
To view updated balances of origin and destination accounts use:
Flags
Height
You can also check balances at any block height using the --height
flag:
Example
Example Output
Note
You can add a note (previously called 'memo') to any transaction using the --note
flag:
Dry Run
You can simulate a transaction without actually broadcasting it by appending the --dry-run
flag:
Generate Only
Furthermore, you can build a transaction and print its JSON format to STDOUT by appending --generate-only
to the list of arguments:
Note: The --generate-only
flag prevents secretcli
from accessing the local keybase. When the flag is supplied <sender-key-alias-or-address>
must be an address.
Validate Signatures
You can validate transaction signatures by typing the following:
Broadcast Signed Transaction
You can broadcast the signed transaction to a node by providing the JSON file using:
Last updated