-
Notifications
You must be signed in to change notification settings - Fork 286
Migration of hardhat-upgrade to plugin to use hardhat v3 #1194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
packages changes and initial config in accord to migration documentation.
…rrors for ESM structure.
importing errors + a few todos, change of Imports + new functions to use hardhat3 library in plugin files.
…ig for NodeNext module resolution
packages/plugin-hardhat/src/index.ts
Outdated
| @@ -1,29 +1,37 @@ | |||
| /* eslint-disable @typescript-eslint/no-var-requires */ | |||
| // TODO figure out what is the newer, TASK_COMPILE_SOLIDITY and TASK_COMPILE_SOLIDITY_COMPILE | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are Hardhat internal subtasks, where Hardhat calls TASK_COMPILE_SOLIDITY -> TASK_COMPILE_SOLIDITY_COMPILE_JOBS -> TASK_COMPILE_SOLIDITY_COMPILE_JOB -> TASK_COMPILE_SOLIDITY_COMPILE. And only certain parts of those need to be overridden in our plugin. See https://github.com/NomicFoundation/hardhat/blob/09951afd78e49465f7949478919c9217a12e8338/packages/hardhat-core/src/builtin-tasks/compile.ts#L1366 for the v2 internal subtasks.
We may need to find the equivalents in v3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On it already.
it seems that there is no such function named subtask anymore, so I'm trying to find what is the alternative right now, so we can figure out how to do what we did before but in hardhat3.
…xtensions for Hardhat compatibility ( still have to test it )
…nhance artifact cleanup process
…out support in Solidity hooks
…ns for defender integration
|
Caution Review the following alerts detected in dependencies. According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. Learn more about Socket for GitHub.
|
…entation address tests
- Updated deploy and upgrade functions across multiple files to accept a NetworkConnection parameter.
…solidity, etherscan-api, and verify-proxy files
…for better context management
…ntract interactions. Also other fixes needed to make sure these would work.
… imports across test files
…tests, and add new test file for Upgrades library
Looking to upgrade to Hardhat 3 with ESM module structure and the new plugin hooks architecture.
The migration includes updating all dependencies to Hardhat 3 compatible versions, converting the package to ESM with updated TypeScript configuration, and refactoring from the legacy extendEnvironment pattern to Hardhat 3's plugin hooks.
Several items are still in progress:
hardhat-verify in etherscan-api.ts and verify-proxy.ts,
determining the correct task usage between TASK_COMPILE_SOLIDITY and TASK_COMPILE_SOLIDITY_COMPILE ( still no clue on this )
validating the plugin hooks implementation and type extensions for the new
architecture.
After that I can try to update defender part in this plugin to the new version of hardhat as well.
Another issue, I'm not sure yet, is how to make both versions work on the same package. ( my decision on it would be to keep both as separate packages, since hardhat3 version will not be usable by v2 users.