Skip to content

Commit

Permalink
Add structures to src/Wingman.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
valar999 committed Jul 13, 2024
1 parent e8c575f commit 91d93a3
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion contracts/src/Wingman.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,32 @@ import { PackedUserOperation } from "modulekit/ModuleKit.sol";
* @author inc4
*/
contract Wingman is ERC7579HookBase, ERC7579ValidatorBase {
mapping(address => Backup[]) public backups;

struct Backup {
string name;
uint48 createdAt;
uint48 initiatedAt;
uint48 expiresAt;
Beneficiary[] beneficiaries;
}

struct Beneficiary {
address account;
uint8 percentage;
uint256 amount;
}

function onInstall(bytes calldata data) external {
}

function onUninstall(bytes calldata) external override {
}

function isInitialized(address smartAccount) public view returns (bool) {
return true;
if (backups[smartAccount].length > 0) {
return true;
}
}

function isModuleType(uint256 typeID) external pure override returns (bool) {
Expand Down

0 comments on commit 91d93a3

Please sign in to comment.