Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Certora Audit] G-01.
OwnerManager.removeOwner()
: 1 SLOAD can be sa…
…ved in the normal path (#888) This pull request includes a small but important change to the `removeOwner` function in the `OwnerManager` contract. The change optimizes the decrement operation for the `ownerCount` variable. The previous code reads from storage twice with the `ownerCount` variable. By doing pre-decrement (which is cheaper than post-decrement), we can save on 1 SLOAD. Optimization: * [`contracts/base/OwnerManager.sol`](diffhunk://#diff-795fb06764b4c2d991707584a31509badf0b036c9401bfbcb82d6bc9fdebab82L74-L80): Modified the `removeOwner` function to use pre-decrement for `ownerCount` to improve efficiency and ensure the threshold check is performed correctly.
- Loading branch information