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

Feature Request: add feature to combine all ABIs into one file #50

Open
gameblock1 opened this issue Jul 18, 2023 · 4 comments
Open

Feature Request: add feature to combine all ABIs into one file #50

gameblock1 opened this issue Jul 18, 2023 · 4 comments

Comments

@gameblock1
Copy link

Hi
Thanks for such a great library!
I was wondering if there would be a feature to put all flattened ABIs into one file.
reasons:

  1. currently events and errors are not getting into ABI if they are imported from a library; so we can combine all ABIs to cover all events and errors.
  2. If you are using the Diamond EIP, it is really helpful to use one ABI for all the facets.
@ItsNickBarry
Copy link
Owner

Have you tried this? https://github.com/projectsophon/hardhat-diamond-abi

@ItsNickBarry
Copy link
Owner

I am not in favor of combining all ABIs, but maybe a configuration option like this would work:

composites: [
  {
    inputs: ['facets/*],
    output: 'MyDiamond',
  }
],

Not sure.

@gameblock1
Copy link
Author

gameblock1 commented Jul 18, 2023

Have you tried this? https://github.com/projectsophon/hardhat-diamond-abi

Yes but hardhat-abi-exporter is much more flexible and feature-rich.
Also hardhat-diamond-abi has a known issue

@gameblock1
Copy link
Author

I am not in favor of combining all ABIs, but maybe a configuration option like this would work:

composites: [
  {
    inputs: ['facets/*],
    output: 'MyDiamond',
  }
],

Not sure.

Yeah, or something like:

abiExporter: [
  {
    path: './abi/unflat',
    flat: false,
  },
  {
    path: './abi/combined',
    combine: true,
    name: 'combined.json'
   // should not use 'flat' anymore
  },
]

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

No branches or pull requests

2 participants