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

feat(hardhat-helpers): standalone contracts deploy functions #13233

Merged
merged 12 commits into from
Jan 24, 2024

Conversation

clemsos
Copy link
Member

@clemsos clemsos commented Jan 24, 2024

Description

This refactoring adds some helpers function for contract deployments so it is easier to deploy on zk chains (see #13078 )

Issues

Fixes #
Refs #

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

Release Note Draft Snippet

@clemsos clemsos requested a review from julien51 January 24, 2024 14:06
@cla-bot cla-bot bot added the cla-signed label Jan 24, 2024
@@ -0,0 +1,20 @@
export const deployContract = async (
Copy link
Member

Choose a reason for hiding this comment

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

Do we also need a deployUpgradableContract helper?
Maybe in a follow up PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, added too here

Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

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

Did you replace in all the scripts to deploy contracts in the governance folder?

@julien51
Copy link
Member

Do we have tests for governance? Can we just add a file that runs in CI that deploys all contracts on a "local" node so we can make sure the scripts are working and we don't end up finding that they don't work when we need to deploy a new network/contract?

@clemsos
Copy link
Member Author

clemsos commented Jan 24, 2024

Do we have tests for governance? Can we just add a file that runs in CI that deploys all contracts on a "local" node so we can make sure the scripts are working and we don't end up finding that they don't work when we need to deploy a new network/contract?

That will be good indeed. We have tests already in governance folder but they are js unit tests. Will be good to have a way to test the cli tasks

EDIT: I added an example test for the main deploy task

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed all tasks and scripts related to Uniswap V2 deployment

@clemsos clemsos requested a review from julien51 January 24, 2024 15:42
Copy link
Member

@julien51 julien51 left a comment

Choose a reason for hiding this comment

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

LGTM!

@julien51
Copy link
Member

That will be good indeed. We have tests already in governance folder but they are js unit tests. Will be good to have a way to test the cli tasks

Want to add that in another PR maybe?

@clemsos
Copy link
Member Author

clemsos commented Jan 24, 2024

That will be good indeed. We have tests already in governance folder but they are js unit tests. Will be good to have a way to test the cli tasks

Want to add that in another PR maybe?

Yes I added a basic one here but can add more coverage in a separate PR

@clemsos clemsos merged commit 04be524 into master Jan 24, 2024
12 checks passed
@clemsos clemsos deleted the factor-contracts-deploy-func branch January 24, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants