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
Projects seem to be getting more complex. Used to be you could deploy an NFT with 6-15 files, now with gas reductions, operator filters, transfer validators and royalties, it's crazy.
I have a project that imports, for example, the Opensea/operator-filter-registry.
I already have Openzeppelin in my lib, but that import ALSO has a lib of Openzeppelin.
Similarly LimitBrake is in my lib, but that ALSO has it's own Openzeppelin lib.
Anyway there are a BUNCH of contracts that are/are not used, depending on what mix-ins you ultimately choose.
I am getting forge build errors, on stuff I am fairly certain I am not using.
From what I can see, forge build compiles EVERYTHING. Is there a way to only compile my top/main (whatever you call it) contract?
I just want to deploy MY contract/mix-ins, and if a .sol is never called by my files, don't tell me it won't compile or that can't inherit. If I'm not using it, then not inheriting is not a problem for me, is it?
Related, how can I get a report of the tree of inherited files, so I can delete a bunch of stuff I am not using? Trying to trace the inheritances by eye/manually is insane. I've even tried drawing a tree on paper but each .sol inherits 2-8 other sols etc etc.
or
Any way to trim a working directory, so that all sol files not called or imported can be trashed?
Searched docs and google, with no result. But maybe I am searching for the wrong thing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
Projects seem to be getting more complex. Used to be you could deploy an NFT with 6-15 files, now with gas reductions, operator filters, transfer validators and royalties, it's crazy.
I have a project that imports, for example, the Opensea/operator-filter-registry.
I already have Openzeppelin in my lib, but that import ALSO has a lib of Openzeppelin.
Similarly LimitBrake is in my lib, but that ALSO has it's own Openzeppelin lib.
Anyway there are a BUNCH of contracts that are/are not used, depending on what mix-ins you ultimately choose.
I am getting forge build errors, on stuff I am fairly certain I am not using.
From what I can see, forge build compiles EVERYTHING. Is there a way to only compile my top/main (whatever you call it) contract?
I just want to deploy MY contract/mix-ins, and if a .sol is never called by my files, don't tell me it won't compile or that can't inherit. If I'm not using it, then not inheriting is not a problem for me, is it?
Related, how can I get a report of the tree of inherited files, so I can delete a bunch of stuff I am not using? Trying to trace the inheritances by eye/manually is insane. I've even tried drawing a tree on paper but each .sol inherits 2-8 other sols etc etc.
or
Any way to trim a working directory, so that all sol files not called or imported can be trashed?
Searched docs and google, with no result. But maybe I am searching for the wrong thing.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions