-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filipp Makarov
authored and
Filipp Makarov
committed
Dec 23, 2024
1 parent
24a08a2
commit 45d738a
Showing
6 changed files
with
87 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.27; | ||
|
||
interface IERC7779 { | ||
/* | ||
* @dev Externally shares the storage bases that has been used throughout the account. | ||
* Majority of 7702 accounts will have their distinctive storage base to reduce the chance of storage collision. | ||
* This allows the external entities to know what the storage base is of the account. | ||
* Wallets willing to redelegate already-delegated accounts should call accountStorageBase() to check if it confirms with the account it plans to redelegate. | ||
* | ||
* The bytes32 array should be stored at the storage slot: keccak(keccak('InteroperableDelegatedAccount.ERC.Storage')-1) & ~0xff | ||
* This is an append-only array so newly redelegated accounts should not overwrite the storage at this slot, but just append their base to the array. | ||
* This append operation should be done during the initialization of the account. | ||
*/ | ||
function accountStorageBases() external view returns (bytes32[] memory); | ||
|
||
/* | ||
* @dev Function called before redelegation. | ||
* This function should prepare the account for a delegation to a different implementation. | ||
* This function could be triggered by the new wallet that wants to redelegate an already delegated EOA. | ||
* It should uninitialize storages if needed and execute wallet-specific logic to prepare for redelegation. | ||
* msg.sender should be the owner of the account. | ||
*/ | ||
function onRedelegation() external returns (bool); | ||
|
||
} |
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