Skip to content

Commit

Permalink
chore: cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
adamegyed committed Nov 18, 2024
1 parent 59d334a commit c7f0d54
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
3 changes: 0 additions & 3 deletions src/account/ModularAccountBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ abstract contract ModularAccountBase is
bytes4 internal constant _1271_MAGIC_VALUE = 0x1626ba7e;
bytes4 internal constant _1271_INVALID = 0xffffffff;

uint8 internal constant _IS_GLOBAL_VALIDATION_BIT = 1;
uint8 internal constant _HAS_DEFERRED_ACTION_BIT = 2;

address internal immutable _EXECUTION_INSTALL_DELEGATE;

event DeferredActionNonceInvalidated(uint256 nonce);
Expand Down
19 changes: 0 additions & 19 deletions src/libraries/ValidationLocatorLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -210,25 +210,6 @@ library ValidationLocatorLib {
result = ValidationLookupKey.wrap(uint168(uint160(directCallValidation)) << 8 | _IS_DIRECT_CALL_VALIDATION);
}

// function getFromModuleEntity(ModuleEntity _moduleEntity) internal pure returns (ValidationLocator result) {
// (address module, uint32 entityId) = ModuleEntityLib.unpack(_moduleEntity);
// if (entityId == DIRECT_CALL_VALIDATION_ENTITYID) {
// result = ValidationLocator.wrap(uint168(uint160(module)) << 8 | _IS_DIRECT_CALL_VALIDATION);
// } else {
// result = ValidationLocator.wrap(uint168(uint160(entityId)) << 8);
// }
// }

// function moduleEntity(ValidationLocator locator, address module) internal pure returns (ModuleEntity result)
// {
// if (ValidationLocator.unwrap(locator) & _IS_DIRECT_CALL_VALIDATION != 0) {
// result = ModuleEntityLib.pack(module, DIRECT_CALL_VALIDATION_ENTITYID);
// } else {
// uint32 entityId = uint32(ValidationLocator.unwrap(locator) >> 8);
// result = ModuleEntityLib.pack(module, entityId);
// }
// }

function lookupKey(ValidationLocator locator) internal pure returns (ValidationLookupKey result) {
assembly ("memory-safe") {
result := and(locator, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF04)
Expand Down

0 comments on commit c7f0d54

Please sign in to comment.