diff --git a/account-kit/smart-contracts/src/ma-v2/abis/maV2.ts b/account-kit/smart-contracts/src/ma-v2/abis/maV2.ts new file mode 100644 index 0000000000..d3e7b7ec66 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/abis/maV2.ts @@ -0,0 +1,1241 @@ +export const maV2Abi = [ + { + type: "constructor", + inputs: [ + { + name: "entryPoint", + type: "address", + internalType: "contract IEntryPoint", + }, + { + name: "executionInstallDelegate", + type: "address", + internalType: "contract ExecutionInstallDelegate", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "fallback", + stateMutability: "payable", + }, + { + type: "receive", + stateMutability: "payable", + }, + { + type: "function", + name: "accountId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "entryPoint", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IEntryPoint", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "execute", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "executeBatch", + inputs: [ + { + name: "calls", + type: "tuple[]", + internalType: "struct Call[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "executeUserOp", + inputs: [ + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "executeWithRuntimeValidation", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + { + name: "authorization", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "getExecutionData", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "data", + type: "tuple", + internalType: "struct ExecutionDataView", + components: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + { + name: "executionHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getValidationData", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + outputs: [ + { + name: "data", + type: "tuple", + internalType: "struct ValidationDataView", + components: [ + { + name: "validationFlags", + type: "uint8", + internalType: "ValidationFlags", + }, + { + name: "validationHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + { + name: "executionHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "initializeWithValidation", + inputs: [ + { + name: "validationConfig", + type: "bytes25", + internalType: "ValidationConfig", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + { + name: "installData", + type: "bytes", + internalType: "bytes", + }, + { + name: "hooks", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "installExecution", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + { + name: "moduleInstallData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "installValidation", + inputs: [ + { + name: "validationConfig", + type: "bytes25", + internalType: "ValidationConfig", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + { + name: "installData", + type: "bytes", + internalType: "bytes", + }, + { + name: "hooks", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isValidSignature", + inputs: [ + { + name: "hash", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onERC1155BatchReceived", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onERC1155Received", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onERC721Received", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "performCreate", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "isCreate2", + type: "bool", + internalType: "bool", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "createdAddr", + type: "address", + internalType: "address", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "proxiableUUID", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "uninstallExecution", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + { + name: "moduleUninstallData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "uninstallValidation", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + { + name: "uninstallData", + type: "bytes", + internalType: "bytes", + }, + { + name: "hookUninstallData", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upgradeToAndCall", + inputs: [ + { + name: "newImplementation", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "validateUserOp", + inputs: [ + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "userOpHash", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "missingAccountFunds", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "validationData", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "ExecutionInstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + indexed: false, + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExecutionUninstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onUninstallSucceeded", + type: "bool", + indexed: false, + internalType: "bool", + }, + { + name: "manifest", + type: "tuple", + indexed: false, + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "version", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Upgraded", + inputs: [ + { + name: "implementation", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ValidationInstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ValidationUninstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "onUninstallSucceeded", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ArrayLengthMismatch", + inputs: [], + }, + { + type: "error", + name: "CreateFailed", + inputs: [], + }, + { + type: "error", + name: "DeferredActionSignatureInvalid", + inputs: [], + }, + { + type: "error", + name: "DeferredValidationHasValidationHooks", + inputs: [], + }, + { + type: "error", + name: "ExecutionHookAlreadySet", + inputs: [ + { + name: "hookConfig", + type: "bytes25", + internalType: "HookConfig", + }, + ], + }, + { + type: "error", + name: "InterfaceNotSupported", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InvalidInitialization", + inputs: [], + }, + { + type: "error", + name: "ModuleInstallCallbackFailed", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "revertReason", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + type: "error", + name: "NonCanonicalEncoding", + inputs: [], + }, + { + type: "error", + name: "NotEntryPoint", + inputs: [], + }, + { + type: "error", + name: "PreValidationHookDuplicate", + inputs: [], + }, + { + type: "error", + name: "RequireUserOperationContext", + inputs: [], + }, + { + type: "error", + name: "SegmentOutOfOrder", + inputs: [], + }, + { + type: "error", + name: "SelfCallRecursionDepthExceeded", + inputs: [], + }, + { + type: "error", + name: "SignatureValidationInvalid", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "UnauthorizedCallContext", + inputs: [], + }, + { + type: "error", + name: "UnexpectedAggregator", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + { + name: "aggregator", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "UnrecognizedFunction", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + }, + { + type: "error", + name: "UpgradeFailed", + inputs: [], + }, + { + type: "error", + name: "UserOpValidationInvalid", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "ValidationAlreadySet", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "ValidationAssocHookLimitExceeded", + inputs: [], + }, + { + type: "error", + name: "ValidationEntityIdInUse", + inputs: [], + }, + { + type: "error", + name: "ValidationFunctionMissing", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + }, + { + type: "error", + name: "ValidationSignatureSegmentMissing", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/abis/smaStorage.ts b/account-kit/smart-contracts/src/ma-v2/abis/smaStorage.ts new file mode 100644 index 0000000000..a73c9d6ebf --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/abis/smaStorage.ts @@ -0,0 +1,1301 @@ +export const smaStorageAbi = [ + { + type: "constructor", + inputs: [ + { + name: "entryPoint", + type: "address", + internalType: "contract IEntryPoint", + }, + { + name: "executionInstallDelegate", + type: "address", + internalType: "contract ExecutionInstallDelegate", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "fallback", + stateMutability: "payable", + }, + { + type: "receive", + stateMutability: "payable", + }, + { + type: "function", + name: "accountId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "entryPoint", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IEntryPoint", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "execute", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "result", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "executeBatch", + inputs: [ + { + name: "calls", + type: "tuple[]", + internalType: "struct Call[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + }, + ], + outputs: [ + { + name: "results", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "executeUserOp", + inputs: [ + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "executeWithRuntimeValidation", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + { + name: "authorization", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "getExecutionData", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "data", + type: "tuple", + internalType: "struct ExecutionDataView", + components: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + { + name: "executionHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getFallbackSignerData", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getValidationData", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + outputs: [ + { + name: "data", + type: "tuple", + internalType: "struct ValidationDataView", + components: [ + { + name: "validationFlags", + type: "uint8", + internalType: "ValidationFlags", + }, + { + name: "validationHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + { + name: "executionHooks", + type: "bytes25[]", + internalType: "HookConfig[]", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "initialize", + inputs: [ + { + name: "initialSigner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "installExecution", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + { + name: "moduleInstallData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "installValidation", + inputs: [ + { + name: "validationConfig", + type: "bytes25", + internalType: "ValidationConfig", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + { + name: "installData", + type: "bytes", + internalType: "bytes", + }, + { + name: "hooks", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "isValidSignature", + inputs: [ + { + name: "hash", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "onERC1155BatchReceived", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "uint256[]", + internalType: "uint256[]", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onERC1155Received", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onERC721Received", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "performCreate", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "isCreate2", + type: "bool", + internalType: "bool", + }, + { + name: "salt", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "createdAddr", + type: "address", + internalType: "address", + }, + ], + stateMutability: "payable", + }, + { + type: "function", + name: "proxiableUUID", + inputs: [], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "uninstallExecution", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + { + name: "moduleUninstallData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "uninstallValidation", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + { + name: "uninstallData", + type: "bytes", + internalType: "bytes", + }, + { + name: "hookUninstallData", + type: "bytes[]", + internalType: "bytes[]", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateFallbackSignerData", + inputs: [ + { + name: "fallbackSigner", + type: "address", + internalType: "address", + }, + { + name: "isDisabled", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "upgradeToAndCall", + inputs: [ + { + name: "newImplementation", + type: "address", + internalType: "address", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "validateUserOp", + inputs: [ + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "userOpHash", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "missingAccountFunds", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "validationData", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "ExecutionInstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "manifest", + type: "tuple", + indexed: false, + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ExecutionUninstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "onUninstallSucceeded", + type: "bool", + indexed: false, + internalType: "bool", + }, + { + name: "manifest", + type: "tuple", + indexed: false, + internalType: "struct ExecutionManifest", + components: [ + { + name: "executionFunctions", + type: "tuple[]", + internalType: "struct ManifestExecutionFunction[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "skipRuntimeValidation", + type: "bool", + internalType: "bool", + }, + { + name: "allowGlobalValidation", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "executionHooks", + type: "tuple[]", + internalType: "struct ManifestExecutionHook[]", + components: [ + { + name: "executionSelector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "isPreHook", + type: "bool", + internalType: "bool", + }, + { + name: "isPostHook", + type: "bool", + internalType: "bool", + }, + ], + }, + { + name: "interfaceIds", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "FallbackSignerUpdated", + inputs: [ + { + name: "newFallbackSigner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "isDisabled", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Initialized", + inputs: [ + { + name: "version", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Upgraded", + inputs: [ + { + name: "implementation", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ValidationInstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ValidationUninstalled", + inputs: [ + { + name: "module", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "onUninstallSucceeded", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ArrayLengthMismatch", + inputs: [], + }, + { + type: "error", + name: "CreateFailed", + inputs: [], + }, + { + type: "error", + name: "DeferredActionSignatureInvalid", + inputs: [], + }, + { + type: "error", + name: "DeferredValidationHasValidationHooks", + inputs: [], + }, + { + type: "error", + name: "ExecutionHookAlreadySet", + inputs: [ + { + name: "hookConfig", + type: "bytes25", + internalType: "HookConfig", + }, + ], + }, + { + type: "error", + name: "FallbackSignerDisabled", + inputs: [], + }, + { + type: "error", + name: "FallbackSignerMismatch", + inputs: [], + }, + { + type: "error", + name: "FallbackValidationInstallationNotAllowed", + inputs: [], + }, + { + type: "error", + name: "InterfaceNotSupported", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "InvalidInitialization", + inputs: [], + }, + { + type: "error", + name: "InvalidSignatureType", + inputs: [], + }, + { + type: "error", + name: "ModuleInstallCallbackFailed", + inputs: [ + { + name: "module", + type: "address", + internalType: "address", + }, + { + name: "revertReason", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + type: "error", + name: "NonCanonicalEncoding", + inputs: [], + }, + { + type: "error", + name: "NotEntryPoint", + inputs: [], + }, + { + type: "error", + name: "PreValidationHookDuplicate", + inputs: [], + }, + { + type: "error", + name: "RequireUserOperationContext", + inputs: [], + }, + { + type: "error", + name: "SegmentOutOfOrder", + inputs: [], + }, + { + type: "error", + name: "SelfCallRecursionDepthExceeded", + inputs: [], + }, + { + type: "error", + name: "SignatureValidationInvalid", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "UnauthorizedCallContext", + inputs: [], + }, + { + type: "error", + name: "UnexpectedAggregator", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + { + name: "aggregator", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "UnrecognizedFunction", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + }, + { + type: "error", + name: "UpgradeFailed", + inputs: [], + }, + { + type: "error", + name: "UserOpValidationInvalid", + inputs: [ + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "ValidationAlreadySet", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "validationFunction", + type: "bytes24", + internalType: "ModuleEntity", + }, + ], + }, + { + type: "error", + name: "ValidationAssocHookLimitExceeded", + inputs: [], + }, + { + type: "error", + name: "ValidationEntityIdInUse", + inputs: [], + }, + { + type: "error", + name: "ValidationFunctionMissing", + inputs: [ + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + ], + }, + { + type: "error", + name: "ValidationSignatureSegmentMissing", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/addresses.ts b/account-kit/smart-contracts/src/ma-v2/addresses.ts new file mode 100644 index 0000000000..8b33143a62 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/addresses.ts @@ -0,0 +1,29 @@ +// TODO: improve format + +export const addresses = { + allowlistModule: + "0xE46ca4a98c485caEE2Abb6ef5116292B8c78a868" as `0x${string}`, + nativeTokenLimitModule: + "0xEa6a05306315196f2A7CA2ec7eEA45290bae00A0" as `0x${string}`, + paymasterGuardModule: + "0x976D01aF75D128cae526B5328AC268ac83D607f4" as `0x${string}`, + singleSignerValidationModule: + "0xF56716aE104545BdAf012e14e4640beb52727479" as `0x${string}`, + timeRangeModule: + "0x6FD0a9765a86788126a55aD5a483029a484F996C" as `0x${string}`, + webauthnValidationModule: + "0xCf3423F8EB9EE215560802D03a48cDD44f85bD28" as `0x${string}`, + executionInstallDelegate: + "0x8Bf909fEb66EBcC4725f04E70F319791Ec9d9628" as `0x${string}`, + modularAccountImpl: + "0x99090abd2700E24Cc70E3c486A89F7af876fFA33" as `0x${string}`, + semiModularAccountBytecodeImpl: + "0xDCBb5d4639428B18703801f7Cd7230add729E4b0" as `0x${string}`, + semiModularAccountStorageOnlyImpl: + "0x563ea43Ba0CD9150466B054Ce47FB0Fb45B234E2" as `0x${string}`, + accountFactory: "0xA5FC7aDc6d2c838443dF5bb826152c58b918f2c8" as `0x${string}`, + accountFactoryOwner: + "0x3BD786ac7Dec96eF9d06ebbCFa4e0E0947A2c303" as `0x${string}`, +}; + +export const tempChainId = 11155420; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/allowlistModule.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/allowlistModule.ts new file mode 100644 index 0000000000..270e36dc13 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/allowlistModule.ts @@ -0,0 +1,715 @@ +export const allowlistModuleAbi = [ + { + type: "function", + name: "addressAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + { + name: "hasSelectorAllowlist", + type: "bool", + internalType: "bool", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "checkAllowlistCalldata", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "view", + }, + { + type: "function", + name: "deleteAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "inputs", + type: "tuple[]", + internalType: "struct AllowlistModule.AllowlistInput[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "hasSelectorAllowlist", + type: "bool", + internalType: "bool", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + { + name: "erc20SpendLimit", + type: "uint256", + internalType: "uint256", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "erc20SpendLimits", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "moduleId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onInstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onUninstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "postExecutionHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preExecutionHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "preRuntimeValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "view", + }, + { + type: "function", + name: "preSignatureValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preUserOpValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "selectorAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setAddressAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + { + name: "hasSelectorAllowlist", + type: "bool", + internalType: "bool", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "setSelectorAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "selector", + type: "bytes4", + internalType: "bytes4", + }, + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "updateAllowlist", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "inputs", + type: "tuple[]", + internalType: "struct AllowlistModule.AllowlistInput[]", + components: [ + { + name: "target", + type: "address", + internalType: "address", + }, + { + name: "hasSelectorAllowlist", + type: "bool", + internalType: "bool", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + { + name: "erc20SpendLimit", + type: "uint256", + internalType: "uint256", + }, + { + name: "selectors", + type: "bytes4[]", + internalType: "bytes4[]", + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateLimits", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + { + name: "newLimit", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "AddressAllowlistUpdated", + inputs: [ + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "target", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "entry", + type: "tuple", + indexed: false, + internalType: "struct AllowlistModule.AddressAllowlistEntry", + components: [ + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + { + name: "hasSelectorAllowlist", + type: "bool", + internalType: "bool", + }, + { + name: "hasERC20SpendLimit", + type: "bool", + internalType: "bool", + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "ERC20SpendLimitUpdated", + inputs: [ + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newLimit", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SelectorAllowlistUpdated", + inputs: [ + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "targetAndSelector", + type: "bytes24", + indexed: true, + internalType: "bytes24", + }, + { + name: "allowed", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AddressNotAllowed", + inputs: [], + }, + { + type: "error", + name: "ERC20NotAllowed", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "ExceededTokenLimit", + inputs: [], + }, + { + type: "error", + name: "InvalidCalldataLength", + inputs: [], + }, + { + type: "error", + name: "NoSelectorSpecified", + inputs: [], + }, + { + type: "error", + name: "NotImplemented", + inputs: [], + }, + { + type: "error", + name: "SelectorNotAllowed", + inputs: [], + }, + { + type: "error", + name: "SpendingRequestNotAllowed", + inputs: [ + { + name: "", + type: "bytes4", + internalType: "bytes4", + }, + ], + }, + { + type: "error", + name: "UnexpectedDataPassed", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/nativeTokenLimitModule.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/nativeTokenLimitModule.ts new file mode 100644 index 0000000000..de0f1d2aa1 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/nativeTokenLimitModule.ts @@ -0,0 +1,403 @@ +export const nativeTokenLimitModuleAbi = [ + { + type: "function", + name: "limits", + inputs: [ + { + name: "entityId", + type: "uint256", + internalType: "uint256", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "limit", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "moduleId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onInstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onUninstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "postExecutionHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preExecutionHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "preRuntimeValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preSignatureValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preUserOpValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "specialPaymasters", + inputs: [ + { + name: "paymaster", + type: "address", + internalType: "address", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "updateLimits", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "newLimit", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateSpecialPaymaster", + inputs: [ + { + name: "paymaster", + type: "address", + internalType: "address", + }, + { + name: "allowed", + type: "bool", + internalType: "bool", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "NativeTokenSpendLimitUpdated", + inputs: [ + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newLimit", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SpecialPaymasterUpdated", + inputs: [ + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "paymaster", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "allowed", + type: "bool", + indexed: false, + internalType: "bool", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "ExceededNativeTokenLimit", + inputs: [], + }, + { + type: "error", + name: "InvalidPaymaster", + inputs: [], + }, + { + type: "error", + name: "NotImplemented", + inputs: [], + }, + { + type: "error", + name: "UnexpectedDataPassed", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/paymasterGuardModule.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/paymasterGuardModule.ts new file mode 100644 index 0000000000..275480aab0 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/paymasterGuardModule.ts @@ -0,0 +1,241 @@ +export const paymasterGuardModuleAbi = [ + { + type: "function", + name: "moduleId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onInstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onUninstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "paymasters", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "paymaster", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "preRuntimeValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "view", + }, + { + type: "function", + name: "preSignatureValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preUserOpValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "error", + name: "BadPaymasterSpecified", + inputs: [], + }, + { + type: "error", + name: "InvalidPaymaster", + inputs: [], + }, + { + type: "error", + name: "NotImplemented", + inputs: [], + }, + { + type: "error", + name: "UnexpectedDataPassed", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/timeRangeModule.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/timeRangeModule.ts new file mode 100644 index 0000000000..e4fe309ca3 --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/timeRangeModule.ts @@ -0,0 +1,295 @@ +export const timeRangeModuleAbi = [ + { + type: "function", + name: "moduleId", + inputs: [], + outputs: [ + { + name: "", + type: "string", + internalType: "string", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "onInstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "onUninstall", + inputs: [ + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "preRuntimeValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "uint256", + internalType: "uint256", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "view", + }, + { + type: "function", + name: "preSignatureValidationHook", + inputs: [ + { + name: "", + type: "uint32", + internalType: "uint32", + }, + { + name: "", + type: "address", + internalType: "address", + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [], + stateMutability: "pure", + }, + { + type: "function", + name: "preUserOpValidationHook", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "userOp", + type: "tuple", + internalType: "struct PackedUserOperation", + components: [ + { + name: "sender", + type: "address", + internalType: "address", + }, + { + name: "nonce", + type: "uint256", + internalType: "uint256", + }, + { + name: "initCode", + type: "bytes", + internalType: "bytes", + }, + { + name: "callData", + type: "bytes", + internalType: "bytes", + }, + { + name: "accountGasLimits", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "preVerificationGas", + type: "uint256", + internalType: "uint256", + }, + { + name: "gasFees", + type: "bytes32", + internalType: "bytes32", + }, + { + name: "paymasterAndData", + type: "bytes", + internalType: "bytes", + }, + { + name: "signature", + type: "bytes", + internalType: "bytes", + }, + ], + }, + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "setTimeRange", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "validUntil", + type: "uint48", + internalType: "uint48", + }, + { + name: "validAfter", + type: "uint48", + internalType: "uint48", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "timeRanges", + inputs: [ + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "validUntil", + type: "uint48", + internalType: "uint48", + }, + { + name: "validAfter", + type: "uint48", + internalType: "uint48", + }, + ], + stateMutability: "view", + }, + { + type: "event", + name: "TimeRangeSet", + inputs: [ + { + name: "entityId", + type: "uint32", + indexed: true, + internalType: "uint32", + }, + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "validUntil", + type: "uint48", + indexed: false, + internalType: "uint48", + }, + { + name: "validAfter", + type: "uint48", + indexed: false, + internalType: "uint48", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "NotImplemented", + inputs: [], + }, + { + type: "error", + name: "TimeRangeNotValid", + inputs: [], + }, + { + type: "error", + name: "UnexpectedDataPassed", + inputs: [], + }, +]; diff --git a/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/webauthnValidation.ts b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/webauthnValidation.ts new file mode 100644 index 0000000000..ac35abfc5d --- /dev/null +++ b/account-kit/smart-contracts/src/ma-v2/modules/single-signer-validation/abis/webauthnValidation.ts @@ -0,0 +1,373 @@ +export const webauthnValidationModuleAbi = [ + { + type: "constructor", + inputs: [ + { + name: "_entryPoint", + type: "address", + internalType: "contract IEntryPoint", + }, + { + name: "_accountImpl", + type: "address", + internalType: "contract ModularAccount", + }, + { + name: "_webauthnValidationModule", + type: "address", + internalType: "address", + }, + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "ACCOUNT_IMPL", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract ModularAccount", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "ENTRY_POINT", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "contract IEntryPoint", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "WEBAUTHN_VALIDATION_MODULE", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "addStake", + inputs: [ + { + name: "unstakeDelay", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [], + stateMutability: "payable", + }, + { + type: "function", + name: "createAccount", + inputs: [ + { + name: "ownerX", + type: "uint256", + internalType: "uint256", + }, + { + name: "ownerY", + type: "uint256", + internalType: "uint256", + }, + { + name: "salt", + type: "uint256", + internalType: "uint256", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "contract ModularAccount", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "getAddress", + inputs: [ + { + name: "ownerX", + type: "uint256", + internalType: "uint256", + }, + { + name: "ownerY", + type: "uint256", + internalType: "uint256", + }, + { + name: "salt", + type: "uint256", + internalType: "uint256", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "getSalt", + inputs: [ + { + name: "ownerX", + type: "uint256", + internalType: "uint256", + }, + { + name: "ownerY", + type: "uint256", + internalType: "uint256", + }, + { + name: "salt", + type: "uint256", + internalType: "uint256", + }, + { + name: "entityId", + type: "uint32", + internalType: "uint32", + }, + ], + outputs: [ + { + name: "", + type: "bytes32", + internalType: "bytes32", + }, + ], + stateMutability: "pure", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "address", + internalType: "address", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "unlockStake", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdraw", + inputs: [ + { + name: "to", + type: "address", + internalType: "address payable", + }, + { + name: "token", + type: "address", + internalType: "address", + }, + { + name: "amount", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "withdrawStake", + inputs: [ + { + name: "withdrawAddress", + type: "address", + internalType: "address payable", + }, + ], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "ModularAccountDeployed", + inputs: [ + { + name: "account", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "ownerX", + type: "uint256", + indexed: true, + internalType: "uint256", + }, + { + name: "ownerY", + type: "uint256", + indexed: true, + internalType: "uint256", + }, + { + name: "salt", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AddressEmptyCode", + inputs: [ + { + name: "target", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "AddressInsufficientBalance", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "FailedInnerCall", + inputs: [], + }, + { + type: "error", + name: "OwnableInvalidOwner", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "OwnableUnauthorizedAccount", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [ + { + name: "token", + type: "address", + internalType: "address", + }, + ], + }, + { + type: "error", + name: "TransferFailed", + inputs: [], + }, +];