Skip to main content

ERC-20 Interaction

Standard ERC-20 contracts work on Sei without modification. This page covers the common read and write operations using viem and ethers.

Try it: deploy an ERC-20

Compile and deploy a real ERC-20 to Sei testnet from the browser — the Remix sandbox preloads an OpenZeppelin-based DemoToken. Then point the read/write patterns below at your deployed address. First, add Sei testnet to your wallet: In Remix, compile under Solidity Compiler, then Deploy & Run with Environment set to Injected Provider — MetaMask.

Setup

Reading Token Metadata

Reading Balances and Allowances

Transferring Tokens

Approving a Spender

Watching Transfer Events

Fetching Historical Transfers

CosmWasm Token Compatibility

CW20 tokens on Sei have ERC-20 pointer contracts that expose the standard ERC-20 interface. You can use all of the patterns above against a CW20 pointer address. See Pointer Contracts for how to look up the pointer address.