> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmos.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Precompiled Contracts

> A hub for precompiled contracts that bridge EVM and Cosmos SDK modules.

# Precompiled Contracts

Precompiled contracts provide direct, gas-efficient access to native Cosmos SDK functionality from within the EVM. Build powerful hybrid applications that leverage the best of both worlds. This page provides an overview of the available precompiled contracts, each with detailed documentation on its usage, Solidity interface, and ABI.

> [!WARNING]
>
> **Critical: Understanding Token Decimals in Precompiles**
>
> All Cosmos EVM precompile contracts use the **native chain's decimal precision**, not Ethereum's standard 18 decimals (wei).
>
> **Why this matters:**
>
> * Cosmos chains typically use 6 decimals, while Ethereum uses 18
> * Passing values while assuming conventional Ethereum exponents could cause significant miscalculations
> * Example: On a 6-decimal chain, passing `1000000000000000000` (1 token in wei) will be interpreted as **1 trillion tokens**
>
> **Before using any precompile:**
>
> 1. Check your chain's native token decimal precision
> 2. Convert amounts to match the native token's format
> 3. Never assume 18-decimal precision
>
> ```solidity theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
> // WRONG: Assuming Ethereum's 18 decimals
> uint256 amount = 1 ether; // 1000000000000000000
> staking.delegate(validator, amount); // Delegates 1 trillion tokens!
>
> // CORRECT: Using chain's native 6 decimals
> uint256 amount = 1000000; // 1 token with 6 decimals
> staking.delegate(validator, amount); // Delegates 1 token
> ```

## Available Precompiles

Access native Cosmos SDK features directly from Solidity:

> [card] Bank
>
> Interface with native Cosmos SDK tokens for balance and supply queries.
> [Explore Bank →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/bank.md)

> [card] Bech32
>
> Convert addresses between Ethereum hex and Cosmos bech32 formats.
> [Explore Bech32 →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/bech32.md)

> [card] Callbacks
>
> Handle IBC packet lifecycle callbacks in smart contracts.
> [Explore Callbacks →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/callbacks.md)

> [card] Distribution
>
> Withdraw staking rewards and interact with the community pool.
> [Explore Distribution →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/distribution.md)

> [card] ERC20
>
> Utilize standard ERC20 token functionality for native Cosmos tokens.
> [Explore ERC20 →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/erc20.md)

> [card] Governance
>
> Participate in on-chain governance through proposals and voting.
> [Explore Governance →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/governance.md)

> [card] ICS20
>
> Perform cross-chain token transfers via the IBC protocol.
> [Explore ICS20 →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/ics20.md)

> [card] P256
>
> Execute P-256 elliptic curve cryptographic operations.
> [Explore P256 →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/p256.md)

> [card] Slashing
>
> Manage validator slashing and jailing for network security.
> [Explore Slashing →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/slashing.md)

> [card] Staking
>
> Perform validator operations, manage delegations, and handle staking.
> [Explore Staking →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/staking.md)

> [card] WERC20
>
> Wrap native tokens to provide ERC20-compatible functionality.
> [Explore WERC20 →](https://docs.cosmos.network/evm/v0.4.x/documentation/smart-contracts/precompiles/werc20.md)
