Feature Request: add feature to combine all ABIs into one file
gameblock1 opened this issue · 4 comments
gameblock1 commented
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:
- 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.
- If you are using the Diamond EIP, it is really helpful to use one ABI for all the facets.
ItsNickBarry commented
Have you tried this? https://github.com/projectsophon/hardhat-diamond-abi
ItsNickBarry commented
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 commented
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 commented
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
},
]