-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
26 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import { | ||
IValidator, | ||
PackedUserOperation, | ||
VALIDATION_SUCCESS | ||
} from "erc7579/interfaces/IERC7579Module.sol"; | ||
|
||
contract MockValidator is IValidator { | ||
function onInstall(bytes calldata data) external override { } | ||
|
||
function onUninstall(bytes calldata data) external override { } | ||
import { PackedUserOperation } from "erc7579/interfaces/IERC7579Module.sol"; | ||
import { MockValidator as MockValidatorBase } from | ||
"@rhinestone/modulekit/src/mocks/MockValidator.sol"; | ||
|
||
contract MockValidator is MockValidatorBase { | ||
function validateUserOp( | ||
PackedUserOperation calldata userOp, | ||
bytes32 userOpHash | ||
) | ||
external | ||
override | ||
returns (uint256) | ||
returns (ValidationData) | ||
{ | ||
bytes4 execSelector = bytes4(userOp.callData[:4]); | ||
|
||
return VALIDATION_SUCCESS; | ||
} | ||
|
||
function isValidSignatureWithSender( | ||
address sender, | ||
bytes32 hash, | ||
bytes calldata data | ||
) | ||
external | ||
view | ||
override | ||
returns (bytes4) | ||
{ } | ||
|
||
function isModuleType(uint256 typeID) external view returns (bool) { | ||
return typeID == 1; | ||
} | ||
|
||
function isInitialized(address smartAccount) external view returns (bool) { | ||
return false; | ||
} | ||
} |
17 changes: 6 additions & 11 deletions
17
accounts/safe7579/test/mocks/MockHook.sol → ...ages/modulekit/src/mocks/MockFallback.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters