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 1 commit 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 High-impact example fixes include precompile snippets that could mis-handle funds or calls: staking undelegate amounts use 6-decimal Hardhat 3 is reflected across deploy/migrate/precompile guides ( Reviewed by Cursor Bugbot for commit 714fca6. 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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 714fca6. Configure here.
| const isValid = isValidRaw === 1n; | ||
| // Extract the parent "prices" object the same way | ||
| const pricesJson = await safeExtractBytes(this.jsonPrecompile, oracleResponse, 'prices', '{}'); | ||
| const rawPrices = JSON.parse(pricesJson); |
There was a problem hiding this comment.
Oracle parser wrong prices key
Medium Severity
The updated SeiPriceOracle.parsePriceFeed reads a top-level prices key, but the page’s sample oracle JSON nests prices under market, so the example returns empty prices even when the feed is valid.
Reviewed by Cursor Bugbot for commit 714fca6. 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()); |
There was a problem hiding this comment.
NFT mint log unchecked
Low Severity
The deploy script logs transferEvent.args.tokenId without checking that a Transfer log was parsed, so a missing or unparsed event causes a runtime throw instead of a clear message.
Reviewed by Cursor Bugbot for commit 714fca6. 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