Skip to main content

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 the seid 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:
Refer to the RPC endpoints page for the list of available RPC endpoints.
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.
Parameters:
  • [optional priv key hex] - Optional private key in hex format. If not provided, uses the key from keyring.
Example:
Output :

Token Transfer Commands

Send Native Tokens

Sends native tokens (usei) to the target EVM address.
Parameters:
  • [to EVM address] - Destination EVM address (0x format)
  • [amount in wei] - Amount to send in wei (smallest unit)
Default Flags:
  • --gas-fee-cap=1000000000000 (1000 Gwei)
  • --gas-limit=21000
Example:
Output :

Send ERC20 Tokens

Sends ERC20 tokens from a specific contract to a recipient.
Parameters:
  • [contract addr] - ERC20 contract address
  • [recipient] - Recipient EVM address
  • [amount] - Amount in smallest unit of the token
Default Flags:
  • --gas-fee-cap=1000000000000 (1000 Gwei)
  • --gas-limit=7000000
Example:
Output :

Contract Deployment Commands

Deploy Contract

Deploys an EVM contract from a binary file.
Parameters:
  • [path to binary] - Path to the contract binary file
Default Flags:
  • --gas-fee-cap=1000000000000 (1000 Gwei)
  • --gas-limit=5000000
Example:
Output :

Contract Interaction Commands

Call Contract

Calls an EVM contract with a specific payload. You can generate payload by taking a look at docs here.
Parameters:
  • [addr] - Contract address
  • [payload hex] - Function call data in hex format
Default Flags:
  • --gas-fee-cap=1000000000000 (1000 Gwei)
  • --gas-limit=7000000
  • --value=0 - SEI value to send with the call
Example:
Output :

Call Precompile

Calls a method on a precompiled contract. Precompiles provide EVM access to Cosmos-SDK functionality.
Parameters:
  • [precompile name] - Name of the precompiled contract
  • [method] - Method name to call
  • [args...] - Method arguments
Default Flags:
  • --gas-fee-cap=1000000000000 (1000 Gwei)
  • --gas-limit=7000000
  • --value="" - SEI value to send (required for payable methods)
Examples: Delegate to validator (payable - uses —value):
Available Precompiles:
  • distribution - Staking rewards management
  • json - JSON parsing utilities
  • p256 - P256 cryptographic operations
  • staking - Validator delegation and staking
For detailed information about each precompile’s methods, parameters, and usage patterns, refer to the EVM Precompiles documentation.
Output :

Advanced Usage

Custom Gas Settings

You can customize gas settings for any transaction:

Nonce Management

Override automatic nonce calculation:

Error Handling

Common Issues:
  • Insufficient balance for transaction + gas
  • Incorrect address formats (use 0x prefix for EVM addresses)
  • Gas limit too low for complex operations
  • Nonce conflicts in rapid successive transactions

Best Practices

  1. Gas Estimation: Start with default gas limits and adjust based on transaction complexity
  2. Address Validation: Always verify addresses before sending transactions
  3. Key Management: Use secure key storage and never expose private keys
  4. Network Verification: Confirm you’re connected to the correct network
  5. 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
  • 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
For more detailed information about specific commands, use the help flag: