Skip to main content
Address: 0x0000000000000000000000000000000000001001 The Sei bank precompile allows EVM applications to interact directly with Sei’s native banking system through standard smart contract calls. This enables querying balances, transferring tokens, and accessing token metadata for both native SEI tokens and Cosmos SDK-based assets, providing seamless integration between EVM and Cosmos ecosystems.
What is a precompile? A precompile is a special smart contract deployed at a fixed address by the Sei protocol itself, that exposes custom native chain logic to EVM-based applications. It acts like a regular contract from the EVM’s perspective, but executes privileged, low-level logic efficiently.

How Does the Bank Precompile Work?

The bank precompile at address 0x0000000000000000000000000000000000001001 exposes functions like send(), sendNative(), balance(), all_balances(), and token metadata queries.
  • Direct Integration: EVM contracts and dApps can call banking functions like any other smart contract method.
  • Native Execution: Operations are executed at the Cosmos SDK level for maximum efficiency and security.
  • Cross-Chain Assets: Manage both native SEI tokens and IBC assets seamlessly from EVM contracts.
When to use send vs sendNative: send moves an arbitrary denom (any IBC or factory token) between two EVM addresses (0x...) by reading the balance directly from the bank module — no msg.value is attached. It is gated to the registered ERC20 native pointer for that denom, so it is typically invoked from the auto-deployed pointer contract rather than from arbitrary user code. sendNative is for sending native SEI (the attached msg.value) from the EVM caller to a Cosmos bech32 (sei1...) destination, which is useful for crossing the EVM→Cosmos boundary when the recipient has no associated EVM address (for example, paying a Cosmos-only contract or account).

Use Cases

  • DeFi Applications: Build decentralized finance protocols that can handle native SEI and Cosmos assets.
  • Portfolio Management: Build tools to track and manage multi-asset portfolios across Cosmos and EVM.
  • Token Information Services: Query comprehensive token metadata for UI display and analytics.

What You’ll Learn in This Guide

By the end of this guide, you’ll be able to:
  • Execute Token Transfers - Send both native SEI and custom tokens between addresses
  • Query Account Balances - Check single and multi-asset balances for any address
  • Access Token Metadata - Retrieve names, symbols, decimals, and supply information

Functions

The bank precompile exposes the following functions:

Transaction Functions

Query Functions

Using the Precompile

Setup

Prerequisites

Before getting started, ensure you have:
  • Node.js (v18 or higher)
  • npm or yarn package manager
  • EVM-compatible wallet
  • SEI tokens for gas and testing transfers
  • Hardhat for development and testing

Install Dependencies

Install the required packages for interacting with Sei precompiles:

Setup Hardhat Environment

Create a hardhat.config.ts file with the following content:
Store your private key in Hardhat’s encrypted keystore (no plaintext .env file needed):

Import Precompile Components

Precompile Address: The bank precompile is deployed at 0x0000000000000000000000000000000000001001

Contract Initialization

Set up your provider, signer, and contract instance:

Native SEI vs Custom Tokens

Native SEI Transfers:
  • Use sendNative() with payable value
  • Denomination is always usei (micro-SEI)
  • Parse to 18 digits when calling sendNative()
Custom Token Transfers:
  • Use send() with specific denomination
  • Requires prior token approval or ownership
  • Support various decimal configurations

Step-by-Step Guide: Using the Bank Precompile

Send Native SEI Tokens

Send Custom Tokens

send() can only be called by the registered ERC20 native pointer contract for the given denom — calling it from a regular wallet will revert. The snippet below only illustrates the arguments a pointer contract passes. As a user, transfer native denoms through the denom’s ERC20 pointer contract (transfer()), or use sendNative() for SEI.

Query Account Balance

Query All Balances

Query Token Metadata

Complete Integration Example

Security Considerations & Risks

Transaction Security

  • Amount Validation: Always validate transfer amounts and ensure sufficient balances
  • Address Verification: Verify recipient addresses are valid before sending tokens
  • Reentrancy Protection: Be aware of potential reentrancy when combining with other contracts

Permission Management

Troubleshooting

Common Issues and Solutions

Transaction Failures

Balance Query Issues

Error Code Reference

Important Notes

Remember: Always verify token denominations and handle errors gracefully in production applications!
  • SEI Native: While reading from chain it is formatted to 6 decimal places (1 SEI = 1,000,000 usei) and while writing to chain it is parsed to 18 decimal places.
  • Custom Tokens: Check decimals using decimals() function
  • Display Formatting: Always format amounts with proper decimal places for user display

Gas Optimization

  • Batch Operations: Use batch functions for multiple operations to save gas
  • Query Efficiency: Cache frequently accessed token metadata
  • Error Handling: Implement proper error handling to avoid failed transaction costs

Integration Best Practices

  • Balance Checks: Always verify sufficient balance before transfers
  • Error Recovery: Implement retry logic for failed transactions
  • User Experience: Provide clear feedback on transaction status
  • Decimal Handling: Use proper decimal formatting for different token types
View the Bank precompile source code and the contract ABI here.