Node RequirementsTo use the To use an external RPC, update the
query and tx commands, your evmd node must either:- Be fully synced with the network you’re interacting with, OR
- Be configured to use an external RPC endpoint in
~/.evmd/config/client.toml
# The network chain ID
chain-id = "myapp-1"
# The keyring's backend
keyring-backend = "os"
# CLI output format
output = "text"
# <host>:<port> to CometBFT RPC interface for this chain
node = "tcp://localhost:26657"
# Transaction broadcasting mode (sync|async)
broadcast-mode = "sync"
node field to point to a public or private RPC endpoint.Global Flags
These flags are available for all commands:| Flag | Description | Default |
|---|---|---|
-b, --broadcast-mode | Transaction broadcasting mode (sync|async) | sync |
--chain-id | Specify Chain ID for sending Tx | |
--fees | Fees to pay along with transaction (e.g., 10atest) | |
--from | Name or address of private key with which to sign | |
--gas-adjustment | Adjustment factor to multiply against the estimate returned by tx simulation | 1 |
--gas-prices | Gas prices to determine the transaction fee (e.g., 10atest) | |
--home | Directory for config and data | ~/.evmd |
--keyring-backend | Select keyring’s backend | os |
--log_format | The logging format (json|plain) | plain |
--log_level | The logging level | info |
--log_no_color | Disable colored logs | |
--node | <host>:<port> to CometBFT RPC interface | tcp://localhost:26657 |
--trace | Print out full stack trace on errors |
Commands
- Node Operations
- Key Management
- EVM Queries
- ERC20 Queries
- Feemarket Queries
- Precisebank Queries
- Cosmos SDK Queries
- EVM Transactions
- ERC20 Transactions
- Cosmos SDK Transactions
- Advanced Commands
Starting the Node
evmd start
evmd start \
--json-rpc.enable \
--json-rpc.api eth,net,web3,txpool
evmd start \
--json-rpc.enable \
--json-rpc.address 0.0.0.0:8545 \
--json-rpc.ws-address 0.0.0.0:8546 \
--json-rpc.api eth,net,web3,txpool,debug \
--json-rpc.enable-indexer \
--json-rpc.gas-cap 50000000
Node Initialization
evmd init my-node --chain-id cosmos-evm-1
evmd init my-validator \
--chain-id cosmos-evm-1 \
--default-denom atest \
--initial-height 1
evmd init my-node \
--chain-id cosmos-evm-1 \
--overwrite
Node Status
evmd status
Transaction Indexing
evmd index-eth-tx forward
evmd index-eth-tx backward
Account Management
evmd keys add my-account
evmd keys add my-account --recover
evmd keys add my-eth-account \
--algo eth_secp256k1 \
--coin-type 60
Key Operations
evmd keys list
evmd keys show my-account
evmd keys show my-account --address
evmd keys export my-account
evmd keys import new-account keyfile.json
Ethereum Key Import/Export
evmd keys unsafe-export-eth-key my-eth-account
evmd keys unsafe-import-eth-key imported-account 0x...
Account & Balance Queries
evmd query evm account 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81
evmd query evm balance-bank 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 atest
evmd query evm balance-erc20 \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Contract Queries
evmd query evm code 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
evmd query evm storage \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
0x0000000000000000000000000000000000000000000000000000000000000001
Configuration & Parameters
evmd query evm config
evmd query evm params
Address Conversion
evmd query evm 0x-to-bech32 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81
evmd query evm bech32-to-0x cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
Token Pair Queries
evmd query erc20 token-pairs
evmd query erc20 token-pair 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
evmd query erc20 token-pair usdc
evmd query erc20 params
Fee Market Information
evmd query feemarket base-fee
evmd query feemarket block-gas
evmd query feemarket params
Precision Banking
evmd query precisebank remainder
evmd query precisebank fractional-balance cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
Bank Module
evmd query bank balances cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
evmd query bank balance cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s atest
evmd query bank total
Staking Module
evmd query staking validators
evmd query staking delegations cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
evmd query staking unbonding-delegations cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
Distribution Module
evmd query distribution rewards \
cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s \
cosmosvaloper1xyz...
evmd query distribution commission cosmosvaloper1xyz...
Governance Module
evmd query gov proposals
evmd query gov proposal 1
evmd query gov votes 1
EVM Transfers
evmd tx evm send \
my-account \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
1000000atest \
--gas-prices 10atest
evmd tx evm raw \
0xf86c0485... \
--from my-account
Token Conversions
evmd tx erc20 convert-coin \
1000000atest \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
--from my-account \
--gas-prices 10atest
evmd tx erc20 convert-erc20 \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
1000000 \
cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s \
--from my-account
Governance Operations
evmd tx erc20 register-erc20 \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
--from validator
evmd tx erc20 toggle-conversion \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
--from validator
Bank Transactions
evmd tx bank send \
my-account \
cosmos1abc... \
1000000atest \
--gas-prices 10atest
evmd tx bank multi-send \
my-account \
cosmos1abc... 500000atest \
cosmos1xyz... 500000atest \
--gas-prices 10atest
Staking Transactions
evmd tx staking delegate \
cosmosvaloper1abc... \
1000000atest \
--from my-account \
--gas-prices 10atest
evmd tx staking unbond \
cosmosvaloper1abc... \
1000000atest \
--from my-account
evmd tx staking redelegate \
cosmosvaloper1abc... \
cosmosvaloper1xyz... \
1000000atest \
--from my-account
Governance Transactions
evmd tx gov submit-proposal \
--title="Upgrade Proposal" \
--description="Upgrade to v2.0.0" \
--type="Text" \
--deposit="1000000atest" \
--from my-account
evmd tx gov vote 1 yes \
--from my-account \
--gas-prices 10atest
evmd tx gov deposit 1 1000000atest \
--from my-account
Genesis Operations
evmd genesis add-genesis-account \
cosmos1abc... \
1000000000atest
evmd genesis gentx \
my-validator \
1000000atest \
--chain-id cosmos-evm-1
evmd genesis collect-gentxs
CometBFT Commands
evmd comet show-node-id
evmd comet show-validator
evmd comet unsafe-reset-all
Debug Utilities
evmd debug addr cosmos1abc...
evmd debug raw-bytes 0xdeadbeef
evmd debug pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"...."}'
Examples
Complete Workflows
- Account Setup
- Query Examples
- Transactions
# Create new Cosmos account
evmd keys add my-account
# Save mnemonic safely!
# Address will be shown as cosmos1...
# Import existing Ethereum private key
evmd keys unsafe-import-eth-key \
eth-account \
0x1234567890abcdef...
# Show the imported account
evmd keys show eth-account
# List all accounts
evmd keys list
# Export account (encrypted)
evmd keys export my-account > account.backup
# Show account address only
evmd keys show my-account --address
# Query Cosmos account
evmd query bank balances \
cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s
# Query EVM account
evmd query evm account \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81
# Native token balance
evmd query bank balance \
cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s \
atest
# ERC20 token balance
evmd query evm balance-erc20 \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
# Current base fee
evmd query feemarket base-fee
# Node sync status
evmd status | jq .sync_info
# Latest block height
evmd status | jq .sync_info.latest_block_height
# Send tokens via bank module
evmd tx bank send \
my-account \
cosmos1abc... \
1000000atest \
--gas-prices 10atest \
--gas-adjustment 1.5
# Send via EVM module
evmd tx evm send \
my-account \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
1000000atest \
--gas-prices 10atest
# Convert native to ERC20
evmd tx erc20 convert-coin \
1000000atest \
0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb81 \
--from my-account \
--gas-prices 10atest
# Convert ERC20 to native
evmd tx erc20 convert-erc20 \
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
1000000 \
cosmos1wsk4trnzfszs55jlt5ugz76lwl2hp04slh5s5s \
--from my-account
Configuration
- Configuration directory:
~/.evmd/ - Key storage: Managed by the keyring backend (os, file, test)
- Node configuration:
~/.evmd/config/config.toml - App configuration:
~/.evmd/config/app.toml
If you use the
--home flag upon initializing the light client, the root/config directory will be generated there