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

[WIP]: Migration to hardhat-viem #587

Closed
wants to merge 2 commits into from
Closed

[WIP]: Migration to hardhat-viem #587

wants to merge 2 commits into from

Conversation

rin-st
Copy link
Collaborator

@rin-st rin-st commented Oct 24, 2023

Description

Migration to hardhat-viem

Todos:

  • use viem an hardhat-viem in scripts and deploy files
  • generating deployments folder.
  • fix verification
  • fix type errors
  • refactor listAccounts
  • migrate tests

Notes:

  • since hardhat-viem is a "new shiny lib (c)", some things is not working as expected, for example types. Also we need to replace hardhat-deploy-ethers and I think some other plugins too, but I'll try to go without it (probably Ignition can help, but we need to wait until they'll add viem support. Currently only ethers v6)
  • after removing hardhat-ethers/hardhat-deploy-ethers deployments folder isn't generated automatically. So I needed to do it in order to create next/generated/deployedContracts folder. It caused adding generateDeployments() to deployYourContract. I'll think again and try to find alternatives. Feel free to add thoughts and ideas about it.

Additional Information

Related Issues

Closes #567

Your ENS/address: 0xrinat

@carletex
Copy link
Member

Thanks for working on this, Rinat!

Yeah, I guess waiting for Ignition to support Viem could be the way to go (rolling our own stuff might be too hardcore)

Maybe we just need to wait until hardhat-viem is more stable + ignition supports viem? If not, it seems that we'd need to have ethers & viem at the same time, or roll our own deployment workflow.

What do you think?

@rin-st
Copy link
Collaborator Author

rin-st commented Oct 25, 2023

Basically, things mostly works already. But

  • as I said already, I need to manually create deployments folder in order to create generated/deployedContracts for nextjs
  • hardhat-verify also works, but from scripts or using cli with adding deployed address and params.

So it's just workarounds, not something convenient and stable. Ignition will help with first issue and hopefully with second too. I'll continue to experiment with it, but for now yes, looks like we need to wait for ignition and more stable versions

@rin-st
Copy link
Collaborator Author

rin-st commented Apr 24, 2024

#567

@rin-st rin-st closed this Apr 24, 2024
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.

Hardhat ethers => Hardhat viem
2 participants