More granular compile targets
elenadimitrova opened this issue · 1 comments
When working with a solution that uses a mix of solc
versions for contract compilation there needs to be a better granularity when defining compilation targets. Currently etherlime compile
takes the contracts
folder by default. A different folder can be targeted using the --workingDirectory
option. What will make this fully flexible is allowing single contract targets to be compiled and also single contracts excluded from compilation of a target folder.
This is very useful when working with migrations between solc releases as rarely can a solution be upgraded all at once. Normally in gradual migrations we prefer to selectively upgrade contracts without disturbing the contracts folder structure.
As an example, the argent-wallet
solution has the following contracts structure and respective solc versions
/ contracts
/infrastructure - solc 0.5.4 except for `WalletFactory` and `TokenPriceProvider` contracts
/legacy - solc 0.5.4
/modules - solc 0.6.8
/wallet - solc 0.6.8
You can pass to the optional param: workingDirectory
a path to a single contract.
However, we should add a single exclusion of a file.