Documentation Index
Fetch the complete documentation index at: https://seilabs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
EVM transactions on Sei allow you to interact with smart contracts, transfer tokens, deploy contracts, and manage various blockchain operations through the command line interface. This guide covers all available transaction types using theseid CLI, from basic token transfers to complex contract interactions and precompile calls.
Prerequisites
Sending transactions via CLI requires you to have keys configured in your local keyring. You can then specify the key you want to use by appending--from=[key name] to your command.
If you don’t already have keys configured, you’ll need to either generate a new key or import an existing one into your local keyring. Refer to this guide on how to create a key for more details.
Network Configuration
If the machine you run these commands from are not a node of the network, you’d need to append the following to your commands:Most commands support
--evm-rpc flag to specify custom RPC endpoints. The default is http://localhost:8545.Common Transaction Flags
All transaction commands support these common flags:--from=<sender>- Specifies the key name to use for signing--gas-fee-cap=<cap>- Gas fee cap for the transaction (default varies by command)--gas-limit=<limit>- Gas limit for the transaction (default varies by command)--evm-rpc=<url>- EVM RPC endpoint URL (default:http://localhost:8545)--nonce=<nonce>- Nonce override for the transaction (-1 means auto-calculate)
Address Management Commands
Associate Address
Associates the Sei address and EVM address on-chain for the sending key. This is required for cross-layer interactions.[optional priv key hex]- Optional private key in hex format. If not provided, uses the key from keyring.
Token Transfer Commands
Send Native Tokens
Sends native tokens (usei) to the target EVM address.[to EVM address]- Destination EVM address (0x format)[amount in wei]- Amount to send in wei (smallest unit)
--gas-fee-cap=1000000000000(1000 Gwei)--gas-limit=21000
Send ERC20 Tokens
Sends ERC20 tokens from a specific contract to a recipient.[contract addr]- ERC20 contract address[recipient]- Recipient EVM address[amount]- Amount in smallest unit of the token
--gas-fee-cap=1000000000000(1000 Gwei)--gas-limit=7000000
Contract Deployment Commands
Deploy Contract
Deploys an EVM contract from a binary file.[path to binary]- Path to the contract binary file
--gas-fee-cap=1000000000000(1000 Gwei)--gas-limit=5000000
Contract Interaction Commands
Call Contract
Calls an EVM contract with a specific payload. You can generate payload by taking a look at docs here.[addr]- Contract address[payload hex]- Function call data in hex format
--gas-fee-cap=1000000000000(1000 Gwei)--gas-limit=7000000--value=0- ETH value to send with the call
Call Precompile
Calls a method on a precompiled contract. Precompiles provide EVM access to Cosmos-SDK functionality.[precompile name]- Name of the precompiled contract[method]- Method name to call[args...]- Method arguments
--gas-fee-cap=1000000000000(1000 Gwei)--gas-limit=7000000--value=""- ETH value to send (required for payable methods)
distribution- Staking rewards managementjson- JSON parsing utilitiesp256- P256 cryptographic operationsstaking- Validator delegation and staking
For detailed information about each precompile’s methods, parameters, and usage patterns, refer to the EVM Precompiles documentation.
Advanced Usage
Custom Gas Settings
You can customize gas settings for any transaction:Nonce Management
Override automatic nonce calculation:Error Handling
Best Practices
- Gas Estimation: Start with default gas limits and adjust based on transaction complexity
- Address Validation: Always verify addresses before sending transactions
- Key Management: Use secure key storage and never expose private keys
- Network Verification: Confirm you’re connected to the correct network
- Transaction Monitoring: Save transaction hashes for tracking purposes
Transaction Requirements
- Key Configuration: Local keyring must contain the signing key
- Sufficient Balance: Account must have enough tokens for transaction amount + gas fees
- Address Formats: Use proper formats (0x… for EVM, seivaloper… for validators)
- Network Access: Ensure connectivity to the specified RPC endpoint
- Gas Limits: Set appropriate gas limits for transaction complexity