Bank
The bank module handles native token transfers and balance queries.
Safrochain's base denom is usaf (1 SAF = 10^6 usaf). Display denom is
SAF.
Query
# all balances of an address
safrochaind query bank balances addr_safro1abc...
# balance of one denom
safrochaind query bank balance addr_safro1abc... usaf
# total supply across all denoms (returns ICS-20 IBC denoms too)
safrochaind query bank total
# total supply of a single denom
safrochaind query bank total --denom usaf
# denom metadata (symbol, decimals, description)
safrochaind query bank denom-metadata
safrochaind query bank denom-metadata-by-query-string usaf
# list all denoms ever held by anyone (paginated)
safrochaind query bank denom-owners usaf --limit 100
# query ICS-20 IBC denom info: input the hash
safrochaind query ibc-transfer denom-trace 27A6394C3F9...
Send tokens (tx bank send)
safrochaind tx bank send <from-key-or-address> <to-address> <amount><denom> \
--chain-id safrochain-1 \
--node https://rpc.safrochain.network:443 \
--keyring-backend file \
--gas auto --gas-adjustment 1.3 \
--gas-prices 0.05usaf \
-y
Example: send 1.5 SAF (= 1 500 000 usaf):
safrochaind tx bank send alice addr_safro1bob... 1500000usaf \
--chain-id safrochain-1 -y
Multi-send
Send to multiple recipients in a single tx. Useful for treasury payouts:
safrochaind tx bank multi-send sender \
addr_safro1aaa... addr_safro1bbb... addr_safro1ccc... \
3000000usaf \
--chain-id safrochain-1 -y
The amount (3000000usaf here) is sent to each recipient, deducted from
the sender.
Useful patterns
# pretty-print my balance in SAF (not usaf)
ME=$(safrochaind keys show alice -a)
amt=$(safrochaind query bank balance "$ME" usaf -o json | jq -r '.balance.amount')
echo "$ME : $((amt/1000000)).$((amt%1000000)) SAF"
# wait for a tx to be included
TX=$(safrochaind tx bank send … -o json -y | jq -r '.txhash')
while ! safrochaind query tx "$TX" >/dev/null 2>&1; do sleep 1; done
safrochaind query tx "$TX" -o json | jq '.code, .raw_log'
# fee currencies
safrochaind query bank denom-metadata -o json \
| jq '.metadatas[] | {denom: .base, symbol: .symbol, decimals: .denom_units[-1].exponent}'
Fees and gas prices
The chain enforces a minimum gas price of 0.05usaf via the
globalfee module (plus each validator’s
minimum-gas-prices in app.toml). Query the live floor with
safrochaind query globalfee minimum-gas-prices.
Recommended: let the CLI price gas from the simulation:
--gas auto --gas-adjustment 1.3 --gas-prices 0.05usaf
For a known-cheap tx (bank send), you can fix gas and pay a fee that meets
the floor (200 000 × 0.05 usaf = 10 000 usaf ≈ 0.01 SAF at minimum
price; round up slightly if desired):
--gas 200000 --fees 10000usaf
See Tokenomics for the full economic model.