Pointer Precompile
Address: 0x000000000000000000000000000000000000100b
Bridge identities/assets between CW and EVM.
Functions
Function | Description |
---|---|
addCW20Pointer function addCW20Pointer(string cwAddr) payable returns (address) | Registers a CW20 contract so EVM contracts can interact via ERC-20 semantics. |
addCW721Pointer function addCW721Pointer(string cwAddr) payable returns (address) | Creates an ERC-721 pointer for the target CW721 contract. |
addCW1155Pointer function addCW1155Pointer(string cwAddr) payable returns (address) | Exposes CW1155 tokens through an ERC-1155-compatible pointer. |
addNativePointer function addNativePointer(string token) payable returns (address) | Maps a native denom (e.g., "usei") to an ERC-20 pointer contract. |
Full Solidity Interface
interface IPointerPrecompile {
function addCW20Pointer(string memory cwAddr) external payable returns (address pointer);
function addCW721Pointer(string memory cwAddr) external payable returns (address pointer);
function addCW1155Pointer(string memory cwAddr) external payable returns (address pointer);
function addNativePointer(string memory token) external payable returns (address pointer);
}
⚠️
Pointer creation is a state-changing transaction and requires a fee in usei; rely on PointerView for lookups when possible.
Example
import { ethers } from 'ethers';
const POINTER = '0x000000000000000000000000000000000000100b';
const ABI = ['function addCW20Pointer(string cwAddr) payable returns (address)', 'function addNativePointer(string token) payable returns (address)'];
const provider = new ethers.BrowserProvider(window.ethereum);
await provider.send('eth_requestAccounts', []);
const pointer = new ethers.Contract(POINTER, ABI, await provider.getSigner());
// Register CW20 pointer (fee charged in usei)
await pointer.addCW20Pointer('sei1cw20...', { value: ethers.parseEther('0.01') });
// Register native denom pointer
await pointer.addNativePointer('usei', { value: ethers.parseEther('0.01') });
Notes
- Pointer creation requires governance-approved fees; check release notes for current pricing
- Pointer contracts emit synthetic events tagged
synthetic=true
(v6.1.11+) - Ensure CW contracts implement expected interfaces; invalid targets revert during registration
Troubleshooting
Error | Cause | Fix |
---|---|---|
pointer exists | Pointer mapping already registered for this contract/denom | Use PointerView to fetch existing pointer; re-registration not allowed. |
invalid denom | Native denom string malformed or empty | Pass the exact denom identifier (e.g., usei, uatom). |
Estimation fails | Wallet lacks EVM/Sei association | Run sei_associate RPC or use Addr precompile before calling Pointer. |
Last updated on