ItsNickBarry/hardhat-abi-exporter

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

gameblock1 opened this issue · 4 comments

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.

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.

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

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
  },
]