Skip to content

Commit

Permalink
Merge branch 'develop' into feat/SMA-363-ABI-SVM
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipp Makarov authored and Filipp Makarov committed Feb 14, 2024
2 parents dddc887 + 5e97846 commit 0d4251f
Show file tree
Hide file tree
Showing 21 changed files with 1,687 additions and 385 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface IAccountRecoveryModule {
uint8 guardiansCount;
uint8 recoveryThreshold;
uint24 securityDelay;
uint8 recoveriesLeft;
}

/**
Expand All @@ -33,6 +34,20 @@ interface IAccountRecoveryModule {
uint48 requestTimestamp;
}

/**
* @dev Emitted when a recovery request is executed
* @param smartAccount address of the Smart Account
* @param recoverer module address that executed the recovery request
* @param recoveryCallValue value that was sent with the recovery request
* @param recoveryCallData calldata that was executed to recover the account
*/
event RecoveryExecuted(
address indexed smartAccount,
address recoverer,
uint256 recoveryCallValue,
bytes recoveryCallData
);

/**
* @dev Emitted when a recovery request is submitted
* @param smartAccount address of the Smart Account
Expand Down Expand Up @@ -97,6 +112,22 @@ interface IAccountRecoveryModule {
uint48 securityDelay
);

/**
* @dev Emitted when recoveries left have been changed
* @param smartAccount address of the Smart Account
* @param recoveriesLeft new recoveries allowed
*/
event RecoveriesLeft(
address indexed smartAccount,
uint8 indexed recoveriesLeft
);

/**
* @dev Emitted when all the guardians and setting have been reset for the Smart Account
* @param smartAccount address of the Smart Account
*/
event ModuleReset(address indexed smartAccount);

/**
* @dev Thrown if trying to init module for the Smart Account
* but it has already been initialized
Expand Down Expand Up @@ -149,6 +180,11 @@ interface IAccountRecoveryModule {
*/
error ZeroThreshold();

/**
* @dev Thrown if trying to set zero allowed recoveries
*/
error ZeroAllowedRecoveries();

/**
* @dev Thrown if not enough or too many params provided
*/
Expand Down Expand Up @@ -182,6 +218,19 @@ interface IAccountRecoveryModule {
bytes32 requestCallDataHash
);

/**
* @dev Thrown when recovery execution failed
* @param smartAccount address of the Smart Account
* @param returnData error data
*/
error RecoveryExecutionFailed(address smartAccount, bytes returnData);

/**
* @dev Thrown if trying to reset module with an incomplete list of guardians
* @param guardiansLeft number of guardians that are still set for the Smart Account
*/
error ResetFailed(address smartAccount, uint256 guardiansLeft);

/**
* @dev Initializes the module for a Smart Account.
* Can only be used at a time of first enabling the module for a Smart Account.
Expand All @@ -197,7 +246,8 @@ interface IAccountRecoveryModule {
bytes32[] calldata guardians,
TimeFrame[] memory timeFrames,
uint8 recoveryThreshold,
uint24 securityDelay
uint24 securityDelay,
uint8 recoveriesAllowed
) external returns (address);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface IPasskeyRegistryModule {

function isValidSignatureForAddress(
bytes32 signedDataHash,
bytes memory moduleSignature
bytes memory moduleSignature,
address smartAccount
) external view returns (bytes4);
}
Loading

0 comments on commit 0d4251f

Please sign in to comment.