Closed adhusson closed 1 month ago
My initial implementation also had the require later in the constructor, no feeling on this one for me neither
Same, I agree that names are shorter as we don't have to go through structs. On the other hand, it feels weird to compute (i.e. the constructor body) stuff that may fail just afterwards. What's your take on that @adhusson ?
As a compromise I can only imagine using shorter names for the constructor parameters like _preLiquidationParams
-> preLiqParams
/pLP
. But, I find these less readable actually.
On the other hand, it feels weird to compute (i.e. the constructor body) stuff that may fail just afterwards. What's your take on that @adhusson ?
There's always a simulation first, and the parameters do not depend on things that will evolve between the simulation and the actual tx inclusion. So I think there will be ~no failed onchain deployments of this contract, the wasted gas does not matter, and we can focus on readability.
Still not a big fan tbh. If there is no majority for it, i would say we close it.
Costs more gas on failed contract creations but much easier to read.