Skip to main content
Each recipe does one task from start to finish. Most recipes show the same code in viem, ethers, and web3.py. When you pick a library in one code block, every code block on the page switches to that library.

Networks

Recipes that send transactions use Sei Testnet. Get testnet SEI from the faucet. The public endpoints have rate limits. For production traffic, use a dedicated RPC provider.

Client setup

viem quickstart

Read chain data and send transactions from Node.js with viem.

ethers v6 quickstart

Read chain data and send transactions with ethers.

Wagmi and React

Connect wallets, read chain state, and send transactions in a React dApp.

Python quickstart

Read chain data and sign transactions with web3.py.

Accounts and transactions

Read a balance

Read the SEI and ERC-20 balances of any address.

Send SEI

Send SEI to another address and confirm the receipt.

Transaction lifecycle

Send a transaction, wait for the receipt, and decode its logs.

Error handling

Decode reverts, handle wallet rejections, and recover from RPC errors.

Sponsor gas with Pimlico

Send from a smart account while a paymaster pays the gas.

Tokens

Deploy an ERC-20

Deploy an OpenZeppelin token with Foundry, Hardhat, or Remix.

ERC-20 interaction

Read token data, transfer tokens, and manage approvals.

ERC-721 interaction

Read NFT ownership and transfer NFTs.

ERC-1155 interaction

Read balances, transfer tokens, and approve operators.

Contracts

Deploy and verify

Deploy any contract and publish its source on Seiscan.

Listen to events

Stream new events over WebSocket and fetch past events.

Multicall

Batch many contract reads into one request.

Read a price feed

Read SEI/USD from an oracle and check that it is fresh.

Sei features

Sei precompiles

Call staking, governance, and other native features from the EVM.

Pointer contracts

Use CosmWasm tokens through standard ERC interfaces.
Missing a recipe? Open an issue in the sei-docs repository.