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

Error with viem and custom chainId (for example, a tenderly fork) #782

Open
johnpm-12 opened this issue Jun 14, 2024 · 2 comments
Open

Error with viem and custom chainId (for example, a tenderly fork) #782

johnpm-12 opened this issue Jun 14, 2024 · 2 comments
Labels
status:ready This issue is ready to be worked on

Comments

@johnpm-12
Copy link

What happened?

When using viem, and a network with a unique/custom chainId, the error NetworkNotFoundError is thrown.
The normal solution is to pass in a custom viem chain, but hre.ignition.deploy does not allow passing in a chain.
See the error message:
image

I propose adding a parameter or field to an existing parameter on hre.ignition.deploy that allows passing a custom viem chain.

Minimal reproduction steps

See https://github.com/johnpm-12/hardhat-ignition-tenderly-test

npm run deploySameId works as expected, because the chainId is the same as one in viem/chains

npm run deployUniqueId throws NetworkNotFoundError

Search terms

NetworkNotFoundError

@kanej
Copy link
Member

kanej commented Jun 14, 2024

Thanks for the reproduction repo, it really helps.
I think the additional chain parameter makes sense as a solution.

@kanej kanej added status:ready This issue is ready to be worked on and removed status:triaging labels Jun 14, 2024
@kanej kanej moved this to Todo in Hardhat Ignition Jun 14, 2024
@johnpm-12
Copy link
Author

@kanej see #783 I put up a PR solving this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Todo
Development

No branches or pull requests

2 participants