fix: migrate example extension to hardhat v3#123
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the
exampleextension's hardhat side to be compatible with hardhat v3 + rocketh (the base templates were migrated in create-eth, see PR #433). Without this,yarn cli ... -e scaffold-eth/create-eth-extensions:examplefails after the backmerge.What
hardhat.config.ts.args.mjscustomNetwork→ addtype: "http"(hh-v3 requires a networktype); drop invalid per-networkverifyblock → declare custom block explorer via top-levelchainDescriptors(keyed by chainId) +customNetwork.chainId; register the extension task viatasks: [...deployTasks, sayHelloTask]deploy/01_deploy_se2_token.tshre.getNamedAccounts()) → rockethdeployScripttasks/index.tstask().setAction(fn)→setInlineAction(...).build(), exported & registered in configtest/SE2Token.tsimport { ethers } from "hardhat"+ typechain → typedAbi_SE2Tokenfixture (network.create()+loadAndExecuteDeploymentsFromFiles+getContractAt), mirroring the base test(The next16
wagmiConfiglint fix is already onexamplevia #122.)Local validation (generated hardhat + extension instance, node 22.18)
yarn compile✓ (solc 0.8.20)yarn deploy✓ (SE2Tokendeployed,deployedContracts.tsregenerated)yarn test✓ (3 passing)hardhat:check-types✓ (was 10 errors)hardhat:lint --max-warnings=0✓ /next:lint --max-warnings=0✓ /next:check-types✓hardhat sayHellotask ✓ (prints "Hello, World!", listed in--help)Notes
customNetwork.chainId: 99999is a placeholder; thechainDescriptorscustom-explorer flow was verified against installed hh-v3 type defs, not exercised against a real explorer.🤖 Generated with Claude Code