Skip to content

Commit

Permalink
refactor: remove unused imports and extract variables to SMA
Browse files Browse the repository at this point in the history
  • Loading branch information
Zer0dot committed Aug 16, 2024
1 parent 6a25eef commit e6d51fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/account/SemiModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ contract SemiModularAccount is UpgradeableModularAccount {

ModuleEntity internal constant _FALLBACK_VALIDATION = ModuleEntity.wrap(bytes24(type(uint192).max));

uint256 internal constant _SIG_VALIDATION_PASSED = 0;
uint256 internal constant _SIG_VALIDATION_FAILED = 1;

event FallbackSignerSet(address indexed previousFallbackSigner, address indexed newFallbackSigner);
event FallbackSignerDisabledSet(bool prevDisabled, bool newDisabled);

Expand Down
8 changes: 0 additions & 8 deletions src/account/UpgradeableModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import {AccountStorage, getAccountStorage, toHookConfig, toSetValue} from "./Acc
import {AccountStorageInitializable} from "./AccountStorageInitializable.sol";
import {ModuleManagerInternals} from "./ModuleManagerInternals.sol";

import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";

contract UpgradeableModularAccount is
AccountExecutor,
AccountLoupe,
Expand All @@ -54,8 +51,6 @@ contract UpgradeableModularAccount is
using ValidationConfigLib for ValidationConfig;
using HookConfigLib for HookConfig;
using SparseCalldataSegmentLib for bytes;
using MessageHashUtils for bytes32;
using ECDSA for bytes32;

struct PostExecToRun {
bytes preExecHookReturnData;
Expand All @@ -72,9 +67,6 @@ contract UpgradeableModularAccount is
bytes4 internal constant _1271_MAGIC_VALUE = 0x1626ba7e;
bytes4 internal constant _1271_INVALID = 0xffffffff;

uint256 internal constant _SIG_VALIDATION_PASSED = 0;
uint256 internal constant _SIG_VALIDATION_FAILED = 1;

event ModularAccountInitialized(IEntryPoint indexed entryPoint);

error NonCanonicalEncoding();
Expand Down

0 comments on commit e6d51fe

Please sign in to comment.