You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends the Tier-1 RunSnippet (read-only JSON-RPC) and Tier-3 Remix deploy embeds beyond the initial 5 example pages:
- examples: erc1155 (Remix deploy), transaction-lifecycle, multicall, error-handling, wagmi-react, sei-precompiles (RunSnippet)
- smart contracts: evm-general, evm-hardhat, evm-foundry, evm-wizard, evm-verify-contracts (Remix deploy), python-quickstart (RunSnippet)
- debugging-contracts: RunSnippet diagnostics mapping cast chain-id/gas-price/nonce/balance
All RPC calls verified live against Sei mainnet; all pages render with zero errors via mint dev.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: evm/debugging-contracts.mdx
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,9 @@ title: 'Debugging for EVM'
3
3
description: 'Advanced debugging techniques for EVM transactions on Sei. Learn transaction template generation and analysis using seid and Foundry cast tools.'
Debugging EVM transactions on Sei requires understanding both the transaction creation process and how to analyze transaction behavior. This guide covers advanced debugging techniques using transaction template generation, analysis tools, and comprehensive transaction inspection methods to help developers identify and resolve issues in their EVM interactions.
Each `cast` diagnostic above is a plain read-only JSON-RPC call. Run the same four against Sei mainnet right here — the example address (`0xAa55…3d96`) is the sender from the `cast tx` output earlier on this page.
174
+
175
+
<RunSnippetmethod="eth_chainId"network="mainnet"title="cast chain-id"description="eth_chainId — decodes to 1329. A mismatch here is the most common cause of a rejected transaction." />
176
+
177
+
<RunSnippetmethod="eth_gasPrice"network="mainnet"title="cast gas-price"description="eth_gasPrice — the current gas price in wei. Compare it against your maxFeePerGas when a transaction is stuck as underpriced." />
Copy file name to clipboardExpand all lines: evm/evm-foundry.mdx
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@ sidebarTitle: 'EVM with Foundry'
4
4
description: 'Learn how to develop, test, and deploy smart contracts on Sei EVM using Foundry, with step-by-step examples of contract creation, testing, deployment, and interaction using both CLI and ethers.js.'
This tutorial will guide you through setting up Foundry for Sei EVM development and using OpenZeppelin contracts to build secure, standardized smart contracts. We'll cover environment setup, contract creation, deployment, and show how to leverage OpenZeppelin's pre-built components with the powerful Foundry toolkit.
8
13
9
14
<Info>Watch the video walkthrough for this topic in the [Video Tutorials](/evm/videos) section.</Info>
@@ -16,6 +21,27 @@ It is <strong>highly recommended</strong> that you deploy to <em>testnet (atlant
16
21
17
22
</Tip>
18
23
24
+
## Try it before you install
25
+
26
+
Installing Foundry and scaffolding a project takes a few minutes. If you just want to see a contract deploy to Sei, you can do both of these right now in the browser.
27
+
28
+
First, confirm the RPC endpoints you'll put in `foundry.toml` respond:
29
+
30
+
<RunSnippetmethod="eth_chainId"network="testnet"title="eth_chainId · atlantic-2"description="Testnet RPC — decodes to 1328." />
31
+
32
+
<RunSnippetmethod="eth_chainId"network="mainnet"title="eth_chainId · pacific-1"description="Mainnet RPC — decodes to 1329." />
33
+
34
+
Then add Sei testnet to your wallet and deploy a minimal `Counter.sol` from Remix — no `forge`, no install. In Remix: compile under **Solidity Compiler**, then **Deploy & Run** with **Environment** set to **Injected Provider — MetaMask**.
35
+
36
+
<AddSeiButtonnetwork="testnet"label="Add Sei testnet" />
Copy file name to clipboardExpand all lines: evm/evm-general.mdx
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@ sidebarTitle: 'EVM (General)'
4
4
description: "Comprehensive guide on Ethereum Virtual Machine (EVM) on Sei blockchain. Learn about smart contract languages, development tools, and best practices for building on Sei's parallelized EVM."
The Ethereum Virtual Machine (EVM) is the runtime environment for smart
@@ -26,6 +31,25 @@ Here are some key points about the EVM:
26
31
machine-readable instructions) and deployed to the EVM compatible network.
27
32
The EVM executes this bytecode.
28
33
34
+
## Try it: deploy without any setup
35
+
36
+
You don't need a local toolchain to ship a contract to Sei. First confirm the network is live, then compile and deploy a minimal `Counter.sol` to testnet straight from the browser.
37
+
38
+
<RunSnippetmethod="eth_chainId"network="testnet"title="eth_chainId · atlantic-2"description="Confirms the testnet RPC responds — decodes to 1328, the chain ID your tooling needs." />
39
+
40
+
<RunSnippetmethod="eth_chainId"network="mainnet"title="eth_chainId · pacific-1"description="Confirms the mainnet RPC responds — decodes to 1329." />
41
+
42
+
Add Sei testnet to your wallet, then deploy from Remix below — compile under **Solidity Compiler**, then **Deploy & Run** with **Environment** set to **Injected Provider — MetaMask**:
43
+
44
+
<AddSeiButtonnetwork="testnet"label="Add Sei testnet" />
Copy file name to clipboardExpand all lines: evm/evm-hardhat.mdx
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@ sidebarTitle: 'EVM with Hardhat'
4
4
description: 'Learn how to set up Hardhat for Sei EVM development, create and deploy smart contracts, and leverage OpenZeppelin components for secure, standardized implementations.'
This tutorial will guide you through setting up Hardhat for Sei EVM development and using OpenZeppelin contracts to build secure, standardized smart contracts. We'll cover environment setup, contract creation, deployment, and show how to leverage OpenZeppelin's pre-built components.
8
13
9
14
<Info>Watch the video walkthrough for this topic in the [Video Tutorials](/evm/videos) section.</Info>
@@ -16,6 +21,27 @@ It is <strong>highly recommended</strong> that you deploy to <em>testnet (atlant
16
21
17
22
</Tip>
18
23
24
+
## Try it before you install
25
+
26
+
Setting up the full toolchain takes a few minutes. If you just want to see a contract deploy to Sei, you can do both of these right now in the browser.
27
+
28
+
First, confirm the RPC endpoints you'll put in `hardhat.config` respond:
29
+
30
+
<RunSnippetmethod="eth_chainId"network="testnet"title="eth_chainId · atlantic-2"description="Testnet RPC — decodes to 1328." />
31
+
32
+
<RunSnippetmethod="eth_chainId"network="mainnet"title="eth_chainId · pacific-1"description="Mainnet RPC — decodes to 1329." />
33
+
34
+
Then add Sei testnet to your wallet and deploy a minimal `Counter.sol` from Remix — no Node, no install. In Remix: compile under **Solidity Compiler**, then **Deploy & Run** with **Environment** set to **Injected Provider — MetaMask**.
35
+
36
+
<AddSeiButtonnetwork="testnet"label="Add Sei testnet" />
ERC-1155 is the multi-token standard — a single contract can hold both fungible tokens (like gold coins in a game) and non-fungible tokens (like unique items), with efficient batch operations built in. Standard ERC-1155 contracts work on Sei without modification.
9
12
13
+
## Try it: deploy an ERC-1155
14
+
15
+
Compile and deploy a real ERC-1155 to Sei testnet from the browser — the Remix sandbox preloads an OpenZeppelin-based `DemoMultiToken` with a public `mint(id, amount)`. Then point the read/write patterns below at your deployed address.
16
+
17
+
First, add Sei testnet to your wallet:
18
+
19
+
<AddSeiButtonnetwork="testnet"label="Add Sei testnet" />
20
+
21
+
In Remix, compile under **Solidity Compiler**, then **Deploy & Run** with **Environment** set to **Injected Provider — MetaMask** (or **External HTTP Provider** at `https://evm-rpc-testnet.sei-apis.com`).
Most transaction failures fall into three categories: contract reverts, wallet rejections, and RPC errors. This page shows how to decode each type and respond correctly.
9
11
12
+
## Try it: see real errors
13
+
14
+
The `RunSnippet` widget surfaces whatever the RPC returns — including failures. These two calls fail on purpose so you can see the exact error shape your code has to handle, live against Sei mainnet.
15
+
16
+
<RunSnippet
17
+
method="eth_call"
18
+
params={[{ to: '0xcA11bde05977b3631167028862bE2a173976CA11', data: '0xdeadbeef' }, 'latest']}
19
+
network="mainnet"
20
+
title="A contract revert"
21
+
description="Calls an unknown selector (0xdeadbeef) on Multicall3. The node rejects it with execution reverted — the same class of failure as the Contract Reverts section below."
22
+
/>
23
+
24
+
<RunSnippet
25
+
method="eth_getBalance"
26
+
params={['0x123', 'latest']}
27
+
network="mainnet"
28
+
title="An RPC argument error"
29
+
description="A malformed address (0x123) triggers a JSON-RPC -32602 invalid argument error — distinct from a revert, and the kind of failure the RPC Errors and Retries section below handles."
30
+
/>
31
+
10
32
## Contract Reverts
11
33
12
34
When a transaction reverts, the error contains the revert reason if the contract provides one.
Multicall3 lets you batch multiple read calls into a single RPC round-trip, dramatically reducing latency for dashboards, portfolio pages, and any view that needs data from multiple contracts at once.
9
11
10
12
Multicall3 is deployed at `0xcA11bde05977b3631167028862bE2a173976CA11` on Sei mainnet and testnet — the same address as Ethereum.
11
13
14
+
## Try It Live
15
+
16
+
Multicall3 is a normal contract — you can hit it with a single `eth_call` and no SDK. These run its two zero-argument helpers on Sei mainnet; the hex results decode to decimal below each response.
17
+
18
+
<RunSnippet
19
+
method="eth_call"
20
+
params={[{ to: '0xcA11bde05977b3631167028862bE2a173976CA11', data: '0x42cbb15c' }, 'latest']}
21
+
network="mainnet"
22
+
title="Multicall3.getBlockNumber()"
23
+
description="Selector 0x42cbb15c on Multicall3 at 0xcA11…CA11 — returns the current block number."
24
+
/>
25
+
26
+
<RunSnippet
27
+
method="eth_call"
28
+
params={[{ to: '0xcA11bde05977b3631167028862bE2a173976CA11', data: '0x0f28c97d' }, 'latest']}
29
+
network="mainnet"
30
+
title="Multicall3.getCurrentBlockTimestamp()"
31
+
description="Selector 0x0f28c97d — returns the latest block's Unix timestamp in seconds."
Sei exposes native chain functionality through precompiled contracts at deterministic EVM addresses. You can call them from any EVM library (viem, ethers, wagmi) using the ABIs exported from `@sei-js/precompiles` — no special SDK required.
Precompiles are callable like any contract — even with a plain `eth_call` from the browser. This hits the **Bank** precompile at `0x0000000000000000000000000000000000001001` on Sei mainnet, calling `name("usei")`. The response is ABI-encoded; it contains the bytes `53 45 49` — ASCII for `SEI`.
22
+
23
+
<RunSnippet
24
+
method="eth_call"
25
+
params={[{ to: '0x0000000000000000000000000000000000001001', data: '0x5b43bc99000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047573656900000000000000000000000000000000000000000000000000000000' }, 'latest']}
26
+
network="mainnet"
27
+
decode="off"
28
+
title="Bank.name('usei')"
29
+
description="Raw eth_call to the Bank precompile. Decoding off because the result is an ABI-encoded string, not a numeric quantity."
30
+
/>
31
+
17
32
For installation instructions, code examples (viem and ethers), common patterns, and a full working Node.js script, see the precompiles reference:
18
33
19
34
<Cardtitle="Precompile Example Usage"icon="hexagon-nodes"href="/evm/precompiles/example-usage">
This page covers the full round-trip of a transaction: building and sending it, waiting for the receipt, and reading the event logs it emitted.
9
11
12
+
## Try It Live
13
+
14
+
Before you send anything, read the live chain state your transaction will interact with — straight from your browser against Sei mainnet, no install or key required.
15
+
16
+
<RunSnippetmethod="eth_gasPrice"network="mainnet"title="eth_gasPrice"description="Current gas price in wei — the widget decodes the hex quantity to decimal below the response." />
17
+
18
+
<RunSnippetmethod="eth_blockNumber"network="mainnet"title="eth_blockNumber"description="Latest committed block on pacific-1. Your transaction lands a block or two after whatever this returns." />
[Wagmi](https://wagmi.sh) is the standard React library for EVM wallet connections and contract interactions. This page covers the essential patterns for a Sei frontend: configuration, wallet connect/disconnect, reading balances, and writing to contracts.
9
11
10
12
For Node.js scripts and backend services, see the [viem Quickstart](/evm/evm-parity/examples/viem-quickstart) instead.
11
13
14
+
## Try It Live
15
+
16
+
The hooks below — `useBlockNumber`, `useBalance` — are thin wrappers over JSON-RPC reads. Here are those same reads issued directly against Sei mainnet, no wallet connection required, so you can see the data your components will render.
17
+
18
+
<RunSnippet
19
+
method="eth_blockNumber"
20
+
network="mainnet"
21
+
title="eth_blockNumber"
22
+
description="What useBlockNumber() resolves to — the latest committed block on pacific-1."
0 commit comments