Open hats-bug-reporter[bot] opened 4 days ago
thanks, but gas submission is different in hats.
Please remember the following instructions:
Users need to clone the repository, make changes, and then upload it to their private repository. In their report, they should include the link to their private repository. After that, they will need to invite sponsors to their private repository. The winner will be chosen based on the average gas savings in tests. There are some rules to consider: if any test fails due to changes, the submission is invalid. Additionally, if a user employs assembly, the submission is also invalid. Please read competition scope for more details.
Github username: @mhhacker111 Twitter username: -- Submission hash (on-chain): 0xc8426654211fff769d7707a938281d8eef7ed5e7288a06e707ada043b393313c Severity: gas saving
Description:
G-1: Empty Block
Consider removing empty blocks.
1 Found Instances
- Found in src/PalmeraGuard.sol [Line: 42](src/PalmeraGuard.sol#L42) ```solidity function checkTransaction( ```G-2: Internal functions called only once can be inlined
Instead of separating the logic into a separate function, consider inlining the logic into the calling function. This can reduce the number of function calls and improve readability.
4 Found Instances
- Found in src/Helpers.sol [Line: 151](src/Helpers.sol#L151) ```solidity function processAndSortSignatures( ``` - Found in src/Helpers.sol [Line: 205](src/Helpers.sol#L205) ```solidity function getPreviewModule(address safe) internal view returns (address) { ``` - Found in src/PalmeraRoles.sol [Line: 37](src/PalmeraRoles.sol#L37) ```solidity function setupRoles(address palmeraModule) ``` - Found in src/ReentrancyAttack.sol [Line: 114](src/ReentrancyAttack.sol#L114) ```solidity function setParamsForAttack( ```G-3: Unused Custom Error
it is recommended that the definition be removed when custom error is unused
6 Found Instances
- Found in src/libraries/Errors.sol [Line: 16](src/libraries/Errors.sol#L16) ```solidity error SuperSafeNotRegistered(uint256 superSafe); ``` - Found in src/libraries/Errors.sol [Line: 22](src/libraries/Errors.sol#L22) ```solidity error NotAuthorizedRemoveSafeFromOtherTree(); ``` - Found in src/libraries/Errors.sol [Line: 24](src/libraries/Errors.sol#L24) ```solidity error NotAuthorizedRemoveSafeFromOtherOrg(); ``` - Found in src/libraries/Errors.sol [Line: 34](src/libraries/Errors.sol#L34) ```solidity error CannotDisconnectedSafeBeforeRemoveChild(uint256 children); ``` - Found in src/libraries/Errors.sol [Line: 60](src/libraries/Errors.sol#L60) ```solidity error CreateSafeProxyFailed(); ``` - Found in src/libraries/Errors.sol [Line: 62](src/libraries/Errors.sol#L62) ```solidity error InvalidThreshold(); ```