Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas Report #65

Open
hats-bug-reporter bot opened this issue Jun 28, 2024 · 1 comment
Open

Gas Report #65

hats-bug-reporter bot opened this issue Jun 28, 2024 · 1 comment
Labels
bug Something isn't working invalid - lead auditor

Comments

@hats-bug-reporter
Copy link

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

         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

         function processAndSortSignatures(
  • Found in src/Helpers.sol Line: 205

         function getPreviewModule(address safe) internal view returns (address) {
  • Found in src/PalmeraRoles.sol Line: 37

         function setupRoles(address palmeraModule)
  • Found in src/ReentrancyAttack.sol Line: 114

         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

         error SuperSafeNotRegistered(uint256 superSafe);
  • Found in src/libraries/Errors.sol Line: 22

         error NotAuthorizedRemoveSafeFromOtherTree();
  • Found in src/libraries/Errors.sol Line: 24

         error NotAuthorizedRemoveSafeFromOtherOrg();
  • Found in src/libraries/Errors.sol Line: 34

         error CannotDisconnectedSafeBeforeRemoveChild(uint256 children);
  • Found in src/libraries/Errors.sol Line: 60

         error CreateSafeProxyFailed();
  • Found in src/libraries/Errors.sol Line: 62

         error InvalidThreshold();
@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Jun 28, 2024
@0xmahdirostami
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid - lead auditor
Projects
None yet
Development

No branches or pull requests

1 participant