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

hardhat-forge: ignore metadata files #101

Merged
merged 2 commits into from Aug 17, 2022

Conversation

tynes
Copy link
Collaborator

@tynes tynes commented Aug 17, 2022

When getting contract artifacts, json files are pulled out of
the artifacts directory. Since metadata files are now emitted by
default as of
foundry-rs/foundry@ad91a4a,
extra files were being passed through the hh artifact generation
pipeline which broke things because the hardhat artifacts need
the fully qualified name which is currently pulled from the
ast in the compiler out. It could be possible to brute force
the fully qualified name but that would fail when 2 contracts
have a matching name. This filters out the metadata files
when getting the contract artifacts.

This fixes our broken CI

When getting contract artifacts, json files are pulled out of
the artifacts directory. Since metadata files are now emitted by
default as of
foundry-rs/foundry@ad91a4a,
extra files were being passed through the hh artifact generation
pipeline which broke things because the hardhat artifacts need
the fully qualified name which is currently pulled from the
ast in the compiler out. It could be possible to brute force
the fully qualified name but that would fail when 2 contracts
have a matching name. This filters out the metadata files
when getting the contract artifacts.
@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2022

🦋 Changeset detected

Latest commit: 3211bab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@foundry-rs/hardhat-forge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm! minor lint issue

ty

@tynes tynes merged commit 192e4b2 into foundry-rs:develop Aug 17, 2022
@tynes tynes deleted the fix/ignore-metadata-files branch August 17, 2022 20:20
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.

None yet

2 participants