Skip to content

Commit

Permalink
fix: audit L-07
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsec-security committed Feb 9, 2025
1 parent b7ad1df commit 8feebae
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 30 deletions.
4 changes: 1 addition & 3 deletions src/auth/Auth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ pragma solidity ^0.8.24;

import { BootloaderAuth } from "./BootloaderAuth.sol";
import { SelfAuth } from "./SelfAuth.sol";
import { HookAuth } from "./HookAuth.sol";
import { Errors } from "../libraries/Errors.sol";

/**
* @title Auth
* @notice Abstract contract that organizes authentication logic for the contract
* @author https://getclave.io
*/
abstract contract Auth is BootloaderAuth, SelfAuth, HookAuth {}
abstract contract Auth is BootloaderAuth, SelfAuth {}
20 changes: 0 additions & 20 deletions src/auth/HookAuth.sol

This file was deleted.

1 change: 0 additions & 1 deletion src/handlers/ERC1271Handler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.8.24;

import { IERC1271Upgradeable } from "@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import { Transaction } from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/TransactionHelper.sol";
import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";

import { SignatureDecoder } from "../libraries/SignatureDecoder.sol";
Expand Down
1 change: 0 additions & 1 deletion src/interfaces/ISsoAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity ^0.8.24;
import { IAccount } from "@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IAccount.sol";

import { IERC1271Upgradeable } from "@openzeppelin/contracts-upgradeable/interfaces/IERC1271Upgradeable.sol";
import { IERC777Recipient } from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import { IERC721Receiver } from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import { IERC1155Receiver } from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";

Expand Down
1 change: 0 additions & 1 deletion src/libraries/Errors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ library Errors {

// Auth errors
error NOT_FROM_BOOTLOADER(address notBootloader);
error NOT_FROM_HOOK(address notHook);
error NOT_FROM_SELF(address notSelf);

// Batch caller errors
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/SignatureDecoder.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.24;

import { Errors } from "../libraries/Errors.sol";

library SignatureDecoder {
// Decode transaction.signature into signature, validator and hook data
function decodeSignature(
Expand Down
2 changes: 1 addition & 1 deletion src/managers/HookManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ abstract contract HookManager is IHookManager, Auth {
emit HookRemoved(hook);
}

function _isHook(address addr) internal view override returns (bool) {
function _isHook(address addr) internal view returns (bool) {
return _validationHooks().contains(addr) || _executionHooks().contains(addr);
}

Expand Down
1 change: 0 additions & 1 deletion src/managers/OwnerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.8.24;

import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import { SsoStorage } from "../libraries/SsoStorage.sol";
import { Errors } from "../libraries/Errors.sol";
import { Auth } from "../auth/Auth.sol";
import { IOwnerManager } from "../interfaces/IOwnerManager.sol";

Expand Down

0 comments on commit 8feebae

Please sign in to comment.