docs(evm): fix broken viem import, migrate Hardhat guide to v3, add Python quickstart#14
docs(evm): fix broken viem import, migrate Hardhat guide to v3, add Python quickstart#14alexander-sei wants to merge 1 commit into
Conversation
…ython quickstart
Several EVM docs shipped code that fails when run verbatim. The fixes were
verified against the live Sei RPC and a fresh hardhat@3.7.0 project.
- viem examples (16 files): import { sei } from 'viem/chains'. The documented
'@sei-js/precompiles/viem' subpath/export does not exist in the published
package, so every viem snippet threw on import. Tighten the viem-quickstart
install to `npm install viem`.
- viem/ethers read snippets: replace the invalid '0xYourAddress' placeholder
with a real example address so the first milestone runs as written.
- Hardhat guide -> Hardhat 3: plugins array with hardhat-toolbox-mocha-ethers,
type:'http' networks, configVariable + keystore for secrets, and
network.getOrCreate() in tests and scripts (the shipped HH2 config fails to
compile under the HH3 the guide installs).
- UUPS upgrades -> plugin-free ERC1967 proxy + upgradeToAndCall (the
@openzeppelin/hardhat-upgrades plugin is HH2-only); drop
__UUPSUpgradeable_init() (removed in OpenZeppelin v5).
- networks.mdx: link plain-text RPC endpoints alongside the widget.
- Add a Python (web3.py) quickstart page + nav entry; de-duplicate the inline
Python sections from the viem/ethers quickstarts.
- Add `npx tsx` run instructions to the TypeScript quickstarts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
PR SummaryLow Risk Overview viem / wagmi examples (many files) now use Hardhat ( New Reviewed by Cursor Bugbot for commit ca896c4. Bugbot is set up for automated code reviews on this repo. Configure here. |
What & why
Several EVM docs shipped code that fails when run verbatim. These fixes were verified against the live Sei RPC and a fresh
hardhat@3.7.0project.Fixes
import { sei } from '@sei-js/precompiles/viem'doesn't resolve — the published@sei-js/precompileshas no/viemsubpath and noseiexport, so every viem snippet throws on import. Switched to viem's built-inimport { sei } from 'viem/chains'and tightened the viem-quickstart install tonpm install viem.'0xYourAddress'placeholder that throws; replaced with a real example address.plugins: [hardhatToolboxMochaEthers],type: 'http'networks,configVariable+ keystore for secrets, andnetwork.getOrCreate()in tests and scripts.@openzeppelin/hardhat-upgradesis Hardhat 2-only, so the upgradeable flow now deploys an ERC1967 proxy directly and upgrades via UUPSupgradeToAndCall. Also dropped__UUPSUpgradeable_init(), which was removed in OpenZeppelin v5 and no longer compiles./learn/dev-chains,/learn/rpc-providers) alongside the interactive widget.npx tsxrun instructions added to the TypeScript quickstarts.Verification
hardhat@3.7.0:compile,test, ERC20 Ignition deploy, ERC721 script run, and the full UUPS deploy →upgradeToAndCall→ V2 cycle.🤖 Generated with Claude Code