You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swapUtils struct should have a correct gap size (confirm all gaps are correct size)
storage variables => events => constants
set loop params to zero in appendAddressArrayBatch, regulateOperators and lastIdChange
check unused return statements from batchApproveOperators, approveOperators
gas improvements
no need to do uint256 _type = self._proposals[proposalId].TYPE in approveSenate (deleted)
use WC: in withdrawal contract
get address instead of the struct in onlyOracle (and maybe in other modifiers too)(seems like a no - increases typo risk)
uint256 operatorId = STAKER._validators[_pk].operatorId should be taken before using at all in _alienateValidator
_setMaintainer no need to use the memory variable currentMaintainer(check deleted already)
"su: not enough funds in Portal ?" delete ?
separate loops in proposeStake and batchApproveOperators
_decreaseWalletBalance delete return
Instead of feetheft and alienate events, imprison can take a parameter.(seems like doesn't make sense now)
" gu: already approved" has an empty space.(function deleted already)
Modular Architecture
Refactor: Interfaces
interfaces should be a top level external folder (try, but do not bother inheriting them in contracts)
interfaces holds only the contract interfaces. You can inherit module or external interfaces (from OZ) to construct them, so you don't need to override twice! Thats good.
modules should inherit relative interfaces, and external interfaces folder should be constructed from these module interfaces
Changes Overview
no need to do uint256 _type = self._proposals[proposalId].TYPE in approveSenate(deleted)get address instead of the struct in onlyOracle (and maybe in other modifiers too)(seems like a no - increases typo risk)_setMaintainer no need to use the memory variable currentMaintainer(check deleted already)Instead of feetheft and alienate events, imprison can take a parameter.(seems like doesn't make sense now)" gu: already approved" has an empty space.(function deleted already)interfaces should be a top level external folder (try, but do not bother inheriting them in contracts)change gETH to gToken ===> more chain-ambiguous(no.)