AVIator
AVIator copied to clipboard
Preserve directory structure, ignore tests, etc. refactoring for ethers-contract-abigen
Is your feature request related to a problem? Please describe.
Currently, it seems like we generate bindings either as multiple files or single file depending on args, if single file, everything is written to a single file, if multiple file, we create one file per contract and include those in lib.rs
or mod.rs
depending on what the user selected, to generate a crate or a module.
Tried this out recently, but see a few problems(?):
- Everything is generated at top level
src/..contract.rs
, not quite nice. - Everything in artifacts dir gets generated, usually we'd want to ignore the contracts defined in
:tests/
or:src/tests
.
Describe the solution you'd like
-
src/...
contracts get generated in same directory structure as in source and follows same module structure. -
lib/...
contracts get generated the same way as in 1, but under a reserved dir likevendor
/third_party
directory
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.