1

this is a question about Safe Contract. Compiling the GnosisSafeL2.sol contract confirmed that it was close to the EVM contract max size of 24.5KiB. And when I run the hardhat optimizer 200 times, I saw that the byte code size was reduced by almost half. Looking at the singletons distributed on each mainnet, optimizing was not carried out. Is there a reason for this?

3 Answers 3

1

The reason for not using the Optimizer is that it is an unaudited piece of software which may introduce unwanted bugs like "Optimizer Bug Regarding Memory Side Effects of Inline Assembly". You can find other occurrences on Google too.

Also, the contracts are already pretty well optimized; the difference is negligible if you compare the gas usage with and without the optimizer.

0

The focus is easy debugging and development, not optimization.

1
  • Welcome to the Ethereum Stack Exchange! Usually better to include a reference for the answer, or your affiliation if for example you wrote the contracts being asked about.
    – eth
    Commented Apr 28, 2023 at 6:27
0

As this question is very specific for one or two developers, who compiled this contract, it is unlikely that you get an answer on a public forum. The only way to get an answer is to ask directly from Gnosis Safe devs what was in their mind when they did it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.