-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a waitForTransaction
to time helpers
#1
Conversation
5f53a57
to
0fb9026
Compare
The [hardhat-ethers](https://github.com/NomicFoundation/hardhat/blob/8f47553a88eb1251907398513449bc15689041d6/packages/hardhat-ethers/src/internal/hardhat-ethers-provider.ts#L362-L368) version is unimplemented, so we provide one.
0fb9026
to
c8e5d00
Compare
The test package/build failure is
Anyone know what that's about? |
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.
LGTM, I'm not merging yet so we can decide if this should be added here or in keep network repo (so we can easily publish)
}) | ||
|
||
it("does not return immediately on non-hardhat networks", async function () { | ||
this.hre.network.name = "not-hardhat" |
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.
Out of curiosity how changing network name make this transaction take longer? 😄
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.
the first big of logic in waitForTransaction
is:
if (hre.network.name === "hardhat") {
return true
}
The default for tests is "hardhat", so changing it to anything else causes that branch to not run and for it to actually wait (like it would on sepolia or mainnet)
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'll add a comment!
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 would check if this is happening in the base repo first before burning time here |
The token issue is due to a missing CI token for Valkyrie to handle tagging, pushing, and releasing the package. |
depends on #2
The hardhat-ethers version is unimplemented, so we provide one.
This is a general purpose wait function, but the inspirational use case is waiting enough blocks after deploying a contract before verifying it on etherscan.
Tagging @pdyraga and @jagodarybacka for review