Overview
The Bank precompile provides access to Sei’s native token operations, allowing you to query balances, transfer tokens, and retrieve token metadata directly from EVM contracts. This precompile bridges EVM and Cosmos SDK bank module functionality. Contract Address:0x0000000000000000000000000000000000001001
Key Features
- Balance Queries: Check token balances for any address and denomination
- Token Transfers: Send native tokens between addresses
- Token Metadata: Get token name, symbol, decimals, and total supply
- Multi-Denomination Support: Work with any native token denomination
Available Functions
View Functions
balance(address, string) → uint256
balance(address, string) → uint256
Get the balance of a specific token denomination for an address.Parameters:
acc(address): The account address to querydenom(string): The token denomination (e.g., “usei”)
all_balances(address) → Coin[]
all_balances(address) → Coin[]
Get all token balances for an address across all denominations.Parameters:
acc(address): The account address to query
name(string) → string
name(string) → string
Get the display name for a token denomination.Parameters:
denom(string): The token denomination
symbol(string) → string
symbol(string) → string
Get the symbol for a token denomination.Parameters:
denom(string): The token denomination
decimals(string) → uint8
decimals(string) → uint8
Get the number of decimals for a token denomination.Parameters:
denom(string): The token denomination
supply(string) → uint256
supply(string) → uint256
Get the total supply of a token denomination.Parameters:
denom(string): The token denomination
State-Changing Functions
send(address, address, string, uint256) → bool
send(address, address, string, uint256) → bool
Transfer tokens between addresses.Parameters:
fromAddress(address): Source addresstoAddress(address): Destination addressdenom(string): Token denominationamount(uint256): Amount to transfer
sendNative(string) → bool
sendNative(string) → bool
Send native SEI tokens to a Cosmos address.Parameters:
toNativeAddress(string): Destination Cosmos address
Usage Examples
- Viem
- Ethers.js
- Manual
Common Use Cases
DeFi Integration
- Query user token balances before swaps
- Check available liquidity across denominations
- Validate token transfers in smart contracts
Wallet Applications
- Display user portfolio across all native tokens
- Enable native token transfers
- Show token metadata and formatting
Cross-Chain Applications
- Bridge native tokens to other chains
- Query token supplies for economic analysis
- Handle multi-denomination transactions
Error Handling
Common errors when using the Bank precompile:- Invalid address format: Ensure addresses are valid EVM addresses
- Unknown denomination: Verify the token denomination exists
- Insufficient balance: Check balance before attempting transfers
- Invalid amount: Ensure transfer amounts are positive and within limits
Related Precompiles
- Distribution: Claim staking rewards
- Staking: Delegate tokens to validators
- IBC: Transfer tokens cross-chain