Skip to main content
The x/vm module from cosmos/evm provides a fully compatible Ethereum Virtual Machine execution environment as a Cosmos SDK module.
For conceptual understanding of EVM architecture and design, see EVM Architecture.

Parameters

The module parameters control EVM behavior and access policies (source):

Parameter Details

Configuration Profiles

Chain Configuration

Hard fork activation schedule (source):

Static Precompiles

Precompiled contracts at fixed addresses (source):

Activation

Messages

MsgEthereumTx

Primary message for EVM transactions (source):
Validation Requirements:
  • Valid signature matching from address
  • Sufficient balance for gas + value
  • Correct nonce (account sequence)
  • Gas limit ≥ intrinsic gas

MsgUpdateParams

Governance message for parameter updates:

State

Persistent State

Transient State

Events

Transaction Events

Block Events

Queries

gRPC

CLI

JSON-RPC

Supported Methods

Hooks

Post-transaction processing interface (source):

Registration

Use Cases

  • Process EVM events in Cosmos modules
  • Bridge EVM logs to Cosmos events
  • Trigger native module actions from contracts
  • Custom indexing and monitoring

Gas Configuration

Gas Consumption Mapping

Gas Refunds

Maximum refund: 50% of gas used (after London)

Best Practices

Chain Integration

  1. Precompile Selection
    • Only enable necessary precompiles
    • Test gas costs in development
    • Monitor usage patterns
  2. Access Control
    • Start restrictive, open gradually
    • Use governance for changes
    • Monitor blacklist/whitelist events
  3. Fork Planning

Contract Development

  1. Gas Optimization
  2. Precompile Usage

dApp Integration

  1. Provider Setup
  2. Error Handling

Troubleshooting

Common Issues

Debug Commands

References

Source Code