Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b7cc273
Update docs.json
evanorti Feb 17, 2026
ca93ea3
Update methods.mdx
evanorti Feb 17, 2026
9451122
Update overview.mdx
evanorti Feb 17, 2026
e7fa1c6
Consolidate EVM compatibility docs
evanorti Feb 17, 2026
4fbfd82
Update evm-compatibility.mdx
evanorti Feb 17, 2026
44984df
Update evm-compatibility.mdx
evanorti Feb 17, 2026
9c5a7f0
Update mempool.mdx
evanorti Feb 18, 2026
43a2380
Update mempool-integration.mdx
evanorti Feb 18, 2026
dae7ffb
Update predeployed-contracts.mdx
evanorti Feb 18, 2026
e12ec71
Update quick-start.mdx
evanorti Feb 18, 2026
f8ed2f9
Update docs.json
evanorti Feb 18, 2026
d37c46e
Delete predeployed-contracts.mdx
evanorti Feb 18, 2026
392b649
Update predeployed-contracts.mdx
evanorti Feb 18, 2026
5a5ad27
Update overview.mdx
evanorti Feb 18, 2026
cf1bf78
remove unneeded pages
evanorti Feb 18, 2026
8a36bc3
update tools page
evanorti Feb 19, 2026
f9efb45
Update evm-compatibility.mdx
evanorti Feb 19, 2026
e84c194
Update overview.mdx
evanorti Feb 19, 2026
69e950a
Update introduction.mdx
evanorti Feb 19, 2026
fb24e24
Create precompiles.mdx
evanorti Feb 19, 2026
dd448c0
Update quick-start.mdx
evanorti Feb 19, 2026
4ee9439
Update docs.json
evanorti Feb 19, 2026
fdca002
Update evm-compatibility.mdx
evanorti Feb 19, 2026
596d408
Update quick-start.mdx
evanorti Feb 19, 2026
c46edc4
Update docs.json
evanorti Feb 19, 2026
4f811e8
Update erc20.mdx
evanorti Feb 19, 2026
b6aeea6
Update evm-compatibility.mdx
evanorti Feb 19, 2026
5467cdf
Update faq.mdx
evanorti Feb 19, 2026
e07b3ad
Update overview.mdx
evanorti Feb 19, 2026
9f746a5
Delete introduction.mdx
evanorti Feb 19, 2026
eda99ba
Delete index.mdx
evanorti Feb 19, 2026
422c416
Update precompiles.mdx
evanorti Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 131 additions & 82 deletions docs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion evm/next/api-reference/ethereum-json-rpc/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Block Number can be entered as a Hex string, `"earliest"`, `"latest"` or `"pendi
* `personal_unlockAccount` - Always returns false
* `debug_traceTransaction` - Has issues with block height

For more details on how Cosmos EVM differs from standard Ethereum implementations, see [Differences from Standard EVMs](/evm/next/documentation/evm-compatibility/overview).
For more details on how Cosmos EVM differs from standard Ethereum implementations, see [Differences from Standard EVMs](/evm/next/documentation/evm-compatibility).
</Info>

## Examples
Expand Down
17 changes: 16 additions & 1 deletion evm/next/documentation/concepts/mempool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Transactions submitted via JSON-RPC or P2P are received by CometBFT and validate

**Nonce Gap Detection**: Transactions with future nonces are intercepted and queued locally:
```go
if errors.Is(err, ErrNonceGap) {
if errors.Is(err, ErrNonceGap) || errors.Is(err, ErrNonceLow) {
// Queue locally, don't broadcast
err := mempool.InsertInvalidNonce(request.Tx)
}
Expand Down Expand Up @@ -68,6 +68,21 @@ Two-tiered approach:

**ExperimentalEVMMempool**: Unified structure managing both EVM and Cosmos transaction pools with single interface for insertion, selection, and removal.

### Transaction Type Routing

**Ethereum transactions (`MsgEthereumTx`)**: Routed to the EVM TxPool, which handles nonce gaps, promotion, and eviction. Executable transactions are then broadcast via CometBFT P2P.

**Cosmos transactions (bank, staking, gov, etc.)**: Routed directly to a `PriorityNonceMempool` using fee-based prioritization. Priority is calculated as `fee_amount / gas_limit` in the EVM coin denom.

### Unified Block Selection

During block building, EVM and Cosmos transactions compete for inclusion based on their effective tip:

- **EVM**: `min(gas_tip_cap, gas_fee_cap - base_fee)`
- **Cosmos**: `fee_amount / gas_limit`

Higher effective tip is selected first regardless of transaction type.

### Transaction States

**Queued (Local Storage)**: Transactions with nonce > expected nonce
Expand Down
115 changes: 0 additions & 115 deletions evm/next/documentation/concepts/predeployed-contracts.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion evm/next/documentation/cosmos-sdk/modules/erc20.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ evmd tx erc20 register-coin <denom> --from mykey
## Related Documentation

- [Building Your Chain Guide](/evm/next/documentation/getting-started/build-a-chain/overview) - Main configuration walkthrough
- [VM Module](evm/next/documentation/cosmos-sdk/modules/vm) - EVM configuration
- [VM Module](/evm/next/documentation/cosmos-sdk/modules/vm) - EVM configuration
- [IBC Module](/evm/next/documentation/cosmos-sdk/modules/ibc) - IBC token handling

---
Expand Down
177 changes: 177 additions & 0 deletions evm/next/documentation/evm-compatibility.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
title: "EVM Compatibility"
keywords: ['differences', 'ethereum', 'evm', 'cosmos', 'CometBFT', 'consensus', 'finality', 'json-rpc', 'compatibility', 'precompiles', 'ibc', 'mev', 'gas', 'basefee', 'reorganization', 'bft', 'validator', 'staking']
---

Cosmos EVM provides full Ethereum compatibility for Cosmos SDK chains. Existing contracts, tools, and workflows run without modification: deploy Solidity contracts, connect MetaMask, and use the same libraries and frameworks you already know.

## Solidity Smart Contracts

The Cosmos EVM smart contract development flow is identical to the flow on Ethereum. Contracts that work on Ethereum work on Cosmos EVM without code changes. The same tools, the same Solidity, the same patterns.

### Development

Write Solidity using [Hardhat](https://hardhat.org), [Foundry](https://book.getfoundry.sh), or [Remix](https://remix.ethereum.org) with no custom configuration needed. Point your tooling at your chain's JSON-RPC endpoint and chain ID and you're set. See the [tooling overview](/evm/next/documentation/getting-started/tooling-and-resources) for a full list of supported tools, and the [quick-start guide](/evm/next/documentation/getting-started/build-a-chain/quick-start#deploy-a-solidity-contract-with-forge) for a step-by-step contract deployment walkthrough.

### Deployment

[Deploy using standard Ethereum tools](/evm/next/documentation/getting-started/build-a-chain/quick-start#deploy-a-solidity-contract-with-forge) by pointing them at your chain's RPC endpoint. Deployment transactions go through the JSON-RPC or Cosmos gRPC interface and are processed by the EVM module. Once deployed, contract bytecode is stored in chain state and callable at its Ethereum address like any other chain.

### Upgrading

Cosmos EVM supports all standard EVM upgrade patterns:

- **Proxy patterns (EIP-1967, Transparent Proxy, UUPS)**: Delegate calls to an implementation contract. Upgrading means swapping the implementation address in the proxy without touching the proxy's storage or address.
- **Diamond pattern (EIP-2535)**: Modular contracts split into "facets" that can be added, replaced, or removed independently. The diamond routes calls to the appropriate facet, enabling granular upgrades without redeploying the whole contract.

Any upgrade architecture that works on Ethereum works on Cosmos EVM.

## Supported Standards

**Cosmos EVM supports all standard EVM opcodes, EIPs, and ERC token interfaces** up to the Prague hard fork.

### EIPs

The following are notable supported EIPs; the full list is [much longer](https://eips.ethereum.org/all).

| EIP | Name | Purpose |
|-----|------|---------|
| [EIP-155](https://eips.ethereum.org/EIPS/eip-155) | Replay Protection | Chain ID in signatures prevents cross-chain replay attacks |
| [EIP-712](https://eips.ethereum.org/EIPS/eip-712) | Typed Structured Data Signing | Sign structured data, human-readable messages, and custom Cosmos transactions |
| [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) | Dynamic Fees | Base fee + priority fee model; base fee is distributed to validators rather than burned |
| [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) | Diamond Standard | Proxy pattern for upgradeable contracts with multiple implementation facets |
| [EIP-2935](https://eips.ethereum.org/EIPS/eip-2935) | Historical Block Hashes | `BLOCKHASH` opcode provides access to up to 8192 previous block hashes (configurable) |
| [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) | Account Abstraction | Smart contract wallets can pay fees, batch transactions, and use custom auth schemes |
| [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) | Set Code for EOA | Temporarily assigns contract code to an EOA for sponsored transactions and complex auth |

### ERCs

Any ERC standard that runs on the EVM is compatible with Cosmos EVM. The most commonly used are:

- **[ERC-20](https://eips.ethereum.org/EIPS/eip-20) — Fungible Tokens:** Standard interface for currency representations with transfer, approval, and allowance mechanisms.
- **[ERC-721](https://eips.ethereum.org/EIPS/eip-721) — Non-Fungible Tokens:** Standard for unique asset identifiers, digital certificates, or proof of ownership records.
- **[ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) — Multi-Token Standard:** Supports both fungible and non-fungible assets in a single contract, enabling batch operations and reduced deployment costs for complex asset systems.

### Opcodes

Cosmos EVM supports **all EVM opcodes up to the Prague hard fork**. For the full reference, see [evm.codes](https://www.evm.codes/).

The following are **not supported**:

- **[EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) — Blob-Carrying Transactions:** Blob data and L2-specific functionality.
- **[EIP-4399](https://eips.ethereum.org/EIPS/eip-4399) — PREVRANDAO:** The replacement of the `DIFFICULTY` opcode with `PREVRANDAO`.

## Tooling

Any tool that connects to a standard Ethereum JSON-RPC endpoint works with Cosmos EVM without custom configuration.

| Tool | Category |
|------|----------|
| [Hardhat](https://hardhat.org), [Foundry](https://book.getfoundry.sh), [Remix](https://remix.ethereum.org) | Contract development |
| [OpenZeppelin Contracts](https://docs.openzeppelin.com/contracts) | Smart contract libraries |
| [Forge](https://book.getfoundry.sh/forge/), [Hardhat](https://hardhat.org) | Testing & fuzzing |
| [MetaMask](https://metamask.io), [WalletConnect](https://walletconnect.com), [Rabby](https://rabby.io) | Wallets |
| [ethers.js](https://docs.ethers.org/v6/), [viem](https://viem.sh), [web3.js](https://web3js.org), [wagmi](https://wagmi.sh) | JavaScript libraries |
| [Blockscout](https://github.com/blockscout/blockscout) | Block explorer |

### JSON-RPC

The JSON-RPC interface implements the full Ethereum spec. Point any standard tool at your chain's RPC endpoint and it works.

<Card title="Ethereum RPC Compatibility" icon="code" href="/evm/next/api-reference/ethereum-json-rpc/methods">
Most standard Ethereum JSON-RPC methods are supported, with some returning stub values for compatibility. View the complete reference.
</Card>

All standard transaction, query, and subscription methods work as expected — `eth_sendRawTransaction`, `eth_call`, `eth_estimateGas`, event logs and filters, WebSocket subscriptions, and the debug namespace for tracing.

A few things to know:
- `eth_gasPrice` returns 0 — use EIP-1559 fee fields instead
- Mining-related methods don't apply (consensus is handled by CometBFT)
- `txpool` methods require the experimental mempool to be enabled

## Beyond Ethereum

Cosmos EVM adds capabilities on top of full Ethereum compatibility. None of these change how existing contracts or tooling behave.

| Area | Ethereum | Cosmos EVM |
|------|----------|------------|
| **Block time** | ~12 seconds | 1–2 seconds |
| **Finality** | 12+ blocks (~3 min) | 1 block (~2 seconds) |
| **Reorganizations** | Possible | Not possible |
| **Cross-chain** | Bridge protocols | Native IBC |
| **Fee distribution** | Base fee burned | Distributed to validators |

### Finality

Cosmos EVM transactions are final after one block (~2 seconds) via CometBFT consensus—no waiting for confirmations, no reorganizations possible. The validator set requires 2/3+ stake agreement for any block to be committed.

### Gas & fees

Cosmos EVM uses EIP-1559 dynamic fees. Unlike Ethereum, the base fee is distributed to validators and delegators rather than burned. The base fee can also be disabled entirely via the `NoBaseFee` parameter, and a chain-wide minimum gas price floor is configurable.

### Address system

Every account has two representations that reference the same underlying key:

```
Ethereum: 0x742d35cc6644c068532fddb11B4C36A58D6D3eAb
Cosmos: cosmos1wskntvnryr5qxpe4tv5k64rhc6kx6ma4dxjmav
```

### Chain IDs

Cosmos EVM uses two independent chain IDs: a Cosmos Chain ID (string, e.g. `cosmosevm-1`) and an EVM Chain ID (integer, e.g. `9000`). These are configured separately, unlike legacy Ethermint where the format was coupled.

### Precompiled Contracts

<CardGroup cols={2}>
<Card title="Precompile Overview" icon="box" href="/evm/next/documentation/smart-contracts/precompiles/overview">
Full list of built-in Cosmos precompiles and their addresses.
</Card>
<Card title="Add a Custom Precompile" icon="wrench" href="/evm/next/documentation/getting-started/build-a-chain/additional-configuration/precompiles">
Enable built-in precompiles or add your own to your chain.
</Card>
</CardGroup>

All standard Ethereum cryptographic precompiles (ecrecover, sha256, etc.) are also supported; visit [evm.codes/precompiled](https://www.evm.codes/precompiled) for the full reference.

### Predeployed Contracts

Cosmos EVM ships with standard EVM infrastructure contracts already in chain state at their canonical addresses — Create2, Multicall3, Permit2, Safe Singleton Factory, and EIP-2935 block hash storage. Any tooling that depends on these contracts at their well-known addresses works without extra setup.

<Card title="Predeployed Contracts" icon="box" href="/evm/next/documentation/getting-started/build-a-chain/additional-configuration/predeployed-contracts">
Learn which contracts are preinstalled and how to preinstall contracts at genesis.
</Card>

#### Key Precompile Addresses

| Function | Address |
|----------|---------|
| **Staking** | `0x0000000000000000000000000000000000000800` |
| **Distribution** | `0x0000000000000000000000000000000000000801` |
| **IBC Transfer** | `0x0000000000000000000000000000000000000802` |
| **Bank** | `0x0000000000000000000000000000000000000804` |
| **Governance** | `0x0000000000000000000000000000000000000805` |

### Performance

Cosmos EVM gas estimation is optimized: plain ETH transfers return 21000 immediately without simulation, and complex transactions use initial execution results to tighten the binary search bounds, making `eth_estimateGas` significantly faster across the board.

The Cosmos EVM mempool follows standard Ethereum behavior (gas price + nonce ordering, multiple transactions per account per block). Pool limits, timeouts, and priority functions are [configurable per chain](/evm/next/documentation/getting-started/build-a-chain/additional-configuration/mempool-integration). An optional experimental mempool adds nonce gap handling and automatic transaction promotion.

## Resources

<CardGroup cols={2}>
<Card title="Quick Start" icon="rocket" href="/evm/next/documentation/getting-started/build-a-chain/quick-start">
Deploy a chain and your first contract end-to-end.
</Card>
<Card title="Tooling & Resources" icon="wrench" href="/evm/next/documentation/getting-started/tooling-and-resources">
Full list of supported tools, libraries, and frameworks.
</Card>
<Card title="Precompile Overview" icon="box" href="/evm/next/documentation/smart-contracts/precompiles/overview">
Built-in Cosmos precompiles and their addresses.
</Card>
<Card title="Predeployed Contracts" icon="box" href="/evm/next/documentation/getting-started/build-a-chain/additional-configuration/predeployed-contracts">
Standard EVM contracts available at genesis.
</Card>
</CardGroup>
Loading