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

Merge feature branch for hardhat support #573

Merged
merged 9 commits into from
Jul 9, 2021

Conversation

taminomara
Copy link
Contributor

@taminomara taminomara commented Jul 9, 2021

Fix #512.

Tamika Nomara added 9 commits July 7, 2021 11:41
Fix #170, part of #512.

Since we support multiple artifact formats now, contract generation should not rely on source json. This PR allows serializing contracts and makes generation code to use serialization.

Builder API still requires source JSON though. It will be fixed in #512 and #196.
Fix #196, part of #512, merge after #554.

Refactor builder interface to separate code that loads artifacts, parses them and generates bindings into independent modules. Now code generation takes a reference to `Contract`, loading contracts from source is no longer builder's job.

Additionally, `Builder` was renamed to `ContractBuilder` in anticipation that we will have `ArtifactBuilder` in the future. Also `ethcontract_generate::contract` was renamed to `ethcontract_generate::generate`. I can move these changes into separate pullrequests if anyone things it's necessary.

Procedural macro will be updated later in #512.
Part of #512, merge after #555.

Refactor `contract!` macro a bit, add support for artifact formats, rework contract renaming syntax (see discussion in #512).
Part of #563.

Allow loading artifacts from hardhat deployments directory by scanning its contents and parsing all allowed contracts.
Part of #563.

Add tests and example for hardhat drectory loader.
Replace temporary dev dependency with the released crate version.
Another option to filter out contracts with conflicting ABIs.
Fixed text style here and there, capitalized Etherscan and NPM, added readme for `hardhat` project and `generate` example.
@taminomara taminomara requested a review from a team July 9, 2021 10:16
@taminomara
Copy link
Contributor Author

This branch is rebased onto master. I want to merge it without squashing to preserve history.

Copy link
Contributor

@vkgnosis vkgnosis left a comment

Choose a reason for hiding this comment

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

Agree that we should merge without squashing. It looks like this is currently disabled for this repository but I think it makes sense in cases like this. Will see if I can enable it in the Github settings.
Edit: enabled it

@taminomara taminomara merged commit 5db6ad4 into main Jul 9, 2021
@taminomara taminomara deleted the feature/builder-refactoring branch July 9, 2021 11:07
@taminomara
Copy link
Contributor Author

Used github's rebase button, and now all my commits are listed as 'unverified' 😕
Should've manually pushed to main instead...

@taminomara
Copy link
Contributor Author

Well, no way to fix it now without force-pushing to main 😞

@taminomara
Copy link
Contributor Author

Note: with @nlordell's permission I've fixed commit signatures.

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.

Add support for hardhat and hardhat-deploy artifacts and deployments.
2 participants