Closed Karrq closed 5 months ago
Unfortunately there's a bit of attrition on converting the cli args to the config values, maybe we can find a way to improve that so future changes to zksync configuration can be further simplified or at least be done in the same context
My two cents: Having everything under [zksync]
might be a good idea as it provides a clean separation for the config. The further nesting might be a bit more controversial because:
Okay, I can refactor to flatten the structure so we keep everything under one [zksync]
section.
I'd still opt to keep the optimizer details nested, as that's already a structure we depend on from elsewhere, and the various values would have been nested also originally
If we merge this we should probably notify somewhere about the API change
Motivation
All zksync related configurations are flattened into the top level
Config
struct, having to deal with duplicated names and need to keep relatively simplified values to encode wanted behavior.Solution
Encapsulate zksync related configuration as to not pollute the top level
Config
struct, allowing a more structured approach to configuration.This is how
foundry.toml
can look like, with the changes:before: