Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions skill/SKILL-CONTRACTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Use this Skill when the user asks for:

These facts must inform every answer involving Sei code or configuration:

1. **400ms block time, instant finality** — use `txResponse.wait(1)`; there is no "safe"/"finalized" distinction
1. **400ms block time, instant finality** — use `txResponse.wait(1)`; `safe`/`finalized`/`latest` all resolve to the same instantly-final block, so just query `latest`
2. **Parallel execution (OCC)** — minimize shared storage writes; partition state by user/asset/id; avoid hot globals
3. **SSTORE gas cost differs by network** — both mainnet (pacific-1) and testnet (atlantic-2) charge 72,000 gas per write (governance-adjustable)
3. **SSTORE gas is non-standard (and identical on both networks)** — mainnet (pacific-1) and testnet (atlantic-2) both charge 72,000 gas per write (governance [Proposal #109 (pacific-1)](https://www.mintscan.io/sei/proposals/109); testnet carries the same value with no separate proposal; governance-adjustable); a `forge --gas-report --fork-url` shows revm's ~22,100, not Sei's cost — use live `eth_estimateGas`
4. **Dual address system** — every account has both `sei1...` (bech32) and `0x...` (EVM); they must be **associated** before cross-VM token transfers
5. **PREVRANDAO is NOT random** — block-time-derived; always use Pyth VRF or Chainlink VRF for randomness
6. **COINBASE = fee collector** — global fee collector address, not the block proposer
Expand Down Expand Up @@ -104,7 +104,7 @@ claude mcp add sei-mcp-server npx @sei-js/mcp-server

### 2. Apply Sei-specific correctness
- **Network** (testnet 1328 vs mainnet 1329)
- **Gas price**: 50 gwei legacy `gasPrice`
- **Gas price**: legacy `gasPrice` at the governance-set, adjustable floor (currently ~50 gwei on mainnet — pacific-1 Proposal #112 / atlantic-2 #244; query `eth_gasPrice`)
- **Address format** (bech32 vs EVM) and association if cross-VM
- **SSTORE implications** for storage-heavy contracts
- **Parallel execution implications** for shared mutable state
Expand Down
24 changes: 13 additions & 11 deletions skill/SKILL-ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: sei-ecosystem
description: >
Use when user asks "what dApps are on Sei", "list Sei DEXes / lending /
perps", "integrate with a Sei DEX or lending protocol", "what bridges work
with Sei", "how do I bridge tokens to Sei with LayerZero / Wormhole / Axelar
/ IBC / CCTP", "find a Sei RPC endpoint", "RPC failover for Sei", "use Pyth /
with Sei", "how do I bridge tokens to Sei with LayerZero / Wormhole / CCTP",
"find a Sei RPC endpoint", "RPC failover for Sei", "use Pyth /
Chainlink oracles on Sei", "set up The Graph / Goldsky subgraph for Sei",
"set up a Sei full node", "how do I delegate SEI to a validator", "submit a
governance proposal on Sei", "how do I become a Sei validator / RPC provider
Expand Down Expand Up @@ -35,16 +35,17 @@ Use this Skill when the user asks for:

- Sei dApps directory by category (DEX, lending, perps, RWA, NFT, gaming, infra, AI)
- Integration patterns for DeFi protocols (DragonSwap, Yei, Takara, Saphyre)
- Bridges (LayerZero V2, Wormhole, Axelar, IBC, ThirdWeb, CCTP)
- Bridges (LayerZero V2, Circle CCTP v2; Wormhole legacy/verify-first); inbound IBC disabled (SIP-3, legacy/exit-only)
- RPC endpoints — public, community, and paid providers + failover patterns
- Oracle integration (Chainlink, Pyth, API3, RedStone, native oracle precompile, VRF)
- Oracle integration (Chainlink, Pyth, API3, RedStone, VRF — the native oracle precompile is shut off)
- Indexer setup (The Graph, Goldsky, Dune, Moralis, Goldrush)
- Node operations (full node setup, state sync, snapshots, `seid` CLI)
- Validator setup (key management, HSM, slashing, monitoring)
- Staking, delegation, governance proposals
- Participation roles (validator, RPC provider, indexer operator, oracle relayer, IBC relayer)
- Grants and builder programs (Sei Foundation, Ecosystem Fund, Creator Fund)
- AI tooling (Sei MCP Server, Cambrian Agent Kit, x402)
- AI tooling (Sei MCP Server, Cambrian Agent Kit)
- Payments (USDC transfers, x402 HTTP-native micropayments)
- Sei architecture context for ecosystem decisions (Twin Turbo, OCC, SeiDB, Sei Giga)

## Key architectural facts (always apply)
Expand All @@ -53,19 +54,19 @@ These facts must inform every Sei ecosystem answer:

1. **400ms block time, instant finality** — block-level systems (relayers, bridges) should expect fast confirmation
2. **Parallel execution (OCC)** — high-throughput protocols must design for non-conflicting state
3. **SSTORE gas cost differs by network** — both mainnet and testnet: 72,000 gas per write (governance-adjustable)
3. **SSTORE gas is non-standard (and identical on both networks)** — mainnet and testnet both charge 72,000 gas per write (governance [Proposal #109 (pacific-1)](https://www.mintscan.io/sei/proposals/109); testnet carries the same value with no separate proposal; governance-adjustable)
4. **Dual address system** — every account has both `sei1...` and `0x...`; cross-VM transfers require association
5. **PREVRANDAO is NOT random** — use Pyth VRF or Chainlink VRF
6. **No base fee burn** — all fees go to validators; legacy `gasPrice` 50 gwei
6. **No base fee burn** — all fees go to validators; use legacy `gasPrice` at the governance-set, adjustable floor (currently ~50 gwei on mainnet — pacific-1 Proposal #112 / atlantic-2 #244; query `eth_gasPrice` for the live value)
7. **CosmWasm is deprecated** (SIP-3) — new ecosystem dApps should target EVM
8. **Chain IDs:** Mainnet `pacific-1` / EVM `1329`; Testnet `atlantic-2` / EVM `1328`
9. **Block gas limit:** 12.5M per block

## Default stack decisions

1. **Oracles**: Native oracle precompile for free SEI/USD price; Pyth (pull) for sub-second latency; Chainlink (push) for production DeFi defaults
1. **Oracles**: Pyth (pull) for sub-second latency; Chainlink (push) for production DeFi defaults; API3 / RedStone as alternatives. The native oracle precompile is **retired (shut off July 2026)** — queries revert; do not use it
2. **Indexers**: The Graph for custom query workloads; Goldsky for real-time CDC; Dune for analytics
3. **Bridges**: LayerZero V2 OFT for omnichain tokens; CCTP for native USDC; IBC for Cosmos ecosystem; Wormhole/Axelar for general-purpose
3. **Bridges**: LayerZero V2 OFT for omnichain tokens; CCTP for native USDC. Wormhole (NTT/WTT) is supported per Wormhole but **not documented by Sei** — verify first. Inbound IBC is disabled (SIP-3) — not a path for new transfers
4. **RPC**: Sei Foundation primary + community fallback for free; paid SaaS (QuickNode, Alchemy, dRPC) with multi-provider failover for production
5. **Networks**: Default to testnet (`atlantic-2`, chain ID 1328) unless explicitly mainnet
6. **Validators**: HSM-backed key management; uptime monitoring; participation in governance
Expand Down Expand Up @@ -140,8 +141,8 @@ For agent-grade RPC patterns, see the 17 canonical skills in [ecosystem/rpc-agen
### Apps + integrations
- **dApps directory by category:** [ecosystem/apps-directory.md](references/ecosystem/apps-directory.md)
- **DeFi integration patterns (DEXes, lending):** [ecosystem/integration-defi.md](references/ecosystem/integration-defi.md)
- **Bridges (LayerZero, Wormhole, Axelar, IBC, CCTP):** [ecosystem/bridges.md](references/ecosystem/bridges.md)
- **IBC + legacy bridging deep dive:** [ecosystem/ibc-bridging.md](references/ecosystem/ibc-bridging.md)
- **Bridges (LayerZero V2, CCTP; Wormhole verify-first; IBC legacy/exit-only):** [ecosystem/bridges.md](references/ecosystem/bridges.md)
- **IBC (legacy / exit-only — inbound disabled, SIP-3):** [ecosystem/ibc-bridging.md](references/ecosystem/ibc-bridging.md)

### Infrastructure
- **RPC endpoints — public, community, paid:** [ecosystem/rpc-providers.md](references/ecosystem/rpc-providers.md)
Expand All @@ -155,6 +156,7 @@ For agent-grade RPC patterns, see the 17 canonical skills in [ecosystem/rpc-agen
### Participation
- **Participation roles (validator / RPC / indexer / oracle / IBC / grants):** [ecosystem/participation-roles.md](references/ecosystem/participation-roles.md)
- **AI tooling (Sei MCP Server, Cambrian, x402):** [ecosystem/ai-tooling.md](references/ecosystem/ai-tooling.md)
- **Payments (USDC + x402):** [ecosystem/payments.md](references/ecosystem/payments.md)

### Cross-domain references the ecosystem reaches for
- Precompiles for on-chain integration: [precompiles/overview.md](references/precompiles/overview.md)
Expand Down
10 changes: 5 additions & 5 deletions skill/SKILL-FRONTEND.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
login", "display both EVM and Cosmos addresses", "RainbowKit / ConnectKit
with Sei", "EIP-6963 wallet detection on Sei", "where on docs.sei.io is X",
"where on sei.io is X", "contribute a page to docs.sei.io", "how do I author
Nextra MDX docs for Sei", "what's in the Sei brand kit", "where do I find
Mintlify MDX docs for Sei", "what's in the Sei brand kit", "where do I find
Sei logos / press kit", or anything about Sei UIs, wallet UX, and the
official web properties. Frontend-focused variant — UI stack, wallet UX,
dual-address UX, and site/docs awareness. For deeper smart-contract or
Expand Down Expand Up @@ -39,7 +39,7 @@ Use this Skill when the user asks for:
- Network-add UX (`wallet_addEthereumChain` for Sei)
- Fast-finality UX patterns (no multi-confirmation spinners)
- Navigating sei.io and docs.sei.io to send users to the right page
- Authoring or contributing pages to docs.sei.io (Nextra + MDX + `_meta.js`)
- Authoring or contributing pages to docs.sei.io (Mintlify + MDX + `docs.json`)
- Sei brand kit, logos, media assets, press contacts
- Frontend-side reading from Sei precompiles (e.g., dual-address lookup via Addr precompile)

Expand All @@ -48,7 +48,7 @@ Use this Skill when the user asks for:
These facts must inform every Sei answer:

1. **400ms block time, instant finality** — use `tx.wait(1)` / `confirmations: 1`; no "safe"/"finalized" spinners
2. **Use legacy `gasPrice` ≥ 50 gwei** — Sei does not use EIP-1559 priority fees; min 50 gwei
2. **Use legacy `gasPrice`** — Sei does not use EIP-1559 priority fees; the minimum is governance-set and adjustable (currently ~50 gwei on mainnet — pacific-1 Proposal #112 / atlantic-2 #244; query `eth_gasPrice` for the live floor)
3. **Dual address system** — every user has both `sei1...` and `0x...`; surface both when needed
4. **Chain IDs:** Mainnet `pacific-1` / EVM `1329`; Testnet `atlantic-2` / EVM `1328`
5. **EIP-6963 is the default** for wallet detection; Wagmi `injected()` discovers all participants automatically
Expand All @@ -59,7 +59,7 @@ These facts must inform every Sei answer:
1. **Library**: Wagmi + Viem for React; Ethers.js v6 for non-React or Node scripts
2. **Wallet (consumer)**: Sei Global Wallet (`@sei-js/sei-global-wallet`) — no install, social login, EIP-6963
3. **Wallet UX shell**: RainbowKit or ConnectKit for polished connect modal
4. **Chain config**: import `sei` / `seiTestnet` from `@sei-js/precompiles`
4. **Chain config**: import `sei` / `seiTestnet` from `wagmi/chains` (or `viem/chains`) — `@sei-js/precompiles` only ships the `seiLocal` dev chain, not `sei`/`seiTestnet`
5. **Always pin `chainId`** in writeContract calls
6. **Always use legacy `gasPrice ≥ 50 gwei`**, never EIP-1559 fields
7. **Default to testnet** in development; switch to mainnet only when explicitly requested
Expand Down Expand Up @@ -129,7 +129,7 @@ Use it for: address lookup, balance checks, contract reads from a frontend testb

### Site awareness and contribution
- **sei.io / docs.sei.io site map:** [frontend/sites-map.md](references/frontend/sites-map.md)
- **Contributing to docs.sei.io (Nextra + MDX + _meta.js):** [frontend/docs-contributing.md](references/frontend/docs-contributing.md)
- **Contributing to docs.sei.io (Mintlify + MDX + docs.json):** [frontend/docs-contributing.md](references/frontend/docs-contributing.md)
- **Brand kit, logos, media:** [frontend/branding-media.md](references/frontend/branding-media.md)

### Cross-domain references frontends will reach for
Expand Down
19 changes: 10 additions & 9 deletions skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ This Skill covers three overlapping domains. Use it when the user asks for:
- Wallet detection (EIP-6963), dual-address UX (`sei1...` ↔ `0x...`), fast-finality patterns
- RainbowKit / ConnectKit integration
- Navigating sei.io and docs.sei.io — pointing users to the right page
- Contributing pages to docs.sei.io (Nextra MDX, _meta.js, build flow)
- Contributing pages to docs.sei.io (Mintlify MDX, docs.json navigation, snippets)
- Sei brand kit, logos, media assets, press contacts

### Ecosystem (apps + integration + participation)
- Sei dApps directory by category (DEX, lending, perps, RWA, NFT, gaming, infra)
- Integration patterns for DeFi protocols (DragonSwap, Yei, Takara, Saphyre)
- Bridges (LayerZero V2, Wormhole, Axelar, IBC, ThirdWeb, CCTP)
- Bridges (LayerZero V2, Circle CCTP v2 for native USDC; Wormhole legacy/verify-first); inbound IBC disabled (SIP-3)
- RPC endpoints — public, community, and paid providers
- Oracle integration (Chainlink, Pyth, API3, RedStone, native precompile, VRF)
- Oracle integration (Chainlink, Pyth, API3, RedStone, VRF; native precompile is shut off)
- Indexer setup (The Graph, Goldsky, Dune, Moralis, Goldrush)
- Participation roles (validator, RPC provider, indexer operator, oracle relayer, IBC relayer)
- Grants and builder programs (Sei Foundation, Ecosystem Fund, Creator Fund)
Expand All @@ -80,9 +80,9 @@ This Skill covers three overlapping domains. Use it when the user asks for:

These facts must inform every answer involving Sei code or configuration:

1. **400ms block time, instant finality** — use `txResponse.wait(1)` for confirmations; there is no "safe" or "finalized" block distinction
1. **400ms block time, instant finality** — use `txResponse.wait(1)` for confirmations; `safe`/`finalized`/`latest` all resolve to the same instantly-final block, so just query `latest`
2. **Parallel execution (OCC)** — minimize shared storage writes; partition state by user/asset/id; avoid hot globals written by many users
3. **SSTORE gas cost differs by network** — both mainnet (pacific-1) and testnet (atlantic-2) charge 72,000 gas per write (governance proposal #240); governance-adjustable — always verify with `forge test --gas-report` against the target network
3. **SSTORE gas cost is non-standard (and identical on both networks)** — mainnet (pacific-1) and testnet (atlantic-2) both charge 72,000 gas per write (set by governance [Proposal #109 (pacific-1)](https://www.mintscan.io/sei/proposals/109); testnet carries the same value with no separate proposal); governance-adjustable. A `forge --gas-report --fork-url` uses revm's standard EVM schedule and shows ~22,100, *not* Sei's cost — use a live `eth_estimateGas` against a Sei RPC for the real value
4. **Dual address system** — every account has both a `sei1...` bech32 address and a `0x...` EVM address derived from the same public key; they must be **associated** before cross-VM token transfers work
5. **PREVRANDAO is NOT random** — it returns a block-time-derived value; always use oracle VRF (Pyth VRF or Chainlink VRF) for on-chain randomness
6. **COINBASE = fee collector** — always returns the global fee collector address, not the block proposer; do not use it for proposer identity
Expand Down Expand Up @@ -143,7 +143,7 @@ Once connected, use MCP tools for: wallet queries, balance checks, transaction d
### 2. Apply Sei-specific correctness
Always be explicit about:
- **Network** (testnet atlantic-2 vs mainnet pacific-1) and chain ID (1328 vs 1329)
- **Gas price**: minimum 50 gwei for legacy txs; use `gasPrice` not EIP-1559 fields
- **Gas price**: governance-set, adjustable minimum (currently ~50 gwei on mainnet — pacific-1 [Proposal #112](https://www.mintscan.io/sei/proposals/112) / atlantic-2 #244; it has changed before, 100→10→50) — query `eth_gasPrice` for the live floor; use legacy `gasPrice`, not EIP-1559 fields
- **Address format** expected (bech32 `sei1...` vs EVM `0x...`) and whether association is required
- **SSTORE implications** for contracts with many storage writes
- **Parallel execution implications** for contracts with shared mutable state (hot globals)
Expand Down Expand Up @@ -201,14 +201,15 @@ When implementing changes, provide:
### Frontend — UI stack and site awareness
- **Frontend stack (Wagmi/Viem/sei-js, Sei Global Wallet, EIP-6963, dual-address UX):** [frontend/frontend-stack.md](references/frontend/frontend-stack.md)
- **sei.io / docs.sei.io site map:** [frontend/sites-map.md](references/frontend/sites-map.md)
- **Contributing to docs.sei.io (Nextra, MDX, _meta.js):** [frontend/docs-contributing.md](references/frontend/docs-contributing.md)
- **Contributing to docs.sei.io (Mintlify, MDX, docs.json):** [frontend/docs-contributing.md](references/frontend/docs-contributing.md)
- **Sei brand kit, logos, media:** [frontend/branding-media.md](references/frontend/branding-media.md)

### Ecosystem — apps, integration, participation
- **dApps directory by category:** [ecosystem/apps-directory.md](references/ecosystem/apps-directory.md)
- **DeFi integration patterns (DEXes, lending):** [ecosystem/integration-defi.md](references/ecosystem/integration-defi.md)
- **Bridges (LayerZero, Wormhole, Axelar, IBC, CCTP):** [ecosystem/bridges.md](references/ecosystem/bridges.md)
- **IBC & legacy bridging deep dive:** [ecosystem/ibc-bridging.md](references/ecosystem/ibc-bridging.md)
- **Bridges (LayerZero V2, CCTP; Wormhole verify-first; IBC legacy/exit-only):** [ecosystem/bridges.md](references/ecosystem/bridges.md)
- **IBC (legacy / exit-only — inbound disabled, SIP-3):** [ecosystem/ibc-bridging.md](references/ecosystem/ibc-bridging.md)
- **Payments (USDC + x402):** [ecosystem/payments.md](references/ecosystem/payments.md)
- **RPC endpoints — public, community, paid:** [ecosystem/rpc-providers.md](references/ecosystem/rpc-providers.md)
- **RPC agent skills (17 canonical patterns, retry, response shapes):** [ecosystem/rpc-agent-skills.md](references/ecosystem/rpc-agent-skills.md)
- **Oracles:** [ecosystem/oracles.md](references/ecosystem/oracles.md) — Chainlink, Pyth, API3, RedStone, VRF
Expand Down
2 changes: 1 addition & 1 deletion skill/references/contracts/account-abstraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const txHash = await smartAccount.sendTransaction({

The paymaster pulls the equivalent USDC from the smart account to cover gas. The user holds zero SEI and still transacts.

> Verify the USDC contract address against [docs.sei.io USDC page](https://docs.sei.io/evm/reference/usdc) before deploying — addresses move during integration phases.
> Verify the USDC contract address against [docs.sei.io USDC page](https://docs.sei.io/evm/usdc-on-sei) before deploying — addresses move during integration phases.

## Sei Global Wallet (embedded AA)

Expand Down
2 changes: 1 addition & 1 deletion skill/references/contracts/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ curl http://localhost:26657/net_info | jq '.result.n_peers'
## Solidity / Contract Development

### SSTORE gas unexpectedly high
**Cause**: Sei charges 72,000 gas per cold write on both mainnet and testnet (governance proposal #240). Multiple storage writes in a function compound quickly.
**Cause**: Sei charges 72,000 gas per cold write on both mainnet and testnet (governance Proposal #109 on pacific-1; testnet carries the same value with no separate proposal). Multiple storage writes in a function compound quickly.
**Fix**: Cache in memory, minimize storage writes. Use `forge test --gas-report` against the target network.
```solidity
// Both networks: 3 × 72,000 = 216,000 gas just for storage
Expand Down
Loading