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
To compose different scripts, we have different options:
vm.etch to temporarily bring in the script contract: works well when the thing is encapsulated, and minimizes compilation time
library: works well to mix-in util functions, but means that the script on its own is not calleable. For SetPreinstalls.s.sol we do want to run it on its own (to install preinstalls into the L1 dev genesis). A separate script entry-point, that uses the same library, ends up adding code, but avoids the vm.etch nicely.
ineheritance: i.e. mix in the contract into the script; we end up with weird temporarily contract overlap. This is better used for actual contract inheritance, rather than adding utils functions into scope that are supposed to be encapsulated.
SetPreinstalls.s.sol is the current main example, but we may want to set a standard approach, and find more occurrences where scripts can be standardized to work in a consistent way.
The text was updated successfully, but these errors were encountered:
To compose different scripts, we have different options:
vm.etch
to temporarily bring in the script contract: works well when the thing is encapsulated, and minimizes compilation timelibrary
: works well to mix-in util functions, but means that the script on its own is not calleable. ForSetPreinstalls.s.sol
we do want to run it on its own (to install preinstalls into the L1 dev genesis). A separate script entry-point, that uses the same library, ends up adding code, but avoids thevm.etch
nicely.ineheritance
: i.e. mix in the contract into the script; we end up with weird temporarily contract overlap. This is better used for actual contract inheritance, rather than adding utils functions into scope that are supposed to be encapsulated.SetPreinstalls.s.sol
is the current main example, but we may want to set a standard approach, and find more occurrences where scripts can be standardized to work in a consistent way.The text was updated successfully, but these errors were encountered: