aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

code quality - merge storage contracts into the main contracts

Open entropidelic opened this issue 1 year ago • 1 comments

From the audit,

There is no added value in splitting these two contracts. If you were to use an upgradeability mechanism that did not use a proxy-based delegatecall pattern, having a separate storage contract would make sense to upgrade the logic without upgrading the storage (by replacing the logic contract, but still using the same storage contract), but in the current setup it does not add any value.

We should discuss this, it may be not applicable

entropidelic avatar Sep 10 '24 18:09 entropidelic

Having a separate storage contract has saved us once from loosing our info when adding a new dependency of an external contract.

When we added is EIP712 on BatcherPaymentService.sol , we didn't loose our storage because we added it AFTER the is BatcherPaymentServiceStorage.

If it wasn't for this, the storage would be in the contract, and their addresses would have been moved by the is EIP712, as it is declared before the storage of a contract.

uri-99 avatar Sep 24 '24 22:09 uri-99