Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

beaurancourt
Copy link

@beaurancourt beaurancourt commented Jan 30, 2024

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

@beaurancourt
Copy link
Author

The test package/build failure is

Error: Input required and not supplied: token

Anyone know what that's about?

Base automatically changed from update-from-upstream to main January 31, 2024 13:15
Copy link

@jagodarybacka jagodarybacka left a 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"

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? 😄

Copy link
Author

@beaurancourt beaurancourt Jan 31, 2024

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)

Copy link
Author

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!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jagodarybacka
Copy link

test package/build failure

I would check if this is happening in the base repo first before burning time here

@Shadowfiend
Copy link

The token issue is due to a missing CI token for Valkyrie to handle tagging, pushing, and releasing the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants