docs: fix factual errors, broken examples, and migrate to Hardhat 3#27
docs: fix factual errors, broken examples, and migrate to Hardhat 3#27alexander-sei wants to merge 3 commits into
Conversation
Full-docs review with every finding verified against the sei-chain source or upstream tool docs before fixing: - Funds-affecting example bugs: staking undelegate/redelegate amounts are 6-decimal usei (verified in staking.go), bank sendNative takes wei (verified via HandlePaymentUseiWei), distribution uses withdrawDelegationRewards per abi.json - P256: correct half-curve-order malleability constant; switch all examples to low-level staticcall since the precompile returns empty data on invalid signatures per RIP-7212, which reverts high-level calls - addr: associate examples now pass the full EIP-191 prefixed message (recovery hashes the raw message string, verified in addr.go) - Contradiction fixes: SIP-03 date (June 15, 2026), instant finality on Twin Turbo page, gas fee formula, node min-gas-price guidance, Ledger app guidance aligned with the EVM signing path - Hardhat 3 everywhere: deploy-verify, migrate-from-solana, migrate-from-other-evms, and precompile pages now use defineConfig, configVariable, encrypted keystore, and network.getOrCreate() (layerzero.mdx intentionally stays on LayerZero's HH2-based toolkit) - Broken commands/links: hardhat verify invocation per HH version, web3auth install, The Graph subgraph ID, statesync glob, validator chain IDs, tab-indented YAML, dead RPC link, jq field names, destructive "compact" command relabeled, fabricated sei_getStorageStats removed - Runtime errors in examples: wagmi setState-in-render, governance demo imports and bigint math, Pyth ABI signature, Pimlico dotenv, USDC explorer URL, ledger getAddresses return type, undefined client in association examples Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR SummaryLow Risk Overview Highest-impact fixes include precompile snippets that could move real funds wrong—staking undelegate amounts in 6-decimal Hardhat 3 is rolled through deploy/migrate/precompile guides: Smaller but important edits: SIP-03/USDC.n timeline (June 15, 2026), instant finality wording, gas fee = price × used, Ledger → Ethereum/Sei app (Cosmos flow deprecated), wagmi post-transfer cleanup in AI/MCP pages mostly get consistent example recipient addresses; x402 Axiom section heading levels are normalized. Reviewed by Cursor Bugbot for commit 812bdfd. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
… module, command fixes Bank precompile (Codex P2 + review): - rewrite all Solidity/JS examples that called send() from arbitrary callers (reverts; pointer-only per bank.go:150) to use the denom's ERC20 pointer transfer()/transferFrom(); key supportedTokens by pointer address; rename misleading amountInUsei variable Deploy & verify page (Codex P3 + review): - add toolbox plugin to configs so the ignition task exists, add the missing ignition/modules/MyContract.ts example, note toolbox-bundled hardhat-verify, fix 'simultaneously' wording, drop duplicate H1 Command fixes: - drop jq parsing from seid status examples — key casing and output stream vary across seid versions and output modes, so show the bare command (also removes a pre-existing broken jq pipe) - drop --keep-addr-book: sei-tendermint's unsafe-reset-all only defines --key, the flag errors - artifact JSON imports resolve relative to the script in scripts/, so use ../artifacts (verified against Hardhat 3.9.0); add the missing run command for addr.mdx Other: - replace invalid-EIP-55-checksum example address with the canonical valid one in MCP server pages and (same pre-existing bug) both agentic-wallets pages - bump example minimum-gas-prices to the chain-enforced mainnet floor (0.02usei) - guard the Transfer-event lookup in the NFT deploy script Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 812bdfd. Configure here.
| // _nextTokenId starts at 0, so the first minted token has ID 0. | ||
| // Read the actual ID from the Transfer event: | ||
| const transferEvent = receipt.logs.map((log) => seiNFT.interface.parseLog(log)).find((parsed) => parsed?.name === 'Transfer'); | ||
| console.log('NFT minted with ID:', transferEvent?.args.tokenId.toString() ?? 'unknown (no Transfer event in receipt)'); |
There was a problem hiding this comment.
NFT example throws on parseLog
Medium Severity
The deploy script walks every receipt log with seiNFT.interface.parseLog, which throws on logs that are not from SeiNFT. Typical receipts include unrelated logs, so the example often fails before it can find the Transfer event.
Reviewed by Cursor Bugbot for commit 812bdfd. Configure here.


Summary
Full-documentation review (45 files) with every finding verified against the sei-chain source or upstream tool docs before fixing. Originated from the automated AI docs review; all fixes were then re-validated against the MDX source and
sei-protocol/sei-chain.Funds-affecting example bugs (verified in sei-chain)
parseEther(18 dec) but amounts are 6-decimal usei — args go raw intosdk.NewCoin(baseDenom)(staking.go). Copying the old example would request undelegation of 5 trillion SEI.sendNativeexample used 6 decimals butmsg.valueis wei (HandlePaymentUseiWei);send()example now reflects its pointer-contract-only restriction (bank.go:150).withdrawDelegatorReward(account, validator); ABI only haswithdrawDelegationRewards(validator)(abi.json).P256 precompile
staticcall: per RIP-7212 the precompile returns empty data on invalid signatures, which makes high-levelreturns (bytes memory)interface calls revert instead of returning false. JS helper updated to ethers v6 with the matching failure handling.Contradictions resolved
Gas Price × Gas Used+ refund caveat), node min-gas-price guidance (0.01usei), Ledger guidance moved off the deprecated Cosmos-app flow.associateexamples now pass the full EIP-191 prefixed message including length — recovery hashes the raw message string (addr.go:196), so the old prefix-without-length never recovered the right key.Hardhat 3 everywhere
deploy-verify,migrate-from-solana,migrate-from-other-evms, and the addr/bank/cosmwasm/staking precompile pages converted todefineConfig+configVariable+ encrypted keystore +network.getOrCreate()(matchingevm-hardhat.mdx).layerzero.mdxintentionally stays on LayerZero's HH2-basedcreate-lz-oapptoolkit.Broken commands, links, and runtime errors
hardhat verifyinvocation corrected per HH version, invalid@web3auth/modal/reactinstall, corrupted Graph subgraph ID, statesyncrm -rf data/\*no-op glob,sei-chain/sei-mainnet-1placeholder chain IDs →pacific-1/atlantic-2, tab-indented YAML (unparseable), dead RPC link to/,jq .SyncInfo→.sync_info, destructive command mislabeled as "compact", fabricatedsei_getStorageStatssection removed (zero hits across the sei-protocol org).dotenv, USDC explorer URL, ledgergetAddressesreturn type, undefinedclientin association examples, Thirdweb view-call-as-transaction, API3 100x decimals error and non-compiling snippet.Note for after merge
llms.txt/llms-full.txtare generated from the live site, so regenerate them in a follow-up commit once this deploys (node scripts/generate-llms.mjs).🤖 Generated with Claude Code