You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running forge bind may generate a lot of additional contracts that one does not want in their simulation crate. It would be helpful to provide a means via a arbiter.toml or even just an addition to foundry.toml that lists which contract bindings we want specifically.
Is your feature request related to a problem? Please describe.
When running something like forge bind or arbiter bind there can be a massive amount of contract bindings generated when we may only need, say, 5 or so contracts.
Solution
We can provide a typical bind interface and a config file of some sort where a user lists which specific bindings they want to keep. Upon running bind we can output files to a temporary location, grep for the contracts the user wants to keep, adjust the mod.rs file, then move this into the bindings/ module directory in their simulation crate.
Alternative approaches
We could propose changes to forge bind itself and attempt to get this changed at that level.
We might be able to set a foundry environment variable to overwrite the "src" directory and then running forge bind will only build for the contracts in that directory, there's not very good "selection" of contracts in foundry's stuff, only filtering + directory choosing
Another possible way is to make all the contracts we want in the bindings end in ".a.sol" (like the .t.sol files), then we might be able to regex filter out every contract doesnt end in that
Idea
Running
forge bind
may generate a lot of additional contracts that one does not want in their simulation crate. It would be helpful to provide a means via aarbiter.toml
or even just an addition tofoundry.toml
that lists which contract bindings we want specifically.Is your feature request related to a problem? Please describe.
When running something like
forge bind
orarbiter bind
there can be a massive amount of contract bindings generated when we may only need, say, 5 or so contracts.Solution
We can provide a typical bind interface and a config file of some sort where a user lists which specific bindings they want to keep. Upon running
bind
we can output files to a temporary location, grep for the contracts the user wants to keep, adjust themod.rs
file, then move this into thebindings/
module directory in their simulation crate.Alternative approaches
We could propose changes to
forge bind
itself and attempt to get this changed at that level.Additional context
Bug report #439 is very related.
The text was updated successfully, but these errors were encountered: