Skip to content

docs: Cookbook tab with six recipes, plus event and Foundry fixes - #91

Merged
alexander-sei merged 23 commits into
mainfrom
docs/evm-cookbook
Oct 9, 2026
Merged

alexander-sei merged 23 commits into
mainfrom
docs/evm-cookbook

Conversation

@alexander-sei

@alexander-sei alexander-sei commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

What is the purpose of the change?

This adds a Cookbook tab. The tab holds short, task-focused recipes for developers who want working code for one job. The code is in the library that they already use: viem, ethers, or web3.py. It closes the cookbook gap from the docs review against Solana's docs.

It also fixes existing pages whose examples do not work against the public endpoints or with current tooling. I found those while I tested the new recipes, and review found a few more.

Commit What it does
1fca868 Cookbook tab and six new recipes
e4f950f Event watching over WebSocket and bounded log queries in four example pages
b352221 forge create --broadcast in four pages
7baa037 Restores the recipes' original wording (contractions)
f565cc3 TypeScript examples run as .mts files (review feedback)
a519486 OpenZeppelin remappings in the ERC-20 recipe (review feedback)
bee848f Pimlico guide no longer overwrites .env
9275f0e Pyth guide updated for Pyth's August 2026 Core upgrade
1bda1f9 ethers watchers show how to close their WebSocket provider (review feedback)
1c6e52a web3.py examples checksum user-supplied addresses (review feedback)
42801c6 Oracle pages avoid point-in-time wording, and the Pyth example checks for PYTH_API_KEY (review feedback)
5f417aa Watcher snippets show their cleanup as a comment instead of stopping right away (review feedback)
21aec1c Verify-contracts note says to put --constructor-args last (review feedback)
5a18ce3 Example pages import webSocket with the other viem helpers (review feedback)
28a3770 Remix sandbox matches the shown contract, and the Pyth testnet address links to Seiscan (review feedback)
0d78c93 ASD-STE100 wording, as in #90, for the prose that this PR adds or changes (undoes 7baa037)
8404fae Cosmos SDK page listed under Learn → Governance instead of Getting Started (review feedback)
88c4112 Verify-contracts page uses the Hardhat guide's network names (review feedback)
2140394 Balance and price-feed recipes show placeholders instead of sample values (review feedback)
b38af31 seitestnet and seimainnet on every page that has a Hardhat config (review feedback)

Describe the changes to the documentation

Cookbook

  • New tab between EVM and Nodes. It groups the twelve existing example pages and six new recipes into Client Setup, Accounts and Transactions, Tokens, Contracts, and Sei Features. The example pages keep their URLs, and /cookbook and /evm/evm-parity/examples redirect to the new overview at /evm/cookbook.
  • New recipes in evm/cookbook/: read a balance, send SEI, deploy an ERC-20 (Foundry, Hardhat, or Remix), listen to events, sponsor gas with Pimlico, and read a price feed. Two of them have a RunSnippet.
  • Synced code tabs. Where the task allows, each recipe shows viem, ethers, and web3.py with the same tab labels. When you pick a library once, every code block on the page switches to it.
  • Cosmos-SDK tab removed. It held a single page, which now sits in the Learn tab's Governance group, after the SIPs page. Its deprecation notice is unchanged.
  • Links from the home page, the EVM overview, and the retired Oracle precompile page. STYLE_GUIDE.md describes the Cookbook conventions, and scripts/generate-llms.mjs gets a Cookbook section for the weekly llms.txt run.

The price-feed recipe uses the API3 SEI/USD push feed (0x09c6e594DE2EB633902f00B87A43b27F80a31a60), which you can read with one free view call. Chainlink on Sei is Data Streams (credentials from Chainlink), and Pyth needs a signed update from its API before a read is current.

Event watching and log queries

Tests against the public endpoints showed that HTTP watchers built on filters miss or repeat events. In one 40-second window, viem reported 2 of 12 transfers, and ethers reported 14. On Sei Mainnet, eth_uninstallFilter returns 403, which crashes ethers when a listener stops. The WebSocket endpoints serve eth_subscribe but not eth_getLogs. eth_getLogs caps a request at 2,000 blocks, so the ERC-20 history query from block 0 always failed.

The ERC-20, ERC-721, ERC-1155, and ethers quickstart pages now watch events over WebSocket. The ERC-20 history query reads the latest 2,000 blocks. The ethers quickstart listener declares the Transfer event that it listens for. Each watcher shows its cleanup as a comment. The cleanup removes the listener and closes the WebSocket provider. A copied snippet therefore listens until you stop it.

Foundry

Current Foundry only simulates forge create without --broadcast, so the documented commands deployed nothing. The examples in evm-foundry.mdx, deploy-verify.mdx, evm-verify-contracts.mdx, and migrate-from-solana.mdx now pass the flag, before --constructor-args (which takes every value after it). The Foundry guide also passed ABI-encoded constructor arguments, which forge create rejects. It now passes plain values.

Review follow-ups

  • .mts files. In a new npm project, tsx compiles a plain .ts file as CommonJS, and top-level await fails with Top-level await is currently not supported with the "cjs" output format. The recipes and the viem and ethers quickstarts now tell readers to save TypeScript examples as .mts files.
  • Remappings. The ERC-20 recipe's Foundry tab now runs forge remappings > remappings.txt, like the Foundry guide.
  • Checksummed addresses. web3.py rejects lowercase addresses, so the web3.py placeholders in the recipes go through Web3.to_checksum_address.
  • Wording that ages well. The price-feed warning and the Pyth guide no longer describe network state at a point in time.

Pimlico guide

The guide tells you to put PIMLICO_API_KEY in .env. Its script then wrote the generated PRIVATE_KEY over the whole file, so the API key disappeared after the first run. It now appends the key. I also removed a top-level return from one snippet.

Pyth guide

Since Pyth's Core upgrade on August 26, 2026, Hermes rejects requests without an API key. Pyth's address list also shows 0x16392B49EA47D4A21bb17F69aA9E7aD570284838 for Sei Mainnet instead of 0x2880aB155794e7179c9eE2e38200202908C17B43, which Pyth still lists for Sei Testnet. The guide now:

  • sends the key as a bearer token to Pyth's recommended base URL (https://pyth.dourolabs.app/hermes)
  • stops early if the key is not set
  • lists both addresses
  • drops the Pythnet description
  • explains when getLatestSeiPrice() reverts

Notes

  • Verification. Every code block in the new recipes ran before the PR was opened. Read-only code ran against Sei Mainnet, and transaction code ran on a local anvil chain with chain ID 1328. Both deploy paths ran (Foundry and Hardhat Ignition), and the live event watchers were checked against eth_getLogs for the same blocks. Python ran on web3.py 7.7, 7.16, and 8.0, and all TypeScript passes a strict type check.
  • Follow-up checks. The viem recipe blocks ran as .mts files in a fresh npm project without "type": "module" (the live watcher caught 36 of 36 transfers). The web3.py read-back worked with a lowercase USDC address, which raised InvalidAddress without the checksum call. With the cleanup lines run after a pause, the ethers watchers exit on their own after destroy(). The Pimlico snippet kept PIMLICO_API_KEY in .env. The repo checks and mint broken-links pass.
  • Language. The prose that this PR adds or changes follows the ASD-STE100 rules from docs: ASD-STE100 language pass and six factual fixes #90. The prose-only check from docs: ASD-STE100 language pass and six factual fixes #90 finds no change outside prose, except for three recipe descriptions in the frontmatter. Code blocks, including their comments, are unchanged.
  • Not verified end to end: the Pyth flow needs a real Pyth API key. With a dummy key, Hermes now answers 403 instead of 401, so the request reaches the right route with the header. The Pimlico recipe also stops at the paymaster call without an API key.
  • After merge: run the "Regenerate llms.txt" workflow so llms.txt and llms-full.txt include the Cookbook.
  • Possible follow-up: seidroid suggested that the older example pages follow the recipe conventions ("You are done when you see" blocks and web3.py tabs). That is a bigger content change, so I would do it in a separate PR.

alexander-sei and others added 3 commits October 2, 2026 15:58
Add a Cookbook tab that groups the twelve existing example pages with six
new recipes: read a balance, send SEI, deploy an ERC-20, listen to events,
sponsor gas with Pimlico, and read a price feed. The recipes show viem,
ethers, and web3.py in code groups with matching labels, so the reader's
library choice applies to every block on the page.

The example pages keep their URLs. The one-page Cosmos-SDK tab moves into
Learn next to the SIP-03 guides, and /cookbook and /evm/evm-parity/examples
redirect to the new overview.

The price-feed recipe reads the API3 SEI/USD push feed, because the Oracle
precompile is retired and the pull oracles need a signed update per call.

Co-authored-by: Cursor <cursoragent@cursor.com>
On the public endpoints, filter-based watchers over HTTP miss or repeat
events, and eth_uninstallFilter returns 403 on Sei Mainnet, which crashes
ethers when a listener stops. eth_getLogs also rejects ranges longer than
2,000 blocks, so the ERC-20 history query from block 0 always failed.

Watch over the WebSocket endpoint in the ERC-20, ERC-721, ERC-1155, and
ethers quickstart examples, and query the latest 2,000 blocks for history.
The ethers listener also declares the Transfer event that it listens for.

Co-authored-by: Cursor <cursoragent@cursor.com>
Current Foundry releases only simulate forge create unless --broadcast is
set, so the documented commands deployed nothing. Add the flag before
--constructor-args, which takes every value after it, and pass plain
constructor values: forge create rejects ABI-encoded arguments.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
sei-docs 🟢 Ready View Preview Oct 9, 2026, 7:51 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@cursor

cursor Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation and navigation only; no application code. Redirects and IA changes affect discoverability but are low operational risk.

Overview
Introduces a Cookbook Mintlify tab with six new task-focused recipes (balances, send SEI, deploy ERC-20, listen to events, Pimlico gas sponsorship, API3 price feed) and an overview that groups existing evm-parity/examples pages by topic. Navigation drops the standalone Cosmos-SDK tab (deprecation page moves to Learn → Governance), removes the Videos section and exchange-specific SIP-03 page, and adds redirects from /cookbook and /evm/evm-parity/examples. STYLE_GUIDE.md and generate-llms.mjs document Cookbook conventions; home and EVM index link to the cookbook.

Corrects copy-paste examples that failed on Sei’s public RPCs: live event watching uses WebSocket (with cleanup notes), historical logs are capped to 2,000 blocks, forge create includes --broadcast and plain constructor args, TypeScript samples run as .mts with tsx, and Hardhat network keys are standardized to seimainnet / seitestnet across migration and verify guides.

Oracle and wallet guides: Pyth docs reflect the 2026 Core upgrade (API key, Hermes URL, mainnet contract address); Pimlico samples append generated keys instead of overwriting .env; retired Oracle precompile points to the new price-feed recipe. Video tutorial callouts are removed from several EVM pages.

Reviewed by Cursor Bugbot for commit d972568. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a well-structured Cookbook tab with six recipes. It also fixes real problems in the existing pages: event watching now uses WebSocket, eth_getLogs queries now stay within the 2,000-block limit, and the forge create examples now pass --broadcast. Redirects and navigation look correct, and nothing blocks the merge. The main open issue is that the TypeScript run instructions use top-level await, which fails when tsx treats the scripts as CommonJS.

Findings: 0 blocking | 7 non-blocking | 3 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • REVIEW_GUIDELINES.md is empty, so this review applies only the AGENTS.md conventions.
  • The Cursor second-opinion pass produced no output (cursor-review.md is empty).
  • The other example pages under evm/evm-parity/examples/ could also use the 'You are done when you see' blocks and the synced viem/ethers/web3.py tab labels. Without them, the Cookbook tab mixes two page styles.
  • After merge, run the 'Regenerate llms.txt' workflow, as the PR description notes. The new Cookbook section in generate-llms.mjs sits before 'EVM Development', so it matches pages correctly.
  • 3 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread evm/cookbook/read-a-balance.mdx Outdated
Comment thread evm/cookbook/sponsor-gas-with-pimlico.mdx Outdated
Comment thread evm/cookbook/deploy-an-erc20.mdx
alexander-sei and others added 5 commits October 4, 2026 14:11
Put back the contractions that were spelled out before the PR was opened to
match the ASD-STE100 pass. The recipes keep the wording they were written
and tested with.

Co-authored-by: Cursor <cursoragent@cursor.com>
In a new npm project, tsx compiles a plain .ts file as CommonJS, so the
recipe and quickstart examples fail with "Top-level await is currently not
supported with the "cjs" output format". Tell readers to save TypeScript
examples as .mts files, add the missing install step to the ERC-20
read-back, and note the convention in STYLE_GUIDE.md and the llms.txt
config.

Co-authored-by: Cursor <cursoragent@cursor.com>
Foundry resolves @openzeppelin/contracts on its own, but editors and other
Solidity tools read the mapping from remappings.txt. The Foundry guide
already has the same step.

Co-authored-by: Cursor <cursoragent@cursor.com>
…g it

The guide has you store PIMLICO_API_KEY in .env, and then the script wrote
the generated PRIVATE_KEY over the whole file, so the API key was gone
after the first run. Append the key instead, and drop a top-level return
from the sending snippet.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ontract

Since Pyth's Core upgrade on August 26, 2026, Hermes rejects requests
without an API key, and Pyth lists 0x16392B49EA47D4A21bb17F69aA9E7aD570284838
as the Sei Mainnet contract. Send the key as a bearer token to Pyth's
recommended Hermes base URL, list the mainnet and testnet addresses
separately, replace the Pythnet description, and note that the update fee
is currently zero on both networks.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a solid Cookbook tab with six recipes. It also fixes real problems in existing pages: event watchers now use WebSocket, log queries stay within the 2,000-block cap, Foundry commands pass --broadcast, the Pimlico script no longer overwrites .env, and the Pyth guide reflects the Core upgrade. Redirects, nav, link targets, and terminology all check out; only minor robustness and wording nits remain.

Findings: 0 blocking | 8 non-blocking | 4 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • REVIEW_GUIDELINES.md is empty, so this review applies AGENTS.md conventions only. The Cursor second-opinion pass produced no output. Codex reported no material issues.
  • Several statements describe current network state and will go stale: the Pyth Mainnet contract has no SEI/USD price yet, the Pyth update fee is currently zero, and the API3 testnet feed was months old when tested. AGENTS.md prefers linking to live sources over hard-coding state that changes. Consider wording these so they age gracefully, or link to the authoritative page.
  • In the ERC-20, ERC-721, and ERC-1155 example pages, the new ethers watchers open a WebSocketProvider, but off() never calls wsProvider.destroy(). A copied script therefore keeps running after it stops listening. Consider adding await wsProvider.destroy() to the stop example.
  • Follow-up already noted in the PR: bring the older example pages in line with the recipe conventions ("You are done when you see" blocks and web3.py tabs).
  • 4 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread evm/oracles/pyth-network.mdx
Comment thread evm/oracles/pyth-network.mdx
Comment thread evm/cookbook/deploy-an-erc20.mdx Outdated
Comment thread evm/cookbook/read-a-price-feed.mdx Outdated
alexander-sei and others added 3 commits October 4, 2026 14:28
off() removes the listener, but the WebSocket stays open, so a copied
script keeps running after it stops listening. The stop examples now
destroy the provider too, and the ERC-1155 example gets a stop example.

Co-authored-by: Cursor <cursoragent@cursor.com>
web3.py rejects addresses that aren't checksummed, so pasting a lowercase
address from a CLI raised InvalidAddress. Wrap the address placeholders in
Web3.to_checksum_address.

Co-authored-by: Cursor <cursoragent@cursor.com>
Describe network state in a way that doesn't go stale: the API3 testnet
warning, the note about the new Pyth Mainnet contract, and the Pyth update
fee. The Pyth fetch example now stops with a clear error when
PYTH_API_KEY isn't set, instead of sending "Bearer undefined".

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a well-organized Cookbook tab with six recipes. It also fixes real problems in existing pages: forge create without --broadcast, unbounded eth_getLogs queries, HTTP filter watchers, the .env overwrite in the Pimlico guide, and the Pyth Core changes. I found no blockers. The main remaining issue is that the ethers watcher snippets tear down their listeners right after registering them.

Findings: 0 blocking | 7 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The Cursor review pass produced no output (cursor-review.md was empty). REVIEW_GUIDELINES.md was also empty, so this review follows AGENTS.md conventions only.
  • The ethers watcher snippets in erc20.mdx, erc721.mdx and ethers-quickstart.mdx show the same thing as the erc1155.mdx inline comment: they register a listener, then immediately await off() and destroy() the provider. The old snippets also called off right away, but now the WebSocket provider is destroyed too. A reader who copies a snippet as-is gets a watcher that never fires. The cookbook recipe shows the better pattern: put the cleanup in a comment or a shutdown handler (for example, process.on('SIGINT', ...)).
  • I couldn't verify the Pyth changes, the new Hermes base URL (pyth.dourolabs.app/hermes) and the new Sei Mainnet address 0x16392B49…, from inside the repo. The PR says the end-to-end flow wasn't tested with a real key. Have someone confirm both against Pyth's contract-addresses page before merging, because a wrong oracle address in docs is costly.
  • The Pyth <Warning> ("Pyth upgraded Pyth Core on August 26, 2026...") is point-in-time wording. Consider removing or softening it once the upgrade is no longer recent.
  • After merge, remember to trigger the "Regenerate llms.txt" workflow so llms.txt and llms-full.txt pick up the new Cookbook section. I couldn't run scripts/check-redirects.mjs in this environment, so rely on the CI result for the two new redirects.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread evm/evm-parity/examples/erc1155.mdx Outdated
Comment thread evm/evm-verify-contracts.mdx Outdated
alexander-sei and others added 2 commits October 4, 2026 14:33
The watcher snippets stopped right after they started, so a copied snippet
never received an event, and destroying an ethers provider before it
connected threw an error. Show the stop calls as a comment instead, as the
listen-to-events recipe does. The WebSocket page had the same pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
The note said to add constructor arguments after the contract path, but
the example now has --broadcast in between. Say to put --constructor-args
last instead, as the Foundry guide does.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a well-scoped, carefully tested docs PR. It adds a Cookbook tab with six recipes and fixes real problems in existing pages: forge create --broadcast, WebSocket event watchers, bounded eth_getLogs ranges, and the Pimlico .env overwrite. I found no blocking issues, only a few small polish nits.

Findings: 0 blocking | 7 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The Cursor second-opinion file (cursor-review.md) was empty, so that pass produced no output. The Codex pass reported no material issues, and I agree that nothing here blocks the merge.
  • I couldn't run node scripts/check-redirects.mjs in this environment. I checked by hand instead. Both new redirects (/cookbook and /evm/evm-parity/examples) point to evm/cookbook/index.mdx, which exists. Neither source collides with an existing redirect or page, since there's no evm/evm-parity/examples/index.mdx. CI should confirm this.
  • After merge, remember to run the "Regenerate llms.txt" workflow, as the PR notes say. The new Cookbook matcher in scripts/generate-llms.mjs comes before EVM Development, so the /evm/evm-parity/examples/* pages move into the new section. That looks intentional.
  • The ERC-20/721/1155 pages add a second import { webSocket } from 'viem'; in the middle of the page. That's fine for a snippet, but adding webSocket to the page's top-level viem import would make a copy-pasted script cleaner.
  • Optional follow-up, already noted by the author: bring the older evm-parity/examples pages in line with the recipe conventions ("You are done when you see" blocks and web3.py tabs) so the Cookbook tab reads consistently.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread evm/cookbook/deploy-an-erc20.mdx Outdated
Comment thread evm/oracles/pyth-network.mdx Outdated
alexander-sei and others added 2 commits October 4, 2026 14:37
The watcher snippets imported webSocket a second time in the middle of the page. Add it to the setup block's viem import instead, so a copied script has one import line.

Co-authored-by: Cursor <cursoragent@cursor.com>
… testnet address

The ERC-20 recipe's Remix payload used a plain import, while the page shows a named import. Re-encode the exact source from the page. The Pyth guide now links the Sei Testnet address to Seiscan, like the mainnet one.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a well-tested docs PR. It adds a Cookbook tab with six recipes and fixes real problems in the existing examples: HTTP-polled watchers, unbounded eth_getLogs ranges, a missing forge create --broadcast, the Pimlico script overwriting .env, and the changes from Pyth's Core upgrade. I found no blockers, only a few small consistency notes.

Findings: 0 blocking | 8 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The Cursor second-opinion review (cursor-review.md) was empty, so that pass produced no output. Codex reported no material issues.
  • REVIEW_GUIDELINES.md was empty, so this review applied only the rules in AGENTS.md.
  • I couldn't run node scripts/check-redirects.mjs in this environment because the command needed approval. CI should confirm that the new /cookbook and /evm/evm-parity/examples redirects resolve to evm/cookbook/index.
  • I checked that the ERC-20, ERC-721, and ERC-1155 ABIs already declare the events their new WebSocket watchers subscribe to, and that websocket.mdx uses a WebSocketProvider. The destroy() cleanup comments are correct.
  • The Pyth changes depend on external facts I can't verify here: the August 26, 2026 Core upgrade, the pyth.dourolabs.app/hermes base URL, and the new mainnet address 0x16392B49…. The PR says the flow wasn't verified end to end with a real key. Have someone with a Pyth API key confirm before merge.
  • After merge, remember to trigger the 'Regenerate llms.txt' workflow, as the PR notes, so the new Cookbook section appears in llms.txt and llms-full.txt.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comments that couldn't be anchored to the diff

  • evm/evm-foundry.mdx:1410 -- [nit] Good fix moving to plain constructor values. YOUR_ADDRESS is unquoted here, while the NFT line below quotes the URL. That's fine for an address, but readers sometimes paste values that contain spaces. Consider quoting placeholders the same way.

// To stop: await usdc.removeAllListeners(); await provider.destroy();
```

```python web3.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This page uses await usdc.on(...), but the updated ERC-20, ERC-721, and ERC-1155 pages call wsContract.on(...) without await. Both work, but awaiting on() surfaces subscription errors. Consider using the same form on every page.


```text
1384.115892177302953913 SEI
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The sample output shows a balance of about 1384 SEI, but the snippet reads the zero address. The text already calls the number illustrative. A neutral placeholder value, or a note to swap in your own address first, would make that clearer. The ERC-20 section below already does this.

Apply the ASD-STE100 rules from the language pass in #90 to the prose
that this PR adds or changes. This undoes 7baa037, which put the
contractions back.

- Spell out contractions.
- Give one instruction per sentence, and put the condition or purpose
  first.
- Use the active voice, for example "tsx compiles a plain .ts file as
  CommonJS".
- Replace figurative words ("lives in", "split the work", "go live")
  and -ing phrases.
- Start the Pyth warning with the commands, then give the reason.

Only prose changes. Code blocks, link targets, and heading anchors are
unchanged. Three recipe descriptions in the frontmatter are shorter or
no longer end in "using".

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a Cookbook tab with six recipes. It also fixes examples that were broken: event watching now uses WebSocket, log queries are bounded, forge create passes --broadcast, the Pimlico guide no longer overwrites .env, and the Pyth guide reflects Pyth's August 2026 upgrade. The navigation, redirects and code samples look correct. I found nothing blocking, only a couple of small notes.

Findings: 0 blocking | 6 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The Cursor review file (cursor-review.md) was empty, so that pass produced no output. Codex reported no material issues. REVIEW_GUIDELINES.md was also empty, so I used the AGENTS.md conventions instead.
  • I checked the redirects. The new ones (/cookbook and /evm/evm-parity/examples → /evm/cookbook) point to evm/cookbook/index.mdx, which this PR adds. The old example pages keep their URLs, so they need no redirects.
  • Because the Cosmos-SDK tab is gone, cosmos-sdk/index now appears only in the Learn group. The many existing redirects to /cosmos-sdk still resolve. Please confirm the deprecation notice on that page still shows as intended in the new location (AGENTS.md requires it to stay visible).
  • Several recipes show hard-coded example output: block numbers, transaction hashes, the SEI/USD price, and the count of 319 transfers. Most are already labelled as illustrative. Consider marking all of them that way so readers don't treat the numbers as real network data.
  • Follow-up, as the author already noted: bring the older evm-parity/examples pages in line with the recipe conventions (web3.py tabs and "You are done when you see" blocks). After merge, run the llms.txt regeneration workflow.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comments that couldn't be anchored to the diff

  • evm/oracles/pyth-network.mdx:1813 -- [nit] This warning says the guide was updated for the Pyth Core upgrade on August 26, 2026, which is a point-in-time statement. Elsewhere this PR deliberately removes point-in-time wording. Consider rewording to describe the current requirements (Hermes needs an API key, and these are the current addresses) and keep the upgrade-guide link for background. That way the warning won't go stale.

Comment thread scripts/generate-llms.mjs
match: (p) => p.startsWith('/evm/cookbook') || p.startsWith('/evm/evm-parity/examples/'),
overview: [
'The Cookbook has task-focused recipes with runnable code, most of them in viem, ethers, and web3.py. The recipes read balances, send SEI, deploy and use ERC-20, ERC-721, and ERC-1155 tokens, listen to events, batch reads with Multicall3, sponsor gas with an ERC-4337 paymaster, and read the API3 SEI/USD price feed.',
'The recipes rely on this public endpoint behavior. Watch live events over WebSocket (wss://evm-ws.sei-apis.com, wss://evm-ws-testnet.sei-apis.com), because HTTP polling watchers can miss or repeat events. The WebSocket endpoints do not serve eth_getLogs or filters. Fetch past events over HTTP with eth_getLogs, which covers at most 2,000 blocks per request.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This overview says the WebSocket endpoints don't serve eth_getLogs or filters. The PR description only shows that eth_getLogs isn't served over WebSocket; the filter problem it describes is HTTP eth_uninstallFilter returning 403. Unless you've confirmed that WebSocket filter methods are also unavailable, drop "or filters" so the llms.txt text doesn't state something unverified.

Remove evm/videos.mdx, its nav group in the EVM tab, and the five Info
callouts that link to it. Redirect /evm/videos to /evm, so old links
still resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a well-tested docs PR. It adds a Cookbook tab with six recipes and fixes real bugs in existing examples: forge create without --broadcast, HTTP polling watchers, unbounded eth_getLogs, the .env overwrite in the Pimlico guide, and the Pyth Core upgrade. Nothing blocks the merge. The main gap is that the PR also deletes the Video Tutorials page, and the description never mentions it.

Findings: 0 blocking | 9 non-blocking | 3 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The PR deletes evm/videos.mdx and its sidebar group, plus the 'Watch the video walkthrough' callouts in five pages, and redirects /evm/videos to /evm. The description says nothing about this. Either say in the description why the videos were removed, or split the removal into its own PR so maintainers can decide on it separately. Removing published content is out of scope for 'Cookbook + event/Foundry fixes'.
  • Moving the Cosmos-SDK page into Learn (Cosmos-SDK tab removed) keeps the deprecation notice and the URL, so it meets AGENTS.md. Like the videos change, it is a navigation change beyond the Cookbook scope. It is already called out in the description, so this is just a note.
  • Several facts are now hard-coded in many places: the 2,000-block eth_getLogs cap, the fact that the public WebSocket endpoints don't serve eth_getLogs, and the 24-hour API3 heartbeat. They appear in the recipes, four example pages, STYLE_GUIDE.md, and the llms.txt config. If the RPC limits change, all of these copies go stale together. Consider stating each limit once (for example in the RPC reference) and linking to it.
  • The same paragraph ('The TypeScript examples use top-level await. Save each one as a .mts file…') is copied into five recipes and two quickstarts. A shared snippet would keep the copies consistent.
  • I checked these claims against the repo: 'Sei does not burn the base fee' matches gas-and-fees.mdx. The getLatestSeiPrice() 60-second revert note matches getPriceNoOlderThan(..., 60) in the Pyth contract. No links to /evm/videos remain apart from the new redirect.
  • Second-opinion passes: codex-review.md and cursor-review.md were both empty, so neither Codex nor Cursor produced any output. REVIEW_GUIDELINES.md was also empty, so I used AGENTS.md conventions only.
  • 3 suggestion(s)/nit(s) flagged inline on specific lines.

---
Pyth Network is a first-party oracle that delivers high-fidelity, low-latency financial market data on-chain. Unlike traditional push-based oracles, Pyth uses a "pull" model: applications get signed price updates on demand. This significantly reduces gas costs and still keeps the data fresh. Pyth has more than 400 price feeds across cryptocurrencies, equities, FX, and commodities. It aggregates data directly from more than 120 institutional data publishers, including major exchanges and trading firms.

<Warning>Send a Pyth API key with every request to Hermes. On Sei Mainnet, use the new Pyth contract address. Pyth made both changes in its Pyth Core upgrade on August 26, 2026. This guide includes them. For background, see Pyth's [upgrade guide](https://docs.pyth.network/price-feeds/core/upgrade/preparing).</Warning>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] "use the new Pyth contract address" will date badly. The address is only "new" relative to August 2026. Since the page already lists both addresses below, consider: "On Sei Mainnet, use the Pyth contract address listed in Step 1."

Comment thread docs.json
"permanent": true
},
{
"source": "/evm/videos",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] This redirect exists because evm/videos.mdx is deleted, but the PR description doesn't mention the deletion. Please document why the videos were removed, or move this change to a separate PR.

async def main():
async with AsyncWeb3(WebSocketProvider("wss://evm-ws.sei-apis.com")) as w3:
transfer = w3.eth.contract(address=USDC, abi=TRANSFER_ABI).events.Transfer()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Here USDC goes straight into w3.eth.contract(address=...). The other web3.py recipes wrap addresses in Web3.to_checksum_address. This literal is already checksummed, so it works, but wrapping it would match the convention set in commit 1c6e52a and keep copy-pasted variants safe.

Remove learn/sip-03-exchange-migration.mdx, its Learn nav entry, and the
card on the SIPs page that links to it. Redirect the old URL to the
SIP-03 migration guide. That guide's frontmatter no longer promises
exchange guidance, and the style guide now names one SIP-03 guide.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Cookbook tab, recipes, and the fixes for WebSocket watchers, Foundry --broadcast, Pyth, and Pimlico are well built and follow the repo conventions. One concern: the last two commits delete the SIP-03 exchange migration guide and the Videos page, and the PR description doesn't mention either deletion.

Findings: 0 blocking | 7 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The last two commits ('remove the Videos page' and 'remove the SIP-03 exchange migration guide') have nothing to do with the Cookbook, and the PR description doesn't mention them. Explain why they are removed, or move them to a separate PR so they get their own review.
  • Codex (P2, agreed): learn/sip-03-exchange-migration.mdx is deleted and redirected to /learn/sip-03-migration. That page has none of the exchange or custodian guidance: the four migration options, FundsForwarder, or the address-association steps for exchanges. The 'exchange migration' and 'FundsForwarder' keywords are also dropped from its frontmatter. The deprecation date in the deleted page (June 15, 2026) has passed, so the content may be obsolete. If so, say that in the PR. If not, move the relevant exchange guidance into the user guide.
  • The committed llms.txt and llms-full.txt still mention /evm/videos and /learn/sip-03-exchange-migration. As the PR notes, run the 'Regenerate llms.txt' workflow after merge.
  • REVIEW_GUIDELINES.md is empty, so no repo-specific review guidelines were applied.
  • The Cursor review file is empty, so that pass produced no output.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread docs.json
"permanent": true
},
{
"source": "/learn/sip-03-exchange-migration",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] This redirect sends exchanges and custodians to the user-facing SIP-03 guide, which has none of the deleted page's exchange content (migration options, FundsForwarder, address association for exchanges). Either keep or migrate that guidance, or confirm in the PR that it is obsolete now that the deprecation date has passed. The PR description doesn't mention this removal. (Raised by Codex too.)

Comment thread docs.json
"permanent": true
},
{
"source": "/evm/videos",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The Videos page removal and its redirect to /evm aren't mentioned in the PR description. It's also unrelated to the Cookbook, so consider a separate PR or a line in the description explaining why the videos are dropped.

alexander-sei and others added 4 commits October 9, 2026 16:09
The deprecated Cosmos SDK page sat in Learn > Getting Started, the first
group that new readers see. List it in the Governance group after the
SIPs page instead, next to the SIP-3 overview. The page, its deprecation
notice, and the redirects to /cosmos-sdk are unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
The Hardhat guide and the ERC-20 recipe name the networks seitestnet and
seimainnet, but the verify page used sei_testnet and sei_mainnet. A
reader who followed the guide and then ran the verify commands got an
unknown-network error. Use the guide's names on the verify page.

Co-authored-by: Cursor <cursoragent@cursor.com>
The sample outputs showed a SEI/USD price and a zero-address balance
that read like real network data. Show <price>, <age>, and <balance>
placeholders, and say what each one is.

Co-authored-by: Cursor <cursoragent@cursor.com>
The deploy-and-verify example, both migration guides, and the Addr
precompile page named the Hardhat networks sei, seiTestnet, or
seiMainnet. Use the names from the Hardhat guide, so that one config
works with the commands on every page.

The LayerZero guide keeps sei-mainnet, because its config names every
chain in that style, such as optimism-mainnet.

Co-authored-by: Cursor <cursoragent@cursor.com>

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a well-built Cookbook tab with six recipes. It also fixes real bugs in existing examples: the missing forge create --broadcast, HTTP-polling event watchers, unbounded eth_getLogs queries, the Pimlico guide overwriting .env, and the Pyth guide's API key and mainnet address. The code and redirects look correct; my only concern is that two page deletions aren't mentioned in the PR description.

Findings: 0 blocking | 6 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • Undocumented scope: commits 7cb4e67 (remove evm/videos.mdx) and b142861 (remove learn/sip-03-exchange-migration.mdx) are not in the PR description's commit table or prose. Deleting the exchange/custodian SIP-03 guide is a content decision with external impact, because exchanges may link to it. A maintainer should approve it explicitly. Please add both deletions to the description. The redirects to /evm and /learn/sip-03-migration are present.
  • The /learn/sip-03-exchange-migration → /learn/sip-03-migration redirect sends exchange readers to a page whose description and keywords this PR strips of exchange guidance (FundsForwarder, the exchange migration options). Confirm that the remaining page still covers what exchanges need, or that this content is intentionally retired.
  • llms.txt and llms-full.txt still list /evm/videos and /learn/sip-03-exchange-migration until the scheduled regeneration runs. As the PR notes, trigger the "Regenerate llms.txt" workflow after merge. Per AGENTS.md, do not hand-edit these files.
  • The Pyth guide changes the Sei Mainnet contract address and the Hermes base URL based on Pyth's upgrade. The author could not verify this end to end without a real API key, so a maintainer with a Pyth key should spot-check the flow before or soon after merge.
  • Second-opinion passes: Codex reported no material issues. The Cursor review file was empty, so that pass produced no output.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comments that couldn't be anchored to the diff

  • evm/oracles/pyth-network.mdx:2121 -- [nit] The sample output now shows Update fee: 0.0 SEI. That reads as a point-in-time value, while the PR otherwise avoids point-in-time wording here. Consider a placeholder such as <fee> SEI, as in the cookbook recipes.

Comment thread docs.json
"permanent": true
},
{
"source": "/learn/sip-03-exchange-migration",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] This redirect relies on removing learn/sip-03-exchange-migration.mdx, which the PR description doesn't mention. Please call out the deletion and confirm that sip-03-migration still covers the exchange/custodian guidance (FundsForwarder, migration options) that readers following this redirect expect.

@alexander-sei
alexander-sei merged commit a776dab into main Oct 9, 2026
10 checks passed
@alexander-sei
alexander-sei deleted the docs/evm-cookbook branch October 9, 2026 19:51

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Cookbook tab and its six recipes are well built and consistent. The forge create --broadcast, WebSocket watcher, bounded eth_getLogs, Pimlico .env and Pyth fixes are correct. Redirects are in place for every moved or removed page. There are no blockers, but the PR also deletes two pages, the SIP-03 exchange migration guide and the Videos page, and the PR description doesn't mention either deletion.

Findings: 0 blocking | 8 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • The PR deletes learn/sip-03-exchange-migration.mdx and evm/videos.mdx in their own commits, but the PR description never mentions either deletion. A reviewer reading only the description would miss them. Record why they were removed, for example in a follow-up note or the changelog.
  • The exchange and custodian guidance is now gone from the docs. That covers the four migration options, the FundsForwarder contract (including its OtterSec audit note), and the support contacts. learn/sip-03-migration.mdx has none of this content. Confirm that dropping it was intended, or move the parts that still apply into the SIP-03 guide.
  • Hardhat network names are inconsistent. The docs pages now use seitestnet and seimainnet. The Mintlify skills under .mintlify/skills/ (sei-contracts, sei-migration) still configure and use seiTestnet. Align them in a follow-up so assistant answers match the docs.
  • After merge, run the 'Regenerate llms.txt' workflow, as the PR notes say. llms-full.txt still has the old network names (sei_testnet, --network sei) and the deleted pages.
  • The same .mts/tsx paragraph appears word for word in five recipes. A shared snippet would make it easier to update.
  • Codex and Cursor produced no output: codex-review.md and cursor-review.md are both empty. This review is a single pass.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread docs.json
"permanent": true
},
{
"source": "/learn/sip-03-exchange-migration",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] This redirect sends exchange and custodian readers to /learn/sip-03-migration. That page has no exchange content: no FundsForwarder and no migration options for exchanges, and this PR also removes exchange migration from its keywords. Existing links and search results will land on a page that doesn't answer their question. Either move the exchange guidance that still applies into that page and link to an anchor, or add a short note there that the exchange guide was retired.

---
Pyth Network is a first-party oracle that delivers high-fidelity, low-latency financial market data on-chain. Unlike traditional push-based oracles, Pyth uses a "pull" model: applications get signed price updates on demand. This significantly reduces gas costs and still keeps the data fresh. Pyth has more than 400 price feeds across cryptocurrencies, equities, FX, and commodities. It aggregates data directly from more than 120 institutional data publishers, including major exchanges and trading firms.

<Warning>Send a Pyth API key with every request to Hermes. On Sei Mainnet, use the new Pyth contract address. Pyth made both changes in its Pyth Core upgrade on August 26, 2026. This guide includes them. For background, see Pyth's [upgrade guide](https://docs.pyth.network/price-feeds/core/upgrade/preparing).</Warning>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This warning says the change happened "on August 26, 2026". That is point-in-time wording, which commit 42801c6 tried to remove elsewhere. Consider saying "Since Pyth's Core upgrade" and keeping the date only behind the upgrade-guide link.

This branch was successfully deployed

1 active deployment
staging — d9725685 Deployed Oct 9, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant