Overview
The Pointerview precompile provides read-only access to pointer contract addresses that bridge CosmWasm tokens (CW20, CW721) and native Cosmos tokens to EVM-compatible contracts. This enables seamless interoperability between CosmWasm and EVM ecosystems on Sei. Contract Address:0x000000000000000000000000000000000000100A
Key Features
- CW20 Pointers: Get EVM addresses for CosmWasm CW20 tokens
- CW721 Pointers: Get EVM addresses for CosmWasm CW721 NFTs
- Native Pointers: Get EVM addresses for native Cosmos tokens
- Version Tracking: Track pointer contract versions
- Existence Checks: Verify if pointer contracts exist
Available Functions
View Functions
getCW20Pointer(string) → (address, uint16, bool)
getCW20Pointer(string) → (address, uint16, bool)
Get the EVM pointer contract address for a CosmWasm CW20 token.Parameters:
cwAddr(string): The CosmWasm CW20 contract address
addr(address): The EVM pointer contract addressversion(uint16): The pointer contract versionexists(bool): Whether the pointer exists
getCW721Pointer(string) → (address, uint16, bool)
getCW721Pointer(string) → (address, uint16, bool)
Get the EVM pointer contract address for a CosmWasm CW721 NFT collection.Parameters:
cwAddr(string): The CosmWasm CW721 contract address
addr(address): The EVM pointer contract addressversion(uint16): The pointer contract versionexists(bool): Whether the pointer exists
getNativePointer(string) → (address, uint16, bool)
getNativePointer(string) → (address, uint16, bool)
Get the EVM pointer contract address for a native Cosmos token.Parameters:
token(string): The native token denomination (e.g., “usei”, “uatom”)
addr(address): The EVM pointer contract addressversion(uint16): The pointer contract versionexists(bool): Whether the pointer exists
Usage Examples
- Viem
- Ethers.js
- Manual
Pointer Contract Types
CW20 Pointers
- Purpose: Bridge CosmWasm CW20 tokens to ERC20-compatible contracts
- Use Cases: DeFi integration, token swaps, liquidity provision
- Interface: Standard ERC20 interface with additional bridging functions
CW721 Pointers
- Purpose: Bridge CosmWasm CW721 NFTs to ERC721-compatible contracts
- Use Cases: NFT marketplaces, gaming, digital collectibles
- Interface: Standard ERC721 interface with metadata extensions
Native Pointers
- Purpose: Bridge native Cosmos tokens to ERC20-compatible contracts
- Use Cases: Staking derivatives, wrapped tokens, cross-chain DeFi
- Interface: ERC20 interface representing native token balances
Common Use Cases
DeFi Integration
- Token Discovery: Find EVM addresses for CosmWasm tokens
- Liquidity Pools: Create pools with bridged tokens
- Yield Farming: Use bridged tokens in EVM-based protocols
Cross-Ecosystem Development
- Unified Interfaces: Interact with all token types via EVM
- Portfolio Management: Track assets across CosmWasm and EVM
- Multi-Chain Applications: Build apps supporting both ecosystems
NFT Marketplaces
- Collection Discovery: Find EVM addresses for CW721 collections
- Cross-Platform Trading: Enable trading across ecosystems
- Metadata Integration: Access NFT metadata via EVM interfaces
Token Bridge Patterns
Automatic Bridge Detection
Bridge Version Management
Multi-Token Bridge Status
Integration Patterns
EVM Contract Integration
Bridge Discovery Service
Error Handling
Common scenarios when using the Pointerview precompile:- Token not found: Token address doesn’t exist
- No pointer exists: Token hasn’t been bridged to EVM
- Invalid address format: Malformed token address
- Network errors: RPC connection issues
Performance Considerations
Caching Strategies
- Cache pointer results to avoid repeated queries
- Implement TTL for cache entries
- Batch multiple pointer queries when possible
Efficient Queries
- Use parallel queries for multiple tokens
- Implement retry logic for network failures
- Cache negative results (non-existent pointers)