-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add getOrCreate to network API #8116
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
Changes from all commits
c96f10a
727fe60
0920de0
88787e1
02d3a74
bb81d75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "hardhat": minor | ||
| --- | ||
|
|
||
| Add `getOrCreate` to the network API | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| "@nomicfoundation/hardhat-ethers-chai-matchers": patch | ||
| "@nomicfoundation/hardhat-toolbox-mocha-ethers": patch | ||
| "@nomicfoundation/hardhat-ignition-ethers": patch | ||
| "@nomicfoundation/hardhat-network-helpers": patch | ||
| "@nomicfoundation/hardhat-viem-assertions": patch | ||
| "@nomicfoundation/hardhat-ignition-viem": patch | ||
| "@nomicfoundation/hardhat-toolbox-viem": patch | ||
| "@nomicfoundation/hardhat-ignition": patch | ||
| "@nomicfoundation/hardhat-errors": patch | ||
| "@nomicfoundation/hardhat-ethers": patch | ||
| "@nomicfoundation/hardhat-ledger": patch | ||
| "@nomicfoundation/hardhat-verify": patch | ||
| "@nomicfoundation/ignition-core": patch | ||
| "@nomicfoundation/hardhat-viem": patch | ||
| "hardhat": patch | ||
| --- | ||
|
|
||
| Deprecate the `hre.network.connect()` method in favour of `hre.network.create()`, exactly the same method but more clearly indicating that it will create a new connection. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,66 @@ | |
| "package": "@nomicfoundation/hardhat-ignition-ethers", | ||
| "peer": "@nomicfoundation/hardhat-ignition", | ||
| "reason": "The usage of the new `getUserInterruptionsHandlers` helper from `@nomicfoundation/hardhat-ignition/helpers`" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ignition", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this needs all the packages that have
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean, all the packages in this PR
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of the packages that are touched here are because of updates to documentation e.g. their README.md had a reference to hre.network.connect.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. I didn't notice that. I think it still makes sense to play safe and bump it.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added in the extra bumps. |
||
| "peer": "hardhat", | ||
| "reason": "Switched from deprecated `hre.network.connect()` to new `hre.network.create()` in deploy, track-tx, transactions, and verify tasks" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-verify", | ||
| "peer": "hardhat", | ||
| "reason": "Switched from deprecated `network.connect()` to new `network.create()` in verification logic and updated API docs" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ethers-chai-matchers", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-toolbox-mocha-ethers", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ignition-ethers", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-network-helpers", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-viem-assertions", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ignition-viem", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-toolbox-viem", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ethers", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-ledger", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| }, | ||
| { | ||
| "package": "@nomicfoundation/hardhat-viem", | ||
| "peer": "hardhat", | ||
| "reason": "Conservative bump for `connect()` deprecation and `create()`/`getOrCreate()` network API changes" | ||
| } | ||
| ] | ||
| } | ||
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.
maybe?
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.
I split out the
createchangeset into.changeset/purple-forks-write.md, so it could get a more detailed explanation.