From d021654ba89f55877db73bbcf226b3432b0cd877 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Tue, 30 Apr 2024 15:29:29 +0530 Subject: [PATCH 01/10] WIP: Support for Modular accounts --- src/sdk/base/BaseAccountAPI.ts | 20 +- src/sdk/base/Bootstrap.ts | 500 +++++ src/sdk/base/ERC4337EthersProvider.ts | 10 +- src/sdk/base/ERC4337EthersSigner.ts | 3 +- src/sdk/base/EncodeExecuteData.ts | 47 + src/sdk/base/EtherspotWalletAPI.ts | 71 +- src/sdk/base/HttpRpcClient.ts | 6 +- src/sdk/base/UserOperationEventListener.ts | 4 +- src/sdk/base/VerifyingPaymasterAPI.ts | 9 +- src/sdk/common/ERC4337Utils.ts | 103 +- .../contracts/core/BaseAccount.ts | 18 +- .../contracts/core/EntryPoint.ts | 1931 ++++++++--------- .../contracts/interfaces/IEntryPoint.ts | 237 +- src/sdk/contracts/erc7579-ref-impl/index.ts | 7 + .../contracts/erc7579-ref-impl/lib/index.ts | 7 + .../lib/sentinellist/index.ts | 5 + .../src/SentinelList.sol/SentinelListLib.ts | 56 + .../src/SentinelList.sol/index.ts | 4 + .../lib/sentinellist/src/index.ts | 5 + .../erc7579-ref-impl/lib/solady/index.ts | 5 + .../erc7579-ref-impl/lib/solady/src/index.ts | 5 + .../lib/solady/src/utils/ECDSA.ts | 56 + .../lib/solady/src/utils/LibClone.ts | 56 + .../lib/solady/src/utils/index.ts | 5 + .../erc7579-ref-impl/src/core/AccountBase.ts | 85 + .../erc7579-ref-impl/src/core/Fallback.ts | 520 +++++ .../src/core/ModuleManager.ts | 618 ++++++ .../erc7579-ref-impl/src/core/index.ts | 6 + .../contracts/erc7579-ref-impl/src/index.ts | 7 + .../src/interfaces/IERC4337.ts | 162 ++ .../src/interfaces/IMSA.sol/IAccountConfig.ts | 485 +++++ .../IMSA.sol/IAccountConfig_Hook.ts | 215 ++ .../src/interfaces/IMSA.sol/IExecution.ts | 253 +++ .../interfaces/IMSA.sol/IExecutionUnsafe.ts | 153 ++ .../src/interfaces/IMSA.sol/IMSA.ts | 781 +++++++ .../src/interfaces/IMSA.sol/index.ts | 8 + .../src/interfaces/IModule.sol/IExecutor.ts | 173 ++ .../src/interfaces/IModule.sol/IFallback.ts | 173 ++ .../src/interfaces/IModule.sol/IHook.ts | 245 +++ .../src/interfaces/IModule.sol/IModule.ts | 173 ++ .../src/interfaces/IModule.sol/IValidator.ts | 307 +++ .../src/interfaces/IModule.sol/index.ts | 8 + .../erc7579-ref-impl/src/interfaces/index.ts | 8 + .../contracts/core/EntryPoint__factory.ts | 783 ++----- .../interfaces/IEntryPoint__factory.ts | 563 ++--- .../contracts/factories/src/ERC6900/index.ts | 4 + .../ERC6900/libraries/ErrorsLib__factory.ts | 339 +++ .../factories/src/ERC6900/libraries/index.ts | 4 + .../access/AccessController__factory.ts | 575 +++++ .../factories/src/ERC7579/access/index.ts | 4 + .../contracts/factories/src/ERC7579/index.ts | 8 + .../interfaces/IAccessController__factory.ts | 377 ++++ .../IAccountConfig_Hook__factory.ts | 107 + .../IAccountConfig__factory.ts | 243 +++ .../IEtherspotWallet7579__factory.ts | 443 ++++ .../IExecutionUnsafe__factory.ts | 74 + .../IExecution__factory.ts | 161 ++ .../IEtherspotWallet7579.sol/index.ts | 8 + .../factories/src/ERC7579/interfaces/index.ts | 5 + .../ERC7579/libraries/ErrorsLib__factory.ts | 133 ++ .../factories/src/ERC7579/libraries/index.ts | 4 + .../MultipleOwnerECDSAValidator__factory.ts | 251 +++ .../factories/src/ERC7579/modules/index.ts | 4 + .../EtherspotWallet7579Base__factory.ts | 739 +++++++ .../EtherspotWallet7579Factory__factory.ts | 168 ++ .../wallet/EtherspotWallet7579__factory.ts | 1284 +++++++++++ .../factories/src/ERC7579/wallet/index.ts | 6 + src/sdk/contracts/index.ts | 1 - src/sdk/contracts/src/ERC6900/index.ts | 5 + .../src/ERC6900/libraries/ErrorsLib.ts | 55 + .../contracts/src/ERC6900/libraries/index.ts | 4 + .../src/ERC7579/access/AccessController.ts | 768 +++++++ src/sdk/contracts/src/ERC7579/access/index.ts | 4 + src/sdk/contracts/src/ERC7579/index.ts | 13 + .../ERC7579/interfaces/IAccessController.ts | 652 ++++++ .../IAccountConfig.ts | 485 +++++ .../IAccountConfig_Hook.ts | 215 ++ .../IEtherspotWallet7579.ts | 781 +++++++ .../IEtherspotWallet7579.sol/IExecution.ts | 253 +++ .../IExecutionUnsafe.ts | 153 ++ .../IEtherspotWallet7579.sol/index.ts | 8 + .../contracts/src/ERC7579/interfaces/index.ts | 6 + .../src/ERC7579/libraries/ErrorsLib.ts | 56 + .../contracts/src/ERC7579/libraries/index.ts | 4 + .../modules/MultipleOwnerECDSAValidator.ts | 307 +++ .../contracts/src/ERC7579/modules/index.ts | 4 + .../src/ERC7579/wallet/EtherspotWallet7579.ts | 1750 +++++++++++++++ .../ERC7579/wallet/EtherspotWallet7579Base.ts | 1062 +++++++++ .../wallet/EtherspotWallet7579Factory.ts | 207 ++ src/sdk/contracts/src/ERC7579/wallet/index.ts | 6 + src/sdk/network/constants.ts | 406 +--- src/sdk/sdk.ts | 13 +- 92 files changed, 18368 insertions(+), 2687 deletions(-) create mode 100644 src/sdk/base/Bootstrap.ts create mode 100644 src/sdk/base/EncodeExecuteData.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/SentinelListLib.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/solady/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/solady/src/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/ECDSA.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/LibClone.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/core/AccountBase.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/core/Fallback.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/core/ModuleManager.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/core/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IERC4337.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig_Hook.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecution.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecutionUnsafe.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IMSA.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IExecutor.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IFallback.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IHook.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IModule.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IValidator.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/index.ts create mode 100644 src/sdk/contracts/erc7579-ref-impl/src/interfaces/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC6900/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC6900/libraries/ErrorsLib__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC6900/libraries/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/access/AccessController__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/access/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IAccessController__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/interfaces/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/libraries/ErrorsLib__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/libraries/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/modules/MultipleOwnerECDSAValidator__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/modules/index.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Base__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Factory__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts create mode 100644 src/sdk/contracts/factories/src/ERC7579/wallet/index.ts create mode 100644 src/sdk/contracts/src/ERC6900/index.ts create mode 100644 src/sdk/contracts/src/ERC6900/libraries/ErrorsLib.ts create mode 100644 src/sdk/contracts/src/ERC6900/libraries/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/access/AccessController.ts create mode 100644 src/sdk/contracts/src/ERC7579/access/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IAccessController.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/interfaces/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/libraries/ErrorsLib.ts create mode 100644 src/sdk/contracts/src/ERC7579/libraries/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/modules/MultipleOwnerECDSAValidator.ts create mode 100644 src/sdk/contracts/src/ERC7579/modules/index.ts create mode 100644 src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts create mode 100644 src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Base.ts create mode 100644 src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Factory.ts create mode 100644 src/sdk/contracts/src/ERC7579/wallet/index.ts diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index b3a48a2..5db04ac 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -1,12 +1,12 @@ import { ethers, BigNumber, BigNumberish } from 'ethers'; import { BehaviorSubject } from 'rxjs'; import { Provider } from '@ethersproject/providers'; -import { EntryPoint, EntryPoint__factory, INonceManager, INonceManager__factory } from '../contracts'; +import { IEntryPoint, EntryPoint__factory, INonceManager, INonceManager__factory } from '../contracts'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { TransactionDetailsForUserOp } from './TransactionDetailsForUserOp'; import { resolveProperties } from 'ethers/lib/utils'; import { PaymasterAPI } from './PaymasterAPI'; -import { ErrorSubject, Exception, getUserOpHash, NotPromise, packUserOp } from '../common'; +import { ErrorSubject, Exception, getUserOpHash, NotPromise, packUserOp, UserOperation } from '../common'; import { calcPreVerificationGas, GasOverheads } from './calcPreVerificationGas'; import { Factory, isWalletProvider, Network, NetworkNames, NetworkService, SdkOptions, SignMessageDto, State, StateService, validateDto, WalletProviderLike, WalletService } from '..'; import { Context } from '../context'; @@ -48,7 +48,7 @@ export abstract class BaseAccountAPI { context: Context; // entryPoint connected to "zero" address. allowed to make static calls (e.g. to getSenderAddress) - protected readonly entryPointView: EntryPoint; + protected readonly entryPointView: IEntryPoint; protected readonly nonceManager: INonceManager; provider: Provider; @@ -365,7 +365,7 @@ export abstract class BaseAccountAPI { * This value matches entryPoint.getUserOpHash (calculated off-chain, to avoid a view call) * @param userOp userOperation, (signature field ignored) */ - async getUserOpHash(userOp: UserOperationStruct): Promise { + async getUserOpHash(userOp: UserOperation): Promise { const op = await resolveProperties(userOp); const provider = this.services.walletService.getWalletProvider(); const chainId = await provider.getNetwork().then((net) => net.chainId); @@ -401,11 +401,11 @@ export abstract class BaseAccountAPI { * - if gas or nonce are missing, read them from the chain (note that we can't fill gaslimit before the account is created) * @param info */ - async createUnsignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { + async createUnsignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { const { callData, callGasLimit } = await this.encodeUserOpCallDataAndGasLimit(info); - const initCode = await this.getInitCode(); + const factoryData = await this.getInitCode(); - const initGas = await this.estimateCreationGas(initCode); + const initGas = await this.estimateCreationGas(factoryData); const verificationGasLimit = BigNumber.from(await this.getVerificationGasLimit()).add(initGas); let { maxFeePerGas, maxPriorityFeePerGas } = info; @@ -433,7 +433,7 @@ export abstract class BaseAccountAPI { const partialUserOp: any = { sender: await this.getAccountAddress(), nonce: await this.getNonce(key), - initCode, + factoryData : '0x' + factoryData.substring(42), callData, callGasLimit, verificationGasLimit, @@ -466,7 +466,7 @@ export abstract class BaseAccountAPI { * Sign the filled userOp. * @param userOp the UserOperation to sign (with signature field ignored) */ - async signUserOp(userOp: UserOperationStruct): Promise { + async signUserOp(userOp: any): Promise { if (this.paymasterAPI != null) { const paymasterAndData = await this.paymasterAPI.getPaymasterAndData(userOp); userOp.paymasterAndData = paymasterAndData.result.paymasterAndData; @@ -486,7 +486,7 @@ export abstract class BaseAccountAPI { * helper method: create and sign a user operation. * @param info transaction details for the userOp */ - async createSignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { + async createSignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { return await this.signUserOp(await this.createUnsignedUserOp(info, key)); } diff --git a/src/sdk/base/Bootstrap.ts b/src/sdk/base/Bootstrap.ts new file mode 100644 index 0000000..7658d26 --- /dev/null +++ b/src/sdk/base/Bootstrap.ts @@ -0,0 +1,500 @@ +import { ethers } from "ethers"; + +export interface BootstrapConfig { + module: string; + data: string; +} + +export const BOOTSTRAP_ABI = [ + { + "inputs": [ + + ], + "name": "AccountAccessUnauthorized", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "CannotRemoveLastValidator", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "FallbackInvalidCallType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "currentHook", + "type": "address" + } + ], + "name": "HookAlreadyInstalled", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "HookPostCheckFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "InvalidFallbackCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "InvalidModule", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "entry", + "type": "address" + } + ], + "name": "LinkedList_EntryAlreadyInList", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "entry", + "type": "address" + } + ], + "name": "LinkedList_InvalidEntry", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "LinkedList_InvalidPage", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "NoFallbackHandler", + "type": "error" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "$valdiators", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "$executors", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig", + "name": "_hook", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "_fallbacks", + "type": "tuple[]" + } + ], + "name": "_getInitMSACalldata", + "outputs": [ + { + "internalType": "bytes", + "name": "init", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + + ], + "name": "entryPoint", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSig", + "type": "bytes4" + } + ], + "name": "getActiveFallbackHandler", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + }, + { + "internalType": "CallType", + "name": "calltype", + "type": "bytes1" + }, + { + "internalType": "address[]", + "name": "allowedCallers", + "type": "address[]" + } + ], + "internalType": "struct ModuleManager.FallbackHandler", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + + ], + "name": "getActiveHook", + "outputs": [ + { + "internalType": "address", + "name": "hook", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "cursor", + "type": "address" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "getExecutorsPaginated", + "outputs": [ + { + "internalType": "address[]", + "name": "array", + "type": "address[]" + }, + { + "internalType": "address", + "name": "next", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "cursor", + "type": "address" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + } + ], + "name": "getValidatorPaginated", + "outputs": [ + { + "internalType": "address[]", + "name": "array", + "type": "address[]" + }, + { + "internalType": "address", + "name": "next", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "$valdiators", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "$executors", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig", + "name": "_hook", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "module", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct BootstrapConfig[]", + "name": "_fallbacks", + "type": "tuple[]" + } + ], + "name": "initMSA", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IModule", + "name": "validator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "singleInitMSA", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +]; + +const abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "typeID", + type: "uint256", + }, + ], + name: "isModuleType", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onInstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onUninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export function _makeBootstrapConfig(module: string, data: string) : BootstrapConfig { + const config: BootstrapConfig = { + module: "", + data: "" + }; + let iface = new ethers.utils.Interface(abi); + + config.module = module; + config.data = iface.encodeFunctionData( + 'onInstall', + [data] + ); + return config; +} + +export function makeBootstrapConfig(module: string, data: string): BootstrapConfig[] { + const config: BootstrapConfig[] = []; + let iface = new ethers.utils.Interface(abi); + const data1 = iface.encodeFunctionData( + 'onInstall', + [data] + ); + const newConfig: BootstrapConfig = { + module: module, + data: data1 + }; + config.push(newConfig); + return config; +} diff --git a/src/sdk/base/ERC4337EthersProvider.ts b/src/sdk/base/ERC4337EthersProvider.ts index 7ef9f66..fcaaf73 100644 --- a/src/sdk/base/ERC4337EthersProvider.ts +++ b/src/sdk/base/ERC4337EthersProvider.ts @@ -7,9 +7,9 @@ import { ClientConfig } from './ClientConfig'; import { ERC4337EthersSigner } from './ERC4337EthersSigner'; import { UserOperationEventListener } from './UserOperationEventListener'; import { HttpRpcClient } from './HttpRpcClient'; -import type { EntryPoint } from '../contracts'; +import type { IEntryPoint } from '../contracts'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; -import { getUserOpHash } from '../common'; +import { UserOperation, getUserOpHash } from '../common'; import { BaseAccountAPI } from './BaseAccountAPI'; export class ERC4337EthersProvider extends BaseProvider { @@ -23,7 +23,7 @@ export class ERC4337EthersProvider extends BaseProvider { readonly originalSigner: Signer, readonly originalProvider: BaseProvider, readonly httpRpcClient: HttpRpcClient, - readonly entryPoint: EntryPoint, + readonly entryPoint: IEntryPoint, readonly smartAccountAPI: BaseAccountAPI, ) { super({ @@ -97,7 +97,7 @@ export class ERC4337EthersProvider extends BaseProvider { } // fabricate a response in a format usable by ethers users... - async constructUserOpTransactionResponse(userOp1: UserOperationStruct): Promise { + async constructUserOpTransactionResponse(userOp1: UserOperation): Promise { const userOp = await resolveProperties(userOp1); const userOpHash = getUserOpHash(userOp, this.config.entryPointAddress, this.chainId); const waitPromise = new Promise((resolve, reject) => { @@ -115,7 +115,7 @@ export class ERC4337EthersProvider extends BaseProvider { // eslint-disable-next-line @typescript-eslint/no-unused-vars wait: async (confirmations?: number): Promise => { const transactionReceipt = await waitPromise; - if (userOp.initCode.length !== 0) { + if (userOp.factory != null) { // checking if the wallet has been deployed by the transaction; it must be if we are here await this.smartAccountAPI.checkAccountPhantom(); } diff --git a/src/sdk/base/ERC4337EthersSigner.ts b/src/sdk/base/ERC4337EthersSigner.ts index fe2f18c..dc37eb5 100644 --- a/src/sdk/base/ERC4337EthersSigner.ts +++ b/src/sdk/base/ERC4337EthersSigner.ts @@ -8,6 +8,7 @@ import { ClientConfig } from './ClientConfig'; import { HttpRpcClient } from './HttpRpcClient'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { BaseAccountAPI } from './BaseAccountAPI'; +import { UserOperation } from '../common'; export class ERC4337EthersSigner extends Signer { // TODO: we have 'erc4337provider', remove shared dependencies or avoid two-way reference @@ -99,7 +100,7 @@ export class ERC4337EthersSigner extends Signer { throw new Error('not implemented'); } - async signUserOperation(userOperation: UserOperationStruct): Promise { + async signUserOperation(userOperation: UserOperation): Promise { const message = await this.smartAccountAPI.getUserOpHash(userOperation); return await this.originalSigner.signMessage(message); } diff --git a/src/sdk/base/EncodeExecuteData.ts b/src/sdk/base/EncodeExecuteData.ts new file mode 100644 index 0000000..185644a --- /dev/null +++ b/src/sdk/base/EncodeExecuteData.ts @@ -0,0 +1,47 @@ +const { ethers } = require("ethers"); + +// Define types +const ModeCode = ethers.utils.Bytes32; +const CallType = ethers.utils.Bytes1; +const ExecType = ethers.utils.Bytes1; +const ModeSelector = ethers.utils.Bytes4; +const ModePayload = ethers.utils.Bytes22; + +// Define constants +const CALLTYPE_SINGLE = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 1); +const CALLTYPE_BATCH = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x01), 1); +const CALLTYPE_STATIC = ethers.utils.hexZeroPad(ethers.utils.hexlify(0xFE), 1); +const CALLTYPE_DELEGATECALL = ethers.utils.hexZeroPad(ethers.utils.hexlify(0xFF), 1); + +const EXECTYPE_DEFAULT = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 1); +const EXECTYPE_TRY = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x01), 1); + +const MODE_DEFAULT = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00000000), 4); + +// Helper function to encode mode +function encodeMode(callType, execType, modeSelector, modePayload) { + return ethers.utils.concat([callType, execType, modeSelector, modePayload]); +} + +// Encode Simple Batch mode +function encodeSimpleBatch() { + const modePayload = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 22); + return encodeMode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, modePayload); +} + +// Encode Simple Single mode +function encodeSimpleSingle() { + const modePayload = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 22); + return encodeMode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, modePayload); +} + +function encodeSingle(target, value, callData) { + // Encode parameters using ethers.js + const userOpCalldata = ethers.utils.defaultAbiCoder.encode( + ["address", "uint256", "bytes"], + [target, value, callData] + ); + + return userOpCalldata; + } + \ No newline at end of file diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index c75cd7b..f4c380b 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -1,12 +1,16 @@ -import { BigNumber, BigNumberish, Contract } from 'ethers'; +import { BigNumber, BigNumberish, Contract, ethers } from 'ethers'; import { EtherspotWallet, EtherspotWallet__factory, EtherspotWalletFactory, EtherspotWalletFactory__factory, } from '../contracts'; -import { arrayify, hexConcat } from 'ethers/lib/utils'; +import { arrayify, defaultAbiCoder, hexConcat } from 'ethers/lib/utils'; import { BaseApiParams, BaseAccountAPI } from './BaseAccountAPI'; +import { EtherspotWallet7579Factory__factory, EtherspotWallet7579__factory } from '../contracts/factories/src/ERC7579/wallet'; +import { EtherspotWallet7579, EtherspotWallet7579Factory } from '../contracts/src/ERC7579/wallet'; +import { IModule } from '../contracts/erc7579-ref-impl/src/interfaces/IModule.sol'; +import { BOOTSTRAP_ABI, BootstrapConfig, _makeBootstrapConfig, makeBootstrapConfig } from './Bootstrap'; /** * constructor params, added no top of base params: @@ -37,9 +41,9 @@ export class EtherspotWalletAPI extends BaseAccountAPI { * our account contract. * should support the "execFromEntryPoint" and "nonce" methods */ - accountContract?: EtherspotWallet; + accountContract?: EtherspotWallet7579; - factory?: EtherspotWalletFactory; + factory?: EtherspotWallet7579Factory; constructor(params: EtherspotWalletApiParams) { super(params); @@ -49,7 +53,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } async checkAccountAddress(address: string): Promise { - const accountContract = EtherspotWallet__factory.connect(address, this.provider); + const accountContract = EtherspotWallet7579__factory.connect(address, this.provider); if (!(await accountContract.isOwner(this.services.walletService.EOAAddress))) { throw new Error('the specified accountAddress does not belong to the given EOA provider') } @@ -58,9 +62,9 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } } - async _getAccountContract(): Promise { + async _getAccountContract(): Promise { if (this.accountContract == null) { - this.accountContract = EtherspotWallet__factory.connect(await this.getAccountAddress(), this.provider); + this.accountContract = EtherspotWallet7579__factory.connect(await this.getAccountAddress(), this.provider); } return this.accountContract; } @@ -71,16 +75,34 @@ export class EtherspotWalletAPI extends BaseAccountAPI { */ async getAccountInitCode(): Promise { if (this.factoryAddress != null && this.factoryAddress !== '') { - this.factory = EtherspotWalletFactory__factory.connect(this.factoryAddress, this.provider); + this.factory = EtherspotWallet7579Factory__factory.connect(this.factoryAddress, this.provider); } else { throw new Error('no factory to get initCode'); } + const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); + const validators: BootstrapConfig[] = makeBootstrapConfig('0x1e714c551fe6234b6ee406899ec3be9234ad2124', '0x'); + const executors: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + const hook: BootstrapConfig = _makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + const fallbacks: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + + const initMSAData = iface.encodeFunctionData( + "initMSA", + [validators, executors, hook, fallbacks] + ); + + const initCode = ethers.utils.defaultAbiCoder.encode( + ["address", "address", "bytes"], + [this.services.walletService.EOAAddress, '0x4f695ad7694863c8280FCEBf2Cb220E361ce4eA0', initMSAData] + ); + const encodedValue = ethers.utils.solidityKeccak256(['string'], [this.index.toString()]); + const hexlifyValue = ethers.utils.hexlify(encodedValue); + const salt = ethers.utils.arrayify(hexlifyValue) return hexConcat([ this.factoryAddress, this.factory.interface.encodeFunctionData('createAccount', [ - this.services.walletService.EOAAddress, - this.index, + salt, + initCode, ]), ]); } @@ -89,11 +111,31 @@ export class EtherspotWalletAPI extends BaseAccountAPI { if (this.predefinedAccountAddress) { await this.checkAccountAddress(this.predefinedAccountAddress); } + + const encodedValue = ethers.utils.solidityKeccak256(['string'], [this.index.toString()]); + const hexlifyValue = ethers.utils.hexlify(encodedValue); + const salt = ethers.utils.arrayify(hexlifyValue); + const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); + const validators: BootstrapConfig[] = makeBootstrapConfig('0x1e714c551fe6234b6ee406899ec3be9234ad2124', '0x'); + const executors: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + const hook: BootstrapConfig = _makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + const fallbacks: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); + + const initMSAData = iface.encodeFunctionData( + "initMSA", + [validators, executors, hook, fallbacks] + ); + + const initCode = ethers.utils.defaultAbiCoder.encode( + ["address", "address", "bytes"], + [this.services.walletService.EOAAddress, '0x4f695ad7694863c8280FCEBf2Cb220E361ce4eA0', initMSAData] + ); + if (!this.accountAddress) { - this.factory = EtherspotWalletFactory__factory.connect(this.factoryAddress, this.provider); + this.factory = EtherspotWallet7579Factory__factory.connect(this.factoryAddress, this.provider); this.accountAddress = await this.factory.getAddress( - this.services.walletService.EOAAddress, - this.index, + salt, + initCode, ); } return this.accountAddress; @@ -128,6 +170,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { async encodeBatch(targets: string[], values: BigNumberish[], datas: string[]): Promise { const accountContract = await this._getAccountContract(); - return accountContract.interface.encodeFunctionData('executeBatch', [targets, values, datas]); + return accountContract.interface.encodeFunctionData('execute', [targets[0], values[0], datas[0]]); + // return accountContract.interface.encodeFunctionData('executeBatch', [targets, values, datas]); } } diff --git a/src/sdk/base/HttpRpcClient.ts b/src/sdk/base/HttpRpcClient.ts index bb3c9ea..da187e9 100644 --- a/src/sdk/base/HttpRpcClient.ts +++ b/src/sdk/base/HttpRpcClient.ts @@ -3,7 +3,7 @@ import { ethers } from 'ethers'; import { resolveProperties } from 'ethers/lib/utils'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import Debug from 'debug'; -import { deepHexlify } from '../common/ERC4337Utils'; +import { UserOperation, deepHexlify } from '../common/ERC4337Utils'; import { Gas } from '../common'; import { ErrorHandler } from '../errorHandler/errorHandler.service'; @@ -51,7 +51,7 @@ export class HttpRpcClient { } } - async getVerificationGasInfo(tx: UserOperationStruct): Promise { + async getVerificationGasInfo(tx: any): Promise { const hexifiedUserOp = deepHexlify(await resolveProperties(tx)); try { const response = await this.userOpJsonRpcProvider.send('eth_estimateUserOperationGas', [hexifiedUserOp, this.entryPointAddress]); @@ -70,7 +70,7 @@ export class HttpRpcClient { * @param userOp1 * @return userOpHash the id of this operation, for getUserOperationTransaction */ - async sendUserOpToBundler(userOp1: UserOperationStruct): Promise { + async sendUserOpToBundler(userOp1: UserOperation): Promise { try { await this.initializing; const hexifiedUserOp = deepHexlify(await resolveProperties(userOp1)); diff --git a/src/sdk/base/UserOperationEventListener.ts b/src/sdk/base/UserOperationEventListener.ts index 3b62940..975285a 100644 --- a/src/sdk/base/UserOperationEventListener.ts +++ b/src/sdk/base/UserOperationEventListener.ts @@ -1,6 +1,6 @@ import { BigNumberish, Event } from 'ethers' import { TransactionReceipt } from '@ethersproject/providers' -import { EntryPoint } from '../contracts' +import { IEntryPoint } from '../contracts' import { defaultAbiCoder } from 'ethers/lib/utils' import Debug from 'debug' @@ -19,7 +19,7 @@ export class UserOperationEventListener { constructor ( readonly resolve: (t: TransactionReceipt) => void, readonly reject: (reason?: any) => void, - readonly entryPoint: EntryPoint, + readonly entryPoint: IEntryPoint, readonly sender: string, readonly userOpHash: string, readonly nonce?: BigNumberish, diff --git a/src/sdk/base/VerifyingPaymasterAPI.ts b/src/sdk/base/VerifyingPaymasterAPI.ts index 5fbdab0..f9d8f57 100644 --- a/src/sdk/base/VerifyingPaymasterAPI.ts +++ b/src/sdk/base/VerifyingPaymasterAPI.ts @@ -4,6 +4,7 @@ import { calcPreVerificationGas } from './calcPreVerificationGas'; import { PaymasterAPI } from './PaymasterAPI'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { toJSON } from '../common/OperationUtils'; +import { UserOperation } from '../common'; const DUMMY_PAYMASTER_AND_DATA = '0x0101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101'; @@ -28,24 +29,24 @@ export class VerifyingPaymasterAPI extends PaymasterAPI { this.context = context; } - async getPaymasterAndData(userOp: Partial): Promise { + async getPaymasterAndData(userOp: Partial): Promise { // Hack: userOp includes empty paymasterAndData which calcPreVerificationGas requires. try { // userOp.preVerificationGas contains a promise that will resolve to an error. await ethers.utils.resolveProperties(userOp); // eslint-disable-next-line no-empty } catch (_) { } - const pmOp: Partial = { + const pmOp: Partial = { sender: userOp.sender, nonce: userOp.nonce, - initCode: userOp.initCode, + factoryData: userOp.factoryData, callData: userOp.callData, callGasLimit: userOp.callGasLimit, verificationGasLimit: userOp.verificationGasLimit, maxFeePerGas: userOp.maxFeePerGas, maxPriorityFeePerGas: userOp.maxPriorityFeePerGas, // A dummy value here is required in order to calculate a correct preVerificationGas value. - paymasterAndData: DUMMY_PAYMASTER_AND_DATA, + paymasterData: DUMMY_PAYMASTER_AND_DATA, signature: userOp.signature ?? '0x', }; const op = await ethers.utils.resolveProperties(pmOp); diff --git a/src/sdk/common/ERC4337Utils.ts b/src/sdk/common/ERC4337Utils.ts index a4f51bd..e525984 100644 --- a/src/sdk/common/ERC4337Utils.ts +++ b/src/sdk/common/ERC4337Utils.ts @@ -1,21 +1,39 @@ -import { defaultAbiCoder, hexConcat, hexlify, keccak256 } from 'ethers/lib/utils'; +import { BytesLike, defaultAbiCoder, hexConcat, hexZeroPad, hexlify, keccak256 } from 'ethers/lib/utils'; import { EntryPoint__factory } from '../contracts'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; -import { ethers } from 'ethers'; +import { BigNumber, BigNumberish, ethers } from 'ethers'; import { Buffer } from 'buffer'; const entryPointAbi: any = EntryPoint__factory.abi; // UserOperation is the first parameter of validateUseOp -const validateUserOpMethod = 'simulateValidation'; -const UserOpType = entryPointAbi.find((entry) => entry.name === validateUserOpMethod)?.inputs[0]; -if (UserOpType == null) { - throw new Error( - `unable to find method ${validateUserOpMethod} in EP ${entryPointAbi - .filter((x) => x.type === 'function') - .map((x) => x.name) - .join(',')}`, - ); +// const validateUserOpMethod = 'simulateValidation'; +// const UserOpType = entryPointAbi.find((entry) => entry.name === validateUserOpMethod)?.inputs[0]; +// if (UserOpType == null) { +// throw new Error( +// `unable to find method ${validateUserOpMethod} in EP ${entryPointAbi +// .filter((x) => x.type === 'function') +// .map((x) => x.name) +// .join(',')}`, +// ); +// } + +export interface UserOperation { + sender: string + nonce: BigNumberish + factory?: string + factoryData?: BytesLike + callData: BytesLike + callGasLimit: BigNumberish + verificationGasLimit: BigNumberish + preVerificationGas: BigNumberish + maxFeePerGas: BigNumberish + maxPriorityFeePerGas: BigNumberish + paymaster?: string + paymasterVerificationGasLimit?: BigNumberish + paymasterPostOpGasLimit?: BigNumberish + paymasterData?: BytesLike + signature: BytesLike } export const AddressZero = ethers.constants.AddressZero; @@ -42,24 +60,63 @@ export type NotPromise = { * @param forSignature "true" if the hash is needed to calculate the getUserOpHash() * "false" to pack entire UserOp, for calculating the calldata cost of putting it on-chain. */ -export function packUserOp (op: NotPromise, forSignature = true): string { +export function packUserOp(op1: UserOperation | NotPromise, forSignature = true): string { + let op: NotPromise; + if ('callGasLimit' in op1) { + op = packUserOpData(op1) + } else { + op = op1 + } + if (forSignature) { return defaultAbiCoder.encode( - ['address', 'uint256', 'bytes32', 'bytes32', - 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', - 'bytes32'], + ['address', 'uint256', 'bytes32', 'bytes32', 'bytes32', 'uint256', 'bytes32', 'bytes32'], [op.sender, op.nonce, keccak256(op.initCode), keccak256(op.callData), - op.callGasLimit, op.verificationGasLimit, op.preVerificationGas, op.maxFeePerGas, op.maxPriorityFeePerGas, - keccak256(op.paymasterAndData)]) + op.accountGasLimits, op.preVerificationGas, op.gasFees, + keccak256(op.paymasterAndData)]) } else { // for the purpose of calculating gas cost encode also signature (and no keccak of bytes) return defaultAbiCoder.encode( - ['address', 'uint256', 'bytes', 'bytes', - 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', - 'bytes', 'bytes'], + ['address', 'uint256', 'bytes', 'bytes', 'bytes32', 'uint256', 'bytes32', 'bytes', 'bytes'], [op.sender, op.nonce, op.initCode, op.callData, - op.callGasLimit, op.verificationGasLimit, op.preVerificationGas, op.maxFeePerGas, op.maxPriorityFeePerGas, - op.paymasterAndData, op.signature]) + op.accountGasLimits, op.preVerificationGas, op.gasFees, + op.paymasterAndData, op.signature]) + } +} + +export function packUint(high128: BigNumberish, low128: BigNumberish): string { + return hexZeroPad(BigNumber.from(high128).shl(128).add(low128).toHexString(), 32) +} + +export function packPaymasterData(paymaster: string, paymasterVerificationGasLimit: BigNumberish, postOpGasLimit: BigNumberish, paymasterData?: BytesLike): BytesLike { + return ethers.utils.hexConcat([ + paymaster, + packUint(paymasterVerificationGasLimit, postOpGasLimit), + paymasterData ?? '0x' + ]) +} + +export function packUserOpData(op: any): NotPromise { + let paymasterAndData: BytesLike + if (op.paymaster == null) { + paymasterAndData = '0x' + } else { + if (op.paymasterVerificationGasLimit == null || op.paymasterPostOpGasLimit == null) { + throw new Error('paymaster with no gas limits') + } + paymasterAndData = packPaymasterData(op.paymaster, op.paymasterVerificationGasLimit, op.paymasterPostOpGasLimit, op.paymasterData) + } + + return { + sender: op.sender, + nonce: BigNumber.from(op.nonce).toHexString(), + initCode: op.factory == null ? '0x' : hexConcat([op.factory, op.factoryData ?? '']), + callData: op.callData, + accountGasLimits: packUint(op.verificationGasLimit, op.callGasLimit), + preVerificationGas: BigNumber.from(op.preVerificationGas).toHexString(), + gasFees: packUint(op.maxPriorityFeePerGas, op.maxFeePerGas), + paymasterAndData, + signature: op.signature } } @@ -72,7 +129,7 @@ export function packUserOp (op: NotPromise, forSignature = * @param entryPoint * @param chainId */ -export function getUserOpHash(op: NotPromise, entryPoint: string, chainId: number): string { +export function getUserOpHash(op: UserOperation, entryPoint: string, chainId: number): string { const userOpHash = keccak256(packUserOp(op, true)); const enc = defaultAbiCoder.encode(['bytes32', 'address', 'uint256'], [userOpHash, entryPoint, chainId]); return keccak256(enc); diff --git a/src/sdk/contracts/account-abstraction/contracts/core/BaseAccount.ts b/src/sdk/contracts/account-abstraction/contracts/core/BaseAccount.ts index 562dbd8..2285f11 100644 --- a/src/sdk/contracts/account-abstraction/contracts/core/BaseAccount.ts +++ b/src/sdk/contracts/account-abstraction/contracts/core/BaseAccount.ts @@ -28,11 +28,9 @@ export type UserOperationStruct = { nonce: PromiseOrValue; initCode: PromiseOrValue; callData: PromiseOrValue; - callGasLimit: PromiseOrValue; - verificationGasLimit: PromiseOrValue; + accountGasLimits: PromiseOrValue; preVerificationGas: PromiseOrValue; - maxFeePerGas: PromiseOrValue; - maxPriorityFeePerGas: PromiseOrValue; + gasFees: PromiseOrValue; paymasterAndData: PromiseOrValue; signature: PromiseOrValue; }; @@ -42,11 +40,9 @@ export type UserOperationStructOutput = [ BigNumber, string, string, + string, BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, + string, string, string ] & { @@ -54,11 +50,9 @@ export type UserOperationStructOutput = [ nonce: BigNumber; initCode: string; callData: string; - callGasLimit: BigNumber; - verificationGasLimit: BigNumber; + accountGasLimits: string; preVerificationGas: BigNumber; - maxFeePerGas: BigNumber; - maxPriorityFeePerGas: BigNumber; + gasFees: string; paymasterAndData: string; signature: string; }; diff --git a/src/sdk/contracts/account-abstraction/contracts/core/EntryPoint.ts b/src/sdk/contracts/account-abstraction/contracts/core/EntryPoint.ts index 12ab507..152b0a1 100644 --- a/src/sdk/contracts/account-abstraction/contracts/core/EntryPoint.ts +++ b/src/sdk/contracts/account-abstraction/contracts/core/EntryPoint.ts @@ -2,1094 +2,949 @@ /* tslint:disable */ /* eslint-disable */ import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PayableOverrides, - PopulatedTransaction, - Signer, - utils, - } from 'ethers'; - import type { - FunctionFragment, - Result, - EventFragment, - } from '@ethersproject/abi'; - import type { Listener, Provider } from '@ethersproject/providers'; - import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, - } from '../../../common'; - - export type UserOperationStruct = { - sender: PromiseOrValue; - nonce: PromiseOrValue; - initCode: PromiseOrValue; - callData: PromiseOrValue; - callGasLimit: PromiseOrValue; - verificationGasLimit: PromiseOrValue; - preVerificationGas: PromiseOrValue; - maxFeePerGas: PromiseOrValue; - maxPriorityFeePerGas: PromiseOrValue; - paymasterAndData: PromiseOrValue; - signature: PromiseOrValue; + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export type PackedUserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + accountGasLimits: PromiseOrValue; + preVerificationGas: PromiseOrValue; + gasFees: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; +}; + +export type PackedUserOperationStructOutput = [ + string, + BigNumber, + string, + string, + string, + BigNumber, + string, + string, + string +] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + accountGasLimits: string; + preVerificationGas: BigNumber; + gasFees: string; + paymasterAndData: string; + signature: string; +}; + +export declare namespace IStakeManager { + export type DepositInfoStruct = { + deposit: PromiseOrValue; + staked: PromiseOrValue; + stake: PromiseOrValue; + unstakeDelaySec: PromiseOrValue; + withdrawTime: PromiseOrValue; }; - - export type UserOperationStructOutput = [ - string, - BigNumber, - string, - string, - BigNumber, - BigNumber, - BigNumber, + + export type DepositInfoStructOutput = [ BigNumber, + boolean, BigNumber, + number, + number + ] & { + deposit: BigNumber; + staked: boolean; + stake: BigNumber; + unstakeDelaySec: number; + withdrawTime: number; + }; +} + +export declare namespace IEntryPoint { + export type UserOpsPerAggregatorStruct = { + userOps: PackedUserOperationStruct[]; + aggregator: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOpsPerAggregatorStructOutput = [ + PackedUserOperationStructOutput[], string, string ] & { - sender: string; - nonce: BigNumber; - initCode: string; - callData: string; - callGasLimit: BigNumber; - verificationGasLimit: BigNumber; - preVerificationGas: BigNumber; - maxFeePerGas: BigNumber; - maxPriorityFeePerGas: BigNumber; - paymasterAndData: string; + userOps: PackedUserOperationStructOutput[]; + aggregator: string; signature: string; }; - - export declare namespace IStakeManager { - export type DepositInfoStruct = { - deposit: PromiseOrValue; - staked: PromiseOrValue; - stake: PromiseOrValue; - unstakeDelaySec: PromiseOrValue; - withdrawTime: PromiseOrValue; - }; - - export type DepositInfoStructOutput = [ - BigNumber, - boolean, - BigNumber, - number, - number - ] & { - deposit: BigNumber; - staked: boolean; - stake: BigNumber; - unstakeDelaySec: number; - withdrawTime: number; - }; - } - - export declare namespace IEntryPoint { - export type UserOpsPerAggregatorStruct = { - userOps: UserOperationStruct[]; - aggregator: PromiseOrValue; - signature: PromiseOrValue; - }; - - export type UserOpsPerAggregatorStructOutput = [ - UserOperationStructOutput[], - string, - string - ] & { - userOps: UserOperationStructOutput[]; - aggregator: string; - signature: string; - }; - } - - export declare namespace EntryPoint { - export type MemoryUserOpStruct = { - sender: PromiseOrValue; - nonce: PromiseOrValue; - callGasLimit: PromiseOrValue; - verificationGasLimit: PromiseOrValue; - preVerificationGas: PromiseOrValue; - paymaster: PromiseOrValue; - maxFeePerGas: PromiseOrValue; - maxPriorityFeePerGas: PromiseOrValue; - }; - - export type MemoryUserOpStructOutput = [ - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - string, - BigNumber, - BigNumber - ] & { - sender: string; - nonce: BigNumber; - callGasLimit: BigNumber; - verificationGasLimit: BigNumber; - preVerificationGas: BigNumber; - paymaster: string; - maxFeePerGas: BigNumber; - maxPriorityFeePerGas: BigNumber; - }; - - export type UserOpInfoStruct = { - mUserOp: EntryPoint.MemoryUserOpStruct; - userOpHash: PromiseOrValue; - prefund: PromiseOrValue; - contextOffset: PromiseOrValue; - preOpGas: PromiseOrValue; - }; - - export type UserOpInfoStructOutput = [ - EntryPoint.MemoryUserOpStructOutput, - string, - BigNumber, - BigNumber, - BigNumber - ] & { - mUserOp: EntryPoint.MemoryUserOpStructOutput; - userOpHash: string; - prefund: BigNumber; - contextOffset: BigNumber; - preOpGas: BigNumber; - }; - } - - export interface EntryPointInterface extends utils.Interface { - functions: { - 'SIG_VALIDATION_FAILED()': FunctionFragment; - '_validateSenderAndPaymaster(bytes,address,bytes)': FunctionFragment; - 'addStake(uint32)': FunctionFragment; - 'balanceOf(address)': FunctionFragment; - 'depositTo(address)': FunctionFragment; - 'deposits(address)': FunctionFragment; - 'getDepositInfo(address)': FunctionFragment; - 'getSenderAddress(bytes)': FunctionFragment; - 'getUserOpHash((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))': FunctionFragment; - 'handleAggregatedOps(((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address,bytes)[],address)': FunctionFragment; - 'handleOps((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address)': FunctionFragment; - 'innerHandleOp(bytes,((address,uint256,uint256,uint256,uint256,address,uint256,uint256),bytes32,uint256,uint256,uint256),bytes)': FunctionFragment; - 'simulateHandleOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address,bytes)': FunctionFragment; - 'simulateValidation((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))': FunctionFragment; - 'unlockStake()': FunctionFragment; - 'withdrawStake(address)': FunctionFragment; - 'withdrawTo(address,uint256)': FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | 'SIG_VALIDATION_FAILED' - | '_validateSenderAndPaymaster' - | 'addStake' - | 'balanceOf' - | 'depositTo' - | 'deposits' - | 'getDepositInfo' - | 'getSenderAddress' - | 'getUserOpHash' - | 'handleAggregatedOps' - | 'handleOps' - | 'innerHandleOp' - | 'simulateHandleOp' - | 'simulateValidation' - | 'unlockStake' - | 'withdrawStake' - | 'withdrawTo' - ): FunctionFragment; - - encodeFunctionData( - functionFragment: 'SIG_VALIDATION_FAILED', - values?: undefined - ): string; - encodeFunctionData( - functionFragment: '_validateSenderAndPaymaster', - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: 'addStake', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'balanceOf', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'depositTo', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'deposits', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'getDepositInfo', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'getSenderAddress', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'getUserOpHash', - values: [UserOperationStruct] - ): string; - encodeFunctionData( - functionFragment: 'handleAggregatedOps', - values: [IEntryPoint.UserOpsPerAggregatorStruct[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'handleOps', - values: [UserOperationStruct[], PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'innerHandleOp', - values: [ - PromiseOrValue, - EntryPoint.UserOpInfoStruct, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: 'simulateHandleOp', - values: [ - UserOperationStruct, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: 'simulateValidation', - values: [UserOperationStruct] - ): string; - encodeFunctionData( - functionFragment: 'unlockStake', - values?: undefined - ): string; - encodeFunctionData( - functionFragment: 'withdrawStake', - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: 'withdrawTo', - values: [PromiseOrValue, PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: 'SIG_VALIDATION_FAILED', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: '_validateSenderAndPaymaster', - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: 'addStake', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'depositTo', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'deposits', data: BytesLike): Result; - decodeFunctionResult( - functionFragment: 'getDepositInfo', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'getSenderAddress', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'getUserOpHash', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'handleAggregatedOps', - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: 'handleOps', data: BytesLike): Result; - decodeFunctionResult( - functionFragment: 'innerHandleOp', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'simulateHandleOp', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'simulateValidation', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'unlockStake', - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: 'withdrawStake', - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: 'withdrawTo', data: BytesLike): Result; - - events: { - 'AccountDeployed(bytes32,address,address,address)': EventFragment; - 'Deposited(address,uint256)': EventFragment; - 'SignatureAggregatorChanged(address)': EventFragment; - 'StakeLocked(address,uint256,uint256)': EventFragment; - 'StakeUnlocked(address,uint256)': EventFragment; - 'StakeWithdrawn(address,address,uint256)': EventFragment; - 'UserOperationEvent(bytes32,address,address,uint256,bool,uint256,uint256)': EventFragment; - 'UserOperationRevertReason(bytes32,address,uint256,bytes)': EventFragment; - 'Withdrawn(address,address,uint256)': EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: 'AccountDeployed'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Deposited'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'SignatureAggregatorChanged'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'StakeLocked'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'StakeUnlocked'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'StakeWithdrawn'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'UserOperationEvent'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'UserOperationRevertReason'): EventFragment; - getEvent(nameOrSignatureOrTopic: 'Withdrawn'): EventFragment; - } - - export interface AccountDeployedEventObject { - userOpHash: string; - sender: string; - factory: string; - paymaster: string; - } - export type AccountDeployedEvent = TypedEvent< - [string, string, string, string], - AccountDeployedEventObject - >; - - export type AccountDeployedEventFilter = TypedEventFilter; - - export interface DepositedEventObject { - account: string; - totalDeposit: BigNumber; - } - export type DepositedEvent = TypedEvent< - [string, BigNumber], - DepositedEventObject - >; - - export type DepositedEventFilter = TypedEventFilter; - - export interface SignatureAggregatorChangedEventObject { - aggregator: string; - } - export type SignatureAggregatorChangedEvent = TypedEvent< - [string], - SignatureAggregatorChangedEventObject - >; - - export type SignatureAggregatorChangedEventFilter = - TypedEventFilter; - - export interface StakeLockedEventObject { - account: string; - totalStaked: BigNumber; - unstakeDelaySec: BigNumber; - } - export type StakeLockedEvent = TypedEvent< - [string, BigNumber, BigNumber], - StakeLockedEventObject - >; - - export type StakeLockedEventFilter = TypedEventFilter; - - export interface StakeUnlockedEventObject { - account: string; - withdrawTime: BigNumber; - } - export type StakeUnlockedEvent = TypedEvent< - [string, BigNumber], - StakeUnlockedEventObject - >; - - export type StakeUnlockedEventFilter = TypedEventFilter; - - export interface StakeWithdrawnEventObject { - account: string; - withdrawAddress: string; - amount: BigNumber; - } - export type StakeWithdrawnEvent = TypedEvent< - [string, string, BigNumber], - StakeWithdrawnEventObject - >; - - export type StakeWithdrawnEventFilter = TypedEventFilter; - - export interface UserOperationEventEventObject { - userOpHash: string; - sender: string; - paymaster: string; - nonce: BigNumber; - success: boolean; - actualGasCost: BigNumber; - actualGasUsed: BigNumber; - } - export type UserOperationEventEvent = TypedEvent< - [string, string, string, BigNumber, boolean, BigNumber, BigNumber], - UserOperationEventEventObject - >; - - export type UserOperationEventEventFilter = - TypedEventFilter; - - export interface UserOperationRevertReasonEventObject { - userOpHash: string; - sender: string; - nonce: BigNumber; - revertReason: string; - } - export type UserOperationRevertReasonEvent = TypedEvent< - [string, string, BigNumber, string], - UserOperationRevertReasonEventObject - >; - - export type UserOperationRevertReasonEventFilter = - TypedEventFilter; - - export interface WithdrawnEventObject { - account: string; - withdrawAddress: string; - amount: BigNumber; - } - export type WithdrawnEvent = TypedEvent< - [string, string, BigNumber], - WithdrawnEventObject - >; - - export type WithdrawnEventFilter = TypedEventFilter; - - export interface EntryPoint extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: EntryPointInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - SIG_VALIDATION_FAILED(overrides?: CallOverrides): Promise<[BigNumber]>; - - _validateSenderAndPaymaster( - initCode: PromiseOrValue, - sender: PromiseOrValue, - paymasterAndData: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[void]>; - - addStake( - unstakeDelaySec: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - depositTo( - account: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - deposits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, boolean, BigNumber, number, number] & { - deposit: BigNumber; - staked: boolean; - stake: BigNumber; - unstakeDelaySec: number; - withdrawTime: number; - } - >; - - getDepositInfo( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [IStakeManager.DepositInfoStructOutput] & { - info: IStakeManager.DepositInfoStructOutput; - } - >; - - getSenderAddress( - initCode: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getUserOpHash( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise<[string]>; - - handleAggregatedOps( - opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - handleOps( - ops: UserOperationStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - innerHandleOp( - callData: PromiseOrValue, - opInfo: EntryPoint.UserOpInfoStruct, - context: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unlockStake( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawStake( - withdrawAddress: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawTo( - withdrawAddress: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - SIG_VALIDATION_FAILED(overrides?: CallOverrides): Promise; - - _validateSenderAndPaymaster( - initCode: PromiseOrValue, - sender: PromiseOrValue, - paymasterAndData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - +} + +export interface IEntryPointInterface extends utils.Interface { + functions: { + "addStake(uint32)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "delegateAndRevert(address,bytes)": FunctionFragment; + "depositTo(address)": FunctionFragment; + "getDepositInfo(address)": FunctionFragment; + "getNonce(address,uint192)": FunctionFragment; + "getSenderAddress(bytes)": FunctionFragment; + "getUserOpHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes))": FunctionFragment; + "handleAggregatedOps(((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address,bytes)[],address)": FunctionFragment; + "handleOps((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address)": FunctionFragment; + "incrementNonce(uint192)": FunctionFragment; + "unlockStake()": FunctionFragment; + "withdrawStake(address)": FunctionFragment; + "withdrawTo(address,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addStake" + | "balanceOf" + | "delegateAndRevert" + | "depositTo" + | "getDepositInfo" + | "getNonce" + | "getSenderAddress" + | "getUserOpHash" + | "handleAggregatedOps" + | "handleOps" + | "incrementNonce" + | "unlockStake" + | "withdrawStake" + | "withdrawTo" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addStake", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "delegateAndRevert", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "depositTo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getDepositInfo", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getNonce", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getSenderAddress", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getUserOpHash", + values: [PackedUserOperationStruct] + ): string; + encodeFunctionData( + functionFragment: "handleAggregatedOps", + values: [IEntryPoint.UserOpsPerAggregatorStruct[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "handleOps", + values: [PackedUserOperationStruct[], PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "incrementNonce", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "unlockStake", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "withdrawStake", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "withdrawTo", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "addStake", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateAndRevert", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getDepositInfo", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getNonce", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getSenderAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getUserOpHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleAggregatedOps", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "handleOps", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "incrementNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "unlockStake", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawStake", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result; + + events: { + "AccountDeployed(bytes32,address,address,address)": EventFragment; + "BeforeExecution()": EventFragment; + "Deposited(address,uint256)": EventFragment; + "PostOpRevertReason(bytes32,address,uint256,bytes)": EventFragment; + "SignatureAggregatorChanged(address)": EventFragment; + "StakeLocked(address,uint256,uint256)": EventFragment; + "StakeUnlocked(address,uint256)": EventFragment; + "StakeWithdrawn(address,address,uint256)": EventFragment; + "UserOperationEvent(bytes32,address,address,uint256,bool,uint256,uint256)": EventFragment; + "UserOperationPrefundTooLow(bytes32,address,uint256)": EventFragment; + "UserOperationRevertReason(bytes32,address,uint256,bytes)": EventFragment; + "Withdrawn(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AccountDeployed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "BeforeExecution"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Deposited"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PostOpRevertReason"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SignatureAggregatorChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "StakeLocked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "StakeUnlocked"): EventFragment; + getEvent(nameOrSignatureOrTopic: "StakeWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserOperationEvent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserOperationPrefundTooLow"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserOperationRevertReason"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawn"): EventFragment; +} + +export interface AccountDeployedEventObject { + userOpHash: string; + sender: string; + factory: string; + paymaster: string; +} +export type AccountDeployedEvent = TypedEvent< + [string, string, string, string], + AccountDeployedEventObject +>; + +export type AccountDeployedEventFilter = TypedEventFilter; + +export interface BeforeExecutionEventObject {} +export type BeforeExecutionEvent = TypedEvent<[], BeforeExecutionEventObject>; + +export type BeforeExecutionEventFilter = TypedEventFilter; + +export interface DepositedEventObject { + account: string; + totalDeposit: BigNumber; +} +export type DepositedEvent = TypedEvent< + [string, BigNumber], + DepositedEventObject +>; + +export type DepositedEventFilter = TypedEventFilter; + +export interface PostOpRevertReasonEventObject { + userOpHash: string; + sender: string; + nonce: BigNumber; + revertReason: string; +} +export type PostOpRevertReasonEvent = TypedEvent< + [string, string, BigNumber, string], + PostOpRevertReasonEventObject +>; + +export type PostOpRevertReasonEventFilter = + TypedEventFilter; + +export interface SignatureAggregatorChangedEventObject { + aggregator: string; +} +export type SignatureAggregatorChangedEvent = TypedEvent< + [string], + SignatureAggregatorChangedEventObject +>; + +export type SignatureAggregatorChangedEventFilter = + TypedEventFilter; + +export interface StakeLockedEventObject { + account: string; + totalStaked: BigNumber; + unstakeDelaySec: BigNumber; +} +export type StakeLockedEvent = TypedEvent< + [string, BigNumber, BigNumber], + StakeLockedEventObject +>; + +export type StakeLockedEventFilter = TypedEventFilter; + +export interface StakeUnlockedEventObject { + account: string; + withdrawTime: BigNumber; +} +export type StakeUnlockedEvent = TypedEvent< + [string, BigNumber], + StakeUnlockedEventObject +>; + +export type StakeUnlockedEventFilter = TypedEventFilter; + +export interface StakeWithdrawnEventObject { + account: string; + withdrawAddress: string; + amount: BigNumber; +} +export type StakeWithdrawnEvent = TypedEvent< + [string, string, BigNumber], + StakeWithdrawnEventObject +>; + +export type StakeWithdrawnEventFilter = TypedEventFilter; + +export interface UserOperationEventEventObject { + userOpHash: string; + sender: string; + paymaster: string; + nonce: BigNumber; + success: boolean; + actualGasCost: BigNumber; + actualGasUsed: BigNumber; +} +export type UserOperationEventEvent = TypedEvent< + [string, string, string, BigNumber, boolean, BigNumber, BigNumber], + UserOperationEventEventObject +>; + +export type UserOperationEventEventFilter = + TypedEventFilter; + +export interface UserOperationPrefundTooLowEventObject { + userOpHash: string; + sender: string; + nonce: BigNumber; +} +export type UserOperationPrefundTooLowEvent = TypedEvent< + [string, string, BigNumber], + UserOperationPrefundTooLowEventObject +>; + +export type UserOperationPrefundTooLowEventFilter = + TypedEventFilter; + +export interface UserOperationRevertReasonEventObject { + userOpHash: string; + sender: string; + nonce: BigNumber; + revertReason: string; +} +export type UserOperationRevertReasonEvent = TypedEvent< + [string, string, BigNumber, string], + UserOperationRevertReasonEventObject +>; + +export type UserOperationRevertReasonEventFilter = + TypedEventFilter; + +export interface WithdrawnEventObject { + account: string; + withdrawAddress: string; + amount: BigNumber; +} +export type WithdrawnEvent = TypedEvent< + [string, string, BigNumber], + WithdrawnEventObject +>; + +export type WithdrawnEventFilter = TypedEventFilter; + +export interface IEntryPoint extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IEntryPointInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { addStake( - unstakeDelaySec: PromiseOrValue, + _unstakeDelaySec: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - + balanceOf( account: PromiseOrValue, overrides?: CallOverrides - ): Promise; - + ): Promise<[BigNumber]>; + + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + depositTo( account: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - - deposits( - arg0: PromiseOrValue, + + getDepositInfo( + account: PromiseOrValue, overrides?: CallOverrides ): Promise< - [BigNumber, boolean, BigNumber, number, number] & { - deposit: BigNumber; - staked: boolean; - stake: BigNumber; - unstakeDelaySec: number; - withdrawTime: number; + [IStakeManager.DepositInfoStructOutput] & { + info: IStakeManager.DepositInfoStructOutput; } >; - - getDepositInfo( - account: PromiseOrValue, + + getNonce( + sender: PromiseOrValue, + key: PromiseOrValue, overrides?: CallOverrides - ): Promise; - + ): Promise<[BigNumber] & { nonce: BigNumber }>; + getSenderAddress( initCode: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - + getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides - ): Promise; - + ): Promise<[string]>; + handleAggregatedOps( opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - + handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - - innerHandleOp( - callData: PromiseOrValue, - opInfo: EntryPoint.UserOpInfoStruct, - context: PromiseOrValue, + + incrementNonce( + key: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, + + unlockStake( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - - simulateValidation( - userOp: UserOperationStruct, + + withdrawStake( + withdrawAddress: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - - unlockStake( + + withdrawTo( + withdrawAddress: PromiseOrValue, + withdrawAmount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - + }; + + addStake( + _unstakeDelaySec: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositTo( + account: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getDepositInfo( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNonce( + sender: PromiseOrValue, + key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSenderAddress( + initCode: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getUserOpHash( + userOp: PackedUserOperationStruct, + overrides?: CallOverrides + ): Promise; + + handleAggregatedOps( + opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleOps( + ops: PackedUserOperationStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + incrementNonce( + key: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unlockStake( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawStake( + withdrawAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawTo( + withdrawAddress: PromiseOrValue, + withdrawAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addStake( + _unstakeDelaySec: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + depositTo( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getDepositInfo( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNonce( + sender: PromiseOrValue, + key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSenderAddress( + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getUserOpHash( + userOp: PackedUserOperationStruct, + overrides?: CallOverrides + ): Promise; + + handleAggregatedOps( + opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], + beneficiary: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleOps( + ops: PackedUserOperationStruct[], + beneficiary: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + incrementNonce( + key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + unlockStake(overrides?: CallOverrides): Promise; + + withdrawStake( + withdrawAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + withdrawTo( + withdrawAddress: PromiseOrValue, + withdrawAmount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "AccountDeployed(bytes32,address,address,address)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + factory?: null, + paymaster?: null + ): AccountDeployedEventFilter; + AccountDeployed( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + factory?: null, + paymaster?: null + ): AccountDeployedEventFilter; + + "BeforeExecution()"(): BeforeExecutionEventFilter; + BeforeExecution(): BeforeExecutionEventFilter; + + "Deposited(address,uint256)"( + account?: PromiseOrValue | null, + totalDeposit?: null + ): DepositedEventFilter; + Deposited( + account?: PromiseOrValue | null, + totalDeposit?: null + ): DepositedEventFilter; + + "PostOpRevertReason(bytes32,address,uint256,bytes)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): PostOpRevertReasonEventFilter; + PostOpRevertReason( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): PostOpRevertReasonEventFilter; + + "SignatureAggregatorChanged(address)"( + aggregator?: PromiseOrValue | null + ): SignatureAggregatorChangedEventFilter; + SignatureAggregatorChanged( + aggregator?: PromiseOrValue | null + ): SignatureAggregatorChangedEventFilter; + + "StakeLocked(address,uint256,uint256)"( + account?: PromiseOrValue | null, + totalStaked?: null, + unstakeDelaySec?: null + ): StakeLockedEventFilter; + StakeLocked( + account?: PromiseOrValue | null, + totalStaked?: null, + unstakeDelaySec?: null + ): StakeLockedEventFilter; + + "StakeUnlocked(address,uint256)"( + account?: PromiseOrValue | null, + withdrawTime?: null + ): StakeUnlockedEventFilter; + StakeUnlocked( + account?: PromiseOrValue | null, + withdrawTime?: null + ): StakeUnlockedEventFilter; + + "StakeWithdrawn(address,address,uint256)"( + account?: PromiseOrValue | null, + withdrawAddress?: null, + amount?: null + ): StakeWithdrawnEventFilter; + StakeWithdrawn( + account?: PromiseOrValue | null, + withdrawAddress?: null, + amount?: null + ): StakeWithdrawnEventFilter; + + "UserOperationEvent(bytes32,address,address,uint256,bool,uint256,uint256)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + paymaster?: PromiseOrValue | null, + nonce?: null, + success?: null, + actualGasCost?: null, + actualGasUsed?: null + ): UserOperationEventEventFilter; + UserOperationEvent( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + paymaster?: PromiseOrValue | null, + nonce?: null, + success?: null, + actualGasCost?: null, + actualGasUsed?: null + ): UserOperationEventEventFilter; + + "UserOperationPrefundTooLow(bytes32,address,uint256)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null + ): UserOperationPrefundTooLowEventFilter; + UserOperationPrefundTooLow( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null + ): UserOperationPrefundTooLowEventFilter; + + "UserOperationRevertReason(bytes32,address,uint256,bytes)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): UserOperationRevertReasonEventFilter; + UserOperationRevertReason( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): UserOperationRevertReasonEventFilter; + + "Withdrawn(address,address,uint256)"( + account?: PromiseOrValue | null, + withdrawAddress?: null, + amount?: null + ): WithdrawnEventFilter; + Withdrawn( + account?: PromiseOrValue | null, + withdrawAddress?: null, + amount?: null + ): WithdrawnEventFilter; + }; + + estimateGas: { + addStake( + _unstakeDelaySec: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositTo( + account: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getDepositInfo( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNonce( + sender: PromiseOrValue, + key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSenderAddress( + initCode: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getUserOpHash( + userOp: PackedUserOperationStruct, + overrides?: CallOverrides + ): Promise; + + handleAggregatedOps( + opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleOps( + ops: PackedUserOperationStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + incrementNonce( + key: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unlockStake( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + withdrawStake( withdrawAddress: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - + ): Promise; + withdrawTo( withdrawAddress: PromiseOrValue, withdrawAmount: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - SIG_VALIDATION_FAILED(overrides?: CallOverrides): Promise; - - _validateSenderAndPaymaster( - initCode: PromiseOrValue, - sender: PromiseOrValue, - paymasterAndData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addStake( - unstakeDelaySec: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositTo( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - deposits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise< - [BigNumber, boolean, BigNumber, number, number] & { - deposit: BigNumber; - staked: boolean; - stake: BigNumber; - unstakeDelaySec: number; - withdrawTime: number; - } - >; - - getDepositInfo( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSenderAddress( - initCode: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getUserOpHash( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise; - - handleAggregatedOps( - opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], - beneficiary: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - handleOps( - ops: UserOperationStruct[], - beneficiary: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - innerHandleOp( - callData: PromiseOrValue, - opInfo: EntryPoint.UserOpInfoStruct, - context: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise; - - unlockStake(overrides?: CallOverrides): Promise; - - withdrawStake( - withdrawAddress: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - withdrawTo( - withdrawAddress: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - 'AccountDeployed(bytes32,address,address,address)'( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - factory?: null, - paymaster?: null - ): AccountDeployedEventFilter; - AccountDeployed( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - factory?: null, - paymaster?: null - ): AccountDeployedEventFilter; - - 'Deposited(address,uint256)'( - account?: PromiseOrValue | null, - totalDeposit?: null - ): DepositedEventFilter; - Deposited( - account?: PromiseOrValue | null, - totalDeposit?: null - ): DepositedEventFilter; - - 'SignatureAggregatorChanged(address)'( - aggregator?: PromiseOrValue | null - ): SignatureAggregatorChangedEventFilter; - SignatureAggregatorChanged( - aggregator?: PromiseOrValue | null - ): SignatureAggregatorChangedEventFilter; - - 'StakeLocked(address,uint256,uint256)'( - account?: PromiseOrValue | null, - totalStaked?: null, - unstakeDelaySec?: null - ): StakeLockedEventFilter; - StakeLocked( - account?: PromiseOrValue | null, - totalStaked?: null, - unstakeDelaySec?: null - ): StakeLockedEventFilter; - - 'StakeUnlocked(address,uint256)'( - account?: PromiseOrValue | null, - withdrawTime?: null - ): StakeUnlockedEventFilter; - StakeUnlocked( - account?: PromiseOrValue | null, - withdrawTime?: null - ): StakeUnlockedEventFilter; - - 'StakeWithdrawn(address,address,uint256)'( - account?: PromiseOrValue | null, - withdrawAddress?: null, - amount?: null - ): StakeWithdrawnEventFilter; - StakeWithdrawn( - account?: PromiseOrValue | null, - withdrawAddress?: null, - amount?: null - ): StakeWithdrawnEventFilter; - - 'UserOperationEvent(bytes32,address,address,uint256,bool,uint256,uint256)'( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - paymaster?: PromiseOrValue | null, - nonce?: null, - success?: null, - actualGasCost?: null, - actualGasUsed?: null - ): UserOperationEventEventFilter; - UserOperationEvent( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - paymaster?: PromiseOrValue | null, - nonce?: null, - success?: null, - actualGasCost?: null, - actualGasUsed?: null - ): UserOperationEventEventFilter; - - 'UserOperationRevertReason(bytes32,address,uint256,bytes)'( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - nonce?: null, - revertReason?: null - ): UserOperationRevertReasonEventFilter; - UserOperationRevertReason( - userOpHash?: PromiseOrValue | null, - sender?: PromiseOrValue | null, - nonce?: null, - revertReason?: null - ): UserOperationRevertReasonEventFilter; - - 'Withdrawn(address,address,uint256)'( - account?: PromiseOrValue | null, - withdrawAddress?: null, - amount?: null - ): WithdrawnEventFilter; - Withdrawn( - account?: PromiseOrValue | null, - withdrawAddress?: null, - amount?: null - ): WithdrawnEventFilter; - }; - - estimateGas: { - SIG_VALIDATION_FAILED(overrides?: CallOverrides): Promise; - - _validateSenderAndPaymaster( - initCode: PromiseOrValue, - sender: PromiseOrValue, - paymasterAndData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addStake( - unstakeDelaySec: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositTo( - account: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - deposits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositInfo( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSenderAddress( - initCode: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getUserOpHash( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise; - - handleAggregatedOps( - opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - handleOps( - ops: UserOperationStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - innerHandleOp( - callData: PromiseOrValue, - opInfo: EntryPoint.UserOpInfoStruct, - context: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unlockStake( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawStake( - withdrawAddress: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawTo( - withdrawAddress: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - SIG_VALIDATION_FAILED( - overrides?: CallOverrides - ): Promise; - - _validateSenderAndPaymaster( - initCode: PromiseOrValue, - sender: PromiseOrValue, - paymasterAndData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - addStake( - unstakeDelaySec: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - balanceOf( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - depositTo( - account: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - deposits( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getDepositInfo( - account: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getSenderAddress( - initCode: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - getUserOpHash( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise; - - handleAggregatedOps( - opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - handleOps( - ops: UserOperationStruct[], - beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - innerHandleOp( - callData: PromiseOrValue, - opInfo: EntryPoint.UserOpInfoStruct, - context: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - unlockStake( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawStake( - withdrawAddress: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - withdrawTo( - withdrawAddress: PromiseOrValue, - withdrawAmount: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - } - \ No newline at end of file + ): Promise; + }; + + populateTransaction: { + addStake( + _unstakeDelaySec: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + balanceOf( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + depositTo( + account: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getDepositInfo( + account: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNonce( + sender: PromiseOrValue, + key: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getSenderAddress( + initCode: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getUserOpHash( + userOp: PackedUserOperationStruct, + overrides?: CallOverrides + ): Promise; + + handleAggregatedOps( + opsPerAggregator: IEntryPoint.UserOpsPerAggregatorStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleOps( + ops: PackedUserOperationStruct[], + beneficiary: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + incrementNonce( + key: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + unlockStake( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawStake( + withdrawAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + withdrawTo( + withdrawAddress: PromiseOrValue, + withdrawAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/account-abstraction/contracts/interfaces/IEntryPoint.ts b/src/sdk/contracts/account-abstraction/contracts/interfaces/IEntryPoint.ts index 9e16903..152b0a1 100644 --- a/src/sdk/contracts/account-abstraction/contracts/interfaces/IEntryPoint.ts +++ b/src/sdk/contracts/account-abstraction/contracts/interfaces/IEntryPoint.ts @@ -28,30 +28,26 @@ import type { PromiseOrValue, } from "../../../common"; -export type UserOperationStruct = { +export type PackedUserOperationStruct = { sender: PromiseOrValue; nonce: PromiseOrValue; initCode: PromiseOrValue; callData: PromiseOrValue; - callGasLimit: PromiseOrValue; - verificationGasLimit: PromiseOrValue; + accountGasLimits: PromiseOrValue; preVerificationGas: PromiseOrValue; - maxFeePerGas: PromiseOrValue; - maxPriorityFeePerGas: PromiseOrValue; + gasFees: PromiseOrValue; paymasterAndData: PromiseOrValue; signature: PromiseOrValue; }; -export type UserOperationStructOutput = [ +export type PackedUserOperationStructOutput = [ string, BigNumber, string, string, + string, BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, + string, string, string ] & { @@ -59,11 +55,9 @@ export type UserOperationStructOutput = [ nonce: BigNumber; initCode: string; callData: string; - callGasLimit: BigNumber; - verificationGasLimit: BigNumber; + accountGasLimits: string; preVerificationGas: BigNumber; - maxFeePerGas: BigNumber; - maxPriorityFeePerGas: BigNumber; + gasFees: string; paymasterAndData: string; signature: string; }; @@ -94,17 +88,17 @@ export declare namespace IStakeManager { export declare namespace IEntryPoint { export type UserOpsPerAggregatorStruct = { - userOps: UserOperationStruct[]; + userOps: PackedUserOperationStruct[]; aggregator: PromiseOrValue; signature: PromiseOrValue; }; export type UserOpsPerAggregatorStructOutput = [ - UserOperationStructOutput[], + PackedUserOperationStructOutput[], string, string ] & { - userOps: UserOperationStructOutput[]; + userOps: PackedUserOperationStructOutput[]; aggregator: string; signature: string; }; @@ -114,16 +108,15 @@ export interface IEntryPointInterface extends utils.Interface { functions: { "addStake(uint32)": FunctionFragment; "balanceOf(address)": FunctionFragment; + "delegateAndRevert(address,bytes)": FunctionFragment; "depositTo(address)": FunctionFragment; "getDepositInfo(address)": FunctionFragment; "getNonce(address,uint192)": FunctionFragment; "getSenderAddress(bytes)": FunctionFragment; - "getUserOpHash((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment; - "handleAggregatedOps(((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address,bytes)[],address)": FunctionFragment; - "handleOps((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],address)": FunctionFragment; + "getUserOpHash((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes))": FunctionFragment; + "handleAggregatedOps(((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address,bytes)[],address)": FunctionFragment; + "handleOps((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)[],address)": FunctionFragment; "incrementNonce(uint192)": FunctionFragment; - "simulateHandleOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),address,bytes)": FunctionFragment; - "simulateValidation((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes))": FunctionFragment; "unlockStake()": FunctionFragment; "withdrawStake(address)": FunctionFragment; "withdrawTo(address,uint256)": FunctionFragment; @@ -133,6 +126,7 @@ export interface IEntryPointInterface extends utils.Interface { nameOrSignatureOrTopic: | "addStake" | "balanceOf" + | "delegateAndRevert" | "depositTo" | "getDepositInfo" | "getNonce" @@ -141,8 +135,6 @@ export interface IEntryPointInterface extends utils.Interface { | "handleAggregatedOps" | "handleOps" | "incrementNonce" - | "simulateHandleOp" - | "simulateValidation" | "unlockStake" | "withdrawStake" | "withdrawTo" @@ -156,6 +148,10 @@ export interface IEntryPointInterface extends utils.Interface { functionFragment: "balanceOf", values: [PromiseOrValue] ): string; + encodeFunctionData( + functionFragment: "delegateAndRevert", + values: [PromiseOrValue, PromiseOrValue] + ): string; encodeFunctionData( functionFragment: "depositTo", values: [PromiseOrValue] @@ -174,7 +170,7 @@ export interface IEntryPointInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "getUserOpHash", - values: [UserOperationStruct] + values: [PackedUserOperationStruct] ): string; encodeFunctionData( functionFragment: "handleAggregatedOps", @@ -182,24 +178,12 @@ export interface IEntryPointInterface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "handleOps", - values: [UserOperationStruct[], PromiseOrValue] + values: [PackedUserOperationStruct[], PromiseOrValue] ): string; encodeFunctionData( functionFragment: "incrementNonce", values: [PromiseOrValue] ): string; - encodeFunctionData( - functionFragment: "simulateHandleOp", - values: [ - UserOperationStruct, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "simulateValidation", - values: [UserOperationStruct] - ): string; encodeFunctionData( functionFragment: "unlockStake", values?: undefined @@ -215,6 +199,10 @@ export interface IEntryPointInterface extends utils.Interface { decodeFunctionResult(functionFragment: "addStake", data: BytesLike): Result; decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateAndRevert", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result; decodeFunctionResult( functionFragment: "getDepositInfo", @@ -238,14 +226,6 @@ export interface IEntryPointInterface extends utils.Interface { functionFragment: "incrementNonce", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "simulateHandleOp", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "simulateValidation", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "unlockStake", data: BytesLike @@ -260,11 +240,13 @@ export interface IEntryPointInterface extends utils.Interface { "AccountDeployed(bytes32,address,address,address)": EventFragment; "BeforeExecution()": EventFragment; "Deposited(address,uint256)": EventFragment; + "PostOpRevertReason(bytes32,address,uint256,bytes)": EventFragment; "SignatureAggregatorChanged(address)": EventFragment; "StakeLocked(address,uint256,uint256)": EventFragment; "StakeUnlocked(address,uint256)": EventFragment; "StakeWithdrawn(address,address,uint256)": EventFragment; "UserOperationEvent(bytes32,address,address,uint256,bool,uint256,uint256)": EventFragment; + "UserOperationPrefundTooLow(bytes32,address,uint256)": EventFragment; "UserOperationRevertReason(bytes32,address,uint256,bytes)": EventFragment; "Withdrawn(address,address,uint256)": EventFragment; }; @@ -272,11 +254,13 @@ export interface IEntryPointInterface extends utils.Interface { getEvent(nameOrSignatureOrTopic: "AccountDeployed"): EventFragment; getEvent(nameOrSignatureOrTopic: "BeforeExecution"): EventFragment; getEvent(nameOrSignatureOrTopic: "Deposited"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PostOpRevertReason"): EventFragment; getEvent(nameOrSignatureOrTopic: "SignatureAggregatorChanged"): EventFragment; getEvent(nameOrSignatureOrTopic: "StakeLocked"): EventFragment; getEvent(nameOrSignatureOrTopic: "StakeUnlocked"): EventFragment; getEvent(nameOrSignatureOrTopic: "StakeWithdrawn"): EventFragment; getEvent(nameOrSignatureOrTopic: "UserOperationEvent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UserOperationPrefundTooLow"): EventFragment; getEvent(nameOrSignatureOrTopic: "UserOperationRevertReason"): EventFragment; getEvent(nameOrSignatureOrTopic: "Withdrawn"): EventFragment; } @@ -310,6 +294,20 @@ export type DepositedEvent = TypedEvent< export type DepositedEventFilter = TypedEventFilter; +export interface PostOpRevertReasonEventObject { + userOpHash: string; + sender: string; + nonce: BigNumber; + revertReason: string; +} +export type PostOpRevertReasonEvent = TypedEvent< + [string, string, BigNumber, string], + PostOpRevertReasonEventObject +>; + +export type PostOpRevertReasonEventFilter = + TypedEventFilter; + export interface SignatureAggregatorChangedEventObject { aggregator: string; } @@ -373,6 +371,19 @@ export type UserOperationEventEvent = TypedEvent< export type UserOperationEventEventFilter = TypedEventFilter; +export interface UserOperationPrefundTooLowEventObject { + userOpHash: string; + sender: string; + nonce: BigNumber; +} +export type UserOperationPrefundTooLowEvent = TypedEvent< + [string, string, BigNumber], + UserOperationPrefundTooLowEventObject +>; + +export type UserOperationPrefundTooLowEventFilter = + TypedEventFilter; + export interface UserOperationRevertReasonEventObject { userOpHash: string; sender: string; @@ -436,6 +447,12 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise<[BigNumber]>; + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + depositTo( account: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } @@ -462,7 +479,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides ): Promise<[string]>; @@ -473,7 +490,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -483,18 +500,6 @@ export interface IEntryPoint extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - unlockStake( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -521,6 +526,12 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise; + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + depositTo( account: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } @@ -543,7 +554,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides ): Promise; @@ -554,7 +565,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -564,18 +575,6 @@ export interface IEntryPoint extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - unlockStake( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -602,6 +601,12 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise; + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + depositTo( account: PromiseOrValue, overrides?: CallOverrides @@ -624,7 +629,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides ): Promise; @@ -635,7 +640,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -645,18 +650,6 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise; - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: CallOverrides - ): Promise; - unlockStake(overrides?: CallOverrides): Promise; withdrawStake( @@ -697,6 +690,19 @@ export interface IEntryPoint extends BaseContract { totalDeposit?: null ): DepositedEventFilter; + "PostOpRevertReason(bytes32,address,uint256,bytes)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): PostOpRevertReasonEventFilter; + PostOpRevertReason( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null, + revertReason?: null + ): PostOpRevertReasonEventFilter; + "SignatureAggregatorChanged(address)"( aggregator?: PromiseOrValue | null ): SignatureAggregatorChangedEventFilter; @@ -754,6 +760,17 @@ export interface IEntryPoint extends BaseContract { actualGasUsed?: null ): UserOperationEventEventFilter; + "UserOperationPrefundTooLow(bytes32,address,uint256)"( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null + ): UserOperationPrefundTooLowEventFilter; + UserOperationPrefundTooLow( + userOpHash?: PromiseOrValue | null, + sender?: PromiseOrValue | null, + nonce?: null + ): UserOperationPrefundTooLowEventFilter; + "UserOperationRevertReason(bytes32,address,uint256,bytes)"( userOpHash?: PromiseOrValue | null, sender?: PromiseOrValue | null, @@ -790,6 +807,12 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise; + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + depositTo( account: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } @@ -812,7 +835,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides ): Promise; @@ -823,7 +846,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -833,18 +856,6 @@ export interface IEntryPoint extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - unlockStake( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -872,6 +883,12 @@ export interface IEntryPoint extends BaseContract { overrides?: CallOverrides ): Promise; + delegateAndRevert( + target: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + depositTo( account: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } @@ -894,7 +911,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; getUserOpHash( - userOp: UserOperationStruct, + userOp: PackedUserOperationStruct, overrides?: CallOverrides ): Promise; @@ -905,7 +922,7 @@ export interface IEntryPoint extends BaseContract { ): Promise; handleOps( - ops: UserOperationStruct[], + ops: PackedUserOperationStruct[], beneficiary: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue } ): Promise; @@ -915,18 +932,6 @@ export interface IEntryPoint extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - simulateHandleOp( - op: UserOperationStruct, - target: PromiseOrValue, - targetCallData: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - simulateValidation( - userOp: UserOperationStruct, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - unlockStake( overrides?: Overrides & { from?: PromiseOrValue } ): Promise; diff --git a/src/sdk/contracts/erc7579-ref-impl/index.ts b/src/sdk/contracts/erc7579-ref-impl/index.ts new file mode 100644 index 0000000..ccf9a6e --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as lib from "./lib"; +export type { lib }; +import type * as src from "./src"; +export type { src }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/index.ts new file mode 100644 index 0000000..6373c8d --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as sentinellist from "./sentinellist"; +export type { sentinellist }; +import type * as solady from "./solady"; +export type { solady }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/index.ts new file mode 100644 index 0000000..f68cafe --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as src from "./src"; +export type { src }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/SentinelListLib.ts b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/SentinelListLib.ts new file mode 100644 index 0000000..6019541 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/SentinelListLib.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../../common"; + +export interface SentinelListLibInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface SentinelListLib extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: SentinelListLibInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/index.ts new file mode 100644 index 0000000..b5fb2d7 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/SentinelList.sol/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { SentinelListLib } from "./SentinelListLib"; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/index.ts new file mode 100644 index 0000000..b2f907a --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/sentinellist/src/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as sentinelListSol from "./SentinelList.sol"; +export type { sentinelListSol }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/solady/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/solady/index.ts new file mode 100644 index 0000000..f68cafe --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/solady/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as src from "./src"; +export type { src }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/index.ts new file mode 100644 index 0000000..74cdc5f --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as utils from "./utils"; +export type { utils }; diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/ECDSA.ts b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/ECDSA.ts new file mode 100644 index 0000000..8833243 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/ECDSA.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../../common"; + +export interface ECDSAInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ECDSA extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ECDSAInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/LibClone.ts b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/LibClone.ts new file mode 100644 index 0000000..7f441f6 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/LibClone.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../../common"; + +export interface LibCloneInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface LibClone extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LibCloneInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/index.ts b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/index.ts new file mode 100644 index 0000000..6cd28a3 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/lib/solady/src/utils/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ECDSA } from "./ECDSA"; +export type { LibClone } from "./LibClone"; diff --git a/src/sdk/contracts/erc7579-ref-impl/src/core/AccountBase.ts b/src/sdk/contracts/erc7579-ref-impl/src/core/AccountBase.ts new file mode 100644 index 0000000..34232a3 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/core/AccountBase.ts @@ -0,0 +1,85 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface AccountBaseInterface extends utils.Interface { + functions: { + "entryPoint()": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "entryPoint"): FunctionFragment; + + encodeFunctionData( + functionFragment: "entryPoint", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; + + events: {}; +} + +export interface AccountBase extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AccountBaseInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + entryPoint(overrides?: CallOverrides): Promise<[string]>; + }; + + entryPoint(overrides?: CallOverrides): Promise; + + callStatic: { + entryPoint(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + entryPoint(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + entryPoint(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/core/Fallback.ts b/src/sdk/contracts/erc7579-ref-impl/src/core/Fallback.ts new file mode 100644 index 0000000..606752e --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/core/Fallback.ts @@ -0,0 +1,520 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface FallbackInterface extends utils.Interface { + functions: { + "entryPoint()": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "entryPoint" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "entryPoint", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + "FallbackHandlerChanged(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FallbackHandlerChanged"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface FallbackHandlerChangedEventObject { + handler: string; +} +export type FallbackHandlerChangedEvent = TypedEvent< + [string], + FallbackHandlerChangedEventObject +>; + +export type FallbackHandlerChangedEventFilter = + TypedEventFilter; + +export interface Fallback extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: FallbackInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + entryPoint(overrides?: CallOverrides): Promise<[string]>; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { enabled: boolean }>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + entryPoint(overrides?: CallOverrides): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + entryPoint(overrides?: CallOverrides): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + + "FallbackHandlerChanged(address)"( + handler?: null + ): FallbackHandlerChangedEventFilter; + FallbackHandlerChanged(handler?: null): FallbackHandlerChangedEventFilter; + }; + + estimateGas: { + entryPoint(overrides?: CallOverrides): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + entryPoint(overrides?: CallOverrides): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/core/ModuleManager.ts b/src/sdk/contracts/erc7579-ref-impl/src/core/ModuleManager.ts new file mode 100644 index 0000000..da74485 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/core/ModuleManager.ts @@ -0,0 +1,618 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ModuleManagerInterface extends utils.Interface { + functions: { + "entryPoint()": FunctionFragment; + "getExecutorsPaginated(address,uint256)": FunctionFragment; + "getValidatorPaginated(address,uint256)": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "entryPoint" + | "getExecutorsPaginated" + | "getValidatorPaginated" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "supportsInterface" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "entryPoint", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getExecutorsPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getValidatorPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getExecutorsPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValidatorPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface ModuleManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ModuleManagerInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + entryPoint(overrides?: CallOverrides): Promise<[string]>; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + entryPoint(overrides?: CallOverrides): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + entryPoint(overrides?: CallOverrides): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + }; + + estimateGas: { + entryPoint(overrides?: CallOverrides): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + entryPoint(overrides?: CallOverrides): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/core/index.ts b/src/sdk/contracts/erc7579-ref-impl/src/core/index.ts new file mode 100644 index 0000000..8c8c989 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/core/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { AccountBase } from "./AccountBase"; +export type { Fallback } from "./Fallback"; +export type { ModuleManager } from "./ModuleManager"; diff --git a/src/sdk/contracts/erc7579-ref-impl/src/index.ts b/src/sdk/contracts/erc7579-ref-impl/src/index.ts new file mode 100644 index 0000000..6b9d26f --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as core from "./core"; +export type { core }; +import type * as interfaces from "./interfaces"; +export type { interfaces }; diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IERC4337.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IERC4337.ts new file mode 100644 index 0000000..3a10e4a --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IERC4337.ts @@ -0,0 +1,162 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IERC4337 { + export type UserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + callGasLimit: PromiseOrValue; + verificationGasLimit: PromiseOrValue; + preVerificationGas: PromiseOrValue; + maxFeePerGas: PromiseOrValue; + maxPriorityFeePerGas: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOperationStructOutput = [ + string, + BigNumber, + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string + ] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + callGasLimit: BigNumber; + verificationGasLimit: BigNumber; + preVerificationGas: BigNumber; + maxFeePerGas: BigNumber; + maxPriorityFeePerGas: BigNumber; + paymasterAndData: string; + signature: string; + }; +} + +export interface IERC4337Interface extends utils.Interface { + functions: { + "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "validateUserOp"): FunctionFragment; + + encodeFunctionData( + functionFragment: "validateUserOp", + values: [ + IERC4337.UserOperationStruct, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "validateUserOp", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IERC4337 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC4337Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig.ts new file mode 100644 index 0000000..faa61b4 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig.ts @@ -0,0 +1,485 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IAccountConfigInterface extends utils.Interface { + functions: { + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface IAccountConfig extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IAccountConfigInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + }; + + estimateGas: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig_Hook.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig_Hook.ts new file mode 100644 index 0000000..ff54a52 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IAccountConfig_Hook.ts @@ -0,0 +1,215 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IAccountConfig_HookInterface extends utils.Interface { + functions: { + "installHook(address,bytes)": FunctionFragment; + "isHookInstalled(address)": FunctionFragment; + "uninstallHook(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "installHook" | "isHookInstalled" | "uninstallHook" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "installHook", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isHookInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallHook", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "installHook", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isHookInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallHook", + data: BytesLike + ): Result; + + events: { + "DisableHook(address)": EventFragment; + "EnableHook(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableHook"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableHook"): EventFragment; +} + +export interface DisableHookEventObject { + module: string; +} +export type DisableHookEvent = TypedEvent<[string], DisableHookEventObject>; + +export type DisableHookEventFilter = TypedEventFilter; + +export interface EnableHookEventObject { + module: string; +} +export type EnableHookEvent = TypedEvent<[string], EnableHookEventObject>; + +export type EnableHookEventFilter = TypedEventFilter; + +export interface IAccountConfig_Hook extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IAccountConfig_HookInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableHook(address)"(module?: null): DisableHookEventFilter; + DisableHook(module?: null): DisableHookEventFilter; + + "EnableHook(address)"(module?: null): EnableHookEventFilter; + EnableHook(module?: null): EnableHookEventFilter; + }; + + estimateGas: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecution.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecution.ts new file mode 100644 index 0000000..13fc3c2 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecution.ts @@ -0,0 +1,253 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export interface IExecutionInterface extends utils.Interface { + functions: { + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeFromExecutor" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IExecution extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IExecutionInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecutionUnsafe.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecutionUnsafe.ts new file mode 100644 index 0000000..21a108f --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IExecutionUnsafe.ts @@ -0,0 +1,153 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IExecutionUnsafeInterface extends utils.Interface { + functions: { + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IExecutionUnsafe extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IExecutionUnsafeInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IMSA.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IMSA.ts new file mode 100644 index 0000000..00a17c1 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/IMSA.ts @@ -0,0 +1,781 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export interface IMSAInterface extends utils.Interface { + functions: { + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + "initializeAccount(bytes)": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + | "executeFromExecutor" + | "initializeAccount" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initializeAccount", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initializeAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface IMSA extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IMSAInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + }; + + estimateGas: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/index.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/index.ts new file mode 100644 index 0000000..15c12fd --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IMSA.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IAccountConfig } from "./IAccountConfig"; +export type { IAccountConfig_Hook } from "./IAccountConfig_Hook"; +export type { IExecution } from "./IExecution"; +export type { IExecutionUnsafe } from "./IExecutionUnsafe"; +export type { IMSA } from "./IMSA"; diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IExecutor.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IExecutor.ts new file mode 100644 index 0000000..63431d9 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IExecutor.ts @@ -0,0 +1,173 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IExecutorInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "isModuleType" | "onInstall" | "onUninstall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IExecutor extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IExecutorInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IFallback.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IFallback.ts new file mode 100644 index 0000000..ba326b0 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IFallback.ts @@ -0,0 +1,173 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IFallbackInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "isModuleType" | "onInstall" | "onUninstall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IFallback extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IFallbackInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IHook.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IHook.ts new file mode 100644 index 0000000..ac437b7 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IHook.ts @@ -0,0 +1,245 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IHookInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + "postCheck(bytes)": FunctionFragment; + "preCheck(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "isModuleType" + | "onInstall" + | "onUninstall" + | "postCheck" + | "preCheck" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "postCheck", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "preCheck", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "postCheck", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "preCheck", data: BytesLike): Result; + + events: {}; +} + +export interface IHook extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IHookInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + postCheck( + hookData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + preCheck( + msgSender: PromiseOrValue, + msgData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + postCheck( + hookData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + preCheck( + msgSender: PromiseOrValue, + msgData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + postCheck( + hookData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + preCheck( + msgSender: PromiseOrValue, + msgData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + postCheck( + hookData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + preCheck( + msgSender: PromiseOrValue, + msgData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + postCheck( + hookData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + preCheck( + msgSender: PromiseOrValue, + msgData: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IModule.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IModule.ts new file mode 100644 index 0000000..077bbcc --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IModule.ts @@ -0,0 +1,173 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IModuleInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "isModuleType" | "onInstall" | "onUninstall" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IModule extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IModuleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IValidator.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IValidator.ts new file mode 100644 index 0000000..d354b82 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/IValidator.ts @@ -0,0 +1,307 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IERC4337 { + export type UserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + callGasLimit: PromiseOrValue; + verificationGasLimit: PromiseOrValue; + preVerificationGas: PromiseOrValue; + maxFeePerGas: PromiseOrValue; + maxPriorityFeePerGas: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOperationStructOutput = [ + string, + BigNumber, + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string + ] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + callGasLimit: BigNumber; + verificationGasLimit: BigNumber; + preVerificationGas: BigNumber; + maxFeePerGas: BigNumber; + maxPriorityFeePerGas: BigNumber; + paymasterAndData: string; + signature: string; + }; +} + +export interface IValidatorInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "isValidSignatureWithSender(address,bytes32,bytes)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "isModuleType" + | "isValidSignatureWithSender" + | "onInstall" + | "onUninstall" + | "validateUserOp" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidSignatureWithSender", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "validateUserOp", + values: [IERC4337.UserOperationStruct, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidSignatureWithSender", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateUserOp", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IValidator extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IValidatorInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/index.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/index.ts new file mode 100644 index 0000000..033ae1d --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/IModule.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IExecutor } from "./IExecutor"; +export type { IFallback } from "./IFallback"; +export type { IHook } from "./IHook"; +export type { IModule } from "./IModule"; +export type { IValidator } from "./IValidator"; diff --git a/src/sdk/contracts/erc7579-ref-impl/src/interfaces/index.ts b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/index.ts new file mode 100644 index 0000000..a22eb03 --- /dev/null +++ b/src/sdk/contracts/erc7579-ref-impl/src/interfaces/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as imsaSol from "./IMSA.sol"; +export type { imsaSol }; +import type * as iModuleSol from "./IModule.sol"; +export type { iModuleSol }; +export type { IERC4337 } from "./IERC4337"; diff --git a/src/sdk/contracts/factories/account-abstraction/contracts/core/EntryPoint__factory.ts b/src/sdk/contracts/factories/account-abstraction/contracts/core/EntryPoint__factory.ts index 16e71b6..c4bf2c5 100644 --- a/src/sdk/contracts/factories/account-abstraction/contracts/core/EntryPoint__factory.ts +++ b/src/sdk/contracts/factories/account-abstraction/contracts/core/EntryPoint__factory.ts @@ -5,45 +5,25 @@ import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; import type { Provider, TransactionRequest } from "@ethersproject/providers"; import type { PromiseOrValue } from "../../../../common"; import type { - EntryPoint, - EntryPointInterface, + IEntryPoint, + IEntryPointInterface, } from "../../../../account-abstraction/contracts/core/EntryPoint"; const _abi = [ { inputs: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "paid", - type: "uint256", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, { internalType: "bool", - name: "targetSuccess", + name: "success", type: "bool", }, { internalType: "bytes", - name: "targetResult", + name: "ret", type: "bytes", }, ], - name: "ExecutionResult", + name: "DelegateAndRevert", type: "error", }, { @@ -65,240 +45,55 @@ const _abi = [ { inputs: [ { - internalType: "address", - name: "sender", - type: "address", + internalType: "uint256", + name: "opIndex", + type: "uint256", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + { + internalType: "bytes", + name: "inner", + type: "bytes", }, ], - name: "SenderAddressResult", + name: "FailedOpWithRevert", type: "error", }, { inputs: [ { - internalType: "address", - name: "aggregator", - type: "address", + internalType: "bytes", + name: "returnData", + type: "bytes", }, ], - name: "SignatureValidationFailed", + name: "PostOpReverted", type: "error", }, { inputs: [ { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", + internalType: "address", + name: "sender", + type: "address", }, ], - name: "ValidationResult", + name: "SenderAddressResult", type: "error", }, { inputs: [ { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "aggregator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "stakeInfo", - type: "tuple", - }, - ], - internalType: "struct IEntryPoint.AggregatorStakeInfo", - name: "aggregatorInfo", - type: "tuple", + internalType: "address", + name: "aggregator", + type: "address", }, ], - name: "ValidationResultWithAggregation", + name: "SignatureValidationFailed", type: "error", }, { @@ -332,6 +127,12 @@ const _abi = [ name: "AccountDeployed", type: "event", }, + { + anonymous: false, + inputs: [], + name: "BeforeExecution", + type: "event", + }, { anonymous: false, inputs: [ @@ -351,6 +152,37 @@ const _abi = [ name: "Deposited", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "PostOpRevertReason", + type: "event", + }, { anonymous: false, inputs: [ @@ -503,82 +335,71 @@ const _abi = [ name: "nonce", type: "uint256", }, - { - indexed: false, - internalType: "bytes", - name: "revertReason", - type: "bytes", - }, ], - name: "UserOperationRevertReason", + name: "UserOperationPrefundTooLow", type: "event", }, { anonymous: false, inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, { indexed: true, internalType: "address", - name: "account", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "withdrawAddress", + name: "sender", type: "address", }, { indexed: false, internalType: "uint256", - name: "amount", + name: "nonce", type: "uint256", }, - ], - name: "Withdrawn", - type: "event", - }, - { - inputs: [], - name: "SIG_VALIDATION_FAILED", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + indexed: false, + internalType: "bytes", + name: "revertReason", + type: "bytes", }, ], - stateMutability: "view", - type: "function", + name: "UserOperationRevertReason", + type: "event", }, { + anonymous: false, inputs: [ { - internalType: "bytes", - name: "initCode", - type: "bytes", + indexed: true, + internalType: "address", + name: "account", + type: "address", }, { + indexed: false, internalType: "address", - name: "sender", + name: "withdrawAddress", type: "address", }, { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", }, ], - name: "_validateSenderAndPaymaster", - outputs: [], - stateMutability: "view", - type: "function", + name: "Withdrawn", + type: "event", }, { inputs: [ { internalType: "uint32", - name: "unstakeDelaySec", + name: "_unstakeDelaySec", type: "uint32", }, ], @@ -610,52 +431,31 @@ const _abi = [ inputs: [ { internalType: "address", - name: "account", + name: "target", type: "address", }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, ], - name: "depositTo", + name: "delegateAndRevert", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", - name: "", + name: "account", type: "address", }, ], - name: "deposits", - outputs: [ - { - internalType: "uint112", - name: "deposit", - type: "uint112", - }, - { - internalType: "bool", - name: "staked", - type: "bool", - }, - { - internalType: "uint112", - name: "stake", - type: "uint112", - }, - { - internalType: "uint32", - name: "unstakeDelaySec", - type: "uint32", - }, - { - internalType: "uint48", - name: "withdrawTime", - type: "uint48", - }, - ], - stateMutability: "view", + name: "depositTo", + outputs: [], + stateMutability: "payable", type: "function", }, { @@ -671,9 +471,9 @@ const _abi = [ { components: [ { - internalType: "uint112", + internalType: "uint256", name: "deposit", - type: "uint112", + type: "uint256", }, { internalType: "bool", @@ -704,6 +504,30 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint192", + name: "key", + type: "uint192", + }, + ], + name: "getNonce", + outputs: [ + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -742,14 +566,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -757,14 +576,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -777,7 +591,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation", + internalType: "struct PackedUserOperation", name: "userOp", type: "tuple", }, @@ -820,14 +634,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -835,14 +644,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -855,7 +659,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation[]", + internalType: "struct PackedUserOperation[]", name: "userOps", type: "tuple[]", }, @@ -910,14 +714,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -925,14 +724,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -945,7 +739,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation[]", + internalType: "struct PackedUserOperation[]", name: "ops", type: "tuple[]", }, @@ -963,247 +757,12 @@ const _abi = [ { inputs: [ { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - components: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "address", - name: "paymaster", - type: "address", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - ], - internalType: "struct EntryPoint.MemoryUserOp", - name: "mUserOp", - type: "tuple", - }, - { - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "uint256", - name: "contextOffset", - type: "uint256", - }, - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - ], - internalType: "struct EntryPoint.UserOpInfo", - name: "opInfo", - type: "tuple", - }, - { - internalType: "bytes", - name: "context", - type: "bytes", - }, - ], - name: "innerHandleOp", - outputs: [ - { - internalType: "uint256", - name: "actualGasCost", - type: "uint256", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "op", - type: "tuple", - }, - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "targetCallData", - type: "bytes", - }, - ], - name: "simulateHandleOp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "userOp", - type: "tuple", + internalType: "uint192", + name: "key", + type: "uint192", }, ], - name: "simulateValidation", + name: "incrementNonce", outputs: [], stateMutability: "nonpayable", type: "function", @@ -1246,14 +805,10 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - stateMutability: "payable", - type: "receive", - }, ] as const; const _bytecode = - "0x60a0604052604051620000129062000076565b604051809103906000f0801580156200002f573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff168152503480156200006f57600080fd5b5062000084565b61046f806200a67083390190565b60805161a5c9620000a76000396000818161264e0152616e6f015261a5c96000f3fe6080604052600436106101025760003560e01c8063957122ab11610095578063bb9fe6bf11610064578063bb9fe6bf1461034f578063c23a5cea14610366578063d6383f941461038f578063ee219423146103b8578063fc7e286d146103e157610126565b8063957122ab146102a45780639b249f69146102cd578063a6193531146102f6578063b760faf91461033357610126565b80634b1d7cf5116100d15780634b1d7cf5146101d65780635287ce12146101ff57806370a082311461023c5780638f41ec5a1461027957610126565b80630396cb601461012b5780631d732756146101475780631fad948c14610184578063205c2878146101ad57610126565b366101265761011b67bd85ada7de3f843660c01b610422565b61012433610425565b005b600080fd5b6101456004803603810190610140919061742f565b61056d565b005b34801561015357600080fd5b5061016e6004803603810190610169919061782c565b610b04565b60405161017b91906178cd565b60405180910390f35b34801561019057600080fd5b506101ab60048036038101906101a6919061797c565b611044565b005b3480156101b957600080fd5b506101d460048036038101906101cf91906179dc565b611340565b005b3480156101e257600080fd5b506101fd60048036038101906101f89190617a72565b6116a5565b005b34801561020b57600080fd5b5061022660048036038101906102219190617ad2565b61210a565b6040516102339190617bdb565b60405180910390f35b34801561024857600080fd5b50610263600480360381019061025e9190617ad2565b612293565b60405161027091906178cd565b60405180910390f35b34801561028557600080fd5b5061028e612344565b60405161029b91906178cd565b60405180910390f35b3480156102b057600080fd5b506102cb60048036038101906102c69190617bf6565b612349565b005b3480156102d957600080fd5b506102f460048036038101906102ef9190617c8b565b612624565b005b34801561030257600080fd5b5061031d60048036038101906103189190617cfd565b612726565b60405161032a9190617d55565b60405180910390f35b61034d60048036038101906103489190617ad2565b610425565b005b34801561035b57600080fd5b5061036461279e565b005b34801561037257600080fd5b5061038d60048036038101906103889190617d70565b612aa2565b005b34801561039b57600080fd5b506103b660048036038101906103b19190617d9d565b612fd2565b005b3480156103c457600080fd5b506103df60048036038101906103da9190617cfd565b61331a565b005b3480156103ed57600080fd5b5061040860048036038101906104039190617ad2565b61389a565b604051610419959493929190617e69565b60405180910390f35b50565b61043967468b4d0eb923786460c01b610422565b61044d67e2dd04761b71021160c01b610422565b6104616739f840fbb98466ea60c01b610422565b61046b8134613933565b61047f672ae9f4c70e9ac82160c01b610422565b6104936780392b76417dd37060c01b610422565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506104e96716b6918eb131153d60c01b610422565b6104fd6782b3f6f7efef9a3060c01b610422565b8173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c48260000160009054906101000a90046dffffffffffffffffffffffffffff166040516105619190617ef7565b60405180910390a25050565b610581676a63848afe7b25a660c01b610422565b610595678aabda62f45d36d860c01b610422565b6105a967cd2a6344bb8ba41d60c01b610422565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506105ff6764f9747c720a16ff60c01b610422565b6106136756f07cead6218a0d60c01b610422565b61062767f7e41ffdf6e7b07360c01b610422565b60008263ffffffff1611610670576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066790617f6f565b60405180910390fd5b6106846745ba7f8864c4838a60c01b610422565b610698673eb5cba913e1b29a60c01b610422565b6106ac674e10279e834acc5160c01b610422565b6106c067b9b4e84773c481f160c01b610422565b8060010160009054906101000a900463ffffffff1663ffffffff168263ffffffff161015610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071a90617fdb565b60405180910390fd5b61073767e43e0a0e0e0b681b60c01b610422565b61074b67fd842514a971b95360c01b610422565b61075f676e3816719231aed060c01b610422565b60003482600001600f9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1661079b919061802a565b90506107b1675a0b2db399659cb660c01b610422565b6107c56714a14fbd67cb18f260c01b610422565b6107d967be3384e9308ba91560c01b610422565b6000811161081c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610813906180aa565b60405180910390fd5b61083067e860cef7076562e860c01b610422565b610844675863f8ef40016f1360c01b610422565b61085867c67ebc2721963fd060c01b610422565b61086c67cde4026bd69782e060c01b610422565b6dffffffffffffffffffffffffffff80168111156108bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b690618116565b60405180910390fd5b6108d36793b6d1c7ed9974a960c01b610422565b6108e767d8267f00f5f9303460c01b610422565b6040518060a001604052808360000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168152602001600115158152602001826dffffffffffffffffffffffffffff1681526020018463ffffffff168152602001600065ffffffffffff168152506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550602082015181600001600e6101000a81548160ff021916908315150217905550604082015181600001600f6101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff16021790555060608201518160010160006101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160046101000a81548165ffffffffffff021916908365ffffffffffff160217905550905050610a9b67eb1c85f247f3f58060c01b610422565b610aaf67e4a8c29fd2ae2b1960c01b610422565b3373ffffffffffffffffffffffffffffffffffffffff167fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c018285604051610af7929190618167565b60405180910390a2505050565b6000610b1a67db3526811af6d2f660c01b613b0b565b610b2d660512575ad400e160c01b613b0b565b610b41675e28714e8ca8473560c01b613b0b565b60005a9050610b5a67fbf195873194ab0060c01b613b0b565b610b6e6742164649c89ee89360c01b613b0b565b610b8267d32ef2f0c33a85dd60c01b613b0b565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be7906181dc565b60405180910390fd5b610c04676c1ebce823d882a160c01b613b0b565b610c186794845e22e51a4a2060c01b613b0b565b610c2c6780b462b8809afa0c60c01b613b0b565b600085600001519050610c49675ee627e33d5a9d4760c01b613b0b565b610c5d67c5a8ad7eeb6af64760c01b613b0b565b600081604001519050610c7a67b6cf7e4854e6b65a60c01b613b0b565b610c8e6768ef5487dffe40e260c01b613b0b565b610ca2678532b8be333513e760c01b613b0b565b61138882606001518201015a1015610d0657610cc8675f6b6fc26e1d7bcd60c01b613b0b565b610cdc67a0d813c4f9ca49ae60c01b613b0b565b7fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b610d1a67e33262b284b9622860c01b613b0b565b610d2e678b199f955efc1b8b60c01b613b0b565b610d4267d69684ddc4dead3960c01b613b0b565b6000610d5867c6aea2abdd90839d60c01b613b0b565b610d6c67daa27416126f734660c01b613b0b565b600089511115610f5d57610d8a67ff0652f47ca0cb8a60c01b613b0b565b610d9e67168087653bef8d4c60c01b613b0b565b610db2673ebcbd10cdc23a5860c01b613b0b565b6000610dc5846000015160008c86613b0e565b9050610ddb67a21eac7e12c81c9760c01b613b0b565b610def6773ed69f4eb5a84e060c01b613b0b565b80610f4257610e0867eb682f232ae0065460c01b613b0b565b610e1c67d09a82d3230f03fd60c01b613b0b565b610e306723ceaaff8c33f04160c01b613b0b565b6000610e3d610800613b4f565b9050610e53678bdf590ff52a5a2b60c01b613b0b565b610e67670588415b92d5232f60c01b613b0b565b600081511115610f0f57610e856762ba2321ed0e69c160c01b613b0b565b610e9967d1620a1ed4dcdc4c60c01b613b0b565b610ead67c0fc5eee94edd58c60c01b613b0b565b846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a201876020015184604051610f0292919061827b565b60405180910390a3610f24565b610f236754fe5335162ab15860c01b613b0b565b5b610f38672f681d8c381fda6960c01b613b0b565b6001925050610f57565b610f566737e5eb8f6f7827c360c01b613b0b565b5b50610f72565b610f7167145dbc1ca024fb8660c01b613b0b565b5b610f8667c54267444da43bfc60c01b613b0b565b610f9a67599b3cfa8748f3b560c01b613b0b565b610fae67714bf44ce4a0381860c01b613b0b565b600088608001515a8603019050610fcf6785a90bc90fd0c5a860c01b613b0b565b610fe3679f9fbda8e47ac60460c01b613b0b565b6110356000838b8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505085613ba7565b95505050505050949350505050565b61105867480f4be8a88a925660c01b613b0b565b61106c670718d96351a70ff760c01b613b0b565b61108067eda6ec5b72a8799760c01b613b0b565b600083839050905061109c67b8a5229407b3ffe260c01b613b0b565b6110b067454d30fce6f050fe60c01b613b0b565b60008167ffffffffffffffff8111156110cc576110cb617477565b5b60405190808252806020026020018201604052801561110557816020015b6110f2617276565b8152602001906001900390816110ea5790505b50905061111c672afc4210868ecdb260c01b613b0b565b611130679de92eca7afe9efe60c01b613b0b565b6111446783d9fd5825b3bd4760c01b613b0b565b60005b828110156112395761116367b42c932e1dc59b0c60c01b613b0b565b61117767ebaa907adb697f2660c01b613b0b565b600082828151811061118c5761118b6182ab565b5b602002602001015190506111aa670ce811578d6854ee60c01b613b0b565b6111be67b4de2464f4eca8f760c01b613b0b565b6000806111f0848a8a878181106111d8576111d76182ab565b5b90506020028101906111ea91906182e9565b856142e4565b9150915061120867551faaad0f42dec760c01b613b0b565b61121c67d8da3040f57e6e4860c01b613b0b565b61122984838360006147a0565b5050508080600101915050611147565b5061124e675489bf08514b848f60c01b613b0b565b611262676cdf4ed558a4877160c01b613b0b565b600061127867a821cbcf353d70f960c01b613b0b565b61128c67bc17dd3329400a2960c01b613b0b565b60005b83811015611305576112ab67e2f8129ef9d3658f60c01b613b0b565b6112f4818888848181106112c2576112c16182ab565b5b90506020028101906112d491906182e9565b8584815181106112e7576112e66182ab565b5b6020026020010151614b3b565b82019150808060010191505061128f565b5061131a6772b31bd0e942f20b60c01b613b0b565b61132e67b79c5a4cdbbf72fb60c01b613b0b565b6113388482614e11565b505050505050565b61135467560f3e8976c6b86c60c01b610422565b61136867b28c49611e086e9260c01b610422565b61137c67bdb6e574008a0ae360c01b610422565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506113d26768e81caaf4bf08d260c01b610422565b6113e667dfd1b8104dcc02a360c01b610422565b6113fa671d227a41f8efec8b60c01b610422565b8060000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1682111561146b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114629061835e565b60405180910390fd5b61147f67483db2d9f91c75b460c01b610422565b61149367981c38718e2f795260c01b610422565b818160000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff166114cd919061837e565b8160000160006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550611517678933eb8a0225346d60c01b610422565b61152b675fa45e9fe98dbcb160c01b610422565b3373ffffffffffffffffffffffffffffffffffffffff167fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb8484604051611573929190618407565b60405180910390a261158f6749f89ede312291a760c01b610422565b6115a3674c5fe87fce31d59f60c01b610422565b60008373ffffffffffffffffffffffffffffffffffffffff16836040516115c990618461565b60006040518083038185875af1925050503d8060008114611606576040519150601f19603f3d011682016040523d82523d6000602084013e61160b565b606091505b5050905061162367a6213c671f35757e60c01b610422565b611637676742cd98f224910860c01b610422565b61164b6795caee35cc00a57f60c01b610422565b8061168b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611682906184c2565b60405180910390fd5b61169f675622a5e8bd3b0c7760c01b610422565b50505050565b6116b967d45167d0b820409960c01b613b0b565b6116cd67cc35957a153378ca60c01b613b0b565b6116e1674c2989d892e87d0f60c01b613b0b565b60008383905090506116fd672fed84417ef8bfe860c01b613b0b565b6117116796028c97b81dd4ca60c01b613b0b565b6000611727675a4768fd252e3be560c01b613b0b565b61173b67c2c56575af3483b460c01b613b0b565b60005b82811015611a8c5761175a67693f8da5a6e9ab0a60c01b613b0b565b61176e677cda10462919d8e160c01b613b0b565b36868683818110611782576117816182ab565b5b905060200281019061179491906184e2565b90506117aa6705820c78111400f560c01b613b0b565b6117be6741ccf4d47e3583ee60c01b613b0b565b3660008280600001906117d1919061850a565b915091506117e9675a383c333b42a4e160c01b613b0b565b6117fd678f62bf7452b7eca160c01b613b0b565b600083602001602081019061181291906185ab565b9050611828671b309c9a411d1c6b60c01b613b0b565b61183c672799ca0d1fe6dfb260c01b613b0b565b611850670b6ba46882b67fa660c01b613b0b565b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036118bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b690618624565b60405180910390fd5b6118d367019aa5bc6cd397ac60c01b613b0b565b6118e767aa1c8bcbd930b1d460c01b613b0b565b6118fb67918ab343fe7e020a60c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a3b576119436737f65cd02c2a8b4f60c01b613b0b565b61195767b4dcc864ad0a75ad60c01b613b0b565b61196b678760cc1fdf08e24860c01b613b0b565b8073ffffffffffffffffffffffffffffffffffffffff1663e3563a4f84848780604001906119999190618644565b6040518563ffffffff1660e01b81526004016119b89493929190618a0d565b60006040518083038186803b1580156119d057600080fd5b505afa9250505080156119e1575060015b611a36576119f96758ec6b8342bd3a2560c01b613b0b565b806040517f86a9f750000000000000000000000000000000000000000000000000000000008152600401611a2d9190618a57565b60405180910390fd5b611a50565b611a4f67a4a227a75bcaa00260c01b613b0b565b5b611a64678fc00b99d20e616b60c01b613b0b565b8282905086611a73919061802a565b9550505050508080611a8490618a72565b91505061173e565b50611aa16742ab1a1b4f7ee2ad60c01b613b0b565b611ab56771ab06326a91d17c60c01b613b0b565b60008167ffffffffffffffff811115611ad157611ad0617477565b5b604051908082528060200260200182016040528015611b0a57816020015b611af7617276565b815260200190600190039081611aef5790505b509050611b2167ea43e34cb3b2cd3560c01b613b0b565b611b356771f3173d2348639d60c01b613b0b565b6000611b4b67069f0801d2dbc6c260c01b613b0b565b611b5f671f650b22e651925e60c01b613b0b565b60005b84811015611dc557611b7e6745688aa7c89dd34560c01b613b0b565b611b9267580f3333dbb5da1560c01b613b0b565b36888883818110611ba657611ba56182ab565b5b9050602002810190611bb891906184e2565b9050611bce67ee341f5e72a97a8c60c01b613b0b565b611be267dcdc504a5a96256460c01b613b0b565b366000828060000190611bf5919061850a565b91509150611c0d67269527dec95cb11c60c01b613b0b565b611c216701979335b1e239c960c01b613b0b565b6000836020016020810190611c3691906185ab565b9050611c4c67706611ae2289a1c860c01b613b0b565b611c606743e9efaa7361986960c01b613b0b565b6000838390509050611c7c67809f0c0c8e7b3cff60c01b613b0b565b611c90677fffbda1e029bb3c60c01b613b0b565b60005b81811015611dac57611caf6773bea7e2a81daa4c60c01b613b0b565b611cc367291a7ba8300c92a360c01b613b0b565b6000898981518110611cd857611cd76182ab565b5b60200260200101519050611cf66771698436d6eaf0ed60c01b613b0b565b611d0a67563367cdfd60546260c01b613b0b565b600080611d3c8b898987818110611d2457611d236182ab565b5b9050602002810190611d3691906182e9565b856142e4565b91509150611d54674734362213fb1c0160c01b613b0b565b611d68677416f12f68d4556c60c01b613b0b565b611d74848383896147a0565b611d88677c5f9436e2492bd060c01b613b0b565b8a80611d9390618a72565b9b50505050508080611da490618a72565b915050611c93565b5050505050508080611dbd90618a72565b915050611b62565b50611dda67c16b30149cb0aa3c60c01b613b0b565b611dee67c0fb1faf9fc25f5660c01b613b0b565b6000611e0467e30df2c998e3e67160c01b613b0b565b60009150611e1c67c80b0563cb6f23f360c01b613b0b565b611e3067d2aa27a228f10a6360c01b613b0b565b60005b8581101561206157611e4f67a084dc518274b30f60c01b613b0b565b611e636743256d97934c584560c01b613b0b565b36898983818110611e7757611e766182ab565b5b9050602002810190611e8991906184e2565b9050611e9f67510cbc26f931437260c01b613b0b565b611eb3679ce57f2ae5c49cb960c01b613b0b565b806020016020810190611ec691906185ab565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a2611f1c677274beafcd04754f60c01b613b0b565b611f306730a1207ece35292760c01b613b0b565b366000828060000190611f43919061850a565b91509150611f5b67524efd8f365fdbd760c01b613b0b565b611f6f67c3cec05e9ac4028360c01b613b0b565b6000828290509050611f8b671aea3cc95726cae960c01b613b0b565b611f9f6775ee5a0920f5be5260c01b613b0b565b60005b8181101561204957611fbe67c00d6a090d98dcd260c01b613b0b565b61200788858584818110611fd557611fd46182ab565b5b9050602002810190611fe791906182e9565b8b8b81518110611ffa57611ff96182ab565b5b6020026020010151614b3b565b87612012919061802a565b965061202867b8d9f72bde1b1f2760c01b613b0b565b878061203390618a72565b985050808061204190618a72565b915050611fa2565b5050505050808061205990618a72565b915050611e33565b50612076670517e35055105ac660c01b613b0b565b61208a67a82eba569fb3785460c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a26120e26778b1e1413f5d45f360c01b613b0b565b6120f6671ff04071d095d97d60c01b613b0b565b6121008682614e11565b5050505050505050565b6121126172ae565b61212667af18cba7299e26ad60c01b610422565b61213a679ebf10ec7c30fe3160c01b610422565b61214e6791f79c211959ce6d60c01b610422565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16815260200160008201600e9054906101000a900460ff1615151515815260200160008201600f9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1681526020016001820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016001820160049054906101000a900465ffffffffffff1665ffffffffffff1665ffffffffffff16815250509050919050565b60006122a967453056944367f73a60c01b610422565b6122bd67d6b0be6190aeaf3560c01b610422565b6122d167f5492b075a6b0a8d60c01b610422565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff169050919050565b600181565b61235d67b1f1af7bf6ef4bf160c01b613b0b565b61237167c16797003993b99260c01b613b0b565b612385671f4c2029f0795a7860c01b613b0b565b6000858590501480156123af575060008373ffffffffffffffffffffffffffffffffffffffff163b145b1561242b576123c867239c9d28660a0c2a60c01b613b0b565b6123dc67b669dd79727b383560c01b613b0b565b6123f067df142b3fce8a6b3b60c01b613b0b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242290618b06565b60405180910390fd5b61243f672d592b374ca1c03b60c01b613b0b565b612453675a84500c42a4ab9e60c01b613b0b565b61246767138b2b31588d141560c01b613b0b565b601482829050106125ac5761248667910bcbd60a6e36da60c01b613b0b565b61249a679f613af2922d985460c01b613b0b565b6124ae67d3b376958f4f773160c01b613b0b565b600082826000906014926124c493929190618b30565b906124cf9190618baf565b60601c90506124e867829d00569e3e63ff60c01b613b0b565b6124fc67fd232d1f4371ecc760c01b613b0b565b60008173ffffffffffffffffffffffffffffffffffffffff163b036125925761252f67cfd0acef3b8a9c4b60c01b613b0b565b61254367ecca448ac47b240560c01b613b0b565b61255767551cab94402f008460c01b613b0b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258990618c5a565b60405180910390fd5b6125a667c5d9882188d9fe8b60c01b613b0b565b506125c1565b6125c067a6361feedecfec7760c01b613b0b565b5b6125d567eadb46768c67bc0660c01b613b0b565b6125e9677adc2c6b15b8fee460c01b613b0b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261b90618c9d565b60405180910390fd5b6126386716e0353279fd0bc160c01b613b0b565b61264c675d6dee4bf91cbea860c01b613b0b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663570e1a3683836040518363ffffffff1660e01b81526004016126a7929190618cbd565b6020604051808303816000875af11580156126c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ea9190618cf6565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815260040161271d9190618a57565b60405180910390fd5b600061273c6798117b896913c24160c01b613b0b565b6127506744f3abd0a14999b860c01b613b0b565b61276467145b145d2a81a8cc60c01b613b0b565b61276d8261500d565b304660405160200161278193929190618d23565b604051602081830303815290604052805190602001209050919050565b6127b267b727bdcaa60faa3460c01b610422565b6127c6677f65868562f2c1f760c01b610422565b6127da6703166387f9301add60c01b610422565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061283067245e52c9cd0ed5c960c01b610422565b6128446788375c7a9700bb9d60c01b610422565b61285867234386199a1f5d4060c01b610422565b60008160010160009054906101000a900463ffffffff1663ffffffff16036128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ac90618da6565b60405180910390fd5b6128c967608175fd3263809960c01b610422565b6128dd673b540901fbe1608b60c01b610422565b6128f1677b3886cd77d618dc60c01b610422565b61290567ac6c52375ca549b960c01b610422565b80600001600e9054906101000a900460ff16612956576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294d90618e12565b60405180910390fd5b61296a6798917dbf2092f49860c01b610422565b61297e67691384b691c8012660c01b610422565b612992676f00f75881e0d11c60c01b610422565b60008160010160009054906101000a900463ffffffff1663ffffffff16426129ba9190618e32565b90506129d067db9f9fbce77d71ae60c01b610422565b808260010160046101000a81548165ffffffffffff021916908365ffffffffffff160217905550612a0b6703437ed7c3c0f01f60c01b610422565b600082600001600e6101000a81548160ff021916908315150217905550612a3c6725f7a9564c64e84560c01b610422565b612a50674634217d4d2d5c8c60c01b610422565b3373ffffffffffffffffffffffffffffffffffffffff167ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a82604051612a969190618e9d565b60405180910390a25050565b612ab6675c449e66a915cc3f60c01b610422565b612aca678b9b5a0a7dfd210a60c01b610422565b612ade67aeae65745692194560c01b610422565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050612b3467f27b98cae48780a260c01b610422565b612b486778c5ee9b5e93ce7d60c01b610422565b600081600001600f9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff169050612b8f674a127222c7585ec160c01b610422565b612ba3675697b8de89fc5b5060c01b610422565b612bb767a42fea213b1cd3fe60c01b610422565b60008111612bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bf190618f04565b60405180910390fd5b612c0e67c670866b0fa843ae60c01b610422565b612c22671e193af69d857ac560c01b610422565b612c3667b8cb3865dea60c1860c01b610422565b612c4a6725bb5e27b1725b2060c01b610422565b60008260010160049054906101000a900465ffffffffffff1665ffffffffffff1611612cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ca290618f70565b60405180910390fd5b612cbf672487230840f0a7b560c01b610422565b612cd3671fa143ab50cdda1660c01b610422565b612ce767c80dc0f646e58e2160c01b610422565b612cfb67d78f00466fda8f6a60c01b610422565b428260010160049054906101000a900465ffffffffffff1665ffffffffffff161115612d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5390618fdc565b60405180910390fd5b612d7067047e4ce27fc5edce60c01b610422565b612d84672488ba64f9c6dec060c01b610422565b60008260010160006101000a81548163ffffffff021916908363ffffffff160217905550612dbc67557c3eed50c93d6160c01b610422565b60008260010160046101000a81548165ffffffffffff021916908365ffffffffffff160217905550612df8670e8c2f781dd367c760c01b610422565b600082600001600f6101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff160217905550612e4467f9f05c06e34d3c2b60c01b610422565b612e5867ddfcc9a075dc351f60c01b610422565b3373ffffffffffffffffffffffffffffffffffffffff167fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda38483604051612ea0929190618407565b60405180910390a2612ebc67bf0c59a6bff89d6d60c01b610422565b612ed067c7734f00106bfd0360c01b610422565b60008373ffffffffffffffffffffffffffffffffffffffff1682604051612ef690618461565b60006040518083038185875af1925050503d8060008114612f33576040519150601f19603f3d011682016040523d82523d6000602084013e612f38565b606091505b50509050612f5067fffde4fe56538fac60c01b610422565b612f64671b0f4978934c967e60c01b610422565b612f78671bcb2d2e59fa189160c01b610422565b80612fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612faf90619048565b60405180910390fd5b612fcc679e7eabf637f3c98c60c01b610422565b50505050565b612fe667308e897ec9ac49b860c01b613b0b565b612ffa6746afd6154958d48760c01b613b0b565b61300e677943f5e49edb6c9060c01b613b0b565b613016617276565b61302a676b399b53e069a3a660c01b613b0b565b61303e67fd10b936731b4f9160c01b613b0b565b61304785615062565b61305b6740a63cbe3b28ab0f60c01b613b0b565b61306f673f895508e0d540a060c01b613b0b565b60008061307e600088856142e4565b915091506130966704eff507f83465d260c01b613b0b565b6130aa67302f1aa4c836323160c01b613b0b565b60006130b6838361522a565b90506130cc67e88deff7702581ef60c01b613b0b565b6130e067b25c829d6a16e4aa60c01b613b0b565b6130e86155a4565b6130fc67ea6ea2511b8d632760c01b613b0b565b613110673432152ca7835c3e60c01b613b0b565b600061311e60008a87614b3b565b905061313467a76dc2db7071bdb360c01b613b0b565b61314867746f7d9f4d57669460c01b613b0b565b6131506155a4565b6131646786c06cf5574ba78e60c01b613b0b565b613178675d95101420b09df260c01b613b0b565b600061318e673f929187b4c9082d60c01b613b0b565b6131a2679d6f362de5986eb960c01b613b0b565b60606131b8676649d6a2c518852d60c01b613b0b565b6131cc67cc9da580bdacbbe560c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff161461329e57613213661447dbcfd5837660c01b613b0b565b61322767f22079f9dd8dfecb60c01b613b0b565b8973ffffffffffffffffffffffffffffffffffffffff16898960405161324e92919061908d565b6000604051808303816000865af19150503d806000811461328b576040519150601f19603f3d011682016040523d82523d6000602084013e613290565b606091505b5080925081935050506132b3565b6132b267d90f8e732302d9f460c01b613b0b565b5b6132c767b42cc8f96635c06860c01b613b0b565b8660800151838560200151866040015185856040517f8b7ac980000000000000000000000000000000000000000000000000000000008152600401613311969594939291906190a6565b60405180910390fd5b61332e67adebb93f041c28da60c01b613b0b565b613342674d0c930f5ff7318060c01b613b0b565b61335667a72d90442325d8a760c01b613b0b565b61335e617276565b61337267ca99458f9089f9cc60c01b613b0b565b61338667da0268cca058caeb60c01b613b0b565b61338f82615062565b6133a367f2cc202fae4e6d2860c01b613b0b565b6133b7676b890ebe4d93dd6760c01b613b0b565b6000806133c6600085856142e4565b915091506133de6798724490aedc5f6d60c01b613b0b565b6133f26777f8798bf1f0265e60c01b613b0b565b6000613405846000015160a001516155d2565b905061341b67bd452490c91954fb60c01b613b0b565b61342f673978756d1524ccc960c01b613b0b565b60006134428560000151600001516155d2565b9050613458677acbcb2f5ef3302660c01b613b0b565b61346c6729be7955feddb26060c01b613b0b565b61347461730d565b61348867f3272f3fb8dc76ea60c01b613b0b565b61349c67b004d9dd5d9e395460c01b613b0b565b6134b067bd5cc9bc63e18e7860c01b613b0b565b3660008880604001906134c39190618644565b915091506134db6759902901f5fc97d660c01b613b0b565b6134ef67050405a1d1e226dd60c01b613b0b565b6000601483839050101580156135155750613514674e71178c7f8d1dd360c01b6156e2565b5b80613530575061352f67647e7e719dd3403760c01b6156ed565b5b61353b57600061355e565b828260009060149261354f93929190618b30565b9061355a9190618baf565b60601c5b905061357467d9dc24b09e2c744060c01b613b0b565b61357d816155d2565b935050505061359667fd1dd0e4fb8dd7ac60c01b613b0b565b6135aa677f3a7f298afe405860c01b613b0b565b60006135b6868661522a565b90506135cc67c748266f190cdd6f60c01b613b0b565b6135e0679811ad866476a4e760c01b613b0b565b6000816000015190506135fd67bff7b97a6411a26a60c01b613b0b565b61361167bbbcd46e34937d7160c01b613b0b565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614905061365967f56f2c6435ad476560c01b613b0b565b61366d6701c07411d06e812460c01b613b0b565b60006040518060c001604052808b6080015181526020018b6040015181526020018315158152602001856020015165ffffffffffff168152602001856040015165ffffffffffff1681526020016136c78c606001516156f4565b81525090506136e0674d18487e1344149a60c01b613b0b565b6136f4673887d13a5d72e38260c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561375e5750600173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561382f5761377767c9dee408325af2cc60c01b613b0b565b61378b67d87ebd31eb97f10860c01b613b0b565b61379f6788c5110cc116a3a260c01b613b0b565b600060405180604001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020016137d1866155d2565b81525090506137ea67aafeb9832d13176a60c01b613b0b565b8187878a846040517ffaecb4e400000000000000000000000000000000000000000000000000000000815260040161382695949392919061925d565b60405180910390fd5b61384367b59d5f7f376aa49b60c01b613b0b565b61385767bd0e2364c61bc38560c01b613b0b565b808686896040517fe0cff05f00000000000000000000000000000000000000000000000000000000815260040161389194939291906192b8565b60405180910390fd5b60006020528060005260406000206000915090508060000160009054906101000a90046dffffffffffffffffffffffffffff169080600001600e9054906101000a900460ff169080600001600f9054906101000a90046dffffffffffffffffffffffffffff16908060010160009054906101000a900463ffffffff16908060010160049054906101000a900465ffffffffffff16905085565b61394767641b16ec65b6a68a60c01b610422565b61395b677bc0adde2d418a7060c01b610422565b61396f67882a2e6265487f8060c01b610422565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506139c567a859bcc12ff4ca1b60c01b610422565b6139d967333c6fae9efbfe3560c01b610422565b6000828260000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16613a15919061802a565b9050613a2b677a9b7bf552fadc3360c01b610422565b613a3f67dc5d7b6a53eb99c660c01b610422565b613a536737910712e61ec37c60c01b610422565b6dffffffffffffffffffffffffffff8016811115613aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613a9d90619350565b60405180910390fd5b613aba67cd0f0402a9a2515360c01b610422565b613ace67495b2fc5f8d7b4a560c01b610422565b808260000160006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff16021790555050505050565b50565b6000613b24672fcf8105fec3df7b60c01b615726565b613b386722473413de3c15fc60c01b615726565b600080845160208601878987f19050949350505050565b6060613b6567303f3b4426b9544e60c01b615726565b613b79677f275f50bcc460f960c01b615726565b3d82811115613b86578290505b604051602082018101604052818152816000602083013e8092505050919050565b6000613bbd676b7dccbe8d01c1b360c01b613b0b565b613bd167c914c7e4eb9527dd60c01b613b0b565b613be567bd9e241408179e3e60c01b613b0b565b60005a9050613bfe670528d035eb11ccd960c01b613b0b565b613c12678232911969024b1e60c01b613b0b565b613c2667f254d0853ab9151860c01b613b0b565b6000613c3c67c866fe45a820868d60c01b613b0b565b613c50674250def80b9cdffa60c01b613b0b565b600086600001519050613c6d67a4034fd86be7493260c01b613b0b565b613c816779f4f5f41e09e1f560c01b613b0b565b6000613c8c82615729565b9050613ca267dac9783205b79b5060c01b613b0b565b613cb667a9f6622ab8b1df7760c01b613b0b565b60008260a001519050613cd3676e86f8ae258d31fc60c01b613b0b565b613ce767190233c50b822bad60c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613d4f57613d2f67d82973dd8b5e756a60c01b613b0b565b613d436705c1feb00d338ee160c01b613b0b565b82600001519350614098565b613d6367bcda3e6439d8dc5160c01b613b0b565b613d7767cae11a430f67971760c01b613b0b565b809350613d8e67d7ffeaae933a36d060c01b613b0b565b613da267adaeb70358f5b14860c01b613b0b565b60008851111561408257613dc0676df70878573bf74b60c01b613b0b565b613dd4679762e536b54aba4260c01b613b0b565b8187029550613ded67f077938fa615dd5060c01b613b0b565b613e0167c99b393c8303c05a60c01b613b0b565b600280811115613e1457613e13619370565b5b8a6002811115613e2757613e26619370565b5b14613ee257613e406792a4c43819ceb85e60c01b613b0b565b613e546715f5372c9a665beb60c01b613b0b565b613e6867acea0271fb902f8d60c01b613b0b565b8073ffffffffffffffffffffffffffffffffffffffff1663a9a2340984606001518c8b8a6040518563ffffffff1660e01b8152600401613eaa939291906193e7565b600060405180830381600088803b158015613ec457600080fd5b5087f1158015613ed8573d6000803e3d6000fd5b505050505061407d565b613ef6675c81ea4ed2050e2a60c01b613b0b565b613f0a67b7962f99fce57f7060c01b613b0b565b613f1e67db7246cce1a7934560c01b613b0b565b8073ffffffffffffffffffffffffffffffffffffffff1663a9a2340984606001518c8b8a6040518563ffffffff1660e01b8152600401613f60939291906193e7565b600060405180830381600088803b158015613f7a57600080fd5b5087f193505050508015613f8c575060015b61407c57613f98619432565b806308c379a0036140295750613fac619454565b80613fb7575061402b565b613fcb6727cbaddc4df8e08e60c01b613b0b565b8b81604051602001613fdd9190619551565b6040516020818303038152906040526040517f220266b60000000000000000000000000000000000000000000000000000000081526004016140209291906195b0565b60405180910390fd5b505b61403f67146b4887806fe10b60c01b613b0b565b8a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401614073919061962c565b60405180910390fd5b5b614097565b61409667e06ee38d2d3dbf4260c01b613b0b565b5b5b6140ac676f5dbd21c9125cd860c01b613b0b565b5a8503870196506140c7679a948bc5f171402a60c01b613b0b565b81870295506140e06710d5f3f58edb5dd060c01b613b0b565b6140f46725c8ddccd2a1e2a260c01b613b0b565b858960400151101561416557614114673818924813f43e5260c01b613b0b565b6141286792b7decf890025c960c01b613b0b565b8a6040517f220266b600000000000000000000000000000000000000000000000000000000815260040161415c91906196a6565b60405180910390fd5b614179674e6856a4e466aef260c01b613b0b565b61418d67d6c35d57572b966260c01b613b0b565b6141a1676f729716f62a808760c01b613b0b565b6000868a604001510390506141c0676d15de463b359f1c60c01b613b0b565b6141d46771b7ab82d62d097e60c01b613b0b565b6141de8582613933565b6141f16679db7ebbddfe4460c01b613b0b565b61420567e86c122c2992c0e560c01b613b0b565b600080600281111561421a57614219619370565b5b8c600281111561422d5761422c619370565b5b149050614244677efc529e88ddb75560c01b613b0b565b61425867c9be395154365aea60c01b613b0b565b8460a0015173ffffffffffffffffffffffffffffffffffffffff16856000015173ffffffffffffffffffffffffffffffffffffffff168c602001517f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f8860200151858d8f6040516142cc94939291906196d4565b60405180910390a45050505050505095945050505050565b6000806142fb67d34039aa0eb98c0960c01b613b0b565b61430f67a2181ff15855e33660c01b613b0b565b614323674f71979477c58c0260c01b613b0b565b60005a905061433c674f3e95a6ed4f6b5c60c01b613b0b565b614350671548a9d28bcff14b60c01b613b0b565b60008460000151905061436d67c9be5937a3943cc660c01b613b0b565b6143816758083866582be81060c01b613b0b565b61438b868261587c565b61439f67acd417f7c00b05ee60c01b613b0b565b6143a886612726565b8560200181815250506143c567afe5ef3d1d5b4e1a60c01b613b0b565b6143d9674f702fee37dcbfb160c01b613b0b565b60008661010001358760e0013583604001518460600151856080015117171717905061440f67e8d5a024d52514cb60c01b613b0b565b6144236770f91e936fc96c3b60c01b613b0b565b614437671f7dbd98090f551c60c01b613b0b565b6effffffffffffffffffffffffffffff801681111561448b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161448290619765565b60405180910390fd5b61449f679f62e1c6356d897e60c01b613b0b565b6144b367c4e70ab68d1a143960c01b613b0b565b6144c767c024a9b41cfafa7b60c01b613b0b565b60006144dd673d278ceaae9da29260c01b613b0b565b6144f167eeebf912e8fa4d4560c01b613b0b565b60006144fc84615bb4565b905061451267944a669b823630a660c01b613b0b565b61451e8a8a8a84615ce9565b809850819350505061453a672778705697a3977f60c01b613b0b565b61454e67e32c1dea5c52d0a260c01b613b0b565b6145566155a4565b61456a673f4c9e91048b950d60c01b613b0b565b61457e67e926034c4f53607360c01b613b0b565b6060614594670ea6529725653f1e60c01b613b0b565b6145a867955e6f66cb6400b660c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168560a0015173ffffffffffffffffffffffffffffffffffffffff1614614622576145f467ad071a44a92945a760c01b613b0b565b61460867a4cf53b3e8c9c3d460c01b613b0b565b6146158b8b8b85876163b0565b8098508192505050614637565b614636675108d43cde40cef460c01b613b0b565b5b61464b67b6ced13152ad086660c01b613b0b565b61465f67374f6f1e5358cd8f60c01b613b0b565b614673670652c7dd31993eb260c01b613b0b565b60005a8703905061468e678787f1dfcb14d78160c01b613b0b565b6146a2674fff11e75095ecf760c01b613b0b565b808b60a001351015614713576146c267b6ad64f0ab06bd8360c01b613b0b565b6146d6677e3c403c9d7eebd760c01b613b0b565b8b6040517f220266b600000000000000000000000000000000000000000000000000000000815260040161470a91906197d1565b60405180910390fd5b61472767486710f8ebff249e60c01b613b0b565b61473b67472da05a38066eaa60c01b613b0b565b828a60400181815250506147596773e329a6db5ba88360c01b613b0b565b614762826168c7565b8a606001818152505061477f672ecdde0ebb1f8ef960c01b613b0b565b8a60c001355a8803018a608001818152505050505050505050935093915050565b6147b4674d137f3badf8ea9660c01b613b0b565b6147c8676fa0d92ceccb5a2a60c01b613b0b565b6147dc673b2714f3b47d62dc60c01b613b0b565b6000806147e8856168f9565b91509150614800673e1b0c9df74a838f60c01b613b0b565b614814674284769e521acdfe60c01b613b0b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146148ac5761485b67999d03d25266223d60c01b613b0b565b61486f67160271be6e43056060c01b613b0b565b856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016148a3919061984b565b60405180910390fd5b6148c06746288d5b7730fc0f60c01b613b0b565b6148d4670621ff31260af8f860c01b613b0b565b6148e8673f71452c68a3856f60c01b613b0b565b80156149535761490267e32f67b676bbc2c860c01b613b0b565b61491667efa3849e8647f22b60c01b613b0b565b856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161494a91906198c5565b60405180910390fd5b6149676775e74b25646337da60c01b613b0b565b61497b673041f334f105bbcc60c01b613b0b565b61498f6772a50700a0abbcec60c01b613b0b565b60006149a5672fd487ba5e39b45e60c01b613b0b565b6149ae856168f9565b80935081925050506149ca6748ccb3962c4b88e260c01b613b0b565b6149de673a59b5d47e6b315b60c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614614a7757614a266796027ee26ef1bdd160c01b613b0b565b614a3a672377b5c640dca54460c01b613b0b565b866040517f220266b6000000000000000000000000000000000000000000000000000000008152600401614a6e919061993f565b60405180910390fd5b614a8b6720c4adeca4b97c2f60c01b613b0b565b614a9f675a62abfc40a7be0f60c01b613b0b565b614ab367bb216ff411c11cd660c01b613b0b565b8115614b1e57614acd67c507a302a88d010a60c01b613b0b565b614ae16753c5dc6542460b6c60c01b613b0b565b866040517f220266b6000000000000000000000000000000000000000000000000000000008152600401614b1591906199df565b60405180910390fd5b614b326719adbd2e485c39ed60c01b613b0b565b50505050505050565b6000614b51670528304b9a4e276660c01b613b0b565b614b65671dc140e2ccab3fd260c01b613b0b565b614b7967b1fb421bdae9b06560c01b613b0b565b60005a9050614b926773c737e49b0ea73f60c01b613b0b565b614ba667bbe717af0b97d78660c01b613b0b565b6000614bb584606001516156f4565b9050614bcb670b031524c09bd43560c01b613b0b565b614bdf67dd83a019dc10b8a760c01b613b0b565b3073ffffffffffffffffffffffffffffffffffffffff16631d732756868060600190614c0b9190618644565b87856040518563ffffffff1660e01b8152600401614c2c9493929190619b2b565b6020604051808303816000875af1925050508015614c6857506040513d601f19601f82011682018060405250810190614c659190619b89565b60015b614def57614c8067ee73b3f231df63cd60c01b613b0b565b614c94673df6104dd8c6a59f60c01b613b0b565b6000614caa67b6b64d39ea0f734160c01b613b0b565b60206000803e6000519050614cc967766ce98d80aa790960c01b613b0b565b614cdd677458a05b861c89c760c01b613b0b565b7fdeaddead000000000000000000000000000000000000000000000000000000008103614d6957614d1867b9a9e7f3da56988660c01b613b0b565b614d2c67156d16e5b508173660c01b613b0b565b866040517f220266b6000000000000000000000000000000000000000000000000000000008152600401614d609190619c02565b60405180910390fd5b614d7d673ee36b6cc848591160c01b613b0b565b614d9167353fe0d2f8fbd62460c01b613b0b565b614da56778239086464ad93560c01b613b0b565b600085608001515a85614db8919061837e565b614dc2919061802a565b9050614dd8671f888209a792f39360c01b613b0b565b614de6886002888685613ba7565b94505050614e08565b614e0367ae9ba21330eb831060c01b613b0b565b809350505b50509392505050565b614e2567ce4eaf1e3ecebc0a60c01b613b0b565b614e39678e806c1eb151833360c01b613b0b565b614e4d671b9353e0132c568860c01b613b0b565b614e61674f109bdea6b6dd4060c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603614ed0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614ec790619c7c565b60405180910390fd5b614ee46786cdbf06ae0d6c9960c01b613b0b565b614ef8679a4fd059eeb243bf60c01b613b0b565b614f0c6755929728ee06af6e60c01b613b0b565b60008273ffffffffffffffffffffffffffffffffffffffff1682604051614f3290618461565b60006040518083038185875af1925050503d8060008114614f6f576040519150601f19603f3d011682016040523d82523d6000602084013e614f74565b606091505b50509050614f8c672c7ae608d7ee218660c01b613b0b565b614fa067632c47631756cf7960c01b613b0b565b614fb467fa7aba00a44115ad60c01b613b0b565b80614ff4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614feb90619ce8565b60405180910390fd5b61500867c324c947c6690a3760c01b613b0b565b505050565b6000615023676ef62f88472d66ea60c01b616a2e565b61503767b557b889e8f81d6f60c01b616a2e565b61504b67656ff2fa1b6bb2b760c01b616a2e565b61505482616a31565b805190602001209050919050565b6150766726d7141481ab323560c01b613b0b565b61508a676e07210c39e4486260c01b613b0b565b61509e67a5955441815976cb60c01b613b0b565b3073ffffffffffffffffffffffffffffffffffffffff1663957122ab8280604001906150ca9190618644565b8460000160208101906150dd9190617ad2565b858061012001906150ee9190618644565b6040518663ffffffff1660e01b815260040161510e959493929190619d08565b60006040518083038186803b15801561512657600080fd5b505afa925050508015615137575060015b61522657615143619432565b806308c379a0036152155750615157619454565b806151625750615217565b615176678ad6c6220dff946760c01b613b0b565b61518a673edaf9b29bc58cfa60c01b613b0b565b60008151146151fb576151a76791345e2a34de5be160c01b613b0b565b6151bb6751e54c767bab910360c01b613b0b565b6000816040517f220266b60000000000000000000000000000000000000000000000000000000081526004016151f2929190619d8c565b60405180910390fd5b61520f67936ff6bb34bef0d560c01b613b0b565b50615221565b505b3d6000803e3d6000fd5b615227565b5b50565b615232617327565b61524667e69f7455fa7a07b360c01b616ac3565b61525a67b4cd7af03ea2c5fa60c01b616ac3565b61526e67ada53efb1dfccb7760c01b616ac3565b600061527984616ac6565b905061528f674d0f716f7bcb7b9260c01b616ac3565b6152a367d63d53a2153b304860c01b616ac3565b60006152ae84616ac6565b90506152c46722fc217c8bb3a21260c01b616ac3565b6152d867d43a06a00665043560c01b616ac3565b6000826000015190506152f567151bc2b1c770894460c01b616ac3565b6153096732841106c226c6e260c01b616ac3565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361537157615351671aace643f445af3c60c01b616ac3565b61536567b767f16e441c791560c01b616ac3565b81600001519050615386565b6153856721f72ae527759e0160c01b616ac3565b5b61539a67976cb73ee93faf4060c01b616ac3565b6153ae67fbc1cf9b45ac9e0560c01b616ac3565b6000836020015190506153cb675ae02cf73427453160c01b616ac3565b6153df672f3e3d635ca3dee260c01b616ac3565b6000846040015190506153fc67d85c8bdd30a53c2060c01b616ac3565b61541067479ce7ff317d61d960c01b616ac3565b60008460200151905061542d6748cd0366f66a74d660c01b616ac3565b61544167233a1ba95415d76360c01b616ac3565b60008560400151905061545e67f891c3f91e3987cf60c01b616ac3565b61547267ee2ac2151246907660c01b616ac3565b8165ffffffffffff168465ffffffffffff1610156154a65761549e677765bdded08f417460c01b616ac3565b8193506154bb565b6154ba673db76e2382591bc460c01b616ac3565b5b6154cf67bbd9ea227d2e8b6160c01b616ac3565b6154e367269600f4d05d62c160c01b616ac3565b8065ffffffffffff168365ffffffffffff1611156155175761550f67769c64441515ae4760c01b616ac3565b80925061552c565b61552b6792508f8b38fce31860c01b616ac3565b5b61554067c4465d6321fbb3e560c01b616ac3565b61555467d764ee64c31d59fd60c01b616ac3565b60405180606001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018565ffffffffffff1681526020018465ffffffffffff1681525097505050505050505092915050565b6155b867af03e0b4035ea55660c01b613b0b565b6155cc67c9620b9c790e33cb60c01b613b0b565b43600052565b6155da61730d565b6155ee67ddd75e05ea2d470b60c01b610422565b6156026714178d6d1eec377660c01b610422565b61561667ed0c0f5c0a4f897960c01b610422565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905061566c6796c6174e6db8a70c60c01b610422565b80600001600f9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168260000181815250506156b867a2474a1809029c6460c01b610422565b8060010160009054906101000a900463ffffffff1663ffffffff1682602001818152505050919050565b600060019050919050565b6000919050565b606061570a678ccfdf63a27f24a160c01b613b0b565b61571e67ec4fc9a45c4cbeda60c01b613b0b565b819050919050565b50565b600061573f6723710d455cbd1fc260c01b613b0b565b615753678552644400882c5660c01b613b0b565b61576767acd0ff56e29caf5760c01b613b0b565b61577b6790173f487bf921c360c01b613b0b565b60008260c0015190506157986788011b89016c87e660c01b613b0b565b6157ac67eabe9d1df1872cb860c01b613b0b565b60008360e0015190506157c96780eabf868b5a2d7860c01b613b0b565b6157dd673a9f497be6de2ad960c01b613b0b565b80820361582a576157f8678e77373db57e0bad60c01b613b0b565b61580c67e9b1eb10be1bde8160c01b613b0b565b615820671cf2ad91872d569360c01b613b0b565b8192505050615877565b61583e67e69ed61328bcf05760c01b613b0b565b61585267f003812ff22f97f660c01b613b0b565b6158666780449873cf826ce860c01b613b0b565b61587282488301616c67565b925050505b919050565b6158906794398c88f005709f60c01b613b0b565b6158a4672b03b3419c14484c60c01b613b0b565b8160000160208101906158b79190617ad2565b816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506159026793d9e770a6faaa2f60c01b613b0b565b816020013581602001818152505061592467139dbe991306ae9c60c01b613b0b565b816080013581604001818152505061594667f0718aa2010e8b9560c01b613b0b565b8160a0013581606001818152505061596867ad45b8a29a93eeab60c01b613b0b565b8160c0013581608001818152505061598a67466bf6fad93902ac60c01b613b0b565b8160e001358160c00181815250506159ac672b132ec41befa5cd60c01b613b0b565b8161010001358160e00181815250506159cf67dd742c4ce53972e660c01b613b0b565b6159e36763014b2d1488f93260c01b613b0b565b366000838061012001906159f79190618644565b91509150615a0f676a2e7bfc8710069c60c01b613b0b565b615a236780511592895b61c960c01b613b0b565b6000828290501115615b4c57615a4367eb7fb348aa1ce84260c01b613b0b565b615a576744ab1d52d3a7326f60c01b613b0b565b615a6b675c26b2f94c28f87460c01b613b0b565b615a7f679001d1e1aa36379560c01b613b0b565b6014828290501015615ac6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615abd90619e08565b60405180910390fd5b615ada6790a6340ef2e7fe5560c01b613b0b565b615aee67d6fdc4d38c3f1d0a60c01b613b0b565b8181600090601492615b0293929190618b30565b90615b0d9190618baf565b60601c8360a0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050615bae565b615b606726722d51917cb4b860c01b613b0b565b615b7467b81fb2bb3b12cb4d60c01b613b0b565b60008360a0019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b50505050565b6000615bca67aad98d6154acdcd760c01b613b0b565b615bde67b73e465bf9e52b6160c01b613b0b565b615bf267f10067438ecb862a60c01b613b0b565b615c0667c4a4fe6ede678b5760c01b613b0b565b60008073ffffffffffffffffffffffffffffffffffffffff168360a0015173ffffffffffffffffffffffffffffffffffffffff1614158015615c585750615c5767d835fc68629f38cd60c01b6156e2565b5b80615c735750615c7267117b2d6966bdaf0160c01b6156ed565b5b615c7e576001615c81565b60035b60ff169050615c9a67700816a1e3bb6d7060c01b613b0b565b615cae6744c1d1938606be1b60c01b613b0b565b6000836080015182856060015102856040015101019050615cd9671f763ace8f3bd88260c01b613b0b565b8360c00151810292505050919050565b600080615d0067d4e9699b2987ab0760c01b613b0b565b615d14675d8d1e834eef448f60c01b613b0b565b615d28672a8009d8c4675d0060c01b613b0b565b615d3c67d1a16c3013ed626460c01b613b0b565b60005a9050615d55672177cad0712c948960c01b613b0b565b615d6967df910ae4468fb24e60c01b613b0b565b600085600001519050615d8667c0879bee2d658afa60c01b613b0b565b615d9a67feb8ebb8a16f14c160c01b613b0b565b600081600001519050615db7670f5581ebd890213060c01b613b0b565b615dcb67f731688142019ef360c01b613b0b565b615de589888a8060400190615de09190618644565b616cf3565b615df967716d94d66ad0a57c60c01b613b0b565b615e0d671a28f26b5f8bf60360c01b613b0b565b60008260a001519050615e2a6729383920594cbefd60c01b613b0b565b615e3e67a10f5e1e6e0cc5f160c01b613b0b565b615e466155a4565b615e5a6733ca9099d32a694360c01b613b0b565b615e6e67356738e8d94640f260c01b613b0b565b6000615e8467f63877a5811722d860c01b613b0b565b615e9867b3c691595510b94960c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603615f7a57615ee067ce50778bc4ab94f860c01b613b0b565b615ef4678727f7e2a4b5b24960c01b613b0b565b615f0867dd1f12ecfec9826660c01b613b0b565b6000615f1384612293565b9050615f29676f78bed3432c062760c01b613b0b565b8881118015615f485750615f476749348aa66d657c5460c01b6156e2565b5b80615f635750615f6267e1b4631d968b658a60c01b6156ed565b5b615f6f57808903615f72565b60005b915050615f8f565b615f8e67277fbdb87062126f60c01b613b0b565b5b615fa3679b9f439e0fe1fd8760c01b613b0b565b615fb7676295b15d043a50e760c01b613b0b565b8273ffffffffffffffffffffffffffffffffffffffff16633a871cdd85606001518c8c60200151856040518563ffffffff1660e01b8152600401615ffd93929190619f8c565b60206040518083038160008887f19350505050801561603a57506040513d601f19601f820116820180604052508101906160379190619b89565b60015b61612a57616046619432565b806308c379a0036160d7575061605a619454565b8061606557506160d9565b61607967af349b3257cee67a60c01b613b0b565b8b8160405160200161608b9190619ff0565b6040516020818303038152906040526040517f220266b60000000000000000000000000000000000000000000000000000000081526004016160ce9291906195b0565b60405180910390fd5b505b6160ed6749f99c326384549e60c01b613b0b565b8a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401616121919061a062565b60405180910390fd5b61613e67b542a0d7e71e5c8c60c01b613b0b565b8096505061615667a32d24326b1c513a60c01b613b0b565b61616a673182b8e917179af560c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603616374576161b267d40966d106ca1f5760c01b613b0b565b6161c667571f1ba350ae084a60c01b613b0b565b6161da670b792efad629a34560c01b613b0b565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050616230670aab76fae7ce329860c01b613b0b565b616244674898c4c8721c6a3360c01b613b0b565b60008160000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16905061628b67939153321635a50460c01b613b0b565b61629f67ba578c349170678360c01b613b0b565b808a111561630c576162bb67888110dcc13924a960c01b613b0b565b6162cf678ba8141c00e1655b60c01b613b0b565b8c6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401616303919061a0dc565b60405180910390fd5b61632067b6199e7bfd865bf760c01b613b0b565b616334676cb4afd9c3644be460c01b613b0b565b8981038260000160006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff1602179055505050616389565b6163886707bc50531c774ab760c01b613b0b565b5b61639d67171a32dcde207a7560c01b613b0b565b5a85039650505050505094509492505050565b606060006163c8675abf7e4ac0e494db60c01b613b0b565b6163dc67aa1a5efdea46787f60c01b613b0b565b6163f067c3a27ebce7e1f4d560c01b613b0b565b616404674ba0c76546e38a7360c01b613b0b565b60008560000151905061642167f6d1634a9dbac5d560c01b613b0b565b616435676826ba9160765dfd60c01b613b0b565b600081606001519050616452671294154b32167c9760c01b613b0b565b616466672e05d8ba9e541b5860c01b613b0b565b61647a67f25cf8fae769115960c01b613b0b565b8481116164bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016164b39061a156565b60405180910390fd5b6164d06762aeaad29e31b57660c01b613b0b565b6164e467aeda739beecf882b60c01b613b0b565b6164f8678c0a9d287bf901aa60c01b613b0b565b6000858203905061651367ab13dece76541fa960c01b613b0b565b6165276703242ac27d96239460c01b613b0b565b60008360a00151905061654467e064ed7711e4f44160c01b613b0b565b61655867bb123bccc54e13cc60c01b613b0b565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506165ae6731703428f7c074ed60c01b613b0b565b6165c267ac6c000120bac21a60c01b613b0b565b60008160000160009054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16905061660967af23c4bd6be76ee060c01b613b0b565b61661d67cd839a6f0c36e7ba60c01b613b0b565b8981101561668a5761663967d2cc586f1fba6ede60c01b613b0b565b61664d671630900ed293652460c01b613b0b565b8c6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401616681919061a1c2565b60405180910390fd5b61669e677b787fd8d0eec8fc60c01b613b0b565b6166b2677965fa12a09ffed060c01b613b0b565b8981038260000160006101000a8154816dffffffffffffffffffffffffffff02191690836dffffffffffffffffffffffffffff1602179055506166ff67c9536eaa4d6b721b60c01b613b0b565b616713673f97a3760e8e42d560c01b613b0b565b8273ffffffffffffffffffffffffffffffffffffffff1663f465c77e858e8e602001518e6040518563ffffffff1660e01b815260040161675593929190619f8c565b60006040518083038160008887f19350505050801561679757506040513d6000823e3d601f19601f82011682018060405250810190616794919061a260565b60015b616887576167a3619432565b806308c379a00361683457506167b7619454565b806167c25750616836565b6167d667c38841f5bb426dc460c01b613b0b565b8d816040516020016167e8919061a2e2565b6040516020818303038152906040526040517f220266b600000000000000000000000000000000000000000000000000000000815260040161682b9291906195b0565b60405180910390fd5b505b61684a67931a78f9e11717bb60c01b613b0b565b8c6040517f220266b600000000000000000000000000000000000000000000000000000000815260040161687e919061a354565b60405180910390fd5b61689b67d768037340671b7260c01b613b0b565b8199506168b267b051c398d37aeff560c01b613b0b565b80985050505050505050509550959350505050565b60006168dd6707014686f499504560c01b613b0b565b6168f16796709f10a759b60c60c01b613b0b565b819050919050565b600080616910674a13673f083cae7d60c01b613b0b565b616924674b63ab113bc3c6f460c01b613b0b565b616938672ffe021986d2217f60c01b613b0b565b600083036169885761695467d14111b5c0dc71b060c01b613b0b565b61696867717cc1608b786d6060c01b613b0b565b61697c676bcd67da856e0d2b60c01b613b0b565b60008091509150616a29565b61699c6728b87be4bd233a0860c01b613b0b565b6169b0675f83ae33b5d720b960c01b613b0b565b6169c467afa51eaba4ada43360c01b613b0b565b60006169cf84616ac6565b90506169e5677f2983a6aeb6e19c60c01b613b0b565b806040015165ffffffffffff16421180616a0a5750806020015165ffffffffffff1642105b9150616a2067c7bf9050789fae5e60c01b613b0b565b80600001519250505b915091565b50565b6060616a47670dec2dbb958a50d860c01b616a2e565b616a5b67f7ebcbf78dfbd2e760c01b616a2e565b616a6f67cf9d9e801922f74560c01b616a2e565b36600083806101400190616a839190618644565b91509150616a9b670c9fe5e21e8be86a60c01b616a2e565b8360208184030360405194506020810185016040528085528082602087013750505050919050565b50565b616ace617327565b616ae267445255dfc48f0c1160c01b616ac3565b616af667910e9ceb2fd1ddda60c01b616ac3565b616b0a678110ad95ab238bef60c01b616ac3565b6000829050616b2367c37597af64d819b260c01b616ac3565b616b3767745df2de1e3ff8c060c01b616ac3565b600060a084901c9050616b54675f3ae0fbd8e35c5660c01b616ac3565b616b68679197384898b1248760c01b616ac3565b60008165ffffffffffff1603616bae57616b8c676ec2d105430e80aa60c01b616ac3565b616ba0673b4825f59f411ff360c01b616ac3565b65ffffffffffff9050616bc3565b616bc267d11e3810d26f91af60c01b616ac3565b5b616bd767b9e858fecf1822cf60c01b616ac3565b616beb67d84bfe2ecd699a3c60c01b616ac3565b600060d085901c9050616c0867bf26ab64782cc21560c01b616ac3565b616c1c6716b05318dd950b3260c01b616ac3565b60405180606001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018265ffffffffffff1681526020018365ffffffffffff168152509350505050919050565b6000616c7d6722175c0f9d46245a60c01b613b0b565b616c9167751619bcb02f97fd60c01b613b0b565b616ca567a2f19de15cde753c60c01b613b0b565b8183108015616cc45750616cc3677ff3f31aa240539460c01b6156e2565b5b80616cdf5750616cde67a156eae91ca1679a60c01b6156ed565b5b616ce95781616ceb565b825b905092915050565b616d076714b81b82e0d404e260c01b613b0b565b616d1b67ad5b2c067f5370fa60c01b613b0b565b616d2f67cb8395f833ee94b360c01b613b0b565b6000828290501461725b57616d4e673d934ef1a627c4d660c01b613b0b565b616d6267b1c545fef9fce3e760c01b613b0b565b616d7667ee209361e09d4b3060c01b613b0b565b60008360000151600001519050616d9767e453fe3e3c27ec0960c01b613b0b565b616dab67b335d211cfd6199a60c01b613b0b565b60008173ffffffffffffffffffffffffffffffffffffffff163b14616e2f57616dde67d17238321e17c45860c01b613b0b565b616df2675da8a164ebc30e0260c01b613b0b565b846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401616e26919061a3ce565b60405180910390fd5b616e43673be16346b366dcea60c01b613b0b565b616e5767d1050ad5ac855c1060c01b613b0b565b616e6b67516cdd3b5eb6451f60c01b613b0b565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516060015186866040518463ffffffff1660e01b8152600401616ed1929190618cbd565b60206040518083038160008887f1158015616ef0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190616f159190618cf6565b9050616f2b679ddc0b7480cf28f060c01b613b0b565b616f3f67fc851e2e35e3d69c60c01b613b0b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603616fd857616f87671705c928229b781960c01b613b0b565b616f9b6742acc096bd718a9060c01b613b0b565b856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401616fcf919061a448565b60405180910390fd5b616fec67ee2c1185c379a99b60c01b613b0b565b617000677b2608bd6112326460c01b613b0b565b6170146727a18a42769c8c7660c01b613b0b565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146170ac5761705b67fd1907cc849a07c260c01b613b0b565b61706f673adcce53dd1d53dc60c01b613b0b565b856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016170a3919061a4c2565b60405180910390fd5b6170c0679cbade85ccd08c4860c01b613b0b565b6170d467613cfc3cdff81b5c60c01b613b0b565b6170e867a824c7345ac3349d60c01b613b0b565b60008173ffffffffffffffffffffffffffffffffffffffff163b0361716c5761711b672c8b8acf7bac64f660c01b613b0b565b61712f676f72c43fa57e965a60c01b613b0b565b856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401617163919061a53c565b60405180910390fd5b61718067b6e6772723fa2a5660c01b613b0b565b6171946734b6cd6bbc43764260c01b613b0b565b6171a86725edc697080da99960c01b613b0b565b600084846000906014926171be93929190618b30565b906171c99190618baf565b60601c90506171e2671ddd5ee48b1a7f4660c01b613b0b565b6171f667f1990a72ac6f6e5660c01b613b0b565b8273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160a0015160405161724b92919061a56a565b60405180910390a3505050617270565b61726f678620bc314972512460c01b613b0b565b5b50505050565b6040518060a0016040528061728961736e565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a0016040528060006dffffffffffffffffffffffffffff16815260200160001515815260200160006dffffffffffffffffffffffffffff168152602001600063ffffffff168152602001600065ffffffffffff1681525090565b604051806040016040528060008152602001600081525090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600065ffffffffffff168152602001600065ffffffffffff1681525090565b604051806101000160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b6000604051905090565b600080fd5b600080fd5b600063ffffffff82169050919050565b61740c816173f3565b811461741757600080fd5b50565b60008135905061742981617403565b92915050565b600060208284031215617445576174446173e9565b5b60006174538482850161741a565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6174af82617466565b810181811067ffffffffffffffff821117156174ce576174cd617477565b5b80604052505050565b60006174e16173df565b90506174ed82826174a6565b919050565b600067ffffffffffffffff82111561750d5761750c617477565b5b61751682617466565b9050602081019050919050565b82818337600083830152505050565b6000617545617540846174f2565b6174d7565b90508281526020810184848401111561756157617560617461565b5b61756c848285617523565b509392505050565b600082601f8301126175895761758861745c565b5b8135617599848260208601617532565b91505092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006175d2826175a7565b9050919050565b6175e2816175c7565b81146175ed57600080fd5b50565b6000813590506175ff816175d9565b92915050565b6000819050919050565b61761881617605565b811461762357600080fd5b50565b6000813590506176358161760f565b92915050565b60006101008284031215617652576176516175a2565b5b61765d6101006174d7565b9050600061766d848285016175f0565b600083015250602061768184828501617626565b602083015250604061769584828501617626565b60408301525060606176a984828501617626565b60608301525060806176bd84828501617626565b60808301525060a06176d1848285016175f0565b60a08301525060c06176e584828501617626565b60c08301525060e06176f984828501617626565b60e08301525092915050565b6000819050919050565b61771881617705565b811461772357600080fd5b50565b6000813590506177358161770f565b92915050565b60006101808284031215617752576177516175a2565b5b61775c60a06174d7565b9050600061776c8482850161763b565b60008301525061010061778184828501617726565b60208301525061012061779684828501617626565b6040830152506101406177ab84828501617626565b6060830152506101606177c084828501617626565b60808301525092915050565b600080fd5b600080fd5b60008083601f8401126177ec576177eb61745c565b5b8235905067ffffffffffffffff811115617809576178086177cc565b5b602083019150836001820283011115617825576178246177d1565b5b9250929050565b6000806000806101c08587031215617847576178466173e9565b5b600085013567ffffffffffffffff811115617865576178646173ee565b5b61787187828801617574565b94505060206178828782880161773b565b9350506101a085013567ffffffffffffffff8111156178a4576178a36173ee565b5b6178b0878288016177d6565b925092505092959194509250565b6178c781617605565b82525050565b60006020820190506178e260008301846178be565b92915050565b60008083601f8401126178fe576178fd61745c565b5b8235905067ffffffffffffffff81111561791b5761791a6177cc565b5b602083019150836020820283011115617937576179366177d1565b5b9250929050565b6000617949826175a7565b9050919050565b6179598161793e565b811461796457600080fd5b50565b60008135905061797681617950565b92915050565b600080600060408486031215617995576179946173e9565b5b600084013567ffffffffffffffff8111156179b3576179b26173ee565b5b6179bf868287016178e8565b935093505060206179d286828701617967565b9150509250925092565b600080604083850312156179f3576179f26173e9565b5b6000617a0185828601617967565b9250506020617a1285828601617626565b9150509250929050565b60008083601f840112617a3257617a3161745c565b5b8235905067ffffffffffffffff811115617a4f57617a4e6177cc565b5b602083019150836020820283011115617a6b57617a6a6177d1565b5b9250929050565b600080600060408486031215617a8b57617a8a6173e9565b5b600084013567ffffffffffffffff811115617aa957617aa86173ee565b5b617ab586828701617a1c565b93509350506020617ac886828701617967565b9150509250925092565b600060208284031215617ae857617ae76173e9565b5b6000617af6848285016175f0565b91505092915050565b60006dffffffffffffffffffffffffffff82169050919050565b617b2281617aff565b82525050565b60008115159050919050565b617b3d81617b28565b82525050565b617b4c816173f3565b82525050565b600065ffffffffffff82169050919050565b617b6d81617b52565b82525050565b60a082016000820151617b896000850182617b19565b506020820151617b9c6020850182617b34565b506040820151617baf6040850182617b19565b506060820151617bc26060850182617b43565b506080820151617bd56080850182617b64565b50505050565b600060a082019050617bf06000830184617b73565b92915050565b600080600080600060608688031215617c1257617c116173e9565b5b600086013567ffffffffffffffff811115617c3057617c2f6173ee565b5b617c3c888289016177d6565b95509550506020617c4f888289016175f0565b935050604086013567ffffffffffffffff811115617c7057617c6f6173ee565b5b617c7c888289016177d6565b92509250509295509295909350565b60008060208385031215617ca257617ca16173e9565b5b600083013567ffffffffffffffff811115617cc057617cbf6173ee565b5b617ccc858286016177d6565b92509250509250929050565b600080fd5b60006101608284031215617cf457617cf3617cd8565b5b81905092915050565b600060208284031215617d1357617d126173e9565b5b600082013567ffffffffffffffff811115617d3157617d306173ee565b5b617d3d84828501617cdd565b91505092915050565b617d4f81617705565b82525050565b6000602082019050617d6a6000830184617d46565b92915050565b600060208284031215617d8657617d856173e9565b5b6000617d9484828501617967565b91505092915050565b60008060008060608587031215617db757617db66173e9565b5b600085013567ffffffffffffffff811115617dd557617dd46173ee565b5b617de187828801617cdd565b9450506020617df2878288016175f0565b935050604085013567ffffffffffffffff811115617e1357617e126173ee565b5b617e1f878288016177d6565b925092505092959194509250565b617e3681617aff565b82525050565b617e4581617b28565b82525050565b617e54816173f3565b82525050565b617e6381617b52565b82525050565b600060a082019050617e7e6000830188617e2d565b617e8b6020830187617e3c565b617e986040830186617e2d565b617ea56060830185617e4b565b617eb26080830184617e5a565b9695505050505050565b6000819050919050565b6000617ee1617edc617ed784617aff565b617ebc565b617605565b9050919050565b617ef181617ec6565b82525050565b6000602082019050617f0c6000830184617ee8565b92915050565b600082825260208201905092915050565b7f6d757374207370656369667920756e7374616b652064656c6179000000000000600082015250565b6000617f59601a83617f12565b9150617f6482617f23565b602082019050919050565b60006020820190508181036000830152617f8881617f4c565b9050919050565b7f63616e6e6f7420646563726561736520756e7374616b652074696d6500000000600082015250565b6000617fc5601c83617f12565b9150617fd082617f8f565b602082019050919050565b60006020820190508181036000830152617ff481617fb8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061803582617605565b915061804083617605565b925082820190508082111561805857618057617ffb565b5b92915050565b7f6e6f207374616b65207370656369666965640000000000000000000000000000600082015250565b6000618094601283617f12565b915061809f8261805e565b602082019050919050565b600060208201905081810360008301526180c381618087565b9050919050565b7f7374616b65206f766572666c6f77000000000000000000000000000000000000600082015250565b6000618100600e83617f12565b915061810b826180ca565b602082019050919050565b6000602082019050818103600083015261812f816180f3565b9050919050565b600061815161814c618147846173f3565b617ebc565b617605565b9050919050565b61816181618136565b82525050565b600060408201905061817c60008301856178be565b6181896020830184618158565b9392505050565b7f4141393220696e7465726e616c2063616c6c206f6e6c79000000000000000000600082015250565b60006181c6601783617f12565b91506181d182618190565b602082019050919050565b600060208201905081810360008301526181f5816181b9565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561823657808201518184015260208101905061821b565b60008484015250505050565b600061824d826181fc565b6182578185618207565b9350618267818560208601618218565b61827081617466565b840191505092915050565b600060408201905061829060008301856178be565b81810360208301526182a28184618242565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600161016003833603038112618306576183056182da565b5b80830191505092915050565b7f576974686472617720616d6f756e7420746f6f206c6172676500000000000000600082015250565b6000618348601983617f12565b915061835382618312565b602082019050919050565b600060208201905081810360008301526183778161833b565b9050919050565b600061838982617605565b915061839483617605565b92508282039050818111156183ac576183ab617ffb565b5b92915050565b60006183cd6183c86183c3846175a7565b617ebc565b6175a7565b9050919050565b60006183df826183b2565b9050919050565b60006183f1826183d4565b9050919050565b618401816183e6565b82525050565b600060408201905061841c60008301856183f8565b61842960208301846178be565b9392505050565b600081905092915050565b50565b600061844b600083618430565b91506184568261843b565b600082019050919050565b600061846c8261843e565b9150819050919050565b7f6661696c656420746f2077697468647261770000000000000000000000000000600082015250565b60006184ac601283617f12565b91506184b782618476565b602082019050919050565b600060208201905081810360008301526184db8161849f565b9050919050565b6000823560016060038336030381126184fe576184fd6182da565b5b80830191505092915050565b60008083356001602003843603038112618527576185266182da565b5b80840192508235915067ffffffffffffffff821115618549576185486182df565b5b602083019250602082023603831315618565576185646182e4565b5b509250929050565b6000618578826175c7565b9050919050565b6185888161856d565b811461859357600080fd5b50565b6000813590506185a58161857f565b92915050565b6000602082840312156185c1576185c06173e9565b5b60006185cf84828501618596565b91505092915050565b7f4141393620696e76616c69642061676772656761746f72000000000000000000600082015250565b600061860e601783617f12565b9150618619826185d8565b602082019050919050565b6000602082019050818103600083015261863d81618601565b9050919050565b60008083356001602003843603038112618661576186606182da565b5b80840192508235915067ffffffffffffffff821115618683576186826182df565b5b60208301925060018202360383131561869f5761869e6182e4565b5b509250929050565b600082825260208201905092915050565b6000819050919050565b60006186d160208401846175f0565b905092915050565b6186e2816175c7565b82525050565b60006186f76020840184617626565b905092915050565b61870881617605565b82525050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261873a57618739618718565b5b83810192508235915060208301925067ffffffffffffffff8211156187625761876161870e565b5b60018202360383131561877857618777618713565b5b509250929050565b600082825260208201905092915050565b600061879d8385618780565b93506187aa838584617523565b6187b383617466565b840190509392505050565b600061016083016187d260008401846186c2565b6187df60008601826186d9565b506187ed60208401846186e8565b6187fa60208601826186ff565b50618808604084018461871d565b858303604087015261881b838284618791565b9250505061882c606084018461871d565b858303606087015261883f838284618791565b9250505061885060808401846186e8565b61885d60808601826186ff565b5061886b60a08401846186e8565b61887860a08601826186ff565b5061888660c08401846186e8565b61889360c08601826186ff565b506188a160e08401846186e8565b6188ae60e08601826186ff565b506188bd6101008401846186e8565b6188cb6101008601826186ff565b506188da61012084018461871d565b8583036101208701526188ee838284618791565b9250505061890061014084018461871d565b858303610140870152618914838284618791565b925050508091505092915050565b600061892e83836187be565b905092915050565b6000823560016101600383360303811261895357618952618718565b5b82810191505092915050565b6000602082019050919050565b600061897883856186a7565b93508360208402850161898a846186b8565b8060005b878110156189ce5784840389526189a58284618936565b6189af8582618922565b94506189ba8361895f565b925060208a0199505060018101905061898e565b50829750879450505050509392505050565b60006189ec8385618207565b93506189f9838584617523565b618a0283617466565b840190509392505050565b60006040820190508181036000830152618a2881868861896c565b90508181036020830152618a3d8184866189e0565b905095945050505050565b618a51816175c7565b82525050565b6000602082019050618a6c6000830184618a48565b92915050565b6000618a7d82617605565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203618aaf57618aae617ffb565b5b600182019050919050565b7f41413230206163636f756e74206e6f74206465706c6f79656400000000000000600082015250565b6000618af0601983617f12565b9150618afb82618aba565b602082019050919050565b60006020820190508181036000830152618b1f81618ae3565b9050919050565b600080fd5b600080fd5b60008085851115618b4457618b43618b26565b5b83861115618b5557618b54618b2b565b5b6001850283019150848603905094509492505050565b600082905092915050565b60007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000082169050919050565b600082821b905092915050565b6000618bbb8383618b6b565b82618bc68135618b76565b92506014821015618c0657618c017fffffffffffffffffffffffffffffffffffffffff00000000000000000000000083601403600802618ba2565b831692505b505092915050565b7f41413330207061796d6173746572206e6f74206465706c6f7965640000000000600082015250565b6000618c44601b83617f12565b9150618c4f82618c0e565b602082019050919050565b60006020820190508181036000830152618c7381618c37565b9050919050565b6000618c87600083617f12565b9150618c928261843b565b600082019050919050565b60006020820190508181036000830152618cb681618c7a565b9050919050565b60006020820190508181036000830152618cd88184866189e0565b90509392505050565b600081519050618cf0816175d9565b92915050565b600060208284031215618d0c57618d0b6173e9565b5b6000618d1a84828501618ce1565b91505092915050565b6000606082019050618d386000830186617d46565b618d456020830185618a48565b618d5260408301846178be565b949350505050565b7f6e6f74207374616b656400000000000000000000000000000000000000000000600082015250565b6000618d90600a83617f12565b9150618d9b82618d5a565b602082019050919050565b60006020820190508181036000830152618dbf81618d83565b9050919050565b7f616c726561647920756e7374616b696e67000000000000000000000000000000600082015250565b6000618dfc601183617f12565b9150618e0782618dc6565b602082019050919050565b60006020820190508181036000830152618e2b81618def565b9050919050565b6000618e3d82617b52565b9150618e4883617b52565b9250828201905065ffffffffffff811115618e6657618e65617ffb565b5b92915050565b6000618e87618e82618e7d84617b52565b617ebc565b617605565b9050919050565b618e9781618e6c565b82525050565b6000602082019050618eb26000830184618e8e565b92915050565b7f4e6f207374616b6520746f207769746864726177000000000000000000000000600082015250565b6000618eee601483617f12565b9150618ef982618eb8565b602082019050919050565b60006020820190508181036000830152618f1d81618ee1565b9050919050565b7f6d7573742063616c6c20756e6c6f636b5374616b652829206669727374000000600082015250565b6000618f5a601d83617f12565b9150618f6582618f24565b602082019050919050565b60006020820190508181036000830152618f8981618f4d565b9050919050565b7f5374616b65207769746864726177616c206973206e6f74206475650000000000600082015250565b6000618fc6601b83617f12565b9150618fd182618f90565b602082019050919050565b60006020820190508181036000830152618ff581618fb9565b9050919050565b7f6661696c656420746f207769746864726177207374616b650000000000000000600082015250565b6000619032601883617f12565b915061903d82618ffc565b602082019050919050565b6000602082019050818103600083015261906181619025565b9050919050565b60006190748385618430565b9350619081838584617523565b82840190509392505050565b600061909a828486619068565b91508190509392505050565b600060c0820190506190bb60008301896178be565b6190c860208301886178be565b6190d56040830187617e5a565b6190e26060830186617e5a565b6190ef6080830185617e3c565b81810360a08301526191018184618242565b9050979650505050505050565b6000619119826181fc565b6191238185618780565b9350619133818560208601618218565b61913c81617466565b840191505092915050565b600060c08301600083015161915f60008601826186ff565b50602083015161917260208601826186ff565b5060408301516191856040860182617b34565b5060608301516191986060860182617b64565b5060808301516191ab6080860182617b64565b5060a083015184820360a08601526191c3828261910e565b9150508091505092915050565b6040820160008201516191e660008501826186ff565b5060208201516191f960208501826186ff565b50505050565b60408201600082015161921560008501826186ff565b50602082015161922860208501826186ff565b50505050565b60608201600082015161924460008501826186d9565b50602082015161925760208501826191ff565b50505050565b60006101408201905081810360008301526192788188619147565b905061928760208301876191d0565b61929460608301866191d0565b6192a160a08301856191d0565b6192ae60e083018461922e565b9695505050505050565b600060e08201905081810360008301526192d28187619147565b90506192e160208301866191d0565b6192ee60608301856191d0565b6192fb60a08301846191d0565b95945050505050565b7f6465706f736974206f766572666c6f7700000000000000000000000000000000600082015250565b600061933a601083617f12565b915061934582619304565b602082019050919050565b600060208201905081810360008301526193698161932d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106193b0576193af619370565b5b50565b60008190506193c18261939f565b919050565b60006193d1826193b3565b9050919050565b6193e1816193c6565b82525050565b60006060820190506193fc60008301866193d8565b818103602083015261940e8185618242565b905061941d60408301846178be565b949350505050565b60008160e01c9050919050565b600060033d11156194515760046000803e61944e600051619425565b90505b90565b600060443d106194e1576194666173df565b60043d036004823e80513d602482011167ffffffffffffffff8211171561948e5750506194e1565b808201805167ffffffffffffffff8111156194ac57505050506194e1565b80602083010160043d0385018111156194c95750505050506194e1565b6194d8826020018501866174a6565b82955050505050505b90565b7f4141353020706f73744f702072657665727465643a2000000000000000000000815250565b600081519050919050565b600081905092915050565b600061952b8261950a565b6195358185619515565b9350619545818560208601618218565b80840191505092915050565b600061955c826194e4565b60168201915061956c8284619520565b915081905092915050565b60006195828261950a565b61958c8185617f12565b935061959c818560208601618218565b6195a581617466565b840191505092915050565b60006040820190506195c560008301856178be565b81810360208301526195d78184619577565b90509392505050565b7f4141353020706f73744f70207265766572740000000000000000000000000000600082015250565b6000619616601283617f12565b9150619621826195e0565b602082019050919050565b600060408201905061964160008301846178be565b818103602083015261965281619609565b905092915050565b7f414135312070726566756e642062656c6f772061637475616c476173436f7374600082015250565b6000619690602083617f12565b915061969b8261965a565b602082019050919050565b60006040820190506196bb60008301846178be565b81810360208301526196cc81619683565b905092915050565b60006080820190506196e960008301876178be565b6196f66020830186617e3c565b61970360408301856178be565b61971060608301846178be565b95945050505050565b7f41413934206761732076616c756573206f766572666c6f770000000000000000600082015250565b600061974f601883617f12565b915061975a82619719565b602082019050919050565b6000602082019050818103600083015261977e81619742565b9050919050565b7f41413430206f76657220766572696669636174696f6e4761734c696d69740000600082015250565b60006197bb601e83617f12565b91506197c682619785565b602082019050919050565b60006040820190506197e660008301846178be565b81810360208301526197f7816197ae565b905092915050565b7f41413234207369676e6174757265206572726f72000000000000000000000000600082015250565b6000619835601483617f12565b9150619840826197ff565b602082019050919050565b600060408201905061986060008301846178be565b818103602083015261987181619828565b905092915050565b7f414132322065787069726564206f72206e6f7420647565000000000000000000600082015250565b60006198af601783617f12565b91506198ba82619879565b602082019050919050565b60006040820190506198da60008301846178be565b81810360208301526198eb816198a2565b905092915050565b7f41413334207369676e6174757265206572726f72000000000000000000000000600082015250565b6000619929601483617f12565b9150619934826198f3565b602082019050919050565b600060408201905061995460008301846178be565b81810360208301526199658161991c565b905092915050565b7f41413332207061796d61737465722065787069726564206f72206e6f7420647560008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b60006199c9602183617f12565b91506199d48261996d565b604082019050919050565b60006040820190506199f460008301846178be565b8181036020830152619a05816199bc565b905092915050565b61010082016000820151619a2460008501826186d9565b506020820151619a3760208501826186ff565b506040820151619a4a60408501826186ff565b506060820151619a5d60608501826186ff565b506080820151619a7060808501826186ff565b5060a0820151619a8360a08501826186d9565b5060c0820151619a9660c08501826186ff565b5060e0820151619aa960e08501826186ff565b50505050565b619ab881617705565b82525050565b61018082016000820151619ad56000850182619a0d565b506020820151619ae9610100850182619aaf565b506040820151619afd6101208501826186ff565b506060820151619b116101408501826186ff565b506080820151619b256101608501826186ff565b50505050565b60006101c0820190508181036000830152619b478186886189e0565b9050619b566020830185619abe565b8181036101a0830152619b698184618242565b905095945050505050565b600081519050619b838161760f565b92915050565b600060208284031215619b9f57619b9e6173e9565b5b6000619bad84828501619b74565b91505092915050565b7f41413935206f7574206f66206761730000000000000000000000000000000000600082015250565b6000619bec600f83617f12565b9150619bf782619bb6565b602082019050919050565b6000604082019050619c1760008301846178be565b8181036020830152619c2881619bdf565b905092915050565b7f4141393020696e76616c69642062656e65666963696172790000000000000000600082015250565b6000619c66601883617f12565b9150619c7182619c30565b602082019050919050565b60006020820190508181036000830152619c9581619c59565b9050919050565b7f41413931206661696c65642073656e6420746f2062656e656669636961727900600082015250565b6000619cd2601f83617f12565b9150619cdd82619c9c565b602082019050919050565b60006020820190508181036000830152619d0181619cc5565b9050919050565b60006060820190508181036000830152619d238187896189e0565b9050619d326020830186618a48565b8181036040830152619d458184866189e0565b90509695505050505050565b6000819050919050565b6000619d76619d71619d6c84619d51565b617ebc565b617605565b9050919050565b619d8681619d5b565b82525050565b6000604082019050619da16000830185619d7d565b8181036020830152619db38184619577565b90509392505050565b7f4141393320696e76616c6964207061796d6173746572416e6444617461000000600082015250565b6000619df2601d83617f12565b9150619dfd82619dbc565b602082019050919050565b60006020820190508181036000830152619e2181619de5565b9050919050565b60006101608301619e3c60008401846186c2565b619e4960008601826186d9565b50619e5760208401846186e8565b619e6460208601826186ff565b50619e72604084018461871d565b8583036040870152619e85838284618791565b92505050619e96606084018461871d565b8583036060870152619ea9838284618791565b92505050619eba60808401846186e8565b619ec760808601826186ff565b50619ed560a08401846186e8565b619ee260a08601826186ff565b50619ef060c08401846186e8565b619efd60c08601826186ff565b50619f0b60e08401846186e8565b619f1860e08601826186ff565b50619f276101008401846186e8565b619f356101008601826186ff565b50619f4461012084018461871d565b858303610120870152619f58838284618791565b92505050619f6a61014084018461871d565b858303610140870152619f7e838284618791565b925050508091505092915050565b60006060820190508181036000830152619fa68186619e28565b9050619fb56020830185617d46565b619fc260408301846178be565b949350505050565b7f414132332072657665727465643a200000000000000000000000000000000000815250565b6000619ffb82619fca565b600f8201915061a00b8284619520565b915081905092915050565b7f4141323320726576657274656420286f72204f4f472900000000000000000000600082015250565b600061a04c601683617f12565b915061a0578261a016565b602082019050919050565b600060408201905061a07760008301846178be565b818103602083015261a0888161a03f565b905092915050565b7f41413231206469646e2774207061792070726566756e64000000000000000000600082015250565b600061a0c6601783617f12565b915061a0d18261a090565b602082019050919050565b600060408201905061a0f160008301846178be565b818103602083015261a1028161a0b9565b905092915050565b7f4141343120746f6f206c6974746c6520766572696669636174696f6e47617300600082015250565b600061a140601f83617f12565b915061a14b8261a10a565b602082019050919050565b6000602082019050818103600083015261a16f8161a133565b9050919050565b7f41413331207061796d6173746572206465706f73697420746f6f206c6f770000600082015250565b600061a1ac601e83617f12565b915061a1b78261a176565b602082019050919050565b600060408201905061a1d760008301846178be565b818103602083015261a1e88161a19f565b905092915050565b600061a20361a1fe846174f2565b6174d7565b90508281526020810184848401111561a21f5761a21e617461565b5b61a22a848285618218565b509392505050565b600082601f83011261a2475761a24661745c565b5b815161a25784826020860161a1f0565b91505092915050565b6000806040838503121561a2775761a2766173e9565b5b600083015167ffffffffffffffff81111561a2955761a2946173ee565b5b61a2a18582860161a232565b925050602061a2b285828601619b74565b9150509250929050565b7f414133332072657665727465643a200000000000000000000000000000000000815250565b600061a2ed8261a2bc565b600f8201915061a2fd8284619520565b915081905092915050565b7f4141333320726576657274656420286f72204f4f472900000000000000000000600082015250565b600061a33e601683617f12565b915061a3498261a308565b602082019050919050565b600060408201905061a36960008301846178be565b818103602083015261a37a8161a331565b905092915050565b7f414131302073656e64657220616c726561647920636f6e737472756374656400600082015250565b600061a3b8601f83617f12565b915061a3c38261a382565b602082019050919050565b600060408201905061a3e360008301846178be565b818103602083015261a3f48161a3ab565b905092915050565b7f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000600082015250565b600061a432601b83617f12565b915061a43d8261a3fc565b602082019050919050565b600060408201905061a45d60008301846178be565b818103602083015261a46e8161a425565b905092915050565b7f4141313420696e6974436f6465206d7573742072657475726e2073656e646572600082015250565b600061a4ac602083617f12565b915061a4b78261a476565b602082019050919050565b600060408201905061a4d760008301846178be565b818103602083015261a4e88161a49f565b905092915050565b7f4141313520696e6974436f6465206d757374206372656174652073656e646572600082015250565b600061a526602083617f12565b915061a5318261a4f0565b602082019050919050565b600060408201905061a55160008301846178be565b818103602083015261a5628161a519565b905092915050565b600060408201905061a57f6000830185618a48565b61a58c6020830184618a48565b939250505056fea26469706673582212206dae6a3dfee854481a79e705a7b23d488634e9bc0aefbf869b89869d4b5e7b1364736f6c63430008110033608060405234801561001057600080fd5b5061044f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063570e1a3614610030575b600080fd5b61004a60048036038101906100459190610288565b610060565b6040516100579190610316565b60405180910390f35b600061007667a77071926199a6bc60c01b610216565b61008a6705db437c17f4c53160c01b610216565b61009e67f7e34fe0ef67d65660c01b610216565b600083836000906014926100b49392919061033b565b906100bf91906103ba565b60601c90506100d8679eee7b10c69e371260c01b610216565b6100ec67e915e597d60e618060c01b610216565b6000848460149080926101019392919061033b565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905061015a6759fca45833adea5d60c01b610216565b61016e67d2f649902cd0246260c01b610216565b600061018467957e43ea595585a160c01b610216565b602060008351602085016000875af1905060005193506101ae67a96890a92414c3b460c01b610216565b6101c267936c0d2a6e83afc460c01b610216565b806101f8576101db67cf211eb43cb304cc60c01b610216565b6101ef67f8af295b41c5669760c01b610216565b6000935061020d565b61020c67bedaa80464ace1ed60c01b610216565b5b50505092915050565b50565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f84011261024857610247610223565b5b8235905067ffffffffffffffff81111561026557610264610228565b5b6020830191508360018202830111156102815761028061022d565b5b9250929050565b6000806020838503121561029f5761029e610219565b5b600083013567ffffffffffffffff8111156102bd576102bc61021e565b5b6102c985828601610232565b92509250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610300826102d5565b9050919050565b610310816102f5565b82525050565b600060208201905061032b6000830184610307565b92915050565b600080fd5b600080fd5b6000808585111561034f5761034e610331565b5b838611156103605761035f610336565b5b6001850283019150848603905094509492505050565b600082905092915050565b60007fffffffffffffffffffffffffffffffffffffffff00000000000000000000000082169050919050565b600082821b905092915050565b60006103c68383610376565b826103d18135610381565b925060148210156104115761040c7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000836014036008026103ad565b831692505b50509291505056fea2646970667358221220222219afa35e7a9ea15a12342931ab42e032fb2f8ffc39aeda6c656ef722d50964736f6c63430008110033"; + "0x60806040526004361015610024575b361561001957600080fd5b61002233612748565b005b60003560e01c806242dc5314611b0057806301ffc9a7146119ae5780630396cb60146116765780630bd28e3b146115fa5780631b2e01b814611566578063205c2878146113d157806322cdde4c1461136b57806335567e1a146112b35780635287ce12146111a557806370a0823114611140578063765e827f14610e82578063850aaf6214610dc35780639b249f6914610c74578063b760faf914610c3a578063bb9fe6bf14610a68578063c23a5cea146107c4578063dbed18e0146101a15763fc7e286d0361000e573461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5773ffffffffffffffffffffffffffffffffffffffff61013a61229f565b16600052600060205260a0604060002065ffffffffffff6001825492015460405192835260ff8116151560208401526dffffffffffffffffffffffffffff8160081c16604084015263ffffffff8160781c16606084015260981c166080820152f35b600080fd5b3461019c576101af36612317565b906101b86129bd565b60009160005b82811061056f57506101d08493612588565b6000805b8481106102fc5750507fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972600080a16000809360005b81811061024757610240868660007f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d8180a2613ba7565b6001600255005b6102a261025582848a612796565b73ffffffffffffffffffffffffffffffffffffffff6102766020830161282a565b167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d600080a2806127d6565b906000915b8083106102b957505050600101610209565b909194976102f36102ed6001926102e78c8b6102e0826102da8e8b8d61269d565b9261265a565b5191613597565b90612409565b99612416565b950191906102a7565b6020610309828789612796565b61031f61031682806127d6565b9390920161282a565b9160009273ffffffffffffffffffffffffffffffffffffffff8091165b8285106103505750505050506001016101d4565b909192939561037f83610378610366848c61265a565b516103728b898b61269d565b856129f6565b9290613dd7565b9116840361050a576104a5576103958491613dd7565b9116610440576103b5576103aa600191612416565b96019392919061033c565b60a487604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560648201527f65000000000000000000000000000000000000000000000000000000000000006084820152fd5b608488604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601460448201527f41413334207369676e6174757265206572726f720000000000000000000000006064820152fd5b608488604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152fd5b608489604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601460448201527f41413234207369676e6174757265206572726f720000000000000000000000006064820152fd5b61057a818487612796565b9361058585806127d6565b919095602073ffffffffffffffffffffffffffffffffffffffff6105aa82840161282a565b1697600192838a1461076657896105da575b5050505060019293949550906105d191612409565b939291016101be565b8060406105e892019061284b565b918a3b1561019c57929391906040519485937f2dd8113300000000000000000000000000000000000000000000000000000000855288604486016040600488015252606490818601918a60051b8701019680936000915b8c83106106e657505050505050838392610684927ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8560009803016024860152612709565b03818a5afa90816106d7575b506106c657602486604051907f86a9f7500000000000000000000000000000000000000000000000000000000082526004820152fd5b93945084936105d1600189806105bc565b6106e0906121bd565b88610690565b91939596977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c908a9294969a0301865288357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18336030181121561019c57836107538793858394016128ec565b9a0196019301909189979695949261063f565b606483604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152fd5b3461019c576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c576107fc61229f565b33600052600082526001604060002001908154916dffffffffffffffffffffffffffff8360081c16928315610a0a5765ffffffffffff8160981c1680156109ac57421061094e5760009373ffffffffffffffffffffffffffffffffffffffff859485947fffffffffffffff000000000000000000000000000000000000000000000000ff86951690556040517fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda33391806108da8786836020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b0390a2165af16108e8612450565b50156108f057005b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152fd5b606485604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152fd5b606486604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152fd5b606485604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152fd5b3461019c5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c573360005260006020526001604060002001805463ffffffff8160781c16908115610bdc5760ff1615610b7e5765ffffffffffff908142160191818311610b4f5780547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001678ffffffffffff00000000000000000000000000000000000000609885901b161790556040519116815233907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a90602090a2005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152fd5b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c57610022610c6f61229f565b612748565b3461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5760043567ffffffffffffffff811161019c576020610cc8610d1b9236906004016122c2565b919073ffffffffffffffffffffffffffffffffffffffff9260405194859283927f570e1a360000000000000000000000000000000000000000000000000000000084528560048501526024840191612709565b03816000857f000000000000000000000000efc2c1444ebcc4db75e7613d20c6a62ff67a167c165af1908115610db757602492600092610d86575b50604051917f6ca7b806000000000000000000000000000000000000000000000000000000008352166004820152fd5b610da991925060203d602011610db0575b610da181836121ed565b8101906126dd565b9083610d56565b503d610d97565b6040513d6000823e3d90fd5b3461019c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c57610dfa61229f565b60243567ffffffffffffffff811161019c57600091610e1e839236906004016122c2565b90816040519283928337810184815203915af4610e39612450565b90610e7e6040519283927f99410554000000000000000000000000000000000000000000000000000000008452151560048401526040602484015260448301906123c6565b0390fd5b3461019c57610e9036612317565b610e9b9291926129bd565b610ea483612588565b60005b848110610f1c57506000927fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972600080a16000915b858310610eec576102408585613ba7565b909193600190610f12610f0087898761269d565b610f0a888661265a565b519088613597565b0194019190610edb565b610f47610f40610f2e8385979561265a565b51610f3a84898761269d565b846129f6565b9190613dd7565b73ffffffffffffffffffffffffffffffffffffffff929183166110db5761107657610f7190613dd7565b911661101157610f8657600101929092610ea7565b60a490604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560648201527f65000000000000000000000000000000000000000000000000000000000000006084820152fd5b608482604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601460448201527f41413334207369676e6174757265206572726f720000000000000000000000006064820152fd5b608483604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601760448201527f414132322065787069726564206f72206e6f74206475650000000000000000006064820152fd5b608484604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601460448201527f41413234207369676e6174757265206572726f720000000000000000000000006064820152fd5b3461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5773ffffffffffffffffffffffffffffffffffffffff61118c61229f565b1660005260006020526020604060002054604051908152f35b3461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5773ffffffffffffffffffffffffffffffffffffffff6111f161229f565b6000608060405161120181612155565b828152826020820152826040820152826060820152015216600052600060205260a06040600020608060405161123681612155565b6001835493848352015490602081019060ff8316151582526dffffffffffffffffffffffffffff60408201818560081c16815263ffffffff936060840193858760781c16855265ffffffffffff978891019660981c1686526040519788525115156020880152511660408601525116606084015251166080820152f35b3461019c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5760206112ec61229f565b73ffffffffffffffffffffffffffffffffffffffff6113096122f0565b911660005260018252604060002077ffffffffffffffffffffffffffffffffffffffffffffffff821660005282526040600020547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006040519260401b16178152f35b3461019c577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60208136011261019c576004359067ffffffffffffffff821161019c5761012090823603011261019c576113c9602091600401612480565b604051908152f35b3461019c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5761140861229f565b60243590336000526000602052604060002090815491828411611508576000808573ffffffffffffffffffffffffffffffffffffffff8295839561144c848a612443565b90556040805173ffffffffffffffffffffffffffffffffffffffff831681526020810185905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb91a2165af16114a2612450565b50156114aa57005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152fd5b3461019c5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5761159d61229f565b73ffffffffffffffffffffffffffffffffffffffff6115ba6122f0565b9116600052600160205277ffffffffffffffffffffffffffffffffffffffffffffffff604060002091166000526020526020604060002054604051908152f35b3461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5760043577ffffffffffffffffffffffffffffffffffffffffffffffff811680910361019c5733600052600160205260406000209060005260205260406000206116728154612416565b9055005b6020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5760043563ffffffff9182821680920361019c5733600052600081526040600020928215611950576001840154908160781c1683106118f2576116f86dffffffffffffffffffffffffffff9182349160081c16612409565b93841561189457818511611836579065ffffffffffff61180592546040519061172082612155565b8152848101926001845260408201908816815260608201878152600160808401936000855233600052600089526040600020905181550194511515917fffffffffffffffffffffffffff0000000000000000000000000000000000000060ff72ffffffff0000000000000000000000000000006effffffffffffffffffffffffffff008954945160081b16945160781b1694169116171717835551167fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff78ffffffffffff0000000000000000000000000000000000000083549260981b169116179055565b6040519283528201527fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c0160403392a2005b606483604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152fd5b606483604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152fd5b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152fd5b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152fd5b3461019c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361019c57807f60fc6b6e0000000000000000000000000000000000000000000000000000000060209214908115611ad6575b8115611aac575b8115611a82575b8115611a58575b506040519015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501482611a4d565b7f3e84f0210000000000000000000000000000000000000000000000000000000081149150611a46565b7fcf28ef970000000000000000000000000000000000000000000000000000000081149150611a3f565b7f915074d80000000000000000000000000000000000000000000000000000000081149150611a38565b3461019c576102007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019c5767ffffffffffffffff60043581811161019c573660238201121561019c57611b62903690602481600401359101612268565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36016101c0811261019c5761014060405191611b9e83612155565b1261019c5760405192611bb0846121a0565b60243573ffffffffffffffffffffffffffffffffffffffff8116810361019c578452602093604435858201526064356040820152608435606082015260a435608082015260c43560a082015260e43560c08201526101043573ffffffffffffffffffffffffffffffffffffffff8116810361019c5760e08201526101243561010082015261014435610120820152825261016435848301526101843560408301526101a43560608301526101c43560808301526101e43590811161019c57611c7c9036906004016122c2565b905a3033036120f7578351606081015195603f5a0260061c61271060a0840151890101116120ce5760009681519182611ff0575b5050505090611cca915a9003608085015101923691612268565b925a90600094845193611cdc85613ccc565b9173ffffffffffffffffffffffffffffffffffffffff60e0870151168015600014611ea957505073ffffffffffffffffffffffffffffffffffffffff855116935b5a9003019360a06060820151910151016080860151850390818111611e95575b50508302604085015192818410600014611dce5750506003811015611da157600203611d79576113c99293508093611d7481613d65565b613cf6565b5050507fdeadaa51000000000000000000000000000000000000000000000000000000008152fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526021600452fd5b81611dde92979396940390613c98565b506003841015611e6857507f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f60808683015192519473ffffffffffffffffffffffffffffffffffffffff865116948873ffffffffffffffffffffffffffffffffffffffff60e0890151169701519160405192835215898301528760408301526060820152a46113c9565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526021600452fd5b6064919003600a0204909301928780611d3d565b8095918051611eba575b5050611d1d565b6003861015611fc1576002860315611eb35760a088015190823b1561019c57600091611f2491836040519586809581947f7c627b210000000000000000000000000000000000000000000000000000000083528d60048401526080602484015260848301906123c6565b8b8b0260448301528b60648301520393f19081611fad575b50611fa65787893d610800808211611f9e575b506040519282828501016040528184528284013e610e7e6040519283927fad7954bc000000000000000000000000000000000000000000000000000000008452600484015260248301906123c6565b905083611f4f565b8980611eb3565b611fb89199506121bd565b6000978a611f3c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91600092918380938c73ffffffffffffffffffffffffffffffffffffffff885116910192f115612023575b808080611cb0565b611cca929195503d6108008082116120c6575b5060405190888183010160405280825260008983013e805161205f575b5050600194909161201b565b7f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a20188870151918973ffffffffffffffffffffffffffffffffffffffff8551169401516120bc604051928392835260408d84015260408301906123c6565b0390a38680612053565b905088612036565b877fdeaddead000000000000000000000000000000000000000000000000000000006000526000fd5b606486604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c790000000000000000006044820152fd5b60a0810190811067ffffffffffffffff82111761217157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610140810190811067ffffffffffffffff82111761217157604052565b67ffffffffffffffff811161217157604052565b6060810190811067ffffffffffffffff82111761217157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761217157604052565b67ffffffffffffffff811161217157601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b9291926122748261222e565b9161228260405193846121ed565b82948184528183011161019c578281602093846000960137010152565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361019c57565b9181601f8401121561019c5782359167ffffffffffffffff831161019c576020838186019501011161019c57565b6024359077ffffffffffffffffffffffffffffffffffffffffffffffff8216820361019c57565b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc83011261019c5760043567ffffffffffffffff9283821161019c578060238301121561019c57816004013593841161019c5760248460051b8301011161019c57602401919060243573ffffffffffffffffffffffffffffffffffffffff8116810361019c5790565b60005b8381106123b65750506000910152565b81810151838201526020016123a6565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093612402815180928187528780880191016123a3565b0116010190565b91908201809211610b4f57565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b4f5760010190565b91908203918211610b4f57565b3d1561247b573d906124618261222e565b9161246f60405193846121ed565b82523d6000602084013e565b606090565b604061248e8183018361284b565b90818351918237206124a3606084018461284b565b90818451918237209260c06124bb60e083018361284b565b908186519182372091845195602087019473ffffffffffffffffffffffffffffffffffffffff833516865260208301358789015260608801526080870152608081013560a087015260a081013582870152013560e08501526101009081850152835261012083019167ffffffffffffffff918484108385111761217157838252845190206101408501908152306101608601524661018086015260608452936101a00191821183831017612171575251902090565b67ffffffffffffffff81116121715760051b60200190565b9061259282612570565b6040906125a260405191826121ed565b8381527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06125d08295612570565b019160005b8381106125e25750505050565b60209082516125f081612155565b83516125fb816121a0565b600081526000849181838201528187820152816060818184015260809282848201528260a08201528260c08201528260e082015282610100820152826101208201528652818587015281898701528501528301528286010152016125d5565b805182101561266e5760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561266e5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18136030182121561019c570190565b9081602091031261019c575173ffffffffffffffffffffffffffffffffffffffff8116810361019c5790565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b7f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4602073ffffffffffffffffffffffffffffffffffffffff61278a3485613c98565b936040519485521692a2565b919081101561266e5760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18136030182121561019c570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561019c570180359067ffffffffffffffff821161019c57602001918160051b3603831361019c57565b3573ffffffffffffffffffffffffffffffffffffffff8116810361019c5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561019c570180359067ffffffffffffffff821161019c5760200191813603831361019c57565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561019c57016020813591019167ffffffffffffffff821161019c57813603831361019c57565b61012091813573ffffffffffffffffffffffffffffffffffffffff811680910361019c576129626129476129ba9561299b93855260208601356020860152612937604087018761289c565b9091806040880152860191612709565b612954606086018661289c565b908583036060870152612709565b6080840135608084015260a084013560a084015260c084013560c084015261298d60e085018561289c565b9084830360e0860152612709565b916129ac610100918281019061289c565b929091818503910152612709565b90565b60028054146129cc5760028055565b60046040517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b926000905a93805194843573ffffffffffffffffffffffffffffffffffffffff811680910361019c5786526020850135602087015260808501356fffffffffffffffffffffffffffffffff90818116606089015260801c604088015260a086013560c088015260c086013590811661010088015260801c610120870152612a8060e086018661284b565b801561357b576034811061351d578060141161019c578060241161019c5760341161019c57602481013560801c60a0880152601481013560801c60808801523560601c60e08701525b612ad285612480565b60208301526040860151946effffffffffffffffffffffffffffff8660c08901511760608901511760808901511760a0890151176101008901511761012089015117116134bf57604087015160608801510160808801510160a08801510160c0880151016101008801510296835173ffffffffffffffffffffffffffffffffffffffff81511690612b66604085018561284b565b806131e4575b505060e0015173ffffffffffffffffffffffffffffffffffffffff1690600082156131ac575b6020612bd7918b828a01516000868a604051978896879586937f19822f7c00000000000000000000000000000000000000000000000000000000855260048501613db5565b0393f160009181613178575b50612c8b573d8c610800808311612c83575b50604051916020818401016040528083526000602084013e610e7e6040519283927f65c8fd4d000000000000000000000000000000000000000000000000000000008452600484015260606024840152600d60648401527f4141323320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906123c6565b915082612bf5565b9a92939495969798999a91156130f2575b509773ffffffffffffffffffffffffffffffffffffffff835116602084015190600052600160205260406000208160401c60005260205267ffffffffffffffff604060002091825492612cee84612416565b9055160361308d575a8503116130285773ffffffffffffffffffffffffffffffffffffffff60e0606093015116612d42575b509060a09184959697986040608096015260608601520135905a900301910152565b969550505a9683519773ffffffffffffffffffffffffffffffffffffffff60e08a01511680600052600060205260406000208054848110612fc3576080612dcd9a9b9c600093878094039055015192602089015183604051809d819582947f52b7512c0000000000000000000000000000000000000000000000000000000084528c60048501613db5565b039286f1978860009160009a612f36575b50612e86573d8b610800808311612e7e575b50604051916020818401016040528083526000602084013e610e7e6040519283927f65c8fd4d000000000000000000000000000000000000000000000000000000008452600484015260606024840152600d60648401527f4141333320726576657274656400000000000000000000000000000000000000608484015260a0604484015260a48301906123c6565b915082612df0565b9991929394959697989998925a900311612eab57509096959094939291906080612d20565b60a490604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152602760448201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760648201527f61734c696d6974000000000000000000000000000000000000000000000000006084820152fd5b915098503d90816000823e612f4b82826121ed565b604081838101031261019c5780519067ffffffffffffffff821161019c57828101601f83830101121561019c578181015191612f868361222e565b93612f9460405195866121ed565b838552820160208483850101011161019c57602092612fba9184808701918501016123a3565b01519838612dde565b60848b604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601e60448201527f41413331207061796d6173746572206465706f73697420746f6f206c6f7700006064820152fd5b608490604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601e60448201527f41413236206f76657220766572696669636174696f6e4761734c696d697400006064820152fd5b608482604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601a60448201527f4141323520696e76616c6964206163636f756e74206e6f6e63650000000000006064820152fd5b600052600060205260406000208054808c11613113578b9003905538612c9c565b608484604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152fd5b9091506020813d6020116131a4575b81613194602093836121ed565b8101031261019c57519038612be3565b3d9150613187565b508060005260006020526040600020548a81116000146131d75750612bd7602060005b915050612b92565b6020612bd7918c036131cf565b833b61345a57604088510151602060405180927f570e1a360000000000000000000000000000000000000000000000000000000082528260048301528160008161323260248201898b612709565b039273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000efc2c1444ebcc4db75e7613d20c6a62ff67a167c1690f1908115610db75760009161343b575b5073ffffffffffffffffffffffffffffffffffffffff811680156133d6578503613371573b1561330c5760141161019c5773ffffffffffffffffffffffffffffffffffffffff9183887fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d604060e0958787602086015195510151168251913560601c82526020820152a391612b6c565b60848d604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152fd5b60848e604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152602060448201527f4141313420696e6974436f6465206d7573742072657475726e2073656e6465726064820152fd5b60848f604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601b60448201527f4141313320696e6974436f6465206661696c6564206f72204f4f4700000000006064820152fd5b613454915060203d602011610db057610da181836121ed565b3861327c565b60848d604051907f220266b6000000000000000000000000000000000000000000000000000000008252600482015260406024820152601f60448201527f414131302073656e64657220616c726561647920636f6e7374727563746564006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152fd5b5050600060e087015260006080870152600060a0870152612ac9565b9092915a906060810151916040928351967fffffffff00000000000000000000000000000000000000000000000000000000886135d7606084018461284b565b600060038211613b9f575b7f8dd7712f0000000000000000000000000000000000000000000000000000000094168403613a445750505061379d6000926136b292602088015161363a8a5193849360208501528b602485015260648401906128ec565b90604483015203906136727fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0928381018352826121ed565b61379189519485927e42dc5300000000000000000000000000000000000000000000000000000000602085015261020060248501526102248401906123c6565b613760604484018b60806101a091805173ffffffffffffffffffffffffffffffffffffffff808251168652602082015160208701526040820151604087015260608201516060870152838201518487015260a082015160a087015260c082015160c087015260e08201511660e0860152610100808201519086015261012080910151908501526020810151610140850152604081015161016085015260608101516101808501520151910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc83820301610204840152876123c6565b039081018352826121ed565b6020918183809351910182305af1600051988652156137bf575b505050505050565b909192939495965060003d8214613a3a575b7fdeaddead00000000000000000000000000000000000000000000000000000000810361385b57608487878051917f220266b600000000000000000000000000000000000000000000000000000000835260048301526024820152600f60448201527f41413935206f7574206f662067617300000000000000000000000000000000006064820152fd5b7fdeadaa510000000000000000000000000000000000000000000000000000000091929395949650146000146138c55750506138a961389e6138b8935a90612443565b608085015190612409565b9083015183611d748295613d65565b905b3880808080806137b7565b909261395290828601518651907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479273ffffffffffffffffffffffffffffffffffffffff9580878551169401516139483d610800808211613a32575b508a519084818301018c5280825260008583013e8a805194859485528401528a8301906123c6565b0390a35a90612443565b916139636080860193845190612409565b926000905a94829488519761397789613ccc565b948260e08b0151168015600014613a1857505050875116955b5a9003019560a06060820151910151019051860390818111613a04575b5050840290850151928184106000146139de57505080611e68575090816139d89293611d7481613d65565b906138ba565b6139ee9082849397950390613c98565b50611e68575090826139ff92613cf6565b6139d8565b6064919003600a02049094019338806139ad565b90919892509751613a2a575b50613990565b955038613a24565b905038613920565b8181803e516137d1565b613b97945082935090613a8c917e42dc53000000000000000000000000000000000000000000000000000000006020613b6b9501526102006024860152610224850191612709565b613b3a604484018860806101a091805173ffffffffffffffffffffffffffffffffffffffff808251168652602082015160208701526040820151604087015260608201516060870152838201518487015260a082015160a087015260c082015160c087015260e08201511660e0860152610100808201519086015261012080910151908501526020810151610140850152604081015161016085015260608101516101808501520151910152565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc83820301610204840152846123c6565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018952886121ed565b60008761379d565b5081356135e2565b73ffffffffffffffffffffffffffffffffffffffff168015613c3a57600080809381935af1613bd4612450565b5015613bdc57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff166000526000602052613cc66040600020918254612409565b80915590565b610120610100820151910151808214613cf257480180821015613ced575090565b905090565b5090565b9190917f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f6080602083015192519473ffffffffffffffffffffffffffffffffffffffff946020868851169660e089015116970151916040519283526000602084015260408301526060820152a4565b60208101519051907f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e60208073ffffffffffffffffffffffffffffffffffffffff855116940151604051908152a3565b613dcd604092959493956060835260608301906128ec565b9460208201520152565b8015613e6457600060408051613dec816121d1565b828152826020820152015273ffffffffffffffffffffffffffffffffffffffff811690604065ffffffffffff91828160a01c16908115613e5c575b60d01c92825191613e37836121d1565b8583528460208401521691829101524211908115613e5457509091565b905042109091565b839150613e27565b5060009060009056fea2646970667358221220b094fd69f04977ae9458e5ba422d01cd2d20dbcfca0992ff37f19aa07deec25464736f6c63430008170033"; type EntryPointConstructorParams = | [signer?: Signer] @@ -1274,16 +829,16 @@ export class EntryPoint__factory extends ContractFactory { override deploy( overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; + ): Promise { + return super.deploy(overrides || {}) as Promise; } override getDeployTransaction( overrides?: Overrides & { from?: PromiseOrValue } ): TransactionRequest { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): EntryPoint { - return super.attach(address) as EntryPoint; + override attach(address: string): IEntryPoint { + return super.attach(address) as IEntryPoint; } override connect(signer: Signer): EntryPoint__factory { return super.connect(signer) as EntryPoint__factory; @@ -1291,13 +846,13 @@ export class EntryPoint__factory extends ContractFactory { static readonly bytecode = _bytecode; static readonly abi = _abi; - static createInterface(): EntryPointInterface { - return new utils.Interface(_abi) as EntryPointInterface; + static createInterface(): IEntryPointInterface { + return new utils.Interface(_abi) as IEntryPointInterface; } static connect( address: string, signerOrProvider: Signer | Provider - ): EntryPoint { - return new Contract(address, _abi, signerOrProvider) as EntryPoint; + ): IEntryPoint { + return new Contract(address, _abi, signerOrProvider) as IEntryPoint; } } \ No newline at end of file diff --git a/src/sdk/contracts/factories/account-abstraction/contracts/interfaces/IEntryPoint__factory.ts b/src/sdk/contracts/factories/account-abstraction/contracts/interfaces/IEntryPoint__factory.ts index ef0d740..367886d 100644 --- a/src/sdk/contracts/factories/account-abstraction/contracts/interfaces/IEntryPoint__factory.ts +++ b/src/sdk/contracts/factories/account-abstraction/contracts/interfaces/IEntryPoint__factory.ts @@ -12,38 +12,18 @@ import type { const _abi = [ { inputs: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "paid", - type: "uint256", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, { internalType: "bool", - name: "targetSuccess", + name: "success", type: "bool", }, { internalType: "bytes", - name: "targetResult", + name: "ret", type: "bytes", }, ], - name: "ExecutionResult", + name: "DelegateAndRevert", type: "error", }, { @@ -65,240 +45,55 @@ const _abi = [ { inputs: [ { - internalType: "address", - name: "sender", - type: "address", + internalType: "uint256", + name: "opIndex", + type: "uint256", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + { + internalType: "bytes", + name: "inner", + type: "bytes", }, ], - name: "SenderAddressResult", + name: "FailedOpWithRevert", type: "error", }, { inputs: [ { - internalType: "address", - name: "aggregator", - type: "address", + internalType: "bytes", + name: "returnData", + type: "bytes", }, ], - name: "SignatureValidationFailed", + name: "PostOpReverted", type: "error", }, { inputs: [ { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", + internalType: "address", + name: "sender", + type: "address", }, ], - name: "ValidationResult", + name: "SenderAddressResult", type: "error", }, { inputs: [ { - components: [ - { - internalType: "uint256", - name: "preOpGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "prefund", - type: "uint256", - }, - { - internalType: "bool", - name: "sigFailed", - type: "bool", - }, - { - internalType: "uint48", - name: "validAfter", - type: "uint48", - }, - { - internalType: "uint48", - name: "validUntil", - type: "uint48", - }, - { - internalType: "bytes", - name: "paymasterContext", - type: "bytes", - }, - ], - internalType: "struct IEntryPoint.ReturnInfo", - name: "returnInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "senderInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "factoryInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "paymasterInfo", - type: "tuple", - }, - { - components: [ - { - internalType: "address", - name: "aggregator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "stake", - type: "uint256", - }, - { - internalType: "uint256", - name: "unstakeDelaySec", - type: "uint256", - }, - ], - internalType: "struct IStakeManager.StakeInfo", - name: "stakeInfo", - type: "tuple", - }, - ], - internalType: "struct IEntryPoint.AggregatorStakeInfo", - name: "aggregatorInfo", - type: "tuple", + internalType: "address", + name: "aggregator", + type: "address", }, ], - name: "ValidationResultWithAggregation", + name: "SignatureValidationFailed", type: "error", }, { @@ -357,6 +152,37 @@ const _abi = [ name: "Deposited", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "PostOpRevertReason", + type: "event", + }, { anonymous: false, inputs: [ @@ -488,6 +314,31 @@ const _abi = [ name: "UserOperationEvent", type: "event", }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + ], + name: "UserOperationPrefundTooLow", + type: "event", + }, { anonymous: false, inputs: [ @@ -576,6 +427,24 @@ const _abi = [ stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "delegateAndRevert", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -602,9 +471,9 @@ const _abi = [ { components: [ { - internalType: "uint112", + internalType: "uint256", name: "deposit", - type: "uint112", + type: "uint256", }, { internalType: "bool", @@ -697,14 +566,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -712,14 +576,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -732,7 +591,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation", + internalType: "struct PackedUserOperation", name: "userOp", type: "tuple", }, @@ -775,14 +634,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -790,14 +644,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -810,7 +659,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation[]", + internalType: "struct PackedUserOperation[]", name: "userOps", type: "tuple[]", }, @@ -865,14 +714,9 @@ const _abi = [ type: "bytes", }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + internalType: "bytes32", + name: "accountGasLimits", + type: "bytes32", }, { internalType: "uint256", @@ -880,14 +724,9 @@ const _abi = [ type: "uint256", }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + internalType: "bytes32", + name: "gasFees", + type: "bytes32", }, { internalType: "bytes", @@ -900,7 +739,7 @@ const _abi = [ type: "bytes", }, ], - internalType: "struct UserOperation[]", + internalType: "struct PackedUserOperation[]", name: "ops", type: "tuple[]", }, @@ -928,156 +767,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "op", - type: "tuple", - }, - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "targetCallData", - type: "bytes", - }, - ], - name: "simulateHandleOp", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "uint256", - name: "nonce", - type: "uint256", - }, - { - internalType: "bytes", - name: "initCode", - type: "bytes", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, - { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", - }, - { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", - }, - { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, - ], - internalType: "struct UserOperation", - name: "userOp", - type: "tuple", - }, - ], - name: "simulateValidation", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, { inputs: [], name: "unlockStake", diff --git a/src/sdk/contracts/factories/src/ERC6900/index.ts b/src/sdk/contracts/factories/src/ERC6900/index.ts new file mode 100644 index 0000000..7b3c83f --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC6900/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as libraries from "./libraries"; diff --git a/src/sdk/contracts/factories/src/ERC6900/libraries/ErrorsLib__factory.ts b/src/sdk/contracts/factories/src/ERC6900/libraries/ErrorsLib__factory.ts new file mode 100644 index 0000000..94c6083 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC6900/libraries/ErrorsLib__factory.ts @@ -0,0 +1,339 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + ErrorsLib, + ErrorsLibInterface, +} from "../../../../src/ERC6900/libraries/ErrorsLib"; + +const _abi = [ + { + inputs: [], + name: "AlreadyAGuardian", + type: "error", + }, + { + inputs: [], + name: "AlreadyAnOwner", + type: "error", + }, + { + inputs: [], + name: "AlwaysDenyRule", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "AuthorizeUpgradeReverted", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "ExecFromPluginExternalNotPermitted", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + ], + name: "ExecFromPluginNotPermitted", + type: "error", + }, + { + inputs: [], + name: "GuardianAlreadySignedProposal", + type: "error", + }, + { + inputs: [], + name: "GuardianCannotBeOwner", + type: "error", + }, + { + inputs: [], + name: "GuardianProposalResolved", + type: "error", + }, + { + inputs: [], + name: "InvalidConfiguration", + type: "error", + }, + { + inputs: [], + name: "InvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "InvalidGuardianProposalId", + type: "error", + }, + { + inputs: [], + name: "InvalidTotalGuardians", + type: "error", + }, + { + inputs: [], + name: "MultipleOwnerPluginRequired", + type: "error", + }, + { + inputs: [], + name: "NoValidProposal", + type: "error", + }, + { + inputs: [], + name: "NotAGuardian", + type: "error", + }, + { + inputs: [], + name: "NotAnOwner", + type: "error", + }, + { + inputs: [], + name: "NotAuthorized", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "uint8", + name: "functionId", + type: "uint8", + }, + { + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "PostExecHookReverted", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "uint8", + name: "functionId", + type: "uint8", + }, + { + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "PreExecHookReverted", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "uint8", + name: "functionId", + type: "uint8", + }, + { + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "PreRuntimeValidationHookFailed", + type: "error", + }, + { + inputs: [], + name: "ProposalTimelockBound", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + ], + name: "RuntimeValidationFunctionMissing", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "uint8", + name: "functionId", + type: "uint8", + }, + { + internalType: "bytes", + name: "revertReason", + type: "bytes", + }, + ], + name: "RuntimeValidationFunctionReverted", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "plugin", + type: "address", + }, + { + internalType: "uint8", + name: "functionId", + type: "uint8", + }, + { + internalType: "address", + name: "aggregator", + type: "address", + }, + ], + name: "UnexpectedAggregator", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + ], + name: "UnrecognizedFunction", + type: "error", + }, + { + inputs: [], + name: "UnresolvedGuardianProposal", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "selector", + type: "bytes4", + }, + ], + name: "UserOpValidationFunctionMissing", + type: "error", + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207e0795d11a7400097ca691701ef417358dbb0b7a5e75b5a040998958ed323ecf64736f6c63430008170033"; + +type ErrorsLibConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ErrorsLibConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ErrorsLib__factory extends ContractFactory { + constructor(...args: ErrorsLibConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ErrorsLib { + return super.attach(address) as ErrorsLib; + } + override connect(signer: Signer): ErrorsLib__factory { + return super.connect(signer) as ErrorsLib__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ErrorsLibInterface { + return new utils.Interface(_abi) as ErrorsLibInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ErrorsLib { + return new Contract(address, _abi, signerOrProvider) as ErrorsLib; + } +} diff --git a/src/sdk/contracts/factories/src/ERC6900/libraries/index.ts b/src/sdk/contracts/factories/src/ERC6900/libraries/index.ts new file mode 100644 index 0000000..31dc99c --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC6900/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ErrorsLib__factory } from "./ErrorsLib__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/access/AccessController__factory.ts b/src/sdk/contracts/factories/src/ERC7579/access/AccessController__factory.ts new file mode 100644 index 0000000..09e6e7a --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/access/AccessController__factory.ts @@ -0,0 +1,575 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + AccessController, + AccessControllerInterface, +} from "../../../../src/ERC7579/access/AccessController"; + +const _abi = [ + { + inputs: [], + name: "AddingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "AddingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "AlreadySignedProposal", + type: "error", + }, + { + inputs: [], + name: "InvalidProposal", + type: "error", + }, + { + inputs: [], + name: "NotEnoughGuardians", + type: "error", + }, + { + inputs: [], + name: "OnlyGuardian", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrGuardianOrSelf", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrSelf", + type: "error", + }, + { + inputs: [], + name: "ProposalResolved", + type: "error", + }, + { + inputs: [], + name: "ProposalTimelocked", + type: "error", + }, + { + inputs: [], + name: "ProposalUnresolved", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "WalletNeedsOwner", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newGuardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedGuardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedOwner", + type: "address", + }, + ], + name: "OwnerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "discardedBy", + type: "address", + }, + ], + name: "ProposalDiscarded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "ProposalSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newTimelock", + type: "uint256", + }, + ], + name: "ProposalTimelockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "approvalCount", + type: "uint256", + }, + ], + name: "QuorumNotReached", + type: "event", + }, + { + inputs: [], + name: "AUTHOR", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NAME", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VERSION", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newGuardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "addOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newTimelock", + type: "uint256", + }, + ], + name: "changeProposalTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "discardCurrentProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_proposalId", + type: "uint256", + }, + ], + name: "getProposal", + outputs: [ + { + internalType: "address", + name: "ownerProposed_", + type: "address", + }, + { + internalType: "uint256", + name: "approvalCount_", + type: "uint256", + }, + { + internalType: "address[]", + name: "guardiansApproved_", + type: "address[]", + }, + { + internalType: "bool", + name: "resolved_", + type: "bool", + }, + { + internalType: "uint256", + name: "proposedAt_", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardianCosign", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "guardianCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "guardianPropose", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ownerCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalTimelock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "removeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60e06040526103e860805261025860a0526201518060c05234801561002357600080fd5b5060805160a05160c05161106c6100536000396000610b2001526000610d9a01526000610dd2015261106c6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80637dcab4ce116100a2578063a7be85c611610071578063a7be85c614610238578063bf57159b14610260578063c3db883814610269578063c7f758a814610271578063ffa1ad741461029557600080fd5b80637dcab4ce146101c2578063a1c0d459146101d5578063a3f4df7e146101e8578063a526d83b1461022557600080fd5b80632f54bf6e116100e95780632f54bf6e1461017857806341c9ddff1461018b57806354387ad7146101935780637065cb481461019c57806371404156146101af57600080fd5b80630c68ba211461011b5780630db0262214610143578063173825d91461015a5780632dfca4451461016f575b600080fd5b61012e610129366004610ea0565b6102b9565b60405190151581526020015b60405180910390f35b61014c60005481565b60405190815260200161013a565b61016d610168366004610ea0565b6102d7565b005b61014c60025481565b61012e610186366004610ea0565b6103b2565b61016d6103d0565b61014c60015481565b61016d6101aa366004610ea0565b61058f565b61016d6101bd366004610ea0565b61064d565b61016d6101d0366004610ea0565b6106fe565b61016d6101e3366004610ed0565b6108e5565b6102186040518060400160405280601181526020017020b1b1b2b9b99021b7b73a3937b63632b960791b81525081565b60405161013a9190610ee9565b61016d610233366004610ea0565b610950565b61021860405180604001604052806009815260200168115d1a195c9cdc1bdd60ba1b81525081565b61014c60035481565b61016d610a0e565b61028461027f366004610ed0565b610bca565b60405161013a959493929190610f38565b610218604051806040016040528060058152602001640312e302e360dc1b81525081565b6001600160a01b031660009081526005602052604090205460ff1690565b6102e0336103b2565b806102ea57503330145b610307576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806103235750610321816103b2565b155b156103415760405163f1369ccb60e01b815260040160405180910390fd5b6001600054116103645760405163021870b960e11b815260040160405180910390fd5b61036d81610cd4565b604080513081526001600160a01b03831660208201527fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367991015b60405180910390a150565b6001600160a01b031660009081526004602052604090205460ff1690565b6103d9336102b9565b6103f657604051636570ecab60e11b815260040160405180910390fd5b60025460000361041957604051631dc0650160e31b815260040160405180910390fd5b610424600254610d07565b15610442576040516320181a3560e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff161561047c57604051638b19dbcb60e01b815260040160405180910390fd5b60028054600090815260066020908152604080832060019081018054808301825590855292842090920180546001600160a01b0319163317905583548352822090920180549091906104cf908490610fbb565b90915550506002546000818152600660205260409020546001600160a01b0316906104f990610d7e565b1561052c576002546000908152600660205260409020805460ff60a01b1916600160a01b17905561052981610e0a565b50565b60028054600081815260066020908152604091829020909301548151308152938401929092526001600160a01b0384169083015260608201527f7afa94f51443879f537b9be4f09d5d734c2c233b788d2f6af6565add34706bab906080016103a7565b610598336103b2565b806105a257503330145b6105bf576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806105d957506105d9816102b9565b806105e857506105e8816103b2565b1561060657604051631a1aefc560e21b815260040160405180910390fd5b61060f81610e0a565b604080513081526001600160a01b03831660208201527fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a91016103a7565b610656336103b2565b8061066057503330145b61067d576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806106995750610697816102b9565b155b156106b75760405163985f453960e01b815260040160405180910390fd5b6106c081610e3b565b604080513081526001600160a01b03831660208201527fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b91016103a7565b610707336102b9565b61072457604051636570ecab60e11b815260040160405180910390fd5b6001600160a01b038116158061073e575061073e816102b9565b8061074d575061074d816103b2565b1561076b57604051631a1aefc560e21b815260040160405180910390fd5b6003600154101561078f57604051636bb07db960e11b815260040160405180910390fd5b600254600090815260066020526040902060010154158015906107cb5750600254600090815260066020526040902054600160a01b900460ff16155b156107e957604051639fa6dc5760e01b815260040160405180910390fd5b6002546107f7906001610fbb565b6002818155600091825260066020908152604080842080546001600160a01b0387166001600160a01b03199182161790915583548552818520600190810180548083018255908752938620909301805490911633179055825484528320909101805491929091610868908490610fbb565b9091555050600280546000908152600660209081526040808320805460ff60a01b1916905583548352918290204260039091015591548151308152928301526001600160a01b038316908201523360608201527f9fb4a8d051aad8866705f4d52eb05a29939e15ad43dd4aab82cf31806759eac3906080016103a7565b6108ee336103b2565b806108f857503330145b610915576040516311d9f09160e01b815260040160405180910390fd5b600381905560408051308152602081018390527f47870c5ed1a3a6940ad17950265b8b50d279f73d7d026febbef88fd3ffcb934b91016103a7565b610959336103b2565b8061096357503330145b610980576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b038116158061099a575061099a816102b9565b806109a957506109a9816103b2565b156109c75760405163053bd11560e31b815260040160405180910390fd5b6109d081610e6f565b604080513081526001600160a01b03831660208201527fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a91016103a7565b610a17336103b2565b80610a265750610a26336102b9565b80610a3057503330145b610a4d576040516302d8be6160e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff1615610a8757604051638b19dbcb60e01b815260040160405180910390fd5b610a90336102b9565b8015610a9e57506000600354115b15610ae557600380546002546000908152600660205260409020909101544291610ac791610fbb565b10610ae55760405163ae18e9c760e01b815260040160405180910390fd5b610aee336102b9565b8015610afa5750600354155b15610b64576002546000908152600660205260409020600301544290610b469062ffffff7f00000000000000000000000000000000000000000000000000000000000000001690610fbb565b10610b645760405163ae18e9c760e01b815260040160405180910390fd5b60028054600090815260066020908152604091829020805460ff60a01b1916600160a01b179055915481513081529283015233908201527faf7f1090397448391393dc134b45d6d20e79a9d2a8f5a82fb42d1514a55ecbf99060600160405180910390a1565b60008060608180851580610bdf575060025486115b15610bfd57604051631dc0650160e31b815260040160405180910390fd5b6000868152600660209081526040808320815160a08101835281546001600160a01b0381168252600160a01b900460ff16151581850152600182018054845181870281018701865281815292959394860193830182828015610c8857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c6a575b5050505050815260200160028201548152602001600382015481525050905080600001518160600151826040015183602001518460800151955095509550955095505091939590929450565b6001600160a01b0381166000908152600460205260408120805460ff1916905554610d0190600190610fd4565b60005550565b6000805b600083815260066020526040902060010154811015610d75576000838152600660205260409020600101805433919083908110610d4a57610d4a610fe7565b6000918252602090912001546001600160a01b031603610d6d5750600192915050565b600101610d0b565b50600092915050565b600154600082815260066020526040812060020154909161ffff7f00000000000000000000000000000000000000000000000000000000000000001691610df8906fffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690610ffd565b610e029190611014565b101592915050565b6001600160a01b0381166000908152600460205260408120805460ff191660019081179091559054610d0191610fbb565b6001600160a01b0381166000908152600560205260409020805460ff1916905560018054610e699190610fd4565b60015550565b6001600160a01b0381166000908152600560205260409020805460ff191660019081179091558054610e6991610fbb565b600060208284031215610eb257600080fd5b81356001600160a01b0381168114610ec957600080fd5b9392505050565b600060208284031215610ee257600080fd5b5035919050565b60006020808352835180602085015260005b81811015610f1757858101830151858201604001528201610efb565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038681168252602080830187905260a060408401819052865190840181905260009287830192909160c0860190855b81811015610f8c578551851683529483019491830191600101610f6e565b5050961515606086015250505050608001529392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610fce57610fce610fa5565b92915050565b81810381811115610fce57610fce610fa5565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610fce57610fce610fa5565b60008261103157634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212205bb02889167c710b0e882f7644a58f0f81bbc5e69ab85dd7eff1fea8a7ac582f64736f6c63430008170033"; + +type AccessControllerConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: AccessControllerConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class AccessController__factory extends ContractFactory { + constructor(...args: AccessControllerConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): AccessController { + return super.attach(address) as AccessController; + } + override connect(signer: Signer): AccessController__factory { + return super.connect(signer) as AccessController__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): AccessControllerInterface { + return new utils.Interface(_abi) as AccessControllerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AccessController { + return new Contract(address, _abi, signerOrProvider) as AccessController; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/access/index.ts b/src/sdk/contracts/factories/src/ERC7579/access/index.ts new file mode 100644 index 0000000..dc7ff6c --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { AccessController__factory } from "./AccessController__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/index.ts b/src/sdk/contracts/factories/src/ERC7579/index.ts new file mode 100644 index 0000000..b9cdd8d --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as access from "./access"; +export * as interfaces from "./interfaces"; +export * as libraries from "./libraries"; +export * as modules from "./modules"; +export * as wallet from "./wallet"; diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IAccessController__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IAccessController__factory.ts new file mode 100644 index 0000000..874983b --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IAccessController__factory.ts @@ -0,0 +1,377 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IAccessController, + IAccessControllerInterface, +} from "../../../../src/ERC7579/interfaces/IAccessController"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newGuardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedGuardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedOwner", + type: "address", + }, + ], + name: "OwnerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "discardedBy", + type: "address", + }, + ], + name: "ProposalDiscarded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "ProposalSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newTimelock", + type: "uint256", + }, + ], + name: "ProposalTimelockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "approvalCount", + type: "uint256", + }, + ], + name: "QuorumNotReached", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_newGuardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "addOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newTimelock", + type: "uint256", + }, + ], + name: "changeProposalTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "discardCurrentProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_proposalId", + type: "uint256", + }, + ], + name: "getProposal", + outputs: [ + { + internalType: "address", + name: "ownerProposed_", + type: "address", + }, + { + internalType: "uint256", + name: "approvalCount_", + type: "uint256", + }, + { + internalType: "address[]", + name: "guardiansApproved_", + type: "address[]", + }, + { + internalType: "bool", + name: "resolved_", + type: "bool", + }, + { + internalType: "uint256", + name: "proposedAt_", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardianCosign", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "guardianPropose", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "removeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IAccessController__factory { + static readonly abi = _abi; + static createInterface(): IAccessControllerInterface { + return new utils.Interface(_abi) as IAccessControllerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IAccessController { + return new Contract(address, _abi, signerOrProvider) as IAccessController; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook__factory.ts new file mode 100644 index 0000000..077b3de --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook__factory.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IAccountConfig_Hook, + IAccountConfig_HookInterface, +} from "../../../../../src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableHook", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableHook", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "hook", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installHook", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "hook", + type: "address", + }, + ], + name: "isHookInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "hook", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallHook", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IAccountConfig_Hook__factory { + static readonly abi = _abi; + static createInterface(): IAccountConfig_HookInterface { + return new utils.Interface(_abi) as IAccountConfig_HookInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IAccountConfig_Hook { + return new Contract(address, _abi, signerOrProvider) as IAccountConfig_Hook; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig__factory.ts new file mode 100644 index 0000000..6ee2eb2 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig__factory.ts @@ -0,0 +1,243 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IAccountConfig, + IAccountConfigInterface, +} from "../../../../../src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableValidator", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + ], + name: "isFallbackInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "isValidatorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IAccountConfig__factory { + static readonly abi = _abi; + static createInterface(): IAccountConfigInterface { + return new utils.Interface(_abi) as IAccountConfigInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IAccountConfig { + return new Contract(address, _abi, signerOrProvider) as IAccountConfig; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579__factory.ts new file mode 100644 index 0000000..5669822 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579__factory.ts @@ -0,0 +1,443 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IEtherspotWallet7579, + IEtherspotWallet7579Interface, +} from "../../../../../src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579"; + +const _abi = [ + { + inputs: [], + name: "Unsupported", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableValidator", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatch", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatchFromExecutor", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCall", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCallFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "initializeAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + ], + name: "isFallbackInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "isValidatorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IEtherspotWallet7579__factory { + static readonly abi = _abi; + static createInterface(): IEtherspotWallet7579Interface { + return new utils.Interface(_abi) as IEtherspotWallet7579Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IEtherspotWallet7579 { + return new Contract( + address, + _abi, + signerOrProvider + ) as IEtherspotWallet7579; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe__factory.ts new file mode 100644 index 0000000..e6831c6 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe__factory.ts @@ -0,0 +1,74 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IExecutionUnsafe, + IExecutionUnsafeInterface, +} from "../../../../../src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCall", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCallFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class IExecutionUnsafe__factory { + static readonly abi = _abi; + static createInterface(): IExecutionUnsafeInterface { + return new utils.Interface(_abi) as IExecutionUnsafeInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IExecutionUnsafe { + return new Contract(address, _abi, signerOrProvider) as IExecutionUnsafe; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution__factory.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution__factory.ts new file mode 100644 index 0000000..059a61d --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution__factory.ts @@ -0,0 +1,161 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IExecution, + IExecutionInterface, +} from "../../../../../src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution"; + +const _abi = [ + { + inputs: [], + name: "Unsupported", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatch", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatchFromExecutor", + outputs: [ + { + internalType: "bytes[]", + name: "results", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class IExecution__factory { + static readonly abi = _abi; + static createInterface(): IExecutionInterface { + return new utils.Interface(_abi) as IExecutionInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IExecution { + return new Contract(address, _abi, signerOrProvider) as IExecution; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts new file mode 100644 index 0000000..8eff275 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IAccountConfig__factory } from "./IAccountConfig__factory"; +export { IAccountConfig_Hook__factory } from "./IAccountConfig_Hook__factory"; +export { IEtherspotWallet7579__factory } from "./IEtherspotWallet7579__factory"; +export { IExecution__factory } from "./IExecution__factory"; +export { IExecutionUnsafe__factory } from "./IExecutionUnsafe__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/interfaces/index.ts b/src/sdk/contracts/factories/src/ERC7579/interfaces/index.ts new file mode 100644 index 0000000..c792dff --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/interfaces/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as iEtherspotWallet7579Sol from "./IEtherspotWallet7579.sol"; +export { IAccessController__factory } from "./IAccessController__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/libraries/ErrorsLib__factory.ts b/src/sdk/contracts/factories/src/ERC7579/libraries/ErrorsLib__factory.ts new file mode 100644 index 0000000..b047c50 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/libraries/ErrorsLib__factory.ts @@ -0,0 +1,133 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + ErrorsLib, + ErrorsLibInterface, +} from "../../../../src/ERC7579/libraries/ErrorsLib"; + +const _abi = [ + { + inputs: [], + name: "AddingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "AddingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "AlreadySignedProposal", + type: "error", + }, + { + inputs: [], + name: "InvalidProposal", + type: "error", + }, + { + inputs: [], + name: "NotEnoughGuardians", + type: "error", + }, + { + inputs: [], + name: "OnlyGuardian", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrGuardianOrSelf", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrSelf", + type: "error", + }, + { + inputs: [], + name: "ProposalResolved", + type: "error", + }, + { + inputs: [], + name: "ProposalTimelocked", + type: "error", + }, + { + inputs: [], + name: "ProposalUnresolved", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "WalletNeedsOwner", + type: "error", + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208d77a094057176932190cc82a0949e5656ae0e3c73149fc8a0e34e957dade28d64736f6c63430008170033"; + +type ErrorsLibConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ErrorsLibConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class ErrorsLib__factory extends ContractFactory { + constructor(...args: ErrorsLibConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): ErrorsLib { + return super.attach(address) as ErrorsLib; + } + override connect(signer: Signer): ErrorsLib__factory { + return super.connect(signer) as ErrorsLib__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ErrorsLibInterface { + return new utils.Interface(_abi) as ErrorsLibInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ErrorsLib { + return new Contract(address, _abi, signerOrProvider) as ErrorsLib; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/libraries/index.ts b/src/sdk/contracts/factories/src/ERC7579/libraries/index.ts new file mode 100644 index 0000000..31dc99c --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ErrorsLib__factory } from "./ErrorsLib__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/modules/MultipleOwnerECDSAValidator__factory.ts b/src/sdk/contracts/factories/src/ERC7579/modules/MultipleOwnerECDSAValidator__factory.ts new file mode 100644 index 0000000..9c5a725 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/modules/MultipleOwnerECDSAValidator__factory.ts @@ -0,0 +1,251 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + MultipleOwnerECDSAValidator, + MultipleOwnerECDSAValidatorInterface, +} from "../../../../src/ERC7579/modules/MultipleOwnerECDSAValidator"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes4", + name: "functionSig", + type: "bytes4", + }, + ], + name: "InvalidExecution", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "InvalidTargetAddress", + type: "error", + }, + { + inputs: [], + name: "InvalidTargetCall", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "typeID", + type: "uint256", + }, + ], + name: "isModuleType", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "isValidSignatureWithSender", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onInstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onUninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct IERC4337.UserOperation", + name: "userOp", + type: "tuple", + }, + { + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + ], + name: "validateUserOp", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610497806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80636d61fe701461005c5780638a91b0e31461005c578063ecd0596114610070578063f551e2ee14610099578063fff35b72146100ca575b600080fd5b61006e61006a3660046102e3565b5050565b005b61008461007e366004610325565b60011490565b60405190151581526020015b60405180910390f35b6100b16100a736600461033e565b6000949350505050565b6040516001600160e01b03199091168152602001610090565b6100dd6100d83660046103a6565b6100eb565b604051908152602001610090565b60008061011d836020527b19457468657265756d205369676e6564204d6573736167653a0a3332600052603c60042090565b9050600061016f6101326101408701876103f1565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525086939250506102099050565b90506001600160a01b03811615806101ec57506040516317aa5fb760e11b81526001600160a01b03821660048201523390632f54bf6e90602401602060405180830381865afa1580156101c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ea9190610438565b155b156101fc57600192505050610203565b6000925050505b92915050565b604051600190836000526020830151604052604083510361024557604083015160ff81901c601b016020526001600160ff1b031660605261026b565b604183510361026657606083015160001a602052604083015160605261026b565b600091505b6020600160806000855afa5191503d61028c57638baa579f6000526004601cfd5b600060605260405292915050565b60008083601f8401126102ac57600080fd5b50813567ffffffffffffffff8111156102c457600080fd5b6020830191508360208285010111156102dc57600080fd5b9250929050565b600080602083850312156102f657600080fd5b823567ffffffffffffffff81111561030d57600080fd5b6103198582860161029a565b90969095509350505050565b60006020828403121561033757600080fd5b5035919050565b6000806000806060858703121561035457600080fd5b84356001600160a01b038116811461036b57600080fd5b935060208501359250604085013567ffffffffffffffff81111561038e57600080fd5b61039a8782880161029a565b95989497509550505050565b600080604083850312156103b957600080fd5b823567ffffffffffffffff8111156103d057600080fd5b830161016081860312156103e357600080fd5b946020939093013593505050565b6000808335601e1984360301811261040857600080fd5b83018035915067ffffffffffffffff82111561042357600080fd5b6020019150368190038213156102dc57600080fd5b60006020828403121561044a57600080fd5b8151801515811461045a57600080fd5b939250505056fea264697066735822122036bd3e1fce05431ea8ff3ebb7b3cef0b85122211ada4d99f17200148e3e32eda64736f6c63430008170033"; + +type MultipleOwnerECDSAValidatorConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: MultipleOwnerECDSAValidatorConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class MultipleOwnerECDSAValidator__factory extends ContractFactory { + constructor(...args: MultipleOwnerECDSAValidatorConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): MultipleOwnerECDSAValidator { + return super.attach(address) as MultipleOwnerECDSAValidator; + } + override connect(signer: Signer): MultipleOwnerECDSAValidator__factory { + return super.connect(signer) as MultipleOwnerECDSAValidator__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): MultipleOwnerECDSAValidatorInterface { + return new utils.Interface(_abi) as MultipleOwnerECDSAValidatorInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MultipleOwnerECDSAValidator { + return new Contract( + address, + _abi, + signerOrProvider + ) as MultipleOwnerECDSAValidator; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/modules/index.ts b/src/sdk/contracts/factories/src/ERC7579/modules/index.ts new file mode 100644 index 0000000..bcc968e --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/modules/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { MultipleOwnerECDSAValidator__factory } from "./MultipleOwnerECDSAValidator__factory"; diff --git a/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Base__factory.ts b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Base__factory.ts new file mode 100644 index 0000000..c4cb0cf --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Base__factory.ts @@ -0,0 +1,739 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + EtherspotWallet7579Base, + EtherspotWallet7579BaseInterface, +} from "../../../../src/ERC7579/wallet/EtherspotWallet7579Base"; + +const _abi = [ + { + inputs: [], + name: "AccountAccessUnauthorized", + type: "error", + }, + { + inputs: [], + name: "CannotRemoveLastValidator", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "InvalidModule", + type: "error", + }, + { + inputs: [], + name: "LinkedList_AlreadyInitialized", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "entry", + type: "address", + }, + ], + name: "LinkedList_EntryAlreadyInList", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "entry", + type: "address", + }, + ], + name: "LinkedList_InvalidEntry", + type: "error", + }, + { + inputs: [], + name: "LinkedList_InvalidPage", + type: "error", + }, + { + inputs: [], + name: "Unsupported", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "currentHandler", + type: "address", + }, + ], + name: "fallbackHandlerAlreadyInstalled", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "handler", + type: "address", + }, + ], + name: "FallbackHandlerChanged", + type: "event", + }, + { + stateMutability: "nonpayable", + type: "fallback", + }, + { + inputs: [], + name: "entryPoint", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatch", + outputs: [ + { + internalType: "bytes[]", + name: "result", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatchFromExecutor", + outputs: [ + { + internalType: "bytes[]", + name: "returnDatas", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCall", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCallFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "returnData", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "cursor", + type: "address", + }, + { + internalType: "uint256", + name: "size", + type: "uint256", + }, + ], + name: "getExecutorsPaginated", + outputs: [ + { + internalType: "address[]", + name: "array", + type: "address[]", + }, + { + internalType: "address", + name: "next", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "cursor", + type: "address", + }, + { + internalType: "uint256", + name: "size", + type: "uint256", + }, + ], + name: "getValidatorPaginated", + outputs: [ + { + internalType: "address[]", + name: "array", + type: "address[]", + }, + { + internalType: "address", + name: "next", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "initializeAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + ], + name: "isFallbackInstalled", + outputs: [ + { + internalType: "bool", + name: "enabled", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "isValidatorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct IERC4337.UserOperation", + name: "userOp", + type: "tuple", + }, + { + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "missingAccountFunds", + type: "uint256", + }, + ], + name: "validateUserOp", + outputs: [ + { + internalType: "uint256", + name: "validSignature", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; + +export class EtherspotWallet7579Base__factory { + static readonly abi = _abi; + static createInterface(): EtherspotWallet7579BaseInterface { + return new utils.Interface(_abi) as EtherspotWallet7579BaseInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): EtherspotWallet7579Base { + return new Contract( + address, + _abi, + signerOrProvider + ) as EtherspotWallet7579Base; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Factory__factory.ts b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Factory__factory.ts new file mode 100644 index 0000000..a823bc9 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579Factory__factory.ts @@ -0,0 +1,168 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + EtherspotWallet7579Factory, + EtherspotWallet7579FactoryInterface, +} from "../../../../src/ERC7579/wallet/EtherspotWallet7579Factory"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_ewImplementation", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + ], + name: "_getSalt", + outputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + ], + name: "createAccount", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "initcode", + type: "bytes", + }, + ], + name: "getAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +const _bytecode = + "0x60a060405234801561001057600080fd5b5060405161054438038061054483398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516104ac61009860003960008181608901528181610141015261018901526104ac6000f3fe60806040526004361061003f5760003560e01c806356c717f5146100445780635c60da1b14610077578063d959fd0e146100c3578063f8a59370146100e3575b600080fd5b34801561005057600080fd5b5061006461005f3660046103b1565b6100f6565b6040519081526020015b60405180910390f35b34801561008357600080fd5b506100ab7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161006e565b3480156100cf57600080fd5b506100ab6100de3660046103b1565b61012c565b6100ab6100f13660046103b1565b610170565b600083838360405160200161010d9392919061042d565b6040516020818303038152906040528051906020012090509392505050565b60008061013a8585856100f6565b90506101677f00000000000000000000000000000000000000000000000000000000000000008230610222565b95945050505050565b60008061017e8585856100f6565b90506000806101ae347f0000000000000000000000000000000000000000000000000000000000000000856102ab565b915091508161021857604051634b6a141960e01b81526001600160a01b03821690634b6a1419906101e59089908990600401610447565b600060405180830381600087803b1580156101ff57600080fd5b505af1158015610213573d6000803e3d6000fd5b505050505b9695505050505050565b60008061029e85604080517fcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f360609081527f5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e20768352616009602052601e9390935268603d3d8160223d3973600a52605f6021209152600090915290565b905061016781858561038f565b6000806040517fcc3735a920a3ca505d382bbc545af43d6000803e6038573d6000fd5b3d6000f36060527f5155f3363d3d373d3d363d7f360894a13ba1a3210667c828492db98dca3e207660405261600960205284601e5268603d3d8160223d3973600a52605f60212060358201523060581b815260ff8153836015820152605581209150813b6103575783605f602188f59150816103525763301164256000526004601cfd5b61037d565b60019250851561037d5760003860003889865af161037d5763b12d13eb6000526004601cfd5b80604052506000606052935093915050565b600060ff60005350603592835260601b60015260155260556000908120915290565b6000806000604084860312156103c657600080fd5b83359250602084013567ffffffffffffffff808211156103e557600080fd5b818601915086601f8301126103f957600080fd5b81358181111561040857600080fd5b87602082850101111561041a57600080fd5b6020830194508093505050509250925092565b838152818360208301376000910160200190815292915050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f1916010191905056fea2646970667358221220a61ce66e1d571004e70201d8429d05f49ab0d1c9fa70aadd2e986bf67745bbe764736f6c63430008170033"; + +type EtherspotWallet7579FactoryConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: EtherspotWallet7579FactoryConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class EtherspotWallet7579Factory__factory extends ContractFactory { + constructor(...args: EtherspotWallet7579FactoryConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _ewImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + _ewImplementation, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + _ewImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(_ewImplementation, overrides || {}); + } + override attach(address: string): EtherspotWallet7579Factory { + return super.attach(address) as EtherspotWallet7579Factory; + } + override connect(signer: Signer): EtherspotWallet7579Factory__factory { + return super.connect(signer) as EtherspotWallet7579Factory__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): EtherspotWallet7579FactoryInterface { + return new utils.Interface(_abi) as EtherspotWallet7579FactoryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): EtherspotWallet7579Factory { + return new Contract( + address, + _abi, + signerOrProvider + ) as EtherspotWallet7579Factory; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts new file mode 100644 index 0000000..d76a095 --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts @@ -0,0 +1,1284 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + EtherspotWallet7579, + EtherspotWallet7579Interface, +} from "../../../../src/ERC7579/wallet/EtherspotWallet7579"; + +const _abi = [ + { + inputs: [], + name: "AccountAccessUnauthorized", + type: "error", + }, + { + inputs: [], + name: "AddingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "AddingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "AlreadySignedProposal", + type: "error", + }, + { + inputs: [], + name: "CannotRemoveLastValidator", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "InvalidAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "InvalidModule", + type: "error", + }, + { + inputs: [], + name: "InvalidProposal", + type: "error", + }, + { + inputs: [], + name: "LinkedList_AlreadyInitialized", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "entry", + type: "address", + }, + ], + name: "LinkedList_EntryAlreadyInList", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "entry", + type: "address", + }, + ], + name: "LinkedList_InvalidEntry", + type: "error", + }, + { + inputs: [], + name: "LinkedList_InvalidPage", + type: "error", + }, + { + inputs: [], + name: "NotEnoughGuardians", + type: "error", + }, + { + inputs: [], + name: "OnlyGuardian", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrGuardianOrSelf", + type: "error", + }, + { + inputs: [], + name: "OnlyOwnerOrSelf", + type: "error", + }, + { + inputs: [], + name: "ProposalResolved", + type: "error", + }, + { + inputs: [], + name: "ProposalTimelocked", + type: "error", + }, + { + inputs: [], + name: "ProposalUnresolved", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidGuardian", + type: "error", + }, + { + inputs: [], + name: "RemovingInvalidOwner", + type: "error", + }, + { + inputs: [], + name: "Unsupported", + type: "error", + }, + { + inputs: [], + name: "WalletNeedsOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "currentHandler", + type: "address", + }, + ], + name: "fallbackHandlerAlreadyInstalled", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "DisableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableExecutor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "module", + type: "address", + }, + ], + name: "EnableValidator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "handler", + type: "address", + }, + ], + name: "FallbackHandlerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newGuardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedGuardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "removedOwner", + type: "address", + }, + ], + name: "OwnerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "discardedBy", + type: "address", + }, + ], + name: "ProposalDiscarded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + ], + name: "ProposalSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "newTimelock", + type: "uint256", + }, + ], + name: "ProposalTimelockChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "newOwnerProposed", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "approvalCount", + type: "uint256", + }, + ], + name: "QuorumNotReached", + type: "event", + }, + { + stateMutability: "nonpayable", + type: "fallback", + }, + { + inputs: [], + name: "AUTHOR", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NAME", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VERSION", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newGuardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "addOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newTimelock", + type: "uint256", + }, + ], + name: "changeProposalTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "discardCurrentProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "entryPoint", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "execute", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatch", + outputs: [ + { + internalType: "bytes[]", + name: "result", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + internalType: "struct IExecution.Execution[]", + name: "executions", + type: "tuple[]", + }, + ], + name: "executeBatchFromExecutor", + outputs: [ + { + internalType: "bytes[]", + name: "returnDatas", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCall", + outputs: [ + { + internalType: "bytes", + name: "result", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeDelegateCallFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + ], + name: "executeFromExecutor", + outputs: [ + { + internalType: "bytes", + name: "returnData", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "cursor", + type: "address", + }, + { + internalType: "uint256", + name: "size", + type: "uint256", + }, + ], + name: "getExecutorsPaginated", + outputs: [ + { + internalType: "address[]", + name: "array", + type: "address[]", + }, + { + internalType: "address", + name: "next", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_proposalId", + type: "uint256", + }, + ], + name: "getProposal", + outputs: [ + { + internalType: "address", + name: "ownerProposed_", + type: "address", + }, + { + internalType: "uint256", + name: "approvalCount_", + type: "uint256", + }, + { + internalType: "address[]", + name: "guardiansApproved_", + type: "address[]", + }, + { + internalType: "bool", + name: "resolved_", + type: "bool", + }, + { + internalType: "uint256", + name: "proposedAt_", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "cursor", + type: "address", + }, + { + internalType: "uint256", + name: "size", + type: "uint256", + }, + ], + name: "getValidatorPaginated", + outputs: [ + { + internalType: "address[]", + name: "array", + type: "address[]", + }, + { + internalType: "address", + name: "next", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardianCosign", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "guardianCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "guardianPropose", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "initializeAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "installValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "fallbackHandler", + type: "address", + }, + ], + name: "isFallbackInstalled", + outputs: [ + { + internalType: "bool", + name: "enabled", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + ], + name: "isValidatorInstalled", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ownerCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalTimelock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "removeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallExecutor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallFallback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "validator", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "uninstallValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "bytes", + name: "initCode", + type: "bytes", + }, + { + internalType: "bytes", + name: "callData", + type: "bytes", + }, + { + internalType: "uint256", + name: "callGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "verificationGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "preVerificationGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "bytes", + name: "paymasterAndData", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + internalType: "struct IERC4337.UserOperation", + name: "userOp", + type: "tuple", + }, + { + internalType: "bytes32", + name: "userOpHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "missingAccountFunds", + type: "uint256", + }, + ], + name: "validateUserOp", + outputs: [ + { + internalType: "uint256", + name: "validSignature", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; + +const _bytecode = + "0x60e06040526103e860805261025860a0526201518060c05234801561002357600080fd5b5060805160a05160c051612fa6610053600039600061164c01526000611d9e01526000611dd60152612fa66000f3fe60806040526004361061023f5760003560e01c8063714041561161012e578063b61d27f6116100ab578063d8bf2fca1161006f578063d8bf2fca1461073b578063d8e2fa1a1461075b578063ea5f61d01461077b578063f32a36611461079b578063ffa1ad74146107bb57610246565b8063b61d27f6146106b9578063b68df16d146106cc578063bf57159b146106df578063c3db8838146106f5578063c7f758a81461070a57610246565b8063a3f4df7e116100f2578063a3f4df7e146105d8578063a526d83b14610615578063a7be85c614610635578063b0d691fe1461066a578063b31d43be1461069957610246565b806371404156146105375780637dcab4ce146105575780638557136814610577578063899764e6146105a5578063a1c0d459146105b857610246565b806334fcd5be116101bc5780634899c131116101805780634899c131146104ae5780634b6a1419146104ce57806354387ad7146104ee5780636613e1ed146105045780637065cb481461051757610246565b806334fcd5be146104265780633a871cdd1461044657806341c9ddff1461045957806342405d1b1461046e57806348135bf81461048e57610246565b80631626ba7e116102035780631626ba7e14610377578063173825d9146103b0578063200ff328146103d05780632dfca445146103f05780632f54bf6e1461040657610246565b806301ffc9a7146102bc578063053c6d98146102f15780630c68ba21146103135780630c8aefe5146103335780630db026221461035357610246565b3661024657005b34801561025257600080fd5b50600080516020612f3183398151915280548061026b57005b60408051368101909152366000823760408051601481019091523360601b9052600080366014018382865af19150506102aa3d60408051918201905290565b3d6000823e816102b8573d81fd5b3d81f35b3480156102c857600080fd5b506102dc6102d736600461260d565b6107ec565b60405190151581526020015b60405180910390f35b3480156102fd57600080fd5b5061031161030c366004612690565b61083d565b005b34801561031f57600080fd5b506102dc61032e3660046126e4565b61091b565b34801561033f57600080fd5b506102dc61034e3660046126e4565b610939565b34801561035f57600080fd5b5061036960005481565b6040519081526020016102e8565b34801561038357600080fd5b50610397610392366004612701565b61095b565b6040516001600160e01b031990911681526020016102e8565b3480156103bc57600080fd5b506103116103cb3660046126e4565b610970565b3480156103dc57600080fd5b506102dc6103eb3660046126e4565b610a4b565b3480156103fc57600080fd5b5061036960025481565b34801561041257600080fd5b506102dc6104213660046126e4565b610a7b565b610439610434366004612733565b610a99565b6040516102e891906127f7565b61036961045436600461285b565b610ae3565b34801561046557600080fd5b50610311610b9c565b34801561047a57600080fd5b506102dc6104893660046126e4565b610d5b565b34801561049a57600080fd5b506103116104a9366004612690565b610d76565b6104c16104bc3660046128ae565b610dc4565b6040516102e89190612909565b3480156104da57600080fd5b506103116104e936600461291c565b610e14565b3480156104fa57600080fd5b5061036960015481565b6104c16105123660046129ff565b610e39565b34801561052357600080fd5b506103116105323660046126e4565b610e8c565b34801561054357600080fd5b506103116105523660046126e4565b610f4a565b34801561056357600080fd5b506103116105723660046126e4565b610ffb565b34801561058357600080fd5b50610597610592366004612a4e565b6111e2565b6040516102e8929190612abf565b6104396105b3366004612733565b61120d565b3480156105c457600080fd5b506103116105d3366004612ae9565b611251565b3480156105e457600080fd5b506104c16040518060400160405280601181526020017020b1b1b2b9b99021b7b73a3937b63632b960791b81525081565b34801561062157600080fd5b506103116106303660046126e4565b6112bc565b34801561064157600080fd5b506104c160405180604001604052806009815260200168115d1a195c9cdc1bdd60ba1b81525081565b34801561067657600080fd5b50604051735ff137d4b0fdcd49dca30c7cf57e578a026d278981526020016102e8565b3480156106a557600080fd5b506103116106b4366004612690565b61137a565b6104c16106c73660046128ae565b61148b565b6104c16106da366004612690565b6114ef565b3480156106eb57600080fd5b5061036960035481565b34801561070157600080fd5b5061031161153a565b34801561071657600080fd5b5061072a610725366004612ae9565b6116f6565b6040516102e8959493929190612b02565b34801561074757600080fd5b50610311610756366004612690565b611800565b34801561076757600080fd5b50610311610776366004612690565b6118d7565b34801561078757600080fd5b50610597610796366004612a4e565b61191f565b3480156107a757600080fd5b506103116107b6366004612690565b61193d565b3480156107c757600080fd5b506104c1604051806040016040528060058152602001640312e302e360dc1b81525081565b600063b495ebe760e01b6001600160e01b031983160161080e57506001919050565b63b495ebe760e01b6001600160e01b031983160161082e57506001919050565b61083782611986565b92915050565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061085e57503330145b61087b57604051635629665f60e11b815260040160405180910390fd5b6000610893600080516020612f318339815191525490565b90506001600160a01b038116156108cd576040516303f1500160e11b81526001600160a01b03821660048201526024015b60405180910390fd5b6108d8848484611a90565b6040516001600160a01b03851681527fb40551e04c79c5ed1bda94430715b4fbd0748b35cc548419af988aeb0679915f906020015b60405180910390a150505050565b6001600160a01b031660009081526005602052604090205460ff1690565b6000600080516020612f118339815191526109548184611af9565b9392505050565b6000610968848484611b33565b949350505050565b61097933610a7b565b8061098357503330145b6109a0576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806109bc57506109ba81610a7b565b155b156109da5760405163f1369ccb60e01b815260040160405180910390fd5b6001600054116109fd5760405163021870b960e11b815260040160405180910390fd5b610a0681611c00565b604080513081526001600160a01b03831660208201527fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367991015b60405180910390a150565b600080610a64600080516020612f318339815191525490565b6001600160a01b0390811693169290921492915050565b6001600160a01b031660009081526004602052604090205460ff1690565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d27891480610abc57503330145b610ad957604051635629665f60e11b815260040160405180910390fd5b6109548383611c33565b6000816020850135606081901c90610afa82610d5b565b610b0957600093505050610b82565b60405160016206524760e11b031981526001600160a01b0383169063fff35b7290610b3a908a908a90600401612bab565b6020604051808303816000875af1158015610b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7d9190612cc4565b935050505b8015610b945760003860003884335af1505b509392505050565b610ba53361091b565b610bc257604051636570ecab60e11b815260040160405180910390fd5b600254600003610be557604051631dc0650160e31b815260040160405180910390fd5b610bf0600254611d0b565b15610c0e576040516320181a3560e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff1615610c4857604051638b19dbcb60e01b815260040160405180910390fd5b60028054600090815260066020908152604080832060019081018054808301825590855292842090920180546001600160a01b031916331790558354835282209092018054909190610c9b908490612cf3565b90915550506002546000818152600660205260409020546001600160a01b031690610cc590611d82565b15610cf8576002546000908152600660205260409020805460ff60a01b1916600160a01b179055610cf581611e0e565b50565b60028054600081815260066020908152604091829020909301548151308152938401929092526001600160a01b0384169083015260608201527f7afa94f51443879f537b9be4f09d5d734c2c233b788d2f6af6565add34706bab90608001610a40565b6000600080516020612f518339815191526109548184611af9565b33735ff137d4b0fdcd49dca30c7cf57e578a026d27891480610d9757503330145b610db457604051635629665f60e11b815260040160405180910390fd5b610dbf838383611e3f565b505050565b6060600080516020612f11833981519152610ddf8133611af9565b610dfe57604051635c93ff2f60e11b81523360048201526024016108c4565b610e0a86868686611efb565b9695505050505050565b6000610e2282840184612d06565b50509050610e2f81611e0e565b610dbf8383611f31565b6060600080516020612f11833981519152610e548133611af9565b610e7357604051635c93ff2f60e11b81523360048201526024016108c4565b604051634851657960e11b815260040160405180910390fd5b610e9533610a7b565b80610e9f57503330145b610ebc576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610ed65750610ed68161091b565b80610ee55750610ee581610a7b565b15610f0357604051631a1aefc560e21b815260040160405180910390fd5b610f0c81611e0e565b604080513081526001600160a01b03831660208201527fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a9101610a40565b610f5333610a7b565b80610f5d57503330145b610f7a576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610f965750610f948161091b565b155b15610fb45760405163985f453960e01b815260040160405180910390fd5b610fbd81612008565b604080513081526001600160a01b03831660208201527fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b9101610a40565b6110043361091b565b61102157604051636570ecab60e11b815260040160405180910390fd5b6001600160a01b038116158061103b575061103b8161091b565b8061104a575061104a81610a7b565b1561106857604051631a1aefc560e21b815260040160405180910390fd5b6003600154101561108c57604051636bb07db960e11b815260040160405180910390fd5b600254600090815260066020526040902060010154158015906110c85750600254600090815260066020526040902054600160a01b900460ff16155b156110e657604051639fa6dc5760e01b815260040160405180910390fd5b6002546110f4906001612cf3565b6002818155600091825260066020908152604080842080546001600160a01b0387166001600160a01b03199182161790915583548552818520600190810180548083018255908752938620909301805490911633179055825484528320909101805491929091611165908490612cf3565b9091555050600280546000908152600660209081526040808320805460ff60a01b1916905583548352918290204260039091015591548151308152928301526001600160a01b038316908201523360608201527f9fb4a8d051aad8866705f4d52eb05a29939e15ad43dd4aab82cf31806759eac390608001610a40565b60606000600080516020612f5183398151915261120081868661203c565b92509250505b9250929050565b6060600080516020612f118339815191526112288133611af9565b61124757604051635c93ff2f60e11b81523360048201526024016108c4565b6109688484611c33565b61125a33610a7b565b8061126457503330145b611281576040516311d9f09160e01b815260040160405180910390fd5b600381905560408051308152602081018390527f47870c5ed1a3a6940ad17950265b8b50d279f73d7d026febbef88fd3ffcb934b9101610a40565b6112c533610a7b565b806112cf57503330145b6112ec576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b038116158061130657506113068161091b565b80611315575061131581610a7b565b156113335760405163053bd11560e31b815260040160405180910390fd5b61133c816121d8565b604080513081526001600160a01b03831660208201527fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a9101610a40565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061139b57503330145b6113b857604051635629665f60e11b815260040160405180910390fd5b600080516020612f518339815191526000806113d6858501866129ff565b604051638a91b0e360e01b815291935091506001600160a01b03871690638a91b0e390611407908490600401612909565b600060405180830381600087803b15801561142157600080fd5b505af1158015611435573d6000803e3d6000fd5b50611447925085915084905088612209565b6040516001600160a01b03871681527f36a773811aa40c53a642b0596c94174b588d0d1b2b9b6fa6e31c3c30d686163f9060200160405180910390a1505050505050565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d278914806114ae57503330145b806114bd57506114bd33610a7b565b6114da57604051635629665f60e11b815260040160405180910390fd5b6114e685858585611efb565b95945050505050565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061151257503330145b61152f57604051635629665f60e11b815260040160405180910390fd5b6109688484846122de565b61154333610a7b565b8061155257506115523361091b565b8061155c57503330145b611579576040516302d8be6160e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff16156115b357604051638b19dbcb60e01b815260040160405180910390fd5b6115bc3361091b565b80156115ca57506000600354115b15611611576003805460025460009081526006602052604090209091015442916115f391612cf3565b106116115760405163ae18e9c760e01b815260040160405180910390fd5b61161a3361091b565b80156116265750600354155b156116905760025460009081526006602052604090206003015442906116729062ffffff7f00000000000000000000000000000000000000000000000000000000000000001690612cf3565b106116905760405163ae18e9c760e01b815260040160405180910390fd5b60028054600090815260066020908152604091829020805460ff60a01b1916600160a01b179055915481513081529283015233908201527faf7f1090397448391393dc134b45d6d20e79a9d2a8f5a82fb42d1514a55ecbf99060600160405180910390a1565b6000806060818085158061170b575060025486115b1561172957604051631dc0650160e31b815260040160405180910390fd5b6000868152600660209081526040808320815160a08101835281546001600160a01b0381168252600160a01b900460ff161515818501526001820180548451818702810187018652818152929593948601938301828280156117b457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611796575b5050505050815260200160028201548152602001600382015481525050905080600001518160600151826040015183602001518460800151955095509550955095505091939590929450565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061182157503330145b61183e57604051635629665f60e11b815260040160405180910390fd5b60008061184d838501856129ff565b604051638a91b0e360e01b815291935091506001600160a01b03861690638a91b0e39061187e908490600401612909565b600060405180830381600087803b15801561189857600080fd5b505af11580156118ac573d6000803e3d6000fd5b5050505060006118c7600080516020612f5183398151915290565b6001019050611447818488612209565b33735ff137d4b0fdcd49dca30c7cf57e578a026d278914806118f857503330145b61191557604051635629665f60e11b815260040160405180910390fd5b610dbf8282612312565b60606000600080516020612f1183398151915261120081868661203c565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061195e57503330145b61197b57604051635629665f60e11b815260040160405180910390fd5b610dbf838383612397565b6000639c7f284760e01b6001600160e01b03198316016119a857506001919050565b63fe00365960e01b6001600160e01b03198316016119c857506001919050565b630cd5c99f60e01b6001600160e01b03198316016119e857506001919050565b6313a0681b60e11b6001600160e01b0319831601611a0857506001919050565b63f375101b60e01b6001600160e01b0319831601611a2857506001919050565b6316fd948160e31b6001600160e01b0319831601611a4857506001919050565b6326715e2160e11b6001600160e01b0319831601611a6857506001919050565b63bdbfa2e560e01b6001600160e01b0319831601611a8857506001919050565b506000919050565b6040516306d61fe760e41b81526001600160a01b03841690636d61fe7090611abe9085908590600401612d67565b600060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b50505050610dbf83612453565b600060016001600160a01b038316148015906109545750506001600160a01b03908116600090815260209290925260409091205416151590565b600080611b436014828587612d7b565b611b4c91612da5565b60601c9050611b5a81610d5b565b611b8257604051635c93ff2f60e11b81526001600160a01b03821660048201526024016108c4565b6001600160a01b03811663f551e2ee3387611ba0876014818b612d7b565b6040518563ffffffff1660e01b8152600401611bbf9493929190612dd8565b602060405180830381865afa158015611bdc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190612e00565b6001600160a01b0381166000908152600460205260408120805460ff1916905554611c2d90600190612e1d565b60005550565b606081806001600160401b03811115611c4e57611c4e61295d565b604051908082528060200260200182016040528015611c8157816020015b6060815260200190600190039081611c6c5790505b50915060005b81811015611d035736858583818110611ca257611ca2612e30565b9050602002810190611cb49190612e46565b9050611cdd611cc660208301836126e4565b6020830135611cd86040850185612e66565b611efb565b848381518110611cef57611cef612e30565b602090810291909101015250600101611c87565b505092915050565b6000805b600083815260066020526040902060010154811015611d79576000838152600660205260409020600101805433919083908110611d4e57611d4e612e30565b6000918252602090912001546001600160a01b031603611d715750600192915050565b600101611d0f565b50600092915050565b600154600082815260066020526040812060020154909161ffff7f00000000000000000000000000000000000000000000000000000000000000001691611dfc906fffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690612eac565b611e069190612ec3565b101592915050565b6001600160a01b0381166000908152600460205260408120805460ff191660019081179091559054611c2d91612cf3565b6040516306d61fe760e41b8152600080516020612f51833981519152906001600160a01b03851690636d61fe7090611e7d9086908690600401612d67565b600060405180830381600087803b158015611e9757600080fd5b505af1158015611eab573d6000803e3d6000fd5b50505050611ec2848261249990919063ffffffff16565b6040516001600160a01b03851681527f2d91d9c220de5aa44766800ef0fe09b060fdd021b142ae4d21ce6a87b066d1709060200161090d565b60405181838237600038838387895af1611f18573d6000823e3d81fd5b3d8152602081013d6000823e3d01604052949350505050565b6001600052600080516020612f518339815191526020527f643a0023cfcea778bfa72ce77c7e63d8b140a6542bf3f6edb59a96ccce28ad86546001600160a01b031615611f7d57600080fd5b611f8561256f565b600080611f9483850185612d06565b92509250506000826001600160a01b031682604051611fb39190612ee5565b600060405180830381855af49150503d8060008114611fee576040519150601f19603f3d011682016040523d82523d6000602084013e611ff3565b606091505b505090508061200157600080fd5b5050505050565b6001600160a01b0381166000908152600560205260409020805460ff19169055600180546120369190612e1d565b60015550565b606060006001600160a01b03841660011480159061205f575061205f8585611af9565b1561208857604051637c84ecfb60e01b81526001600160a01b03851660048201526024016108c4565b826000036120a95760405163f725081760e01b815260040160405180910390fd5b826001600160401b038111156120c1576120c161295d565b6040519080825280602002602001820160405280156120ea578160200160208202803683370190505b506001600160a01b03808616600090815260208890526040812054929450911691505b6001600160a01b0382161580159061212f57506001600160a01b038216600114155b801561213a57508381105b15612194578183828151811061215257612152612e30565b6001600160a01b03928316602091820292909201810191909152928116600090815292879052604090922054909116908061218c81612ef7565b91505061210d565b6001600160a01b0382166001146121cc57826121b1600183612e1d565b815181106121c1576121c1612e30565b602002602001015191505b80835250935093915050565b6001600160a01b0381166000908152600560205260409020805460ff19166001908117909155805461203691612cf3565b6001600160a01b038116158061222857506001600160a01b0381166001145b1561225157604051637c84ecfb60e01b81526001600160a01b03831660048201526024016108c4565b6001600160a01b0382811660009081526020859052604090205481169082161461229957604051637c84ecfb60e01b81526001600160a01b03821660048201526024016108c4565b6001600160a01b0390811660008181526020949094526040808520805494841686529085208054949093166001600160a01b0319948516179092559092528154169055565b604051818382376000388383875af46122fa573d6000823e3d81fd5b3d8152602081013d6000823e3d016040529392505050565b600061232a600080516020612f318339815191525490565b604051638a91b0e360e01b81529091506001600160a01b03821690638a91b0e39061235b9086908690600401612d67565b600060405180830381600087803b15801561237557600080fd5b505af1158015612389573d6000803e3d6000fd5b50505050610dbf6000612453565b6040516306d61fe760e41b8152600080516020612f11833981519152906001600160a01b03851690636d61fe70906123d59086908690600401612d67565b600060405180830381600087803b1580156123ef57600080fd5b505af1158015612403573d6000803e3d6000fd5b5050505061241a848261249990919063ffffffff16565b6040516001600160a01b03851681527fa94a505d6d06d2648d04f969a277c083b36aacc22be6fc3ab6afbadee18b6eb99060200161090d565b306001600160a01b0382160361248757604051634726455360e11b81526001600160a01b03821660048201526024016108c4565b600080516020612f3183398151915255565b6001600160a01b03811615806124b857506001600160a01b0381166001145b156124e157604051637c84ecfb60e01b81526001600160a01b03821660048201526024016108c4565b6001600160a01b03818116600090815260208490526040902054161561252557604051631034f46960e21b81526001600160a01b03821660048201526024016108c4565b60016000818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b600080516020612f51833981519152612595600080516020612f1183398151915261259a565b610cf5815b60016000908152602082905260409020546001600160a01b0316156125d2576040516329e42f3360e11b815260040160405180910390fd5b60016000818152602092909252604090912080546001600160a01b0319169091179055565b6001600160e01b031981168114610cf557600080fd5b60006020828403121561261f57600080fd5b8135610954816125f7565b6001600160a01b0381168114610cf557600080fd5b803561264a8161262a565b919050565b60008083601f84011261266157600080fd5b5081356001600160401b0381111561267857600080fd5b60208301915083602082850101111561120657600080fd5b6000806000604084860312156126a557600080fd5b83356126b08161262a565b925060208401356001600160401b038111156126cb57600080fd5b6126d78682870161264f565b9497909650939450505050565b6000602082840312156126f657600080fd5b81356109548161262a565b60008060006040848603121561271657600080fd5b8335925060208401356001600160401b038111156126cb57600080fd5b6000806020838503121561274657600080fd5b82356001600160401b038082111561275d57600080fd5b818501915085601f83011261277157600080fd5b81358181111561278057600080fd5b8660208260051b850101111561279557600080fd5b60209290920196919550909350505050565b60005b838110156127c25781810151838201526020016127aa565b50506000910152565b600081518084526127e38160208601602086016127a7565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561284e57603f1988860301845261283c8583516127cb565b94509285019290850190600101612820565b5092979650505050505050565b60008060006060848603121561287057600080fd5b83356001600160401b0381111561288657600080fd5b8401610160818703121561289957600080fd5b95602085013595506040909401359392505050565b600080600080606085870312156128c457600080fd5b84356128cf8161262a565b93506020850135925060408501356001600160401b038111156128f157600080fd5b6128fd8782880161264f565b95989497509550505050565b60208152600061095460208301846127cb565b6000806020838503121561292f57600080fd5b82356001600160401b0381111561294557600080fd5b6129518582860161264f565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298457600080fd5b81356001600160401b038082111561299e5761299e61295d565b604051601f8301601f19908116603f011681019082821181831017156129c6576129c661295d565b816040528381528660208588010111156129df57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612a1257600080fd5b8235612a1d8161262a565b915060208301356001600160401b03811115612a3857600080fd5b612a4485828601612973565b9150509250929050565b60008060408385031215612a6157600080fd5b8235612a6c8161262a565b946020939093013593505050565b60008151808452602080850194506020840160005b83811015612ab45781516001600160a01b031687529582019590820190600101612a8f565b509495945050505050565b604081526000612ad26040830185612a7a565b905060018060a01b03831660208301529392505050565b600060208284031215612afb57600080fd5b5035919050565b60018060a01b038616815284602082015260a060408201526000612b2960a0830186612a7a565b931515606083015250608001529392505050565b6000808335601e19843603018112612b5457600080fd5b83016020810192503590506001600160401b03811115612b7357600080fd5b80360382131561120657600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152612bcc60408201612bbf8561263f565b6001600160a01b03169052565b602083013560608201526000612be56040850185612b3d565b610160806080860152612bfd6101a086018385612b82565b9250612c0c6060880188612b3d565b9250603f19808786030160a0880152612c26858584612b82565b9450608089013560c088015260a089013560e0880152610100935060c089013584880152610120915060e089013582880152610140848a013581890152612c6f838b018b612b3d565b95509250818887030184890152612c87868685612b82565b9550612c95818b018b612b3d565b955093505080878603016101808801525050612cb2838383612b82565b93505050508260208301529392505050565b600060208284031215612cd657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561083757610837612cdd565b600080600060608486031215612d1b57600080fd5b8335612d268161262a565b92506020840135612d368161262a565b915060408401356001600160401b03811115612d5157600080fd5b612d5d86828701612973565b9150509250925092565b602081526000610968602083018486612b82565b60008085851115612d8b57600080fd5b83861115612d9857600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015611d035760149490940360031b84901b1690921692915050565b60018060a01b0385168152836020820152606060408201526000610e0a606083018486612b82565b600060208284031215612e1257600080fd5b8151610954816125f7565b8181038181111561083757610837612cdd565b634e487b7160e01b600052603260045260246000fd5b60008235605e19833603018112612e5c57600080fd5b9190910192915050565b6000808335601e19843603018112612e7d57600080fd5b8301803591506001600160401b03821115612e9757600080fd5b60200191503681900382131561120657600080fd5b808202811582820484141761083757610837612cdd565b600082612ee057634e487b7160e01b600052601260045260246000fd5b500490565b60008251612e5c8184602087016127a7565b600060018201612f0957612f09612cdd565b506001019056fef88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea039c63439e8db454cdf22fd3d05d35ed5ea662f6ebbc519905ab830d38464df094f88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02a26469706673582212209fb18fa9f56408b811a0a4bd8e0b24510141edebd07626fcda57fc51661b05b864736f6c63430008170033"; + +type EtherspotWallet7579ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: EtherspotWallet7579ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class EtherspotWallet7579__factory extends ContractFactory { + constructor(...args: EtherspotWallet7579ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): EtherspotWallet7579 { + return super.attach(address) as EtherspotWallet7579; + } + override connect(signer: Signer): EtherspotWallet7579__factory { + return super.connect(signer) as EtherspotWallet7579__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): EtherspotWallet7579Interface { + return new utils.Interface(_abi) as EtherspotWallet7579Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): EtherspotWallet7579 { + return new Contract(address, _abi, signerOrProvider) as EtherspotWallet7579; + } +} diff --git a/src/sdk/contracts/factories/src/ERC7579/wallet/index.ts b/src/sdk/contracts/factories/src/ERC7579/wallet/index.ts new file mode 100644 index 0000000..421fd6f --- /dev/null +++ b/src/sdk/contracts/factories/src/ERC7579/wallet/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { EtherspotWallet7579__factory } from "./EtherspotWallet7579__factory"; +export { EtherspotWallet7579Base__factory } from "./EtherspotWallet7579Base__factory"; +export { EtherspotWallet7579Factory__factory } from "./EtherspotWallet7579Factory__factory"; diff --git a/src/sdk/contracts/index.ts b/src/sdk/contracts/index.ts index cbe48d9..954ed39 100644 --- a/src/sdk/contracts/index.ts +++ b/src/sdk/contracts/index.ts @@ -76,5 +76,4 @@ export type { EtherspotWalletFactory } from "./src/wallet/EtherspotWalletFactory export { EtherspotWalletFactory__factory } from "./factories/src/wallet/EtherspotWalletFactory__factory"; export type { Proxy } from "./src/wallet/Proxy"; export { Proxy__factory } from "./factories/src/wallet/Proxy__factory"; -export type { EntryPoint } from "./account-abstraction/contracts/core/EntryPoint"; export { EntryPoint__factory } from "./factories/account-abstraction/contracts/core/EntryPoint__factory"; diff --git a/src/sdk/contracts/src/ERC6900/index.ts b/src/sdk/contracts/src/ERC6900/index.ts new file mode 100644 index 0000000..128489a --- /dev/null +++ b/src/sdk/contracts/src/ERC6900/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as libraries from "./libraries"; +export type { libraries }; diff --git a/src/sdk/contracts/src/ERC6900/libraries/ErrorsLib.ts b/src/sdk/contracts/src/ERC6900/libraries/ErrorsLib.ts new file mode 100644 index 0000000..716d95f --- /dev/null +++ b/src/sdk/contracts/src/ERC6900/libraries/ErrorsLib.ts @@ -0,0 +1,55 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../common"; + +export interface ErrorsLibInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ErrorsLib extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ErrorsLibInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/src/sdk/contracts/src/ERC6900/libraries/index.ts b/src/sdk/contracts/src/ERC6900/libraries/index.ts new file mode 100644 index 0000000..da947a3 --- /dev/null +++ b/src/sdk/contracts/src/ERC6900/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ErrorsLib } from "./ErrorsLib"; diff --git a/src/sdk/contracts/src/ERC7579/access/AccessController.ts b/src/sdk/contracts/src/ERC7579/access/AccessController.ts new file mode 100644 index 0000000..25f663d --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/access/AccessController.ts @@ -0,0 +1,768 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface AccessControllerInterface extends utils.Interface { + functions: { + "AUTHOR()": FunctionFragment; + "NAME()": FunctionFragment; + "VERSION()": FunctionFragment; + "addGuardian(address)": FunctionFragment; + "addOwner(address)": FunctionFragment; + "changeProposalTimelock(uint256)": FunctionFragment; + "discardCurrentProposal()": FunctionFragment; + "getProposal(uint256)": FunctionFragment; + "guardianCosign()": FunctionFragment; + "guardianCount()": FunctionFragment; + "guardianPropose(address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isOwner(address)": FunctionFragment; + "ownerCount()": FunctionFragment; + "proposalId()": FunctionFragment; + "proposalTimelock()": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "removeOwner(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "AUTHOR" + | "NAME" + | "VERSION" + | "addGuardian" + | "addOwner" + | "changeProposalTimelock" + | "discardCurrentProposal" + | "getProposal" + | "guardianCosign" + | "guardianCount" + | "guardianPropose" + | "isGuardian" + | "isOwner" + | "ownerCount" + | "proposalId" + | "proposalTimelock" + | "removeGuardian" + | "removeOwner" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "AUTHOR", values?: undefined): string; + encodeFunctionData(functionFragment: "NAME", values?: undefined): string; + encodeFunctionData(functionFragment: "VERSION", values?: undefined): string; + encodeFunctionData( + functionFragment: "addGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "changeProposalTimelock", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "discardCurrentProposal", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProposal", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "guardianCosign", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "guardianCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "guardianPropose", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ownerCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalTimelock", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "removeGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeOwner", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "AUTHOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addGuardian", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeProposalTimelock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "discardCurrentProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianCosign", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianPropose", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ownerCount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "proposalId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalTimelock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeGuardian", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeOwner", + data: BytesLike + ): Result; + + events: { + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "OwnerAdded(address,address)": EventFragment; + "OwnerRemoved(address,address)": EventFragment; + "ProposalDiscarded(address,uint256,address)": EventFragment; + "ProposalSubmitted(address,uint256,address,address)": EventFragment; + "ProposalTimelockChanged(address,uint256)": EventFragment; + "QuorumNotReached(address,uint256,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalDiscarded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalSubmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalTimelockChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumNotReached"): EventFragment; +} + +export interface GuardianAddedEventObject { + account: string; + newGuardian: string; +} +export type GuardianAddedEvent = TypedEvent< + [string, string], + GuardianAddedEventObject +>; + +export type GuardianAddedEventFilter = TypedEventFilter; + +export interface GuardianRemovedEventObject { + account: string; + removedGuardian: string; +} +export type GuardianRemovedEvent = TypedEvent< + [string, string], + GuardianRemovedEventObject +>; + +export type GuardianRemovedEventFilter = TypedEventFilter; + +export interface OwnerAddedEventObject { + account: string; + newOwner: string; +} +export type OwnerAddedEvent = TypedEvent< + [string, string], + OwnerAddedEventObject +>; + +export type OwnerAddedEventFilter = TypedEventFilter; + +export interface OwnerRemovedEventObject { + account: string; + removedOwner: string; +} +export type OwnerRemovedEvent = TypedEvent< + [string, string], + OwnerRemovedEventObject +>; + +export type OwnerRemovedEventFilter = TypedEventFilter; + +export interface ProposalDiscardedEventObject { + account: string; + proposalId: BigNumber; + discardedBy: string; +} +export type ProposalDiscardedEvent = TypedEvent< + [string, BigNumber, string], + ProposalDiscardedEventObject +>; + +export type ProposalDiscardedEventFilter = + TypedEventFilter; + +export interface ProposalSubmittedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + proposer: string; +} +export type ProposalSubmittedEvent = TypedEvent< + [string, BigNumber, string, string], + ProposalSubmittedEventObject +>; + +export type ProposalSubmittedEventFilter = + TypedEventFilter; + +export interface ProposalTimelockChangedEventObject { + account: string; + newTimelock: BigNumber; +} +export type ProposalTimelockChangedEvent = TypedEvent< + [string, BigNumber], + ProposalTimelockChangedEventObject +>; + +export type ProposalTimelockChangedEventFilter = + TypedEventFilter; + +export interface QuorumNotReachedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + approvalCount: BigNumber; +} +export type QuorumNotReachedEvent = TypedEvent< + [string, BigNumber, string, BigNumber], + QuorumNotReachedEventObject +>; + +export type QuorumNotReachedEventFilter = + TypedEventFilter; + +export interface AccessController extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AccessControllerInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + AUTHOR(overrides?: CallOverrides): Promise<[string]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + VERSION(overrides?: CallOverrides): Promise<[string]>; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ownerCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalTimelock(overrides?: CallOverrides): Promise<[BigNumber]>; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + discardCurrentProposal(overrides?: CallOverrides): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign(overrides?: CallOverrides): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "GuardianAdded(address,address)"( + account?: null, + newGuardian?: null + ): GuardianAddedEventFilter; + GuardianAdded(account?: null, newGuardian?: null): GuardianAddedEventFilter; + + "GuardianRemoved(address,address)"( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + GuardianRemoved( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + + "OwnerAdded(address,address)"( + account?: null, + newOwner?: null + ): OwnerAddedEventFilter; + OwnerAdded(account?: null, newOwner?: null): OwnerAddedEventFilter; + + "OwnerRemoved(address,address)"( + account?: null, + removedOwner?: null + ): OwnerRemovedEventFilter; + OwnerRemoved(account?: null, removedOwner?: null): OwnerRemovedEventFilter; + + "ProposalDiscarded(address,uint256,address)"( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + ProposalDiscarded( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + + "ProposalSubmitted(address,uint256,address,address)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + ProposalSubmitted( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + + "ProposalTimelockChanged(address,uint256)"( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + ProposalTimelockChanged( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + + "QuorumNotReached(address,uint256,address,uint256)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + QuorumNotReached( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + }; + + estimateGas: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/access/index.ts b/src/sdk/contracts/src/ERC7579/access/index.ts new file mode 100644 index 0000000..bc397b1 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/access/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { AccessController } from "./AccessController"; diff --git a/src/sdk/contracts/src/ERC7579/index.ts b/src/sdk/contracts/src/ERC7579/index.ts new file mode 100644 index 0000000..9da2e56 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/index.ts @@ -0,0 +1,13 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as access from "./access"; +export type { access }; +import type * as interfaces from "./interfaces"; +export type { interfaces }; +import type * as libraries from "./libraries"; +export type { libraries }; +import type * as modules from "./modules"; +export type { modules }; +import type * as wallet from "./wallet"; +export type { wallet }; diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IAccessController.ts b/src/sdk/contracts/src/ERC7579/interfaces/IAccessController.ts new file mode 100644 index 0000000..45fdcb3 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IAccessController.ts @@ -0,0 +1,652 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface IAccessControllerInterface extends utils.Interface { + functions: { + "addGuardian(address)": FunctionFragment; + "addOwner(address)": FunctionFragment; + "changeProposalTimelock(uint256)": FunctionFragment; + "discardCurrentProposal()": FunctionFragment; + "getProposal(uint256)": FunctionFragment; + "guardianCosign()": FunctionFragment; + "guardianPropose(address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isOwner(address)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "removeOwner(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addGuardian" + | "addOwner" + | "changeProposalTimelock" + | "discardCurrentProposal" + | "getProposal" + | "guardianCosign" + | "guardianPropose" + | "isGuardian" + | "isOwner" + | "removeGuardian" + | "removeOwner" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "changeProposalTimelock", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "discardCurrentProposal", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProposal", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "guardianCosign", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "guardianPropose", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeOwner", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "addGuardian", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeProposalTimelock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "discardCurrentProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianCosign", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianPropose", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeGuardian", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeOwner", + data: BytesLike + ): Result; + + events: { + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "OwnerAdded(address,address)": EventFragment; + "OwnerRemoved(address,address)": EventFragment; + "ProposalDiscarded(address,uint256,address)": EventFragment; + "ProposalSubmitted(address,uint256,address,address)": EventFragment; + "ProposalTimelockChanged(address,uint256)": EventFragment; + "QuorumNotReached(address,uint256,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalDiscarded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalSubmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalTimelockChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumNotReached"): EventFragment; +} + +export interface GuardianAddedEventObject { + account: string; + newGuardian: string; +} +export type GuardianAddedEvent = TypedEvent< + [string, string], + GuardianAddedEventObject +>; + +export type GuardianAddedEventFilter = TypedEventFilter; + +export interface GuardianRemovedEventObject { + account: string; + removedGuardian: string; +} +export type GuardianRemovedEvent = TypedEvent< + [string, string], + GuardianRemovedEventObject +>; + +export type GuardianRemovedEventFilter = TypedEventFilter; + +export interface OwnerAddedEventObject { + account: string; + newOwner: string; +} +export type OwnerAddedEvent = TypedEvent< + [string, string], + OwnerAddedEventObject +>; + +export type OwnerAddedEventFilter = TypedEventFilter; + +export interface OwnerRemovedEventObject { + account: string; + removedOwner: string; +} +export type OwnerRemovedEvent = TypedEvent< + [string, string], + OwnerRemovedEventObject +>; + +export type OwnerRemovedEventFilter = TypedEventFilter; + +export interface ProposalDiscardedEventObject { + account: string; + proposalId: BigNumber; + discardedBy: string; +} +export type ProposalDiscardedEvent = TypedEvent< + [string, BigNumber, string], + ProposalDiscardedEventObject +>; + +export type ProposalDiscardedEventFilter = + TypedEventFilter; + +export interface ProposalSubmittedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + proposer: string; +} +export type ProposalSubmittedEvent = TypedEvent< + [string, BigNumber, string, string], + ProposalSubmittedEventObject +>; + +export type ProposalSubmittedEventFilter = + TypedEventFilter; + +export interface ProposalTimelockChangedEventObject { + account: string; + newTimelock: BigNumber; +} +export type ProposalTimelockChangedEvent = TypedEvent< + [string, BigNumber], + ProposalTimelockChangedEventObject +>; + +export type ProposalTimelockChangedEventFilter = + TypedEventFilter; + +export interface QuorumNotReachedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + approvalCount: BigNumber; +} +export type QuorumNotReachedEvent = TypedEvent< + [string, BigNumber, string, BigNumber], + QuorumNotReachedEventObject +>; + +export type QuorumNotReachedEventFilter = + TypedEventFilter; + +export interface IAccessController extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IAccessControllerInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + discardCurrentProposal(overrides?: CallOverrides): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + guardianCosign(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "GuardianAdded(address,address)"( + account?: null, + newGuardian?: null + ): GuardianAddedEventFilter; + GuardianAdded(account?: null, newGuardian?: null): GuardianAddedEventFilter; + + "GuardianRemoved(address,address)"( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + GuardianRemoved( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + + "OwnerAdded(address,address)"( + account?: null, + newOwner?: null + ): OwnerAddedEventFilter; + OwnerAdded(account?: null, newOwner?: null): OwnerAddedEventFilter; + + "OwnerRemoved(address,address)"( + account?: null, + removedOwner?: null + ): OwnerRemovedEventFilter; + OwnerRemoved(account?: null, removedOwner?: null): OwnerRemovedEventFilter; + + "ProposalDiscarded(address,uint256,address)"( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + ProposalDiscarded( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + + "ProposalSubmitted(address,uint256,address,address)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + ProposalSubmitted( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + + "ProposalTimelockChanged(address,uint256)"( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + ProposalTimelockChanged( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + + "QuorumNotReached(address,uint256,address,uint256)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + QuorumNotReached( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + }; + + estimateGas: { + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig.ts new file mode 100644 index 0000000..faa61b4 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig.ts @@ -0,0 +1,485 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IAccountConfigInterface extends utils.Interface { + functions: { + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface IAccountConfig extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IAccountConfigInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + }; + + estimateGas: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook.ts new file mode 100644 index 0000000..ff54a52 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IAccountConfig_Hook.ts @@ -0,0 +1,215 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IAccountConfig_HookInterface extends utils.Interface { + functions: { + "installHook(address,bytes)": FunctionFragment; + "isHookInstalled(address)": FunctionFragment; + "uninstallHook(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "installHook" | "isHookInstalled" | "uninstallHook" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "installHook", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isHookInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallHook", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "installHook", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isHookInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallHook", + data: BytesLike + ): Result; + + events: { + "DisableHook(address)": EventFragment; + "EnableHook(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableHook"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableHook"): EventFragment; +} + +export interface DisableHookEventObject { + module: string; +} +export type DisableHookEvent = TypedEvent<[string], DisableHookEventObject>; + +export type DisableHookEventFilter = TypedEventFilter; + +export interface EnableHookEventObject { + module: string; +} +export type EnableHookEvent = TypedEvent<[string], EnableHookEventObject>; + +export type EnableHookEventFilter = TypedEventFilter; + +export interface IAccountConfig_Hook extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IAccountConfig_HookInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableHook(address)"(module?: null): DisableHookEventFilter; + DisableHook(module?: null): DisableHookEventFilter; + + "EnableHook(address)"(module?: null): EnableHookEventFilter; + EnableHook(module?: null): EnableHookEventFilter; + }; + + estimateGas: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + installHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isHookInstalled( + hook: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallHook( + hook: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579.ts new file mode 100644 index 0000000..44bfc2d --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IEtherspotWallet7579.ts @@ -0,0 +1,781 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export interface IEtherspotWallet7579Interface extends utils.Interface { + functions: { + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + "initializeAccount(bytes)": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + | "executeFromExecutor" + | "initializeAccount" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidatorInstalled" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initializeAccount", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initializeAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface IEtherspotWallet7579 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IEtherspotWallet7579Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + }; + + estimateGas: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution.ts new file mode 100644 index 0000000..13fc3c2 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecution.ts @@ -0,0 +1,253 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export interface IExecutionInterface extends utils.Interface { + functions: { + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeFromExecutor" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IExecution extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IExecutionInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe.ts new file mode 100644 index 0000000..21a108f --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/IExecutionUnsafe.ts @@ -0,0 +1,153 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IExecutionUnsafeInterface extends utils.Interface { + functions: { + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IExecutionUnsafe extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IExecutionUnsafeInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts new file mode 100644 index 0000000..ceb9610 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/IEtherspotWallet7579.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IAccountConfig } from "./IAccountConfig"; +export type { IAccountConfig_Hook } from "./IAccountConfig_Hook"; +export type { IEtherspotWallet7579 } from "./IEtherspotWallet7579"; +export type { IExecution } from "./IExecution"; +export type { IExecutionUnsafe } from "./IExecutionUnsafe"; diff --git a/src/sdk/contracts/src/ERC7579/interfaces/index.ts b/src/sdk/contracts/src/ERC7579/interfaces/index.ts new file mode 100644 index 0000000..b502ef0 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as iEtherspotWallet7579Sol from "./IEtherspotWallet7579.sol"; +export type { iEtherspotWallet7579Sol }; +export type { IAccessController } from "./IAccessController"; diff --git a/src/sdk/contracts/src/ERC7579/libraries/ErrorsLib.ts b/src/sdk/contracts/src/ERC7579/libraries/ErrorsLib.ts new file mode 100644 index 0000000..33e353d --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/libraries/ErrorsLib.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; + +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface ErrorsLibInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface ErrorsLib extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ErrorsLibInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/src/sdk/contracts/src/ERC7579/libraries/index.ts b/src/sdk/contracts/src/ERC7579/libraries/index.ts new file mode 100644 index 0000000..da947a3 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ErrorsLib } from "./ErrorsLib"; diff --git a/src/sdk/contracts/src/ERC7579/modules/MultipleOwnerECDSAValidator.ts b/src/sdk/contracts/src/ERC7579/modules/MultipleOwnerECDSAValidator.ts new file mode 100644 index 0000000..e4e783e --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/modules/MultipleOwnerECDSAValidator.ts @@ -0,0 +1,307 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IERC4337 { + export type UserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + callGasLimit: PromiseOrValue; + verificationGasLimit: PromiseOrValue; + preVerificationGas: PromiseOrValue; + maxFeePerGas: PromiseOrValue; + maxPriorityFeePerGas: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOperationStructOutput = [ + string, + BigNumber, + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string + ] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + callGasLimit: BigNumber; + verificationGasLimit: BigNumber; + preVerificationGas: BigNumber; + maxFeePerGas: BigNumber; + maxPriorityFeePerGas: BigNumber; + paymasterAndData: string; + signature: string; + }; +} + +export interface MultipleOwnerECDSAValidatorInterface extends utils.Interface { + functions: { + "isModuleType(uint256)": FunctionFragment; + "isValidSignatureWithSender(address,bytes32,bytes)": FunctionFragment; + "onInstall(bytes)": FunctionFragment; + "onUninstall(bytes)": FunctionFragment; + "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "isModuleType" + | "isValidSignatureWithSender" + | "onInstall" + | "onUninstall" + | "validateUserOp" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "isModuleType", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidSignatureWithSender", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "onInstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "onUninstall", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "validateUserOp", + values: [IERC4337.UserOperationStruct, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "isModuleType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidSignatureWithSender", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "onInstall", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "onUninstall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateUserOp", + data: BytesLike + ): Result; + + events: {}; +} + +export interface MultipleOwnerECDSAValidator extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: MultipleOwnerECDSAValidatorInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + isModuleType( + typeID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignatureWithSender( + sender: PromiseOrValue, + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + onInstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + onUninstall( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/modules/index.ts b/src/sdk/contracts/src/ERC7579/modules/index.ts new file mode 100644 index 0000000..40783ab --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/modules/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { MultipleOwnerECDSAValidator } from "./MultipleOwnerECDSAValidator"; diff --git a/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts new file mode 100644 index 0000000..cb51b42 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts @@ -0,0 +1,1750 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export declare namespace IERC4337 { + export type UserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + callGasLimit: PromiseOrValue; + verificationGasLimit: PromiseOrValue; + preVerificationGas: PromiseOrValue; + maxFeePerGas: PromiseOrValue; + maxPriorityFeePerGas: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOperationStructOutput = [ + string, + BigNumber, + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string + ] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + callGasLimit: BigNumber; + verificationGasLimit: BigNumber; + preVerificationGas: BigNumber; + maxFeePerGas: BigNumber; + maxPriorityFeePerGas: BigNumber; + paymasterAndData: string; + signature: string; + }; +} + +export interface EtherspotWallet7579Interface extends utils.Interface { + functions: { + "AUTHOR()": FunctionFragment; + "NAME()": FunctionFragment; + "VERSION()": FunctionFragment; + "addGuardian(address)": FunctionFragment; + "addOwner(address)": FunctionFragment; + "changeProposalTimelock(uint256)": FunctionFragment; + "discardCurrentProposal()": FunctionFragment; + "entryPoint()": FunctionFragment; + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + "getExecutorsPaginated(address,uint256)": FunctionFragment; + "getProposal(uint256)": FunctionFragment; + "getValidatorPaginated(address,uint256)": FunctionFragment; + "guardianCosign()": FunctionFragment; + "guardianCount()": FunctionFragment; + "guardianPropose(address)": FunctionFragment; + "initializeAccount(bytes)": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isOwner(address)": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "ownerCount()": FunctionFragment; + "proposalId()": FunctionFragment; + "proposalTimelock()": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "removeOwner(address)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "AUTHOR" + | "NAME" + | "VERSION" + | "addGuardian" + | "addOwner" + | "changeProposalTimelock" + | "discardCurrentProposal" + | "entryPoint" + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + | "executeFromExecutor" + | "getExecutorsPaginated" + | "getProposal" + | "getValidatorPaginated" + | "guardianCosign" + | "guardianCount" + | "guardianPropose" + | "initializeAccount" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isGuardian" + | "isOwner" + | "isValidSignature" + | "isValidatorInstalled" + | "ownerCount" + | "proposalId" + | "proposalTimelock" + | "removeGuardian" + | "removeOwner" + | "supportsInterface" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + | "validateUserOp" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "AUTHOR", values?: undefined): string; + encodeFunctionData(functionFragment: "NAME", values?: undefined): string; + encodeFunctionData(functionFragment: "VERSION", values?: undefined): string; + encodeFunctionData( + functionFragment: "addGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "changeProposalTimelock", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "discardCurrentProposal", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "entryPoint", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getExecutorsPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getProposal", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getValidatorPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "guardianCosign", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "guardianCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "guardianPropose", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initializeAccount", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidSignature", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ownerCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalTimelock", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "removeGuardian", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "validateUserOp", + values: [ + IERC4337.UserOperationStruct, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "AUTHOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addGuardian", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeProposalTimelock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "discardCurrentProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getExecutorsPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValidatorPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianCosign", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "guardianPropose", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initializeAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isValidSignature", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ownerCount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "proposalId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalTimelock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeGuardian", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeOwner", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateUserOp", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + "FallbackHandlerChanged(address)": EventFragment; + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "OwnerAdded(address,address)": EventFragment; + "OwnerRemoved(address,address)": EventFragment; + "ProposalDiscarded(address,uint256,address)": EventFragment; + "ProposalSubmitted(address,uint256,address,address)": EventFragment; + "ProposalTimelockChanged(address,uint256)": EventFragment; + "QuorumNotReached(address,uint256,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FallbackHandlerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalDiscarded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalSubmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalTimelockChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumNotReached"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface FallbackHandlerChangedEventObject { + handler: string; +} +export type FallbackHandlerChangedEvent = TypedEvent< + [string], + FallbackHandlerChangedEventObject +>; + +export type FallbackHandlerChangedEventFilter = + TypedEventFilter; + +export interface GuardianAddedEventObject { + account: string; + newGuardian: string; +} +export type GuardianAddedEvent = TypedEvent< + [string, string], + GuardianAddedEventObject +>; + +export type GuardianAddedEventFilter = TypedEventFilter; + +export interface GuardianRemovedEventObject { + account: string; + removedGuardian: string; +} +export type GuardianRemovedEvent = TypedEvent< + [string, string], + GuardianRemovedEventObject +>; + +export type GuardianRemovedEventFilter = TypedEventFilter; + +export interface OwnerAddedEventObject { + account: string; + newOwner: string; +} +export type OwnerAddedEvent = TypedEvent< + [string, string], + OwnerAddedEventObject +>; + +export type OwnerAddedEventFilter = TypedEventFilter; + +export interface OwnerRemovedEventObject { + account: string; + removedOwner: string; +} +export type OwnerRemovedEvent = TypedEvent< + [string, string], + OwnerRemovedEventObject +>; + +export type OwnerRemovedEventFilter = TypedEventFilter; + +export interface ProposalDiscardedEventObject { + account: string; + proposalId: BigNumber; + discardedBy: string; +} +export type ProposalDiscardedEvent = TypedEvent< + [string, BigNumber, string], + ProposalDiscardedEventObject +>; + +export type ProposalDiscardedEventFilter = + TypedEventFilter; + +export interface ProposalSubmittedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + proposer: string; +} +export type ProposalSubmittedEvent = TypedEvent< + [string, BigNumber, string, string], + ProposalSubmittedEventObject +>; + +export type ProposalSubmittedEventFilter = + TypedEventFilter; + +export interface ProposalTimelockChangedEventObject { + account: string; + newTimelock: BigNumber; +} +export type ProposalTimelockChangedEvent = TypedEvent< + [string, BigNumber], + ProposalTimelockChangedEventObject +>; + +export type ProposalTimelockChangedEventFilter = + TypedEventFilter; + +export interface QuorumNotReachedEventObject { + account: string; + proposalId: BigNumber; + newOwnerProposed: string; + approvalCount: BigNumber; +} +export type QuorumNotReachedEvent = TypedEvent< + [string, BigNumber, string, BigNumber], + QuorumNotReachedEventObject +>; + +export type QuorumNotReachedEventFilter = + TypedEventFilter; + +export interface EtherspotWallet7579 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: EtherspotWallet7579Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + AUTHOR(overrides?: CallOverrides): Promise<[string]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + VERSION(overrides?: CallOverrides): Promise<[string]>; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + entryPoint(overrides?: CallOverrides): Promise<[string]>; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { enabled: boolean }>; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ownerCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalTimelock(overrides?: CallOverrides): Promise<[BigNumber]>; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + discardCurrentProposal(overrides?: CallOverrides): Promise; + + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, string[], boolean, BigNumber] & { + ownerProposed_: string; + approvalCount_: BigNumber; + guardiansApproved_: string[]; + resolved_: boolean; + proposedAt_: BigNumber; + } + >; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + guardianCosign(overrides?: CallOverrides): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + + "FallbackHandlerChanged(address)"( + handler?: null + ): FallbackHandlerChangedEventFilter; + FallbackHandlerChanged(handler?: null): FallbackHandlerChangedEventFilter; + + "GuardianAdded(address,address)"( + account?: null, + newGuardian?: null + ): GuardianAddedEventFilter; + GuardianAdded(account?: null, newGuardian?: null): GuardianAddedEventFilter; + + "GuardianRemoved(address,address)"( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + GuardianRemoved( + account?: null, + removedGuardian?: null + ): GuardianRemovedEventFilter; + + "OwnerAdded(address,address)"( + account?: null, + newOwner?: null + ): OwnerAddedEventFilter; + OwnerAdded(account?: null, newOwner?: null): OwnerAddedEventFilter; + + "OwnerRemoved(address,address)"( + account?: null, + removedOwner?: null + ): OwnerRemovedEventFilter; + OwnerRemoved(account?: null, removedOwner?: null): OwnerRemovedEventFilter; + + "ProposalDiscarded(address,uint256,address)"( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + ProposalDiscarded( + account?: null, + proposalId?: null, + discardedBy?: null + ): ProposalDiscardedEventFilter; + + "ProposalSubmitted(address,uint256,address,address)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + ProposalSubmitted( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + proposer?: null + ): ProposalSubmittedEventFilter; + + "ProposalTimelockChanged(address,uint256)"( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + ProposalTimelockChanged( + account?: null, + newTimelock?: null + ): ProposalTimelockChangedEventFilter; + + "QuorumNotReached(address,uint256,address,uint256)"( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + QuorumNotReached( + account?: null, + proposalId?: null, + newOwnerProposed?: null, + approvalCount?: null + ): QuorumNotReachedEventFilter; + }; + + estimateGas: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + AUTHOR(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + VERSION(overrides?: CallOverrides): Promise; + + addGuardian( + _newGuardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + changeProposalTimelock( + _newTimelock: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + discardCurrentProposal( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProposal( + _proposalId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + guardianCosign( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + guardianCount(overrides?: CallOverrides): Promise; + + guardianPropose( + _newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isGuardian( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ownerCount(overrides?: CallOverrides): Promise; + + proposalId(overrides?: CallOverrides): Promise; + + proposalTimelock(overrides?: CallOverrides): Promise; + + removeGuardian( + _guardian: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Base.ts b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Base.ts new file mode 100644 index 0000000..36f91ce --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Base.ts @@ -0,0 +1,1062 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IExecution { + export type ExecutionStruct = { + target: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + + export type ExecutionStructOutput = [string, BigNumber, string] & { + target: string; + value: BigNumber; + callData: string; + }; +} + +export declare namespace IERC4337 { + export type UserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + callGasLimit: PromiseOrValue; + verificationGasLimit: PromiseOrValue; + preVerificationGas: PromiseOrValue; + maxFeePerGas: PromiseOrValue; + maxPriorityFeePerGas: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; + }; + + export type UserOperationStructOutput = [ + string, + BigNumber, + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + string, + string + ] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + callGasLimit: BigNumber; + verificationGasLimit: BigNumber; + preVerificationGas: BigNumber; + maxFeePerGas: BigNumber; + maxPriorityFeePerGas: BigNumber; + paymasterAndData: string; + signature: string; + }; +} + +export interface EtherspotWallet7579BaseInterface extends utils.Interface { + functions: { + "entryPoint()": FunctionFragment; + "execute(address,uint256,bytes)": FunctionFragment; + "executeBatch((address,uint256,bytes)[])": FunctionFragment; + "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; + "executeDelegateCall(address,bytes)": FunctionFragment; + "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; + "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + "getExecutorsPaginated(address,uint256)": FunctionFragment; + "getValidatorPaginated(address,uint256)": FunctionFragment; + "initializeAccount(bytes)": FunctionFragment; + "installExecutor(address,bytes)": FunctionFragment; + "installFallback(address,bytes)": FunctionFragment; + "installValidator(address,bytes)": FunctionFragment; + "isExecutorInstalled(address)": FunctionFragment; + "isFallbackInstalled(address)": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "isValidatorInstalled(address)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "uninstallExecutor(address,bytes)": FunctionFragment; + "uninstallFallback(address,bytes)": FunctionFragment; + "uninstallValidator(address,bytes)": FunctionFragment; + "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "entryPoint" + | "execute" + | "executeBatch" + | "executeBatchFromExecutor" + | "executeDelegateCall" + | "executeDelegateCallFromExecutor" + | "executeFromExecutor" + | "getExecutorsPaginated" + | "getValidatorPaginated" + | "initializeAccount" + | "installExecutor" + | "installFallback" + | "installValidator" + | "isExecutorInstalled" + | "isFallbackInstalled" + | "isValidSignature" + | "isValidatorInstalled" + | "supportsInterface" + | "uninstallExecutor" + | "uninstallFallback" + | "uninstallValidator" + | "validateUserOp" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "entryPoint", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchFromExecutor", + values: [IExecution.ExecutionStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeDelegateCallFromExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeFromExecutor", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getExecutorsPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getValidatorPaginated", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initializeAccount", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "installValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isExecutorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isFallbackInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidSignature", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isValidatorInstalled", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallExecutor", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallFallback", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "uninstallValidator", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "validateUserOp", + values: [ + IERC4337.UserOperationStruct, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeDelegateCallFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeFromExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getExecutorsPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValidatorPaginated", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initializeAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "installValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFallbackInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidSignature", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidatorInstalled", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallExecutor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallFallback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "uninstallValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateUserOp", + data: BytesLike + ): Result; + + events: { + "DisableExecutor(address)": EventFragment; + "DisableValidator(address)": EventFragment; + "EnableExecutor(address)": EventFragment; + "EnableValidator(address)": EventFragment; + "FallbackHandlerChanged(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FallbackHandlerChanged"): EventFragment; +} + +export interface DisableExecutorEventObject { + module: string; +} +export type DisableExecutorEvent = TypedEvent< + [string], + DisableExecutorEventObject +>; + +export type DisableExecutorEventFilter = TypedEventFilter; + +export interface DisableValidatorEventObject { + module: string; +} +export type DisableValidatorEvent = TypedEvent< + [string], + DisableValidatorEventObject +>; + +export type DisableValidatorEventFilter = + TypedEventFilter; + +export interface EnableExecutorEventObject { + module: string; +} +export type EnableExecutorEvent = TypedEvent< + [string], + EnableExecutorEventObject +>; + +export type EnableExecutorEventFilter = TypedEventFilter; + +export interface EnableValidatorEventObject { + module: string; +} +export type EnableValidatorEvent = TypedEvent< + [string], + EnableValidatorEventObject +>; + +export type EnableValidatorEventFilter = TypedEventFilter; + +export interface FallbackHandlerChangedEventObject { + handler: string; +} +export type FallbackHandlerChangedEvent = TypedEvent< + [string], + FallbackHandlerChangedEventObject +>; + +export type FallbackHandlerChangedEventFilter = + TypedEventFilter; + +export interface EtherspotWallet7579Base extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: EtherspotWallet7579BaseInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + entryPoint(overrides?: CallOverrides): Promise<[string]>; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean] & { enabled: boolean }>; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: CallOverrides + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[], string] & { array: string[]; next: string }>; + + initializeAccount( + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; + DisableExecutor(module?: null): DisableExecutorEventFilter; + + "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; + DisableValidator(module?: null): DisableValidatorEventFilter; + + "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; + EnableExecutor(module?: null): EnableExecutorEventFilter; + + "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; + EnableValidator(module?: null): EnableValidatorEventFilter; + + "FallbackHandlerChanged(address)"( + handler?: null + ): FallbackHandlerChangedEventFilter; + FallbackHandlerChanged(handler?: null): FallbackHandlerChangedEventFilter; + }; + + estimateGas: { + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + entryPoint(overrides?: CallOverrides): Promise; + + execute( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatch( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeBatchFromExecutor( + executions: IExecution.ExecutionStruct[], + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCall( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeDelegateCallFromExecutor( + target: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + executeFromExecutor( + target: PromiseOrValue, + value: PromiseOrValue, + callData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getExecutorsPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorPaginated( + cursor: PromiseOrValue, + size: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initializeAccount( + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installFallback( + fallbackHandler: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + installValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isExecutorInstalled( + executor: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isFallbackInstalled( + fallbackHandler: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidSignature( + hash: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isValidatorInstalled( + validator: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceID: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + uninstallExecutor( + executor: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallFallback( + arg0: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + uninstallValidator( + validator: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + validateUserOp( + userOp: IERC4337.UserOperationStruct, + userOpHash: PromiseOrValue, + missingAccountFunds: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Factory.ts b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Factory.ts new file mode 100644 index 0000000..d2a9449 --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579Factory.ts @@ -0,0 +1,207 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface EtherspotWallet7579FactoryInterface extends utils.Interface { + functions: { + "_getSalt(bytes32,bytes)": FunctionFragment; + "createAccount(bytes32,bytes)": FunctionFragment; + "getAddress(bytes32,bytes)": FunctionFragment; + "implementation()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "_getSalt" + | "createAccount" + | "getAddress" + | "implementation" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "_getSalt", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "createAccount", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getAddress", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "_getSalt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "createAccount", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getAddress", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + + events: {}; +} + +export interface EtherspotWallet7579Factory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: EtherspotWallet7579FactoryInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + _getSalt( + _salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string] & { salt: string }>; + + createAccount( + salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getAddress( + salt: PromiseOrValue, + initcode: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + implementation(overrides?: CallOverrides): Promise<[string]>; + }; + + _getSalt( + _salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + createAccount( + salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getAddress( + salt: PromiseOrValue, + initcode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + callStatic: { + _getSalt( + _salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + createAccount( + salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getAddress( + salt: PromiseOrValue, + initcode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + _getSalt( + _salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + createAccount( + salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getAddress( + salt: PromiseOrValue, + initcode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + _getSalt( + _salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + createAccount( + salt: PromiseOrValue, + initCode: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getAddress( + salt: PromiseOrValue, + initcode: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + }; +} diff --git a/src/sdk/contracts/src/ERC7579/wallet/index.ts b/src/sdk/contracts/src/ERC7579/wallet/index.ts new file mode 100644 index 0000000..35b8aad --- /dev/null +++ b/src/sdk/contracts/src/ERC7579/wallet/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { EtherspotWallet7579 } from "./EtherspotWallet7579"; +export type { EtherspotWallet7579Base } from "./EtherspotWallet7579Base"; +export type { EtherspotWallet7579Factory } from "./EtherspotWallet7579Factory"; diff --git a/src/sdk/network/constants.ts b/src/sdk/network/constants.ts index dc8c980..e354882 100644 --- a/src/sdk/network/constants.ts +++ b/src/sdk/network/constants.ts @@ -84,414 +84,18 @@ export const onRamperAllNetworks = ['OPTIMISM', 'POLYGON', 'ARBITRUM', 'FUSE', ' export const Networks: { [key: string]: NetworkConfig } = { - [5]: { - chainId: 5, - bundler: 'https://goerli-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [1001]: { - chainId: 1001, - bundler: 'https://klaytntestnet-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '', - } - }, - }, - [80001]: { - chainId: 80001, - bundler: 'https://mumbai-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [84531]: { - chainId: 84531, - bundler: 'https://basegoerli-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [84532]: { - chainId: 84532, - bundler: 'https://basesepolia-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, [11155111]: { chainId: 11155111, - bundler: 'https://sepolia-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [10]: { - chainId: 10, - bundler: 'https://rpc.etherspot.io/optimism', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [137]: { - chainId: 137, - bundler: 'https://rpc.etherspot.io/polygon', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [42161]: { - chainId: 42161, - bundler: 'https://rpc.etherspot.io/arbitrum', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [8217]: { - chainId: 8217, - bundler: 'https://klaytn-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '', - } - }, - }, - [1]: { - chainId: 1, - bundler: 'https://rpc.etherspot.io/ethereum', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [421613]: { - chainId: 421613, - bundler: 'https://arbitrumgoerli-bundler.etherspot.io', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [10200]: { - chainId: 10200, - bundler: '', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [122]: { - chainId: 122, - bundler: 'https://rpc.etherspot.io/fuse', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [123]: { - chainId: 123, - bundler: 'https://fusetestnet-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [100]: { - chainId: 100, - bundler: 'https://rpc.etherspot.io/gnosis', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [2357]: { - chainId: 2357, - bundler: '', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [420]: { - chainId: 420, - bundler: 'https://optimismgoerli-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [30]: { - chainId: 30, - bundler: 'https://rpc.etherspot.io/rootstock', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '', - } - }, - }, - [31]: { - chainId: 31, - bundler: 'https://rootstocktestnet-bundler.etherspot.io/', + bundler: 'https://testnet-rpc.etherspot.io/v2/11155111', contracts: { - entryPoint: '0x48e60BBb664aEfAc9f14aDB42e5FB5b4a119EB66', + entryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', + etherspot: '0x77E4288A4b15893F520F15C262a07dF9866904e4', zeroDev: '', simpleAccount: '', } }, - }, - [20197]: { - chainId: 20197, - bundler: '', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [5000]: { - chainId: 5000, - bundler: 'https://rpc.etherspot.io/mantle', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [5001]: { - chainId: 5001, - bundler: 'https://mantletestnet-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [43114]: { - chainId: 43114, - bundler: 'https://rpc.etherspot.io/avalanche', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [8453]: { - chainId: 8453, - bundler: 'https://rpc.etherspot.io/base', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [56]: { - chainId: 56, - bundler: 'https://rpc.etherspot.io/bnb', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [97]: { - chainId: 97, - bundler: 'https://bnbtestnet-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [43113]: { - chainId: 43113, - bundler: '', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '0x5de4839a76cf55d0c90e2061ef4386d962E15ae3', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [59144]: { - chainId: 59144, - bundler: 'https://rpc.etherspot.io/linea', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [59140]: { - chainId: 59140, - bundler: '', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [114]: { - chainId: 114, - bundler: 'https://flaretestnet-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '', - } - }, - }, - [14]: { - chainId: 14, - bundler: 'https://rpc.etherspot.io/flare', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [534351]: { - chainId: 534351, - bundler: 'https://scrollsepolia-bundler.etherspot.io/', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, - [534352]: { - chainId: 534352, - bundler: 'https://rpc.etherspot.io/scroll', - contracts: { - entryPoint: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789', - walletFactory: { - etherspot: '0x7f6d8F107fE8551160BD5351d5F1514A6aD5d40E', - zeroDev: '', - simpleAccount: '0x9406Cc6185a346906296840746125a0E44976454', - } - }, - }, + } }; interface ISafeConstant { @@ -711,4 +315,4 @@ export const CHAIN_ID_TO_NETWORK_NAME: { [key: number]: NetworkNames } = Object. export function getNetworkConfig(key: number) { return Networks[key]; -} +} \ No newline at end of file diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index b982adf..f7a0056 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -9,7 +9,7 @@ import { } from './wallet'; import { Factory, PaymasterApi, SdkOptions } from './interfaces'; import { Network } from "./network"; -import { BatchUserOpsRequest, Exception, getGasFee, onRampApiKey, openUrl, UserOpsRequest } from "./common"; +import { BatchUserOpsRequest, Exception, getGasFee, onRampApiKey, openUrl, UserOperation, UserOpsRequest } from "./common"; import { BigNumber, BigNumberish, ethers, providers } from 'ethers'; import { Networks, onRamperAllNetworks } from './network/constants'; import { UserOperationStruct } from './contracts/account-abstraction/contracts/core/BaseAccount'; @@ -183,7 +183,7 @@ export class PrimeSdk { const tx: TransactionDetailsForUserOp = { target: this.userOpsBatch.to, - values: this.userOpsBatch.value, + values: this.userOpsBatch.value, data: this.userOpsBatch.data, dummySignature: dummySignature, ...gasDetails, @@ -200,6 +200,7 @@ export class PrimeSdk { if (callGasLimit) { partialtx.callGasLimit = BigNumber.from(callGasLimit).toHexString(); } + partialtx.factory = this.etherspotWallet.factoryAddress; const bundlerGasEstimate = await this.bundler.getVerificationGasInfo(partialtx); @@ -225,7 +226,7 @@ export class PrimeSdk { if (!callGasLimit) partialtx.callGasLimit = expectedCallGasLimit; else if (BigNumber.from(callGasLimit).lt(expectedCallGasLimit)) - throw new ErrorHandler(`CallGasLimit is too low. Expected atleast ${expectedCallGasLimit.toString()}`); + throw new ErrorHandler(`CallGasLimit is too low. Expected atleast ${expectedCallGasLimit.toString()}`); } return partialtx; @@ -239,7 +240,7 @@ export class PrimeSdk { return getGasFee(this.etherspotWallet.provider as providers.JsonRpcProvider); } - async send(userOp: UserOperationStruct) { + async send(userOp: any) { const signedUserOp = await this.etherspotWallet.signUserOp(userOp); return this.bundler.sendUserOpToBundler(signedUserOp); } @@ -256,7 +257,7 @@ export class PrimeSdk { return this.bundler.getUserOpsReceipt(userOpHash); } - async getUserOpHash(userOp: UserOperationStruct) { + async getUserOpHash(userOp: UserOperation) { return this.etherspotWallet.getUserOpHash(userOp); } @@ -281,7 +282,7 @@ export class PrimeSdk { return this.etherspotWallet._getAccountContract(); } - async totalGasEstimated(userOp: UserOperationStruct): Promise { + async totalGasEstimated(userOp: UserOperation): Promise { const callGasLimit = BigNumber.from(await userOp.callGasLimit); const verificationGasLimit = BigNumber.from(await userOp.verificationGasLimit); const preVerificationGas = BigNumber.from(await userOp.preVerificationGas); From ed02da574f476d6c247da891a8a888ca9303ca76 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Tue, 14 May 2024 14:53:05 +0530 Subject: [PATCH 02/10] Add support for EP7.0 and Etherspot Modular accounts --- examples/02-transfer-funds.ts | 6 +- examples/03-transfer-erc20.ts | 6 +- src/sdk/base/BaseAccountAPI.ts | 6 +- src/sdk/base/Bootstrap.ts | 8 +- src/sdk/base/ERC4337EthersProvider.ts | 2 - src/sdk/base/ERC4337EthersSigner.ts | 2 - src/sdk/base/EncodeExecuteData.ts | 47 - src/sdk/base/EtherspotWalletAPI.ts | 123 +- src/sdk/base/SimpleAccountWalletAPI.ts | 2 +- src/sdk/base/VerifyingPaymasterAPI.ts | 1 - src/sdk/base/ZeroDevWalletAPI.ts | 2 +- src/sdk/common/ERC4337Utils.ts | 15 - src/sdk/common/constants.ts | 22 + src/sdk/common/utils/execute-mode.ts | 19 + src/sdk/common/utils/index.ts | 1 + .../wallet/EtherspotWallet7579__factory.ts | 1750 +++++++++-------- .../src/ERC7579/wallet/EtherspotWallet7579.ts | 1047 ++++------ src/sdk/contracts/src/ERC7579/wallet/index.ts | 2 +- src/sdk/network/constants.ts | 73 +- src/sdk/network/interfaces.ts | 2 + src/sdk/sdk.ts | 13 +- 21 files changed, 1400 insertions(+), 1749 deletions(-) delete mode 100644 src/sdk/base/EncodeExecuteData.ts create mode 100644 src/sdk/common/utils/execute-mode.ts diff --git a/examples/02-transfer-funds.ts b/examples/02-transfer-funds.ts index eeba792..6ce743f 100644 --- a/examples/02-transfer-funds.ts +++ b/examples/02-transfer-funds.ts @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { BigNumber, ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; @@ -33,7 +33,9 @@ async function main() { console.log('balances: ', balance); // estimate transactions added to the batch and get the fee data for the UserOp - const op = await primeSdk.estimate(); + const op = await primeSdk.estimate({ + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + }); console.log(`Estimate UserOp: ${await printOp(op)}`); // sign the UserOp and sending to the bundler... diff --git a/examples/03-transfer-erc20.ts b/examples/03-transfer-erc20.ts index cd3eb68..dce0df1 100644 --- a/examples/03-transfer-erc20.ts +++ b/examples/03-transfer-erc20.ts @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { BigNumber, ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import { ERC20_ABI } from '../src/sdk/helpers/abi/ERC20_ABI'; @@ -41,7 +41,9 @@ async function main() { console.log('transactions: ', userOpsBatch); // estimate transactions added to the batch and get the fee data for the UserOp - const op = await primeSdk.estimate(); + const op = await primeSdk.estimate({ + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + }); console.log(`Estimate UserOp: ${await printOp(op)}`); // sign the UserOp and sending to the bundler... diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index 5db04ac..6856302 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -239,7 +239,7 @@ export abstract class BaseAccountAPI { /** * return current account's nonce. */ - protected abstract getNonce(key?: number): Promise; + protected abstract getNonce(key?: BigNumber): Promise; /** * encode the call from entryPoint through our account to the target contract. @@ -401,7 +401,7 @@ export abstract class BaseAccountAPI { * - if gas or nonce are missing, read them from the chain (note that we can't fill gaslimit before the account is created) * @param info */ - async createUnsignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { + async createUnsignedUserOp(info: TransactionDetailsForUserOp, key = BigNumber.from(0)): Promise { const { callData, callGasLimit } = await this.encodeUserOpCallDataAndGasLimit(info); const factoryData = await this.getInitCode(); @@ -486,7 +486,7 @@ export abstract class BaseAccountAPI { * helper method: create and sign a user operation. * @param info transaction details for the userOp */ - async createSignedUserOp(info: TransactionDetailsForUserOp, key = 0): Promise { + async createSignedUserOp(info: TransactionDetailsForUserOp, key = BigNumber.from(0)): Promise { return await this.signUserOp(await this.createUnsignedUserOp(info, key)); } diff --git a/src/sdk/base/Bootstrap.ts b/src/sdk/base/Bootstrap.ts index 7658d26..06841ca 100644 --- a/src/sdk/base/Bootstrap.ts +++ b/src/sdk/base/Bootstrap.ts @@ -469,12 +469,12 @@ const abi = [ }, ] as const; -export function _makeBootstrapConfig(module: string, data: string) : BootstrapConfig { - const config: BootstrapConfig = { +export function _makeBootstrapConfig(module: string, data: string): BootstrapConfig { + const config: BootstrapConfig = { module: "", data: "" }; - let iface = new ethers.utils.Interface(abi); + const iface = new ethers.utils.Interface(abi); config.module = module; config.data = iface.encodeFunctionData( @@ -486,7 +486,7 @@ export function _makeBootstrapConfig(module: string, data: string) : BootstrapCo export function makeBootstrapConfig(module: string, data: string): BootstrapConfig[] { const config: BootstrapConfig[] = []; - let iface = new ethers.utils.Interface(abi); + const iface = new ethers.utils.Interface(abi); const data1 = iface.encodeFunctionData( 'onInstall', [data] diff --git a/src/sdk/base/ERC4337EthersProvider.ts b/src/sdk/base/ERC4337EthersProvider.ts index fcaaf73..cf2f8eb 100644 --- a/src/sdk/base/ERC4337EthersProvider.ts +++ b/src/sdk/base/ERC4337EthersProvider.ts @@ -2,13 +2,11 @@ import { BaseProvider, TransactionReceipt, TransactionResponse } from '@etherspr import { BigNumber, Signer } from 'ethers'; import { Network } from '@ethersproject/networks'; import { hexValue, resolveProperties } from 'ethers/lib/utils'; - import { ClientConfig } from './ClientConfig'; import { ERC4337EthersSigner } from './ERC4337EthersSigner'; import { UserOperationEventListener } from './UserOperationEventListener'; import { HttpRpcClient } from './HttpRpcClient'; import type { IEntryPoint } from '../contracts'; -import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { UserOperation, getUserOpHash } from '../common'; import { BaseAccountAPI } from './BaseAccountAPI'; diff --git a/src/sdk/base/ERC4337EthersSigner.ts b/src/sdk/base/ERC4337EthersSigner.ts index dc37eb5..4289222 100644 --- a/src/sdk/base/ERC4337EthersSigner.ts +++ b/src/sdk/base/ERC4337EthersSigner.ts @@ -1,12 +1,10 @@ import { Deferrable, defineReadOnly } from '@ethersproject/properties'; import { Provider, TransactionRequest, TransactionResponse } from '@ethersproject/providers'; import { Signer } from '@ethersproject/abstract-signer'; - import { Bytes } from 'ethers'; import { ERC4337EthersProvider } from './ERC4337EthersProvider'; import { ClientConfig } from './ClientConfig'; import { HttpRpcClient } from './HttpRpcClient'; -import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { BaseAccountAPI } from './BaseAccountAPI'; import { UserOperation } from '../common'; diff --git a/src/sdk/base/EncodeExecuteData.ts b/src/sdk/base/EncodeExecuteData.ts deleted file mode 100644 index 185644a..0000000 --- a/src/sdk/base/EncodeExecuteData.ts +++ /dev/null @@ -1,47 +0,0 @@ -const { ethers } = require("ethers"); - -// Define types -const ModeCode = ethers.utils.Bytes32; -const CallType = ethers.utils.Bytes1; -const ExecType = ethers.utils.Bytes1; -const ModeSelector = ethers.utils.Bytes4; -const ModePayload = ethers.utils.Bytes22; - -// Define constants -const CALLTYPE_SINGLE = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 1); -const CALLTYPE_BATCH = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x01), 1); -const CALLTYPE_STATIC = ethers.utils.hexZeroPad(ethers.utils.hexlify(0xFE), 1); -const CALLTYPE_DELEGATECALL = ethers.utils.hexZeroPad(ethers.utils.hexlify(0xFF), 1); - -const EXECTYPE_DEFAULT = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 1); -const EXECTYPE_TRY = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x01), 1); - -const MODE_DEFAULT = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00000000), 4); - -// Helper function to encode mode -function encodeMode(callType, execType, modeSelector, modePayload) { - return ethers.utils.concat([callType, execType, modeSelector, modePayload]); -} - -// Encode Simple Batch mode -function encodeSimpleBatch() { - const modePayload = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 22); - return encodeMode(CALLTYPE_BATCH, EXECTYPE_DEFAULT, MODE_DEFAULT, modePayload); -} - -// Encode Simple Single mode -function encodeSimpleSingle() { - const modePayload = ethers.utils.hexZeroPad(ethers.utils.hexlify(0x00), 22); - return encodeMode(CALLTYPE_SINGLE, EXECTYPE_DEFAULT, MODE_DEFAULT, modePayload); -} - -function encodeSingle(target, value, callData) { - // Encode parameters using ethers.js - const userOpCalldata = ethers.utils.defaultAbiCoder.encode( - ["address", "uint256", "bytes"], - [target, value, callData] - ); - - return userOpCalldata; - } - \ No newline at end of file diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index f4c380b..1cbd8e7 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -1,16 +1,11 @@ -import { BigNumber, BigNumberish, Contract, ethers } from 'ethers'; -import { - EtherspotWallet, - EtherspotWallet__factory, - EtherspotWalletFactory, - EtherspotWalletFactory__factory, -} from '../contracts'; -import { arrayify, defaultAbiCoder, hexConcat } from 'ethers/lib/utils'; +import { BigNumber, BigNumberish, Contract, constants, ethers } from 'ethers'; +import { arrayify, hexConcat } from 'ethers/lib/utils'; import { BaseApiParams, BaseAccountAPI } from './BaseAccountAPI'; import { EtherspotWallet7579Factory__factory, EtherspotWallet7579__factory } from '../contracts/factories/src/ERC7579/wallet'; -import { EtherspotWallet7579, EtherspotWallet7579Factory } from '../contracts/src/ERC7579/wallet'; -import { IModule } from '../contracts/erc7579-ref-impl/src/interfaces/IModule.sol'; +import { ModularEtherspotWallet, EtherspotWallet7579Factory } from '../contracts/src/ERC7579/wallet'; import { BOOTSTRAP_ABI, BootstrapConfig, _makeBootstrapConfig, makeBootstrapConfig } from './Bootstrap'; +import { Networks } from '../network/constants'; +import { CALL_TYPE, EXEC_TYPE, getExecuteMode } from '../common'; /** * constructor params, added no top of base params: @@ -36,12 +31,14 @@ export class EtherspotWalletAPI extends BaseAccountAPI { index: number; accountAddress?: string; predefinedAccountAddress?: string; + bootstrapAddress?: string; + multipleOwnerECDSAValidatorAddress?: string; /** * our account contract. * should support the "execFromEntryPoint" and "nonce" methods */ - accountContract?: EtherspotWallet7579; + accountContract?: ModularEtherspotWallet; factory?: EtherspotWallet7579Factory; @@ -50,6 +47,8 @@ export class EtherspotWalletAPI extends BaseAccountAPI { this.factoryAddress = params.factoryAddress; this.index = params.index ?? 0; this.predefinedAccountAddress = params.predefinedAccountAddress ?? null; + this.bootstrapAddress = Networks[params.optionsLike.chainId].contracts.bootstrap; + this.multipleOwnerECDSAValidatorAddress = Networks[params.optionsLike.chainId].contracts.multipleOwnerECDSAValidator; } async checkAccountAddress(address: string): Promise { @@ -62,13 +61,33 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } } - async _getAccountContract(): Promise { + async _getAccountContract(): Promise { if (this.accountContract == null) { this.accountContract = EtherspotWallet7579__factory.connect(await this.getAccountAddress(), this.provider); } return this.accountContract; } + async getInitCode(): Promise { + const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); + const validators: BootstrapConfig[] = makeBootstrapConfig(this.multipleOwnerECDSAValidatorAddress, '0x'); + const executors: BootstrapConfig[] = makeBootstrapConfig(constants.AddressZero, '0x'); + const hook: BootstrapConfig = _makeBootstrapConfig(constants.AddressZero, '0x'); + const fallbacks: BootstrapConfig[] = makeBootstrapConfig(constants.AddressZero, '0x'); + + const initMSAData = iface.encodeFunctionData( + "initMSA", + [validators, executors, hook, fallbacks] + ); + + const initCode = ethers.utils.defaultAbiCoder.encode( + ["address", "address", "bytes"], + [this.services.walletService.EOAAddress, this.bootstrapAddress, initMSAData] + ); + + return initCode; + } + /** * return the value to put into the "initCode" field, if the account is not yet deployed. * this value holds the "factory" address, followed by this account's information @@ -80,24 +99,9 @@ export class EtherspotWalletAPI extends BaseAccountAPI { throw new Error('no factory to get initCode'); } - const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); - const validators: BootstrapConfig[] = makeBootstrapConfig('0x1e714c551fe6234b6ee406899ec3be9234ad2124', '0x'); - const executors: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - const hook: BootstrapConfig = _makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - const fallbacks: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - - const initMSAData = iface.encodeFunctionData( - "initMSA", - [validators, executors, hook, fallbacks] - ); + const initCode = await this.getInitCode(); + const salt = ethers.utils.hexZeroPad(ethers.utils.hexValue(this.index), 32); - const initCode = ethers.utils.defaultAbiCoder.encode( - ["address", "address", "bytes"], - [this.services.walletService.EOAAddress, '0x4f695ad7694863c8280FCEBf2Cb220E361ce4eA0', initMSAData] - ); - const encodedValue = ethers.utils.solidityKeccak256(['string'], [this.index.toString()]); - const hexlifyValue = ethers.utils.hexlify(encodedValue); - const salt = ethers.utils.arrayify(hexlifyValue) return hexConcat([ this.factoryAddress, this.factory.interface.encodeFunctionData('createAccount', [ @@ -112,24 +116,8 @@ export class EtherspotWalletAPI extends BaseAccountAPI { await this.checkAccountAddress(this.predefinedAccountAddress); } - const encodedValue = ethers.utils.solidityKeccak256(['string'], [this.index.toString()]); - const hexlifyValue = ethers.utils.hexlify(encodedValue); - const salt = ethers.utils.arrayify(hexlifyValue); - const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); - const validators: BootstrapConfig[] = makeBootstrapConfig('0x1e714c551fe6234b6ee406899ec3be9234ad2124', '0x'); - const executors: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - const hook: BootstrapConfig = _makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - const fallbacks: BootstrapConfig[] = makeBootstrapConfig('0x0000000000000000000000000000000000000000', '0x'); - - const initMSAData = iface.encodeFunctionData( - "initMSA", - [validators, executors, hook, fallbacks] - ); - - const initCode = ethers.utils.defaultAbiCoder.encode( - ["address", "address", "bytes"], - [this.services.walletService.EOAAddress, '0x4f695ad7694863c8280FCEBf2Cb220E361ce4eA0', initMSAData] - ); + const salt = ethers.utils.hexZeroPad(ethers.utils.hexValue(this.index), 32); + const initCode = await this.getInitCode(); if (!this.accountAddress) { this.factory = EtherspotWallet7579Factory__factory.connect(this.factoryAddress, this.provider); @@ -141,11 +129,9 @@ export class EtherspotWalletAPI extends BaseAccountAPI { return this.accountAddress; } - async getNonce(key = 0): Promise { - if (await this.checkAccountPhantom()) { - return BigNumber.from(0); - } - return await this.nonceManager.getNonce(await this.getAccountAddress(), key); + async getNonce(key: BigNumber = BigNumber.from(0)): Promise { + const dummyKey = ethers.utils.getAddress(key.toHexString()) + "00000000" + return await this.nonceManager.getNonce(await this.getAccountAddress(), BigInt(dummyKey)); } /** @@ -156,7 +142,18 @@ export class EtherspotWalletAPI extends BaseAccountAPI { */ async encodeExecute(target: string, value: BigNumberish, data: string): Promise { const accountContract = await this._getAccountContract(); - return accountContract.interface.encodeFunctionData('execute', [target, value, data]); + const executeMode = getExecuteMode({ + callType: CALL_TYPE.SINGLE, + execType: EXEC_TYPE.DEFAULT + }); + + const calldata = hexConcat([ + target, + ethers.utils.hexZeroPad(ethers.utils.hexValue(value), 32), + data + ]); + + return accountContract.interface.encodeFunctionData('execute', [executeMode, calldata]); } async signUserOpHash(userOpHash: string): Promise { @@ -170,7 +167,23 @@ export class EtherspotWalletAPI extends BaseAccountAPI { async encodeBatch(targets: string[], values: BigNumberish[], datas: string[]): Promise { const accountContract = await this._getAccountContract(); - return accountContract.interface.encodeFunctionData('execute', [targets[0], values[0], datas[0]]); - // return accountContract.interface.encodeFunctionData('executeBatch', [targets, values, datas]); + + const executeMode = getExecuteMode({ + callType: CALL_TYPE.BATCH, + execType: EXEC_TYPE.DEFAULT + }); + + const result = targets.map((target, index) => ({ + target: target, + value: values[index], + callData: datas[index] + })); + + const calldata = ethers.utils.defaultAbiCoder.encode( + ["tuple(address target,uint256 value,bytes callData)[]"], + [result] + ); + + return accountContract.interface.encodeFunctionData('execute', [executeMode, calldata]); } } diff --git a/src/sdk/base/SimpleAccountWalletAPI.ts b/src/sdk/base/SimpleAccountWalletAPI.ts index 461422c..91687c8 100644 --- a/src/sdk/base/SimpleAccountWalletAPI.ts +++ b/src/sdk/base/SimpleAccountWalletAPI.ts @@ -84,7 +84,7 @@ export class SimpleAccountAPI extends BaseAccountAPI { return this.accountAddress; } - async getNonce(key = 0): Promise { + async getNonce(key = BigNumber.from(0)): Promise { if (await this.checkAccountPhantom()) { return BigNumber.from(0); } diff --git a/src/sdk/base/VerifyingPaymasterAPI.ts b/src/sdk/base/VerifyingPaymasterAPI.ts index f9d8f57..b7eaa46 100644 --- a/src/sdk/base/VerifyingPaymasterAPI.ts +++ b/src/sdk/base/VerifyingPaymasterAPI.ts @@ -2,7 +2,6 @@ import { ethers } from 'ethers'; import fetch from 'cross-fetch'; import { calcPreVerificationGas } from './calcPreVerificationGas'; import { PaymasterAPI } from './PaymasterAPI'; -import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { toJSON } from '../common/OperationUtils'; import { UserOperation } from '../common'; diff --git a/src/sdk/base/ZeroDevWalletAPI.ts b/src/sdk/base/ZeroDevWalletAPI.ts index 43c72bd..fb210cf 100644 --- a/src/sdk/base/ZeroDevWalletAPI.ts +++ b/src/sdk/base/ZeroDevWalletAPI.ts @@ -116,7 +116,7 @@ export class ZeroDevWalletAPI extends BaseAccountAPI { return this.accountAddress; } - async getNonce(key = 0): Promise { + async getNonce(key = BigNumber.from(0)): Promise { if (await this.checkAccountPhantom()) { return BigNumber.from(0); } diff --git a/src/sdk/common/ERC4337Utils.ts b/src/sdk/common/ERC4337Utils.ts index e525984..2e4dbb6 100644 --- a/src/sdk/common/ERC4337Utils.ts +++ b/src/sdk/common/ERC4337Utils.ts @@ -1,23 +1,8 @@ import { BytesLike, defaultAbiCoder, hexConcat, hexZeroPad, hexlify, keccak256 } from 'ethers/lib/utils'; -import { EntryPoint__factory } from '../contracts'; import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount'; import { BigNumber, BigNumberish, ethers } from 'ethers'; import { Buffer } from 'buffer'; -const entryPointAbi: any = EntryPoint__factory.abi; - -// UserOperation is the first parameter of validateUseOp -// const validateUserOpMethod = 'simulateValidation'; -// const UserOpType = entryPointAbi.find((entry) => entry.name === validateUserOpMethod)?.inputs[0]; -// if (UserOpType == null) { -// throw new Error( -// `unable to find method ${validateUserOpMethod} in EP ${entryPointAbi -// .filter((x) => x.type === 'function') -// .map((x) => x.name) -// .join(',')}`, -// ); -// } - export interface UserOperation { sender: string nonce: BigNumberish diff --git a/src/sdk/common/constants.ts b/src/sdk/common/constants.ts index 27ad6ec..75985e8 100644 --- a/src/sdk/common/constants.ts +++ b/src/sdk/common/constants.ts @@ -10,3 +10,25 @@ export enum HeaderNames { export const bufferPercent = 13; // Buffer in percent export const onRampApiKey = 'pk_prod_01H66WYDRFM95JBTJ4VMGY1FAX'; + +export enum CALL_TYPE { + SINGLE = "0x00", + BATCH = "0x01", + DELEGATE_CALL = "0xFF" +} + +export enum EXEC_TYPE { + DEFAULT = "0x00", + TRY_EXEC = "0x01" +} + +export const VALIDATOR_TYPE = { + ROOT: "0x00", + VALIDATOR: "0x01", + PERMISSION: "0x02" +} as const + +export enum VALIDATOR_MODE { + DEFAULT = "0x00", + ENABLE = "0x01" +} diff --git a/src/sdk/common/utils/execute-mode.ts b/src/sdk/common/utils/execute-mode.ts new file mode 100644 index 0000000..a484c56 --- /dev/null +++ b/src/sdk/common/utils/execute-mode.ts @@ -0,0 +1,19 @@ +import { hexConcat } from "ethers/lib/utils"; +import { CALL_TYPE, EXEC_TYPE } from "../constants"; +import { ethers } from "ethers"; + +export const getExecuteMode = ({ + callType, + execType +}: { + callType: CALL_TYPE + execType: EXEC_TYPE +}): string => { + return hexConcat([ + callType, // 1 byte + execType, // 1 byte + "0x00000000", // 4 bytes + "0x00000000", // 4 bytes + ethers.utils.zeroPad("0x00000000", 22) + ]); +} diff --git a/src/sdk/common/utils/index.ts b/src/sdk/common/utils/index.ts index cf14285..3d8456f 100644 --- a/src/sdk/common/utils/index.ts +++ b/src/sdk/common/utils/index.ts @@ -14,3 +14,4 @@ export * from './sleep'; export * from './stringify-json'; export * from './to-hex'; export * from './openurl'; +export * from './execute-mode'; diff --git a/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts index d76a095..5d71993 100644 --- a/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts +++ b/src/sdk/contracts/factories/src/ERC7579/wallet/EtherspotWallet7579__factory.ts @@ -5,1236 +5,1244 @@ import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; import type { Provider, TransactionRequest } from "@ethersproject/providers"; import type { PromiseOrValue } from "../../../../common"; import type { - EtherspotWallet7579, - EtherspotWallet7579Interface, + ModularEtherspotWallet, + ModularEtherspotWalletInterface, } from "../../../../src/ERC7579/wallet/EtherspotWallet7579"; const _abi = [ { - inputs: [], - name: "AccountAccessUnauthorized", - type: "error", + "inputs": [ + + ], + "name": "AccountAccessUnauthorized", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "AccountInitializationFailed", + "type": "error" }, { - inputs: [], - name: "AddingInvalidGuardian", - type: "error", + "inputs": [ + + ], + "name": "AddingInvalidGuardian", + "type": "error" }, { - inputs: [], - name: "AddingInvalidOwner", - type: "error", + "inputs": [ + + ], + "name": "AddingInvalidOwner", + "type": "error" }, { - inputs: [], - name: "AlreadySignedProposal", - type: "error", + "inputs": [ + + ], + "name": "AlreadySignedProposal", + "type": "error" }, { - inputs: [], - name: "CannotRemoveLastValidator", - type: "error", + "inputs": [ + + ], + "name": "CannotRemoveLastValidator", + "type": "error" }, { - inputs: [ + "inputs": [ + + ], + "name": "ExecutionFailed", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "FallbackInvalidCallType", + "type": "error" + }, + { + "inputs": [ { - internalType: "address", - name: "addr", - type: "address", - }, + "internalType": "address", + "name": "currentHook", + "type": "address" + } ], - name: "InvalidAddress", - type: "error", + "name": "HookAlreadyInstalled", + "type": "error" }, { - inputs: [ + "inputs": [ + + ], + "name": "HookPostCheckFailed", + "type": "error" + }, + { + "inputs": [ { - internalType: "address", - name: "module", - type: "address", - }, + "internalType": "address", + "name": "caller", + "type": "address" + } ], - name: "InvalidModule", - type: "error", + "name": "InvalidFallbackCaller", + "type": "error" }, { - inputs: [], - name: "InvalidProposal", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "InvalidModule", + "type": "error" }, { - inputs: [], - name: "LinkedList_AlreadyInitialized", - type: "error", + "inputs": [ + + ], + "name": "InvalidProposal", + "type": "error" + }, + { + "inputs": [ + + ], + "name": "LinkedList_AlreadyInitialized", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "entry", - type: "address", - }, + "internalType": "address", + "name": "entry", + "type": "address" + } ], - name: "LinkedList_EntryAlreadyInList", - type: "error", + "name": "LinkedList_EntryAlreadyInList", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "entry", - type: "address", - }, + "internalType": "address", + "name": "entry", + "type": "address" + } ], - name: "LinkedList_InvalidEntry", - type: "error", + "name": "LinkedList_InvalidEntry", + "type": "error" }, { - inputs: [], - name: "LinkedList_InvalidPage", - type: "error", + "inputs": [ + + ], + "name": "LinkedList_InvalidPage", + "type": "error" }, { - inputs: [], - name: "NotEnoughGuardians", - type: "error", + "inputs": [ + { + "internalType": "bytes4", + "name": "selector", + "type": "bytes4" + } + ], + "name": "NoFallbackHandler", + "type": "error" }, { - inputs: [], - name: "OnlyGuardian", - type: "error", + "inputs": [ + + ], + "name": "NotEnoughGuardians", + "type": "error" }, { - inputs: [], - name: "OnlyOwnerOrGuardianOrSelf", - type: "error", + "inputs": [ + + ], + "name": "OnlyGuardian", + "type": "error" }, { - inputs: [], - name: "OnlyOwnerOrSelf", - type: "error", + "inputs": [ + + ], + "name": "OnlyOwnerOrGuardianOrSelf", + "type": "error" }, { - inputs: [], - name: "ProposalResolved", - type: "error", + "inputs": [ + + ], + "name": "OnlyOwnerOrSelf", + "type": "error" }, { - inputs: [], - name: "ProposalTimelocked", - type: "error", + "inputs": [ + + ], + "name": "OnlyProxy", + "type": "error" }, { - inputs: [], - name: "ProposalUnresolved", - type: "error", + "inputs": [ + + ], + "name": "ProposalResolved", + "type": "error" }, { - inputs: [], - name: "RemovingInvalidGuardian", - type: "error", + "inputs": [ + + ], + "name": "ProposalTimelocked", + "type": "error" }, { - inputs: [], - name: "RemovingInvalidOwner", - type: "error", + "inputs": [ + + ], + "name": "ProposalUnresolved", + "type": "error" }, { - inputs: [], - name: "Unsupported", - type: "error", + "inputs": [ + + ], + "name": "RemovingInvalidGuardian", + "type": "error" }, { - inputs: [], - name: "WalletNeedsOwner", - type: "error", + "inputs": [ + + ], + "name": "RemovingInvalidOwner", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "currentHandler", - type: "address", - }, + "internalType": "CallType", + "name": "callType", + "type": "bytes1" + } ], - name: "fallbackHandlerAlreadyInstalled", - type: "error", + "name": "UnsupportedCallType", + "type": "error" }, { - anonymous: false, - inputs: [ + "inputs": [ { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, + "internalType": "ExecType", + "name": "execType", + "type": "bytes1" + } ], - name: "DisableExecutor", - type: "event", + "name": "UnsupportedExecType", + "type": "error" }, { - anonymous: false, - inputs: [ + "inputs": [ { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, + "internalType": "uint256", + "name": "moduleType", + "type": "uint256" + } ], - name: "DisableValidator", - type: "event", + "name": "UnsupportedModuleType", + "type": "error" }, { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "module", - type: "address", - }, + "inputs": [ + ], - name: "EnableExecutor", - type: "event", + "name": "WalletNeedsOwner", + "type": "error" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "module", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "newGuardian", + "type": "address" + } ], - name: "EnableValidator", - type: "event", + "name": "GuardianAdded", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "handler", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "removedGuardian", + "type": "address" + } ], - name: "FallbackHandlerChanged", - type: "event", + "name": "GuardianRemoved", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "newGuardian", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } ], - name: "GuardianAdded", - type: "event", + "name": "ModuleInstalled", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "removedGuardian", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "module", + "type": "address" + } ], - name: "GuardianRemoved", - type: "event", + "name": "ModuleUninstalled", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: false, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnerAdded", - type: "event", + "name": "OwnerAdded", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: false, - internalType: "address", - name: "removedOwner", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "removedOwner", + "type": "address" + } ], - name: "OwnerRemoved", - type: "event", + "name": "OwnerRemoved", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "proposalId", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "discardedBy", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "discardedBy", + "type": "address" + } ], - name: "ProposalDiscarded", - type: "event", + "name": "ProposalDiscarded", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "proposalId", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "newOwnerProposed", - type: "address", + "indexed": false, + "internalType": "address", + "name": "newOwnerProposed", + "type": "address" }, { - indexed: false, - internalType: "address", - name: "proposer", - type: "address", - }, + "indexed": false, + "internalType": "address", + "name": "proposer", + "type": "address" + } ], - name: "ProposalSubmitted", - type: "event", + "name": "ProposalSubmitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "newTimelock", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "proposalId", + "type": "uint256" }, - ], - name: "ProposalTimelockChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "address", - name: "account", - type: "address", + "indexed": false, + "internalType": "address", + "name": "newOwnerProposed", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "proposalId", - type: "uint256", - }, + "indexed": false, + "internalType": "uint256", + "name": "approvalCount", + "type": "uint256" + } + ], + "name": "QuorumNotReached", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "newOwnerProposed", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "batchExecutionindex", + "type": "uint256" }, { - indexed: false, - internalType: "uint256", - name: "approvalCount", - type: "uint256", - }, + "indexed": false, + "internalType": "bytes", + "name": "result", + "type": "bytes" + } ], - name: "QuorumNotReached", - type: "event", + "name": "TryExecuteUnsuccessful", + "type": "event" }, { - stateMutability: "nonpayable", - type: "fallback", + "stateMutability": "payable", + "type": "fallback" }, { - inputs: [], - name: "AUTHOR", - outputs: [ + "inputs": [ + + ], + "name": "accountId", + "outputs": [ { - internalType: "string", - name: "", - type: "string", - }, + "internalType": "string", + "name": "", + "type": "string" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "NAME", - outputs: [ + "inputs": [ { - internalType: "string", - name: "", - type: "string", - }, + "internalType": "address", + "name": "_newGuardian", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "addGuardian", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "VERSION", - outputs: [ + "inputs": [ { - internalType: "string", - name: "", - type: "string", - }, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "addOwner", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_newGuardian", - type: "address", - }, + "internalType": "uint256", + "name": "_newTimelock", + "type": "uint256" + } + ], + "name": "changeProposalTimelock", + "outputs": [ + ], - name: "addGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "_newOwner", - type: "address", - }, + "inputs": [ + ], - name: "addOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "discardCurrentProposal", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ + + ], + "name": "entryPoint", + "outputs": [ { - internalType: "uint256", - name: "_newTimelock", - type: "uint256", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "changeProposalTimelock", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "discardCurrentProposal", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "entryPoint", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", + "internalType": "ModeCode", + "name": "mode", + "type": "bytes32" }, + { + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } ], - stateMutability: "view", - type: "function", + "name": "execute", + "outputs": [ + + ], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, + "inputs": [ { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "ModeCode", + "name": "mode", + "type": "bytes32" }, { - internalType: "bytes", - name: "callData", - type: "bytes", - }, + "internalType": "bytes", + "name": "executionCalldata", + "type": "bytes" + } ], - name: "execute", - outputs: [ + "name": "executeFromExecutor", + "outputs": [ { - internalType: "bytes", - name: "result", - type: "bytes", - }, + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } ], - stateMutability: "payable", - type: "function", + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - components: [ + "components": [ { - internalType: "address", - name: "target", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "nonce", + "type": "uint256" }, { - internalType: "bytes", - name: "callData", - type: "bytes", + "internalType": "bytes", + "name": "initCode", + "type": "bytes" }, - ], - internalType: "struct IExecution.Execution[]", - name: "executions", - type: "tuple[]", - }, - ], - name: "executeBatch", - outputs: [ - { - internalType: "bytes[]", - name: "result", - type: "bytes[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ { - internalType: "address", - name: "target", - type: "address", + "internalType": "bytes", + "name": "callData", + "type": "bytes" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" }, { - internalType: "bytes", - name: "callData", - type: "bytes", + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" }, + { + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], - internalType: "struct IExecution.Execution[]", - name: "executions", - type: "tuple[]", - }, - ], - name: "executeBatchFromExecutor", - outputs: [ - { - internalType: "bytes[]", - name: "returnDatas", - type: "bytes[]", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" + } ], - name: "executeDelegateCall", - outputs: [ - { - internalType: "bytes", - name: "result", - type: "bytes", - }, + "name": "executeUserOp", + "outputs": [ + ], - stateMutability: "payable", - type: "function", + "stateMutability": "payable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, + "inputs": [ { - internalType: "bytes", - name: "callData", - type: "bytes", - }, + "internalType": "bytes4", + "name": "functionSig", + "type": "bytes4" + } ], - name: "executeDelegateCallFromExecutor", - outputs: [ + "name": "getActiveFallbackHandler", + "outputs": [ { - internalType: "bytes", - name: "", - type: "bytes", - }, + "components": [ + { + "internalType": "address", + "name": "handler", + "type": "address" + }, + { + "internalType": "CallType", + "name": "calltype", + "type": "bytes1" + }, + { + "internalType": "address[]", + "name": "allowedCallers", + "type": "address[]" + } + ], + "internalType": "struct ModuleManager.FallbackHandler", + "name": "", + "type": "tuple" + } ], - stateMutability: "payable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "target", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "callData", - type: "bytes", - }, + "inputs": [ + ], - name: "executeFromExecutor", - outputs: [ + "name": "getActiveHook", + "outputs": [ { - internalType: "bytes", - name: "returnData", - type: "bytes", - }, + "internalType": "address", + "name": "hook", + "type": "address" + } ], - stateMutability: "payable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "cursor", - type: "address", + "internalType": "address", + "name": "cursor", + "type": "address" }, { - internalType: "uint256", - name: "size", - type: "uint256", - }, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } ], - name: "getExecutorsPaginated", - outputs: [ + "name": "getExecutorsPaginated", + "outputs": [ { - internalType: "address[]", - name: "array", - type: "address[]", + "internalType": "address[]", + "name": "array", + "type": "address[]" }, { - internalType: "address", - name: "next", - type: "address", - }, + "internalType": "address", + "name": "next", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "uint256", - name: "_proposalId", - type: "uint256", - }, + "internalType": "uint256", + "name": "_proposalId", + "type": "uint256" + } ], - name: "getProposal", - outputs: [ + "name": "getProposal", + "outputs": [ { - internalType: "address", - name: "ownerProposed_", - type: "address", + "internalType": "address", + "name": "ownerProposed_", + "type": "address" }, { - internalType: "uint256", - name: "approvalCount_", - type: "uint256", + "internalType": "uint256", + "name": "approvalCount_", + "type": "uint256" }, { - internalType: "address[]", - name: "guardiansApproved_", - type: "address[]", + "internalType": "address[]", + "name": "guardiansApproved_", + "type": "address[]" }, { - internalType: "bool", - name: "resolved_", - type: "bool", + "internalType": "bool", + "name": "resolved_", + "type": "bool" }, { - internalType: "uint256", - name: "proposedAt_", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposedAt_", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "cursor", - type: "address", + "internalType": "address", + "name": "cursor", + "type": "address" }, { - internalType: "uint256", - name: "size", - type: "uint256", - }, + "internalType": "uint256", + "name": "size", + "type": "uint256" + } ], - name: "getValidatorPaginated", - outputs: [ + "name": "getValidatorPaginated", + "outputs": [ { - internalType: "address[]", - name: "array", - type: "address[]", + "internalType": "address[]", + "name": "array", + "type": "address[]" }, { - internalType: "address", - name: "next", - type: "address", - }, + "internalType": "address", + "name": "next", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "guardianCosign", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "guardianCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "inputs": [ + + ], + "name": "guardianCosign", + "outputs": [ + ], - stateMutability: "view", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ + + ], + "name": "guardianCount", + "outputs": [ { - internalType: "address", - name: "_newOwner", - type: "address", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: "guardianPropose", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "address", + "name": "_newOwner", + "type": "address" + } ], - name: "initializeAccount", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "guardianPropose", + "outputs": [ + + ], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "executor", - type: "address", - }, + "inputs": [ + + ], + "name": "implementation", + "outputs": [ { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "installExecutor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "fallbackHandler", - type: "address", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "initializeAccount", + "outputs": [ + ], - name: "installFallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "validator", - type: "address", + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "address", + "name": "module", + "type": "address" }, + { + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "name": "installModule", + "outputs": [ + ], - name: "installValidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "executor", - type: "address", - }, + "internalType": "address", + "name": "_address", + "type": "address" + } ], - name: "isExecutorInstalled", - outputs: [ + "name": "isGuardian", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "fallbackHandler", - type: "address", + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, - ], - name: "isFallbackInstalled", - outputs: [ { - internalType: "bool", - name: "enabled", - type: "bool", + "internalType": "address", + "name": "module", + "type": "address" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_address", - type: "address", - }, + "internalType": "bytes", + "name": "additionalContext", + "type": "bytes" + } ], - name: "isGuardian", - outputs: [ + "name": "isModuleInstalled", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_address", - type: "address", - }, + "internalType": "address", + "name": "_address", + "type": "address" + } ], - name: "isOwner", - outputs: [ + "name": "isOwner", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "hash", - type: "bytes32", + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" }, { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } ], - name: "isValidSignature", - outputs: [ + "name": "isValidSignature", + "outputs": [ { - internalType: "bytes4", - name: "", - type: "bytes4", - }, + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "validator", - type: "address", - }, + "inputs": [ + ], - name: "isValidatorInstalled", - outputs: [ + "name": "ownerCount", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "ownerCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "inputs": [ + ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "proposalId", - outputs: [ + "name": "proposalId", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "proposalTimelock", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "inputs": [ + ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ + "name": "proposalTimelock", + "outputs": [ { - internalType: "address", - name: "_guardian", - type: "address", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: "removeGuardian", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_owner", - type: "address", - }, + "internalType": "address", + "name": "_guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [ + ], - name: "removeOwner", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes4", - name: "interfaceID", - type: "bytes4", - }, + "internalType": "address", + "name": "_owner", + "type": "address" + } ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, + "name": "removeOwner", + "outputs": [ + ], - stateMutability: "pure", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "executor", - type: "address", - }, + "internalType": "ModeCode", + "name": "mode", + "type": "bytes32" + } + ], + "name": "supportsExecutionMode", + "outputs": [ { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "bool", + "name": "isSupported", + "type": "bool" + } ], - name: "uninstallExecutor", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "uint256", + "name": "modulTypeId", + "type": "uint256" + } + ], + "name": "supportsModule", + "outputs": [ { - internalType: "bytes", - name: "data", - type: "bytes", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "uninstallFallback", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "validator", - type: "address", + "internalType": "uint256", + "name": "moduleTypeId", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "address", + "name": "module", + "type": "address" }, + { + "internalType": "bytes", + "name": "deInitData", + "type": "bytes" + } ], - name: "uninstallValidator", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "uninstallModule", + "outputs": [ + + ], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - components: [ - { - internalType: "address", - name: "sender", - type: "address", - }, + "components": [ { - internalType: "uint256", - name: "nonce", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "bytes", - name: "initCode", - type: "bytes", + "internalType": "uint256", + "name": "nonce", + "type": "uint256" }, { - internalType: "bytes", - name: "callData", - type: "bytes", + "internalType": "bytes", + "name": "initCode", + "type": "bytes" }, { - internalType: "uint256", - name: "callGasLimit", - type: "uint256", + "internalType": "bytes", + "name": "callData", + "type": "bytes" }, { - internalType: "uint256", - name: "verificationGasLimit", - type: "uint256", + "internalType": "bytes32", + "name": "accountGasLimits", + "type": "bytes32" }, { - internalType: "uint256", - name: "preVerificationGas", - type: "uint256", + "internalType": "uint256", + "name": "preVerificationGas", + "type": "uint256" }, { - internalType: "uint256", - name: "maxFeePerGas", - type: "uint256", + "internalType": "bytes32", + "name": "gasFees", + "type": "bytes32" }, { - internalType: "uint256", - name: "maxPriorityFeePerGas", - type: "uint256", + "internalType": "bytes", + "name": "paymasterAndData", + "type": "bytes" }, { - internalType: "bytes", - name: "paymasterAndData", - type: "bytes", - }, - { - internalType: "bytes", - name: "signature", - type: "bytes", - }, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } ], - internalType: "struct IERC4337.UserOperation", - name: "userOp", - type: "tuple", + "internalType": "struct PackedUserOperation", + "name": "userOp", + "type": "tuple" }, { - internalType: "bytes32", - name: "userOpHash", - type: "bytes32", + "internalType": "bytes32", + "name": "userOpHash", + "type": "bytes32" }, { - internalType: "uint256", - name: "missingAccountFunds", - type: "uint256", - }, + "internalType": "uint256", + "name": "missingAccountFunds", + "type": "uint256" + } ], - name: "validateUserOp", - outputs: [ + "name": "validateUserOp", + "outputs": [ { - internalType: "uint256", - name: "validSignature", - type: "uint256", - }, + "internalType": "uint256", + "name": "validSignature", + "type": "uint256" + } ], - stateMutability: "payable", - type: "function", + "stateMutability": "payable", + "type": "function" }, { - stateMutability: "payable", - type: "receive", - }, + "stateMutability": "payable", + "type": "receive" + } ] as const; const _bytecode = - "0x60e06040526103e860805261025860a0526201518060c05234801561002357600080fd5b5060805160a05160c051612fa6610053600039600061164c01526000611d9e01526000611dd60152612fa66000f3fe60806040526004361061023f5760003560e01c8063714041561161012e578063b61d27f6116100ab578063d8bf2fca1161006f578063d8bf2fca1461073b578063d8e2fa1a1461075b578063ea5f61d01461077b578063f32a36611461079b578063ffa1ad74146107bb57610246565b8063b61d27f6146106b9578063b68df16d146106cc578063bf57159b146106df578063c3db8838146106f5578063c7f758a81461070a57610246565b8063a3f4df7e116100f2578063a3f4df7e146105d8578063a526d83b14610615578063a7be85c614610635578063b0d691fe1461066a578063b31d43be1461069957610246565b806371404156146105375780637dcab4ce146105575780638557136814610577578063899764e6146105a5578063a1c0d459146105b857610246565b806334fcd5be116101bc5780634899c131116101805780634899c131146104ae5780634b6a1419146104ce57806354387ad7146104ee5780636613e1ed146105045780637065cb481461051757610246565b806334fcd5be146104265780633a871cdd1461044657806341c9ddff1461045957806342405d1b1461046e57806348135bf81461048e57610246565b80631626ba7e116102035780631626ba7e14610377578063173825d9146103b0578063200ff328146103d05780632dfca445146103f05780632f54bf6e1461040657610246565b806301ffc9a7146102bc578063053c6d98146102f15780630c68ba21146103135780630c8aefe5146103335780630db026221461035357610246565b3661024657005b34801561025257600080fd5b50600080516020612f3183398151915280548061026b57005b60408051368101909152366000823760408051601481019091523360601b9052600080366014018382865af19150506102aa3d60408051918201905290565b3d6000823e816102b8573d81fd5b3d81f35b3480156102c857600080fd5b506102dc6102d736600461260d565b6107ec565b60405190151581526020015b60405180910390f35b3480156102fd57600080fd5b5061031161030c366004612690565b61083d565b005b34801561031f57600080fd5b506102dc61032e3660046126e4565b61091b565b34801561033f57600080fd5b506102dc61034e3660046126e4565b610939565b34801561035f57600080fd5b5061036960005481565b6040519081526020016102e8565b34801561038357600080fd5b50610397610392366004612701565b61095b565b6040516001600160e01b031990911681526020016102e8565b3480156103bc57600080fd5b506103116103cb3660046126e4565b610970565b3480156103dc57600080fd5b506102dc6103eb3660046126e4565b610a4b565b3480156103fc57600080fd5b5061036960025481565b34801561041257600080fd5b506102dc6104213660046126e4565b610a7b565b610439610434366004612733565b610a99565b6040516102e891906127f7565b61036961045436600461285b565b610ae3565b34801561046557600080fd5b50610311610b9c565b34801561047a57600080fd5b506102dc6104893660046126e4565b610d5b565b34801561049a57600080fd5b506103116104a9366004612690565b610d76565b6104c16104bc3660046128ae565b610dc4565b6040516102e89190612909565b3480156104da57600080fd5b506103116104e936600461291c565b610e14565b3480156104fa57600080fd5b5061036960015481565b6104c16105123660046129ff565b610e39565b34801561052357600080fd5b506103116105323660046126e4565b610e8c565b34801561054357600080fd5b506103116105523660046126e4565b610f4a565b34801561056357600080fd5b506103116105723660046126e4565b610ffb565b34801561058357600080fd5b50610597610592366004612a4e565b6111e2565b6040516102e8929190612abf565b6104396105b3366004612733565b61120d565b3480156105c457600080fd5b506103116105d3366004612ae9565b611251565b3480156105e457600080fd5b506104c16040518060400160405280601181526020017020b1b1b2b9b99021b7b73a3937b63632b960791b81525081565b34801561062157600080fd5b506103116106303660046126e4565b6112bc565b34801561064157600080fd5b506104c160405180604001604052806009815260200168115d1a195c9cdc1bdd60ba1b81525081565b34801561067657600080fd5b50604051735ff137d4b0fdcd49dca30c7cf57e578a026d278981526020016102e8565b3480156106a557600080fd5b506103116106b4366004612690565b61137a565b6104c16106c73660046128ae565b61148b565b6104c16106da366004612690565b6114ef565b3480156106eb57600080fd5b5061036960035481565b34801561070157600080fd5b5061031161153a565b34801561071657600080fd5b5061072a610725366004612ae9565b6116f6565b6040516102e8959493929190612b02565b34801561074757600080fd5b50610311610756366004612690565b611800565b34801561076757600080fd5b50610311610776366004612690565b6118d7565b34801561078757600080fd5b50610597610796366004612a4e565b61191f565b3480156107a757600080fd5b506103116107b6366004612690565b61193d565b3480156107c757600080fd5b506104c1604051806040016040528060058152602001640312e302e360dc1b81525081565b600063b495ebe760e01b6001600160e01b031983160161080e57506001919050565b63b495ebe760e01b6001600160e01b031983160161082e57506001919050565b61083782611986565b92915050565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061085e57503330145b61087b57604051635629665f60e11b815260040160405180910390fd5b6000610893600080516020612f318339815191525490565b90506001600160a01b038116156108cd576040516303f1500160e11b81526001600160a01b03821660048201526024015b60405180910390fd5b6108d8848484611a90565b6040516001600160a01b03851681527fb40551e04c79c5ed1bda94430715b4fbd0748b35cc548419af988aeb0679915f906020015b60405180910390a150505050565b6001600160a01b031660009081526005602052604090205460ff1690565b6000600080516020612f118339815191526109548184611af9565b9392505050565b6000610968848484611b33565b949350505050565b61097933610a7b565b8061098357503330145b6109a0576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806109bc57506109ba81610a7b565b155b156109da5760405163f1369ccb60e01b815260040160405180910390fd5b6001600054116109fd5760405163021870b960e11b815260040160405180910390fd5b610a0681611c00565b604080513081526001600160a01b03831660208201527fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367991015b60405180910390a150565b600080610a64600080516020612f318339815191525490565b6001600160a01b0390811693169290921492915050565b6001600160a01b031660009081526004602052604090205460ff1690565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d27891480610abc57503330145b610ad957604051635629665f60e11b815260040160405180910390fd5b6109548383611c33565b6000816020850135606081901c90610afa82610d5b565b610b0957600093505050610b82565b60405160016206524760e11b031981526001600160a01b0383169063fff35b7290610b3a908a908a90600401612bab565b6020604051808303816000875af1158015610b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7d9190612cc4565b935050505b8015610b945760003860003884335af1505b509392505050565b610ba53361091b565b610bc257604051636570ecab60e11b815260040160405180910390fd5b600254600003610be557604051631dc0650160e31b815260040160405180910390fd5b610bf0600254611d0b565b15610c0e576040516320181a3560e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff1615610c4857604051638b19dbcb60e01b815260040160405180910390fd5b60028054600090815260066020908152604080832060019081018054808301825590855292842090920180546001600160a01b031916331790558354835282209092018054909190610c9b908490612cf3565b90915550506002546000818152600660205260409020546001600160a01b031690610cc590611d82565b15610cf8576002546000908152600660205260409020805460ff60a01b1916600160a01b179055610cf581611e0e565b50565b60028054600081815260066020908152604091829020909301548151308152938401929092526001600160a01b0384169083015260608201527f7afa94f51443879f537b9be4f09d5d734c2c233b788d2f6af6565add34706bab90608001610a40565b6000600080516020612f518339815191526109548184611af9565b33735ff137d4b0fdcd49dca30c7cf57e578a026d27891480610d9757503330145b610db457604051635629665f60e11b815260040160405180910390fd5b610dbf838383611e3f565b505050565b6060600080516020612f11833981519152610ddf8133611af9565b610dfe57604051635c93ff2f60e11b81523360048201526024016108c4565b610e0a86868686611efb565b9695505050505050565b6000610e2282840184612d06565b50509050610e2f81611e0e565b610dbf8383611f31565b6060600080516020612f11833981519152610e548133611af9565b610e7357604051635c93ff2f60e11b81523360048201526024016108c4565b604051634851657960e11b815260040160405180910390fd5b610e9533610a7b565b80610e9f57503330145b610ebc576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610ed65750610ed68161091b565b80610ee55750610ee581610a7b565b15610f0357604051631a1aefc560e21b815260040160405180910390fd5b610f0c81611e0e565b604080513081526001600160a01b03831660208201527fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a9101610a40565b610f5333610a7b565b80610f5d57503330145b610f7a576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610f965750610f948161091b565b155b15610fb45760405163985f453960e01b815260040160405180910390fd5b610fbd81612008565b604080513081526001600160a01b03831660208201527fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b9101610a40565b6110043361091b565b61102157604051636570ecab60e11b815260040160405180910390fd5b6001600160a01b038116158061103b575061103b8161091b565b8061104a575061104a81610a7b565b1561106857604051631a1aefc560e21b815260040160405180910390fd5b6003600154101561108c57604051636bb07db960e11b815260040160405180910390fd5b600254600090815260066020526040902060010154158015906110c85750600254600090815260066020526040902054600160a01b900460ff16155b156110e657604051639fa6dc5760e01b815260040160405180910390fd5b6002546110f4906001612cf3565b6002818155600091825260066020908152604080842080546001600160a01b0387166001600160a01b03199182161790915583548552818520600190810180548083018255908752938620909301805490911633179055825484528320909101805491929091611165908490612cf3565b9091555050600280546000908152600660209081526040808320805460ff60a01b1916905583548352918290204260039091015591548151308152928301526001600160a01b038316908201523360608201527f9fb4a8d051aad8866705f4d52eb05a29939e15ad43dd4aab82cf31806759eac390608001610a40565b60606000600080516020612f5183398151915261120081868661203c565b92509250505b9250929050565b6060600080516020612f118339815191526112288133611af9565b61124757604051635c93ff2f60e11b81523360048201526024016108c4565b6109688484611c33565b61125a33610a7b565b8061126457503330145b611281576040516311d9f09160e01b815260040160405180910390fd5b600381905560408051308152602081018390527f47870c5ed1a3a6940ad17950265b8b50d279f73d7d026febbef88fd3ffcb934b9101610a40565b6112c533610a7b565b806112cf57503330145b6112ec576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b038116158061130657506113068161091b565b80611315575061131581610a7b565b156113335760405163053bd11560e31b815260040160405180910390fd5b61133c816121d8565b604080513081526001600160a01b03831660208201527fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a9101610a40565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061139b57503330145b6113b857604051635629665f60e11b815260040160405180910390fd5b600080516020612f518339815191526000806113d6858501866129ff565b604051638a91b0e360e01b815291935091506001600160a01b03871690638a91b0e390611407908490600401612909565b600060405180830381600087803b15801561142157600080fd5b505af1158015611435573d6000803e3d6000fd5b50611447925085915084905088612209565b6040516001600160a01b03871681527f36a773811aa40c53a642b0596c94174b588d0d1b2b9b6fa6e31c3c30d686163f9060200160405180910390a1505050505050565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d278914806114ae57503330145b806114bd57506114bd33610a7b565b6114da57604051635629665f60e11b815260040160405180910390fd5b6114e685858585611efb565b95945050505050565b606033735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061151257503330145b61152f57604051635629665f60e11b815260040160405180910390fd5b6109688484846122de565b61154333610a7b565b8061155257506115523361091b565b8061155c57503330145b611579576040516302d8be6160e21b815260040160405180910390fd5b600254600090815260066020526040902054600160a01b900460ff16156115b357604051638b19dbcb60e01b815260040160405180910390fd5b6115bc3361091b565b80156115ca57506000600354115b15611611576003805460025460009081526006602052604090209091015442916115f391612cf3565b106116115760405163ae18e9c760e01b815260040160405180910390fd5b61161a3361091b565b80156116265750600354155b156116905760025460009081526006602052604090206003015442906116729062ffffff7f00000000000000000000000000000000000000000000000000000000000000001690612cf3565b106116905760405163ae18e9c760e01b815260040160405180910390fd5b60028054600090815260066020908152604091829020805460ff60a01b1916600160a01b179055915481513081529283015233908201527faf7f1090397448391393dc134b45d6d20e79a9d2a8f5a82fb42d1514a55ecbf99060600160405180910390a1565b6000806060818085158061170b575060025486115b1561172957604051631dc0650160e31b815260040160405180910390fd5b6000868152600660209081526040808320815160a08101835281546001600160a01b0381168252600160a01b900460ff161515818501526001820180548451818702810187018652818152929593948601938301828280156117b457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611796575b5050505050815260200160028201548152602001600382015481525050905080600001518160600151826040015183602001518460800151955095509550955095505091939590929450565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061182157503330145b61183e57604051635629665f60e11b815260040160405180910390fd5b60008061184d838501856129ff565b604051638a91b0e360e01b815291935091506001600160a01b03861690638a91b0e39061187e908490600401612909565b600060405180830381600087803b15801561189857600080fd5b505af11580156118ac573d6000803e3d6000fd5b5050505060006118c7600080516020612f5183398151915290565b6001019050611447818488612209565b33735ff137d4b0fdcd49dca30c7cf57e578a026d278914806118f857503330145b61191557604051635629665f60e11b815260040160405180910390fd5b610dbf8282612312565b60606000600080516020612f1183398151915261120081868661203c565b33735ff137d4b0fdcd49dca30c7cf57e578a026d2789148061195e57503330145b61197b57604051635629665f60e11b815260040160405180910390fd5b610dbf838383612397565b6000639c7f284760e01b6001600160e01b03198316016119a857506001919050565b63fe00365960e01b6001600160e01b03198316016119c857506001919050565b630cd5c99f60e01b6001600160e01b03198316016119e857506001919050565b6313a0681b60e11b6001600160e01b0319831601611a0857506001919050565b63f375101b60e01b6001600160e01b0319831601611a2857506001919050565b6316fd948160e31b6001600160e01b0319831601611a4857506001919050565b6326715e2160e11b6001600160e01b0319831601611a6857506001919050565b63bdbfa2e560e01b6001600160e01b0319831601611a8857506001919050565b506000919050565b6040516306d61fe760e41b81526001600160a01b03841690636d61fe7090611abe9085908590600401612d67565b600060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b50505050610dbf83612453565b600060016001600160a01b038316148015906109545750506001600160a01b03908116600090815260209290925260409091205416151590565b600080611b436014828587612d7b565b611b4c91612da5565b60601c9050611b5a81610d5b565b611b8257604051635c93ff2f60e11b81526001600160a01b03821660048201526024016108c4565b6001600160a01b03811663f551e2ee3387611ba0876014818b612d7b565b6040518563ffffffff1660e01b8152600401611bbf9493929190612dd8565b602060405180830381865afa158015611bdc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e69190612e00565b6001600160a01b0381166000908152600460205260408120805460ff1916905554611c2d90600190612e1d565b60005550565b606081806001600160401b03811115611c4e57611c4e61295d565b604051908082528060200260200182016040528015611c8157816020015b6060815260200190600190039081611c6c5790505b50915060005b81811015611d035736858583818110611ca257611ca2612e30565b9050602002810190611cb49190612e46565b9050611cdd611cc660208301836126e4565b6020830135611cd86040850185612e66565b611efb565b848381518110611cef57611cef612e30565b602090810291909101015250600101611c87565b505092915050565b6000805b600083815260066020526040902060010154811015611d79576000838152600660205260409020600101805433919083908110611d4e57611d4e612e30565b6000918252602090912001546001600160a01b031603611d715750600192915050565b600101611d0f565b50600092915050565b600154600082815260066020526040812060020154909161ffff7f00000000000000000000000000000000000000000000000000000000000000001691611dfc906fffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690612eac565b611e069190612ec3565b101592915050565b6001600160a01b0381166000908152600460205260408120805460ff191660019081179091559054611c2d91612cf3565b6040516306d61fe760e41b8152600080516020612f51833981519152906001600160a01b03851690636d61fe7090611e7d9086908690600401612d67565b600060405180830381600087803b158015611e9757600080fd5b505af1158015611eab573d6000803e3d6000fd5b50505050611ec2848261249990919063ffffffff16565b6040516001600160a01b03851681527f2d91d9c220de5aa44766800ef0fe09b060fdd021b142ae4d21ce6a87b066d1709060200161090d565b60405181838237600038838387895af1611f18573d6000823e3d81fd5b3d8152602081013d6000823e3d01604052949350505050565b6001600052600080516020612f518339815191526020527f643a0023cfcea778bfa72ce77c7e63d8b140a6542bf3f6edb59a96ccce28ad86546001600160a01b031615611f7d57600080fd5b611f8561256f565b600080611f9483850185612d06565b92509250506000826001600160a01b031682604051611fb39190612ee5565b600060405180830381855af49150503d8060008114611fee576040519150601f19603f3d011682016040523d82523d6000602084013e611ff3565b606091505b505090508061200157600080fd5b5050505050565b6001600160a01b0381166000908152600560205260409020805460ff19169055600180546120369190612e1d565b60015550565b606060006001600160a01b03841660011480159061205f575061205f8585611af9565b1561208857604051637c84ecfb60e01b81526001600160a01b03851660048201526024016108c4565b826000036120a95760405163f725081760e01b815260040160405180910390fd5b826001600160401b038111156120c1576120c161295d565b6040519080825280602002602001820160405280156120ea578160200160208202803683370190505b506001600160a01b03808616600090815260208890526040812054929450911691505b6001600160a01b0382161580159061212f57506001600160a01b038216600114155b801561213a57508381105b15612194578183828151811061215257612152612e30565b6001600160a01b03928316602091820292909201810191909152928116600090815292879052604090922054909116908061218c81612ef7565b91505061210d565b6001600160a01b0382166001146121cc57826121b1600183612e1d565b815181106121c1576121c1612e30565b602002602001015191505b80835250935093915050565b6001600160a01b0381166000908152600560205260409020805460ff19166001908117909155805461203691612cf3565b6001600160a01b038116158061222857506001600160a01b0381166001145b1561225157604051637c84ecfb60e01b81526001600160a01b03831660048201526024016108c4565b6001600160a01b0382811660009081526020859052604090205481169082161461229957604051637c84ecfb60e01b81526001600160a01b03821660048201526024016108c4565b6001600160a01b0390811660008181526020949094526040808520805494841686529085208054949093166001600160a01b0319948516179092559092528154169055565b604051818382376000388383875af46122fa573d6000823e3d81fd5b3d8152602081013d6000823e3d016040529392505050565b600061232a600080516020612f318339815191525490565b604051638a91b0e360e01b81529091506001600160a01b03821690638a91b0e39061235b9086908690600401612d67565b600060405180830381600087803b15801561237557600080fd5b505af1158015612389573d6000803e3d6000fd5b50505050610dbf6000612453565b6040516306d61fe760e41b8152600080516020612f11833981519152906001600160a01b03851690636d61fe70906123d59086908690600401612d67565b600060405180830381600087803b1580156123ef57600080fd5b505af1158015612403573d6000803e3d6000fd5b5050505061241a848261249990919063ffffffff16565b6040516001600160a01b03851681527fa94a505d6d06d2648d04f969a277c083b36aacc22be6fc3ab6afbadee18b6eb99060200161090d565b306001600160a01b0382160361248757604051634726455360e11b81526001600160a01b03821660048201526024016108c4565b600080516020612f3183398151915255565b6001600160a01b03811615806124b857506001600160a01b0381166001145b156124e157604051637c84ecfb60e01b81526001600160a01b03821660048201526024016108c4565b6001600160a01b03818116600090815260208490526040902054161561252557604051631034f46960e21b81526001600160a01b03821660048201526024016108c4565b60016000818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b600080516020612f51833981519152612595600080516020612f1183398151915261259a565b610cf5815b60016000908152602082905260409020546001600160a01b0316156125d2576040516329e42f3360e11b815260040160405180910390fd5b60016000818152602092909252604090912080546001600160a01b0319169091179055565b6001600160e01b031981168114610cf557600080fd5b60006020828403121561261f57600080fd5b8135610954816125f7565b6001600160a01b0381168114610cf557600080fd5b803561264a8161262a565b919050565b60008083601f84011261266157600080fd5b5081356001600160401b0381111561267857600080fd5b60208301915083602082850101111561120657600080fd5b6000806000604084860312156126a557600080fd5b83356126b08161262a565b925060208401356001600160401b038111156126cb57600080fd5b6126d78682870161264f565b9497909650939450505050565b6000602082840312156126f657600080fd5b81356109548161262a565b60008060006040848603121561271657600080fd5b8335925060208401356001600160401b038111156126cb57600080fd5b6000806020838503121561274657600080fd5b82356001600160401b038082111561275d57600080fd5b818501915085601f83011261277157600080fd5b81358181111561278057600080fd5b8660208260051b850101111561279557600080fd5b60209290920196919550909350505050565b60005b838110156127c25781810151838201526020016127aa565b50506000910152565b600081518084526127e38160208601602086016127a7565b601f01601f19169290920160200192915050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b8281101561284e57603f1988860301845261283c8583516127cb565b94509285019290850190600101612820565b5092979650505050505050565b60008060006060848603121561287057600080fd5b83356001600160401b0381111561288657600080fd5b8401610160818703121561289957600080fd5b95602085013595506040909401359392505050565b600080600080606085870312156128c457600080fd5b84356128cf8161262a565b93506020850135925060408501356001600160401b038111156128f157600080fd5b6128fd8782880161264f565b95989497509550505050565b60208152600061095460208301846127cb565b6000806020838503121561292f57600080fd5b82356001600160401b0381111561294557600080fd5b6129518582860161264f565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261298457600080fd5b81356001600160401b038082111561299e5761299e61295d565b604051601f8301601f19908116603f011681019082821181831017156129c6576129c661295d565b816040528381528660208588010111156129df57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215612a1257600080fd5b8235612a1d8161262a565b915060208301356001600160401b03811115612a3857600080fd5b612a4485828601612973565b9150509250929050565b60008060408385031215612a6157600080fd5b8235612a6c8161262a565b946020939093013593505050565b60008151808452602080850194506020840160005b83811015612ab45781516001600160a01b031687529582019590820190600101612a8f565b509495945050505050565b604081526000612ad26040830185612a7a565b905060018060a01b03831660208301529392505050565b600060208284031215612afb57600080fd5b5035919050565b60018060a01b038616815284602082015260a060408201526000612b2960a0830186612a7a565b931515606083015250608001529392505050565b6000808335601e19843603018112612b5457600080fd5b83016020810192503590506001600160401b03811115612b7357600080fd5b80360382131561120657600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152612bcc60408201612bbf8561263f565b6001600160a01b03169052565b602083013560608201526000612be56040850185612b3d565b610160806080860152612bfd6101a086018385612b82565b9250612c0c6060880188612b3d565b9250603f19808786030160a0880152612c26858584612b82565b9450608089013560c088015260a089013560e0880152610100935060c089013584880152610120915060e089013582880152610140848a013581890152612c6f838b018b612b3d565b95509250818887030184890152612c87868685612b82565b9550612c95818b018b612b3d565b955093505080878603016101808801525050612cb2838383612b82565b93505050508260208301529392505050565b600060208284031215612cd657600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561083757610837612cdd565b600080600060608486031215612d1b57600080fd5b8335612d268161262a565b92506020840135612d368161262a565b915060408401356001600160401b03811115612d5157600080fd5b612d5d86828701612973565b9150509250925092565b602081526000610968602083018486612b82565b60008085851115612d8b57600080fd5b83861115612d9857600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015611d035760149490940360031b84901b1690921692915050565b60018060a01b0385168152836020820152606060408201526000610e0a606083018486612b82565b600060208284031215612e1257600080fd5b8151610954816125f7565b8181038181111561083757610837612cdd565b634e487b7160e01b600052603260045260246000fd5b60008235605e19833603018112612e5c57600080fd5b9190910192915050565b6000808335601e19843603018112612e7d57600080fd5b8301803591506001600160401b03821115612e9757600080fd5b60200191503681900382131561120657600080fd5b808202811582820484141761083757610837612cdd565b600082612ee057634e487b7160e01b600052601260045260246000fd5b500490565b60008251612e5c8184602087016127a7565b600060018201612f0957612f09612cdd565b506001019056fef88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea039c63439e8db454cdf22fd3d05d35ed5ea662f6ebbc519905ab830d38464df094f88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea02a26469706673582212209fb18fa9f56408b811a0a4bd8e0b24510141edebd07626fcda57fc51661b05b864736f6c63430008170033"; + "0x6080604052600436106101f25760003560e01c80637dcab4ce1161010d578063bf57159b116100a0578063d691c9641161006f578063d691c96414610721578063e9ae5c5314610741578063ea5f61d014610754578063eac9b20d14610774578063f2dc691d146107a1576101f9565b8063bf57159b146106a5578063c3db8838146106bb578063c7f758a8146106d0578063d03c791414610701576101f9565b8063a1c0d459116100dc578063a1c0d4591461062f578063a526d83b1461064f578063a71763a81461066f578063b0d691fe14610682576101f9565b80637dcab4ce1461058257806385571368146105a25780639517e29f146105d05780639cfd7cff146105e3576101f9565b80632f54bf6e116101855780635c60da1b116101545780635c60da1b146104fb5780637065cb481461052f578063714041561461054f57806372aea6541461056f576101f9565b80632f54bf6e1461049d57806341c9ddff146104bd5780634b6a1419146104d257806354387ad7146104e5576101f9565b80631626ba7e116101c15780631626ba7e1461041b578063173825d91461045457806319822f7c146104745780632dfca44514610487576101f9565b80630a664dba146103755780630c68ba21146103a75780630db02622146103d7578063112d3a7d146103fb576101f9565b366101f957005b61020e6000356001600160e01b0319166107c1565b6000610218610874565b600080356001600160e01b0319168152600291909101602090815260409182902080548351808501909452601484527346616c6c6261636b2068616e646c65723a20257360601b9284019290925292506001600160a01b03811691600160a01b90910460f81b906102899083610898565b6001600160a01b0382166102c357604051632464e76d60e11b81526001600160e01b03196000351660048201526024015b60405180910390fd5b6102d181607f60f91b6108dd565b156103255760408051368101909152366000823760408051601481019091523360601b90526000803660140183865afa90506103133d60408051918201905290565b3d6000823e81610321573d81fd5b3d81f35b6103308160006108dd565b156103735760408051368101909152366000823760408051601481019091523360601b9052600080366014018382875af190506103133d60408051918201905290565b005b34801561038157600080fd5b5061038a6108f4565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156103b357600080fd5b506103c76103c2366004613826565b610911565b604051901515815260200161039e565b3480156103e357600080fd5b506103ed60005481565b60405190815260200161039e565b34801561040757600080fd5b506103c7610416366004613884565b61092f565b34801561042757600080fd5b5061043b6104363660046138df565b610994565b6040516001600160e01b0319909116815260200161039e565b34801561046057600080fd5b5061037361046f366004613826565b610a6a565b6103ed610482366004613943565b610b31565b34801561049357600080fd5b506103ed60025481565b3480156104a957600080fd5b506103c76104b8366004613826565b610c17565b3480156104c957600080fd5b50610373610c35565b6103736104e0366004613990565b610df2565b3480156104f157600080fd5b506103ed60015481565b34801561050757600080fd5b5061038a7f000000000000000000000000917398df969752a7d94725740918f38e4b8eecec81565b34801561053b57600080fd5b5061037361054a366004613826565b610ee6565b34801561055b57600080fd5b5061037361056a366004613826565b610fa4565b61037361057d3660046139d1565b611041565b34801561058e57600080fd5b5061037361059d366004613826565b611121565b3480156105ae57600080fd5b506105c26105bd366004613a05565b6112e6565b60405161039e929190613a76565b6103736105de366004613884565b61130d565b3480156105ef57600080fd5b50604080518082018252601e81527f657468657273706f7477616c6c65742e6d6f64756c61722e76312e302e3000006020820152905161039e9190613af0565b34801561063b57600080fd5b5061037361064a366004613b03565b61143a565b34801561065b57600080fd5b5061037361066a366004613826565b61146f565b61037361067d366004613884565b61152d565b34801561068e57600080fd5b506f71727de22e5e9d8baf0edac6f37da03261038a565b3480156106b157600080fd5b506103ed60035481565b3480156106c757600080fd5b506103736115f6565b3480156106dc57600080fd5b506106f06106eb366004613b03565b611739565b60405161039e959493929190613b1c565b34801561070d57600080fd5b506103c761071c366004613b03565b611843565b61073461072f3660046138df565b6118e2565b60405161039e9190613b57565b61037361074f3660046138df565b611f39565b34801561076057600080fd5b506105c261076f366004613a05565b6123ae565b34801561078057600080fd5b5061079461078f366004613bd1565b6123cb565b60405161039e9190613bee565b3480156107ad57600080fd5b506103c76107bc366004613b03565b6124a3565b60006107cb610874565b6001600160e01b03198316600090815260029190910160209081526040918290206001018054835181840281018401909452808452909183018282801561083b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161081d575b5050505050905061084c81336124f2565b1515600003610870576040516332cf492b60e11b81523360048201526024016102ba565b5050565b7ff88ce1fdb7fb1cbd3282e49729100fa3f2d6ee9f797961fe4fb1871cea89ea0290565b61087082826040516024016108ae929190613c6c565b60408051601f198184030181529190526020810180516001600160e01b031663319af33360e01b1790526124ff565b6001600160f81b0319828116908216145b92915050565b600061090c6000805160206142aa8339815191525490565b905090565b6001600160a01b031660009081526005602052604090205460ff1690565b600060018503610949576109428461250b565b905061098c565b6002850361095a5761094284612529565b600385036109775761094261097183850185613bd1565b85612543565b600485036109885761094284612581565b5060005b949350505050565b6000806109a46014828587613c7f565b6109ad91613ca9565b60601c90506109bb8161250b565b6109e357604051635c93ff2f60e11b81526001600160a01b03821660048201526024016102ba565b6001600160a01b03811663f551e2ee3387610a01876014818b613c7f565b6040518563ffffffff1660e01b8152600401610a209493929190613d05565b602060405180830381865afa158015610a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a619190613d37565b95945050505050565b610a7333610c17565b80610a7d57503330145b610a9a576040516311d9f09160e01b815260040160405180910390fd5b610aa381610c17565b610ac05760405163f1369ccb60e01b815260040160405180910390fd5b600160005411610ae35760405163021870b960e11b815260040160405180910390fd5b610aec816125b3565b604080513081526001600160a01b03831660208201527fe594d081b4382713733fe631966432c9cea5199afb2db5c3c1931f9f9300367991015b60405180910390a150565b6000336f71727de22e5e9d8baf0edac6f37da03214610b6357604051635629665f60e11b815260040160405180910390fd5b816020850135606081901c90610b788261250b565b610b8757600193505050610bfd565b604051639700320360e01b81526001600160a01b03831690639700320390610bb5908a908a90600401613d99565b6020604051808303816000875af1158015610bd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf89190613e98565b935050505b8015610c0f5760003860003884335af1505b509392505050565b6001600160a01b031660009081526004602052604090205460ff1690565b610c3e33610911565b610c5b57604051636570ecab60e11b815260040160405180910390fd5b600254600081815260066020526040812090829003610c8d57604051631dc0650160e31b815260040160405180910390fd5b610c96826125e8565b15610cb4576040516320181a3560e21b815260040160405180910390fd5b610cd6600254600090815260066020526040902054600160a01b900460ff1690565b15610cf457604051638b19dbcb60e01b815260040160405180910390fd5b60008281526006602090815260408220600180820180549182018155845291832090910180546001600160a01b03191633179055838252600201805491610d3a83613ec7565b909155505080546001600160a01b0316610d538361265f565b15610d85576000838152600660205260409020805460ff60a01b1916600160a01b179055610d8081612699565b505050565b6000838152600660209081526040918290206002015482513081529182018690526001600160a01b0384169282019290925260608101919091527f7afa94f51443879f537b9be4f09d5d734c2c233b788d2f6af6565add34706bab906080015b60405180910390a1505050565b6001600160a01b037f000000000000000000000000917398df969752a7d94725740918f38e4b8eecec163003610e3b576040516308e3edd160e41b815260040160405180910390fd5b610e436126c9565b60008080610e5384860186613fa3565b925092509250610e6283612699565b6000826001600160a01b031682604051610e7c9190614004565b600060405180830381855af49150503d8060008114610eb7576040519150601f19603f3d011682016040523d82523d6000602084013e610ebc565b606091505b5050905080610ede57604051631b79777760e11b815260040160405180910390fd5b505050505050565b610eef33610c17565b80610ef957503330145b610f16576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b0381161580610f305750610f3081610911565b80610f3f5750610f3f81610c17565b15610f5d57604051631a1aefc560e21b815260040160405180910390fd5b610f6681612699565b604080513081526001600160a01b03831660208201527fc82bdbbf677a2462f2a7e22e4ba9abd209496b69cd7b868b3b1d28f76e09a40a9101610b26565b610fad33610c17565b80610fb757503330145b610fd4576040516311d9f09160e01b815260040160405180910390fd5b610fdd81610911565b610ffa5760405163985f453960e01b815260040160405180910390fd5b611003816126ea565b604080513081526001600160a01b03831660208201527fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b9101610b26565b336f71727de22e5e9d8baf0edac6f37da032148061105e57503330145b61107b57604051635629665f60e11b815260040160405180910390fd5b36600061108b6060840184614020565b611099916004908290613c7f565b915091506000306001600160a01b031683836040516110b9929190614066565b600060405180830381855af49150503d80600081146110f4576040519150601f19603f3d011682016040523d82523d6000602084013e6110f9565b606091505b505090508061111b57604051632b3f6d1160e21b815260040160405180910390fd5b50505050565b61112a33610911565b61114757604051636570ecab60e11b815260040160405180910390fd5b6001600160a01b0381161580611161575061116181610911565b80611170575061117081610c17565b1561118e57604051631a1aefc560e21b815260040160405180910390fd5b600360015410156111b257604051636bb07db960e11b815260040160405180910390fd5b60025460009081526006602052604090206001810154158015906111df57508054600160a01b900460ff16155b156111fd57604051639fa6dc5760e01b815260040160405180910390fd5b6000600254600161120e9190614076565b6000818152600660209081526040822080546001600160a01b0388166001600160a01b031991821617825560018083018054918201815585529284209092018054909216331790915582825260020180549293509061126c83613ec7565b9091555050600081815260066020908152604091829020805460ff60a01b1916815542600390910155600283905581513081529081018390526001600160a01b038516918101919091523360608201527f9fb4a8d051aad8866705f4d52eb05a29939e15ad43dd4aab82cf31806759eac390608001610de5565b60606000806112f3610874565b905061130081868661274b565b92509250505b9250929050565b336f71727de22e5e9d8baf0edac6f37da032148061132a57503330145b61134757604051635629665f60e11b815260040160405180910390fd5b6001840361135f5761135a8383836128e7565b6113f2565b600284036113725761135a838383612963565b600384036113c3576113b86040518060400160405280601f81526020017f49545320412046414c4c4241434b203d3e20696e7374616c6c4d6f64756c650081525061297c565b61135a8383836129bf565b600484036113d65761135a838383612c89565b60405163041c38b360e41b8152600481018590526024016102ba565b604080518581526001600160a01b03851660208201527fd21d0b289f126c4b473ea641963e766833c2f13866e4ff480abd787c100ef12391015b60405180910390a150505050565b61144333610c17565b8061144d57503330145b61146a576040516311d9f09160e01b815260040160405180910390fd5b600355565b61147833610c17565b8061148257503330145b61149f576040516311d9f09160e01b815260040160405180910390fd5b6001600160a01b03811615806114b957506114b981610911565b806114c857506114c881610c17565b156114e65760405163053bd11560e31b815260040160405180910390fd5b6114ef81612cec565b604080513081526001600160a01b03831660208201527fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a9101610b26565b336f71727de22e5e9d8baf0edac6f37da032148061154a57503330145b61156757604051635629665f60e11b815260040160405180910390fd5b6001840361157f5761157a838383612d1e565b6115b8565b600284036115925761157a838383612daf565b600384036115a55761157a838383612dcd565b600484036113d65761157a8383836130aa565b604080518581526001600160a01b03851660208201527f341347516a9de374859dfda710fa4828b2d48cb57d4fbe4c1149612b8e02276e910161142c565b6115ff33610c17565b8061160e575061160e33610911565b8061161857503330145b611635576040516302d8be6160e21b815260040160405180910390fd5b6002546000908152600660205260408120600354909190156116595760035461165e565b620151805b9050611682600254600090815260066020526040902054600160a01b900460ff1690565b156116a057604051638b19dbcb60e01b815260040160405180910390fd5b60006116ab33610911565b90508080156116c95750428284600301546116c69190614076565b10155b156116e75760405163ae18e9c760e01b815260040160405180910390fd5b825460ff60a01b1916600160a01b17835560025460408051308152602081019290925233908201527faf7f1090397448391393dc134b45d6d20e79a9d2a8f5a82fb42d1514a55ecbf990606001610de5565b6000806060818085158061174e575060025486115b1561176c57604051631dc0650160e31b815260040160405180910390fd5b6000868152600660209081526040808320815160a08101835281546001600160a01b0381168252600160a01b900460ff161515818501526001820180548451818702810187018652818152929593948601938301828280156117f757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116117d9575b5050505050815260200160028201548152602001600382015481525050905080600001518160600151826040015183602001518460800151955095509550955095505091939590929450565b600081600881901b61185982600160f81b6108dd565b1561186757600192506118aa565b6118728260006108dd565b1561188057600192506118aa565b611892826001600160f81b03196108dd565b156118a057600192506118aa565b5060009392505050565b6118b58160006108dd565b156118c357600192506118db565b6118d181600160f81b6108dd565b156118a057600192505b5050919050565b606060006118ee610874565b60010190506118fd8133613126565b61191c57604051635c93ff2f60e11b81523360048201526024016102ba565b60006119346000805160206142aa8339815191525490565b90506001600160a01b038116611bf45785600881901b61195882600160f81b6108dd565b156119c757863587016020810190356119728360006108dd565b15611988576119818282613160565b96506119c0565b61199683600160f81b6108dd565b156119a5576119818282613238565b826040516308c3ee0360e11b81526004016102ba9190614089565b5050611bed565b6119d28260006108dd565b15611b20576000803660006119e78b8b613365565b6040805160018082528183019092529498509296509094509250816020015b6060815260200190600190039081611a065790505098506000611a2986826108dd565b15611a5d57611a3a858585856133b6565b8a600081518110611a4d57611a4d61409e565b6020026020010181905250611b16565b611a6b86600160f81b6108dd565b15611afb57611a7c858585856133ec565b8b600081518110611a8f57611a8f61409e565b6020908102919091010152905080611af6577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb760008b600081518110611ad757611ad761409e565b6020026020010151604051611aed9291906140b4565b60405180910390a15b611b16565b856040516308c3ee0360e11b81526004016102ba9190614089565b5050505050611bed565b611b32826001600160f81b03196108dd565b15611bd2576000611b46601482898b613c7f565b611b4f91613ca9565b60601c9050366000611b64896014818d613c7f565b9092509050611b748460006108dd565b15611b8a57611b8483838361341d565b50611bca565b611b9884600160f81b6108dd565b15611baf57611ba8838383613451565b5050611bca565b836040516308c3ee0360e11b81526004016102ba9190614089565b505050611bed565b81604051632e5bf3f960e21b81526004016102ba9190614089565b5050611f30565b604051631057c74d60e11b81526000906001600160a01b038316906320af8e9a90611c27903390859036906004016140cd565b6000604051808303816000875af1158015611c46573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c6e91908101906140f2565b905086600881901b611c8482600160f81b6108dd565b15611cd85787358801602081019035611c9e8360006108dd565b15611cb457611cad8282613160565b9750611cd1565b611cc283600160f81b6108dd565b156119a557611cad8282613238565b5050611ea0565b611ce38260006108dd565b15611e1157600080366000611cf88c8c613365565b6040805160018082528183019092529498509296509094509250816020015b6060815260200190600190039081611d175790505099506000611d3a86826108dd565b15611d6e57611d4b858585856133b6565b8b600081518110611d5e57611d5e61409e565b6020026020010181905250611e07565b611d7c86600160f81b6108dd565b15611afb57611d8d858585856133ec565b8c600081518110611da057611da061409e565b6020908102919091010152905080611e07577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb760008c600081518110611de857611de861409e565b6020026020010151604051611dfe9291906140b4565b60405180910390a15b5050505050611ea0565b611e23826001600160f81b03196108dd565b15611bd2576000611e376014828a8c613c7f565b611e4091613ca9565b60601c9050366000611e558a6014818e613c7f565b9092509050611e658460006108dd565b15611e7b57611e7583838361341d565b50611e9c565b611e8984600160f81b6108dd565b15611baf57611e99838383613451565b50505b5050505b5050604051630b9dfbed60e11b81526001600160a01b0383169063173bf7da90611ece908490600401613af0565b6020604051808303816000875af1158015611eed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f11919061415f565b611f2e5760405163546b3e6360e01b815260040160405180910390fd5b505b50509392505050565b336f71727de22e5e9d8baf0edac6f37da0321480611f5657503330145b611f7357604051635629665f60e11b815260040160405180910390fd5b6000611f8b6000805160206142aa8339815191525490565b90506001600160a01b03811661212f5783600881901b611faf82600160f81b6108dd565b156120025784358501602081019035611fc98360006108dd565b15611fde57611fd88282613160565b50611ffb565b611fec83600160f81b6108dd565b156119a557611fd88282613238565b5050612128565b61200d8260006108dd565b15612099576000803660006120228989613365565b935093509350935061203885600060f81b6108dd565b1561204f57612049848484846133b6565b50612090565b61205d85600160f81b6108dd565b156120755761206e848484846133ec565b5050612090565b846040516308c3ee0360e11b81526004016102ba9190614089565b50505050612128565b6120ab826001600160f81b03196108dd565b15611bd25760006120bf6014828789613c7f565b6120c891613ca9565b60601c90503660006120dd876014818b613c7f565b90925090506120ed8460006108dd565b15612103576120fd83838361341d565b50612124565b61211184600160f81b6108dd565b15611baf57612121838383613451565b50505b5050505b505061111b565b604051631057c74d60e11b81526000906001600160a01b038316906320af8e9a90612162903390859036906004016140cd565b6000604051808303816000875af1158015612181573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121a991908101906140f2565b905084600881901b6121bf82600160f81b6108dd565b1561221257853586016020810190356121d98360006108dd565b156121ee576121e88282613160565b5061220b565b6121fc83600160f81b6108dd565b156119a5576121e88282613238565b5050612319565b61221d8260006108dd565b1561228a576000803660006122328a8a613365565b935093509350935061224885600060f81b6108dd565b1561225f57612259848484846133b6565b50612281565b61226d85600160f81b6108dd565b156120755761227e848484846133ec565b50505b50505050612319565b61229c826001600160f81b03196108dd565b15611bd25760006122b0601482888a613c7f565b6122b991613ca9565b60601c90503660006122ce886014818c613c7f565b90925090506122de8460006108dd565b156122f4576122ee83838361341d565b50612315565b61230284600160f81b6108dd565b15611baf57612312838383613451565b50505b5050505b5050604051630b9dfbed60e11b81526001600160a01b0383169063173bf7da90612347908490600401613af0565b6020604051808303816000875af1158015612366573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238a919061415f565b6123a75760405163546b3e6360e01b815260040160405180910390fd5b5050505050565b60606000806123bb610874565b600101905061130081868661274b565b604080516060808201835260008083526020830152918101919091526123ef610874565b6001600160e01b0319831660009081526002919091016020908152604091829020825160608101845281546001600160a01b0381168252600160a01b900460f81b6001600160f81b031916818401526001820180548551818602810186018752818152929593949386019383018282801561249357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612475575b5050505050815250509050919050565b6000600182036124b557506001919050565b600282036124c557506001919050565b600382036124d557506001919050565b600482036124e557506001919050565b506000919050565b919050565b600080610a618484613480565b612508816134e6565b50565b600080612516610874565b90506125228184613126565b9392505050565b600080612534610874565b60010190506125228184613126565b60008061254e610874565b6001600160e01b0319949094166000908152600290940160205250506040909120546001600160a01b0390811691161490565b6000816001600160a01b03166125a36000805160206142aa8339815191525490565b6001600160a01b03161492915050565b6001600160a01b0381166000908152600460205260408120805460ff19169055805490806125e083614181565b919050555050565b6000805b60008381526006602052604090206001015481101561265657600083815260066020526040902060010180543391908390811061262b5761262b61409e565b6000918252602090912001546001600160a01b03160361264e5750600192915050565b6001016125ec565b50600092915050565b600154600082815260066020526040812060020154909161025891612687906103e890614198565b61269191906141af565b101592915050565b6001600160a01b0381166000908152600460205260408120805460ff19166001179055805490806125e083613ec7565b60006126d3610874565b90506126e181600101613507565b61250881613507565b6001600160a01b0381166000908152600560205260408120805460ff19169055600180549161271883614181565b919050555061273f600254600090815260066020526040902054600160a01b900460ff1690565b612508576125086115f6565b606060006001600160a01b03841660011480159061276e575061276e8585613126565b1561279757604051637c84ecfb60e01b81526001600160a01b03851660048201526024016102ba565b826000036127b85760405163f725081760e01b815260040160405180910390fd5b826001600160401b038111156127d0576127d0613ee0565b6040519080825280602002602001820160405280156127f9578160200160208202803683370190505b506001600160a01b03808616600090815260208890526040812054929450911691505b6001600160a01b0382161580159061283e57506001600160a01b038216600114155b801561284957508381105b156128a357818382815181106128615761286161409e565b6001600160a01b03928316602091820292909201810191909152928116600090815292879052604090922054909116908061289b81613ec7565b91505061281c565b6001600160a01b0382166001146128db57826128c06001836141d1565b815181106128d0576128d061409e565b602002602001015191505b80835250935093915050565b60006128f1610874565b90506128fd8185613564565b6040516306d61fe760e41b81526001600160a01b03851690636d61fe709061292b90869086906004016141e4565b600060405180830381600087803b15801561294557600080fd5b505af1158015612959573d6000803e3d6000fd5b5050505050505050565b600061296d610874565b60010190506128fd8185613564565b612508816040516024016129909190613af0565b60408051601f198184030181529190526020810180516001600160e01b031663104c13eb60e21b1790526124ff565b6129fe6040518060400160405280601781526020017f5f696e7374616c6c46616c6c6261636b48616e646c657200000000000000000081525084610898565b612a3d82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061363a92505050565b600082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516060818101909252602b8082529697509195869550909350839250612aa291906142f4602083013961297c565b60208701873594508035935060208101356040519350601f19601f602083020116840160405260005b81811015612aea57602081028381016060013590860152600101612acb565b5050604081013560208183010335606081815281838501602083013780945050505050612b2e6040518060600160405280602a81526020016142ca602a913961297c565b612b378461367d565b15612b845760405162461bcd60e51b815260206004820152601e60248201527f46756e6374696f6e2073656c6563746f7220616c72656164792075736564000060448201526064016102ba565b604080516060810182526001600160a01b038a1681526001600160f81b031985166020820152908101839052612bb8610874565b6001600160e01b0319861660009081526002919091016020908152604091829020835181548584015160f81c600160a01b026001600160a81b03199091166001600160a01b0390921691909117178155918301518051612c1e926001850192019061378c565b50506040516306d61fe760e41b81526001600160a01b038a169150636d61fe7090612c4d908490600401613af0565b600060405180830381600087803b158015612c6757600080fd5b505af1158015612c7b573d6000803e3d6000fd5b505050505050505050505050565b6000612ca16000805160206142aa8339815191525490565b90506001600160a01b03811615612cd65760405163741cbe0360e01b81526001600160a01b03821660048201526024016102ba565b6128fd846000805160206142aa83398151915255565b6001600160a01b0381166000908152600560205260408120805460ff1916600190811790915580549161271883613ec7565b6000612d28610874565b9050600080612d39848601866141f8565b9092509050612d498383886136b7565b604051638a91b0e360e01b81526001600160a01b03871690638a91b0e390612d75908490600401613af0565b600060405180830381600087803b158015612d8f57600080fd5b505af1158015612da3573d6000803e3d6000fd5b50505050505050505050565b6000612db9610874565b6001019050600080612d39848601866141f8565b6000612ddc6004828486613c7f565b612de591614247565b90506000612df68360048187613c7f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929350612e39925084915061367d9050565b612e855760405162461bcd60e51b815260206004820152601a60248201527f46756e6374696f6e2073656c6563746f72206e6f74207573656400000000000060448201526064016102ba565b6000612e8f610874565b6001600160e01b0319841660009081526002919091016020908152604091829020825160608101845281546001600160a01b0381168252600160a01b900460f81b6001600160f81b0319168184015260018201805485518186028101860187528181529295939493860193830182828015612f3357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612f15575b5050505050815250509050856001600160a01b031681600001516001600160a01b031614612fb65760405162461bcd60e51b815260206004820152602a60248201527f46756e6374696f6e2073656c6563746f72206e6f74207573656420627920746860448201526934b9903430b7323632b960b11b60648201526084016102ba565b6020810151612fcd816001600160f81b03196108dd565b15612feb57604051633accf26360e11b815260040160405180910390fd5b60408051600080825260808201835260208201818152928201526060810181905290613015610874565b6001600160e01b0319871660009081526002919091016020908152604091829020835181548584015160f81c600160a01b026001600160a81b03199091166001600160a01b039092169190911717815591830151805161307b926001850192019061378c565b5050604051638a91b0e360e01b81526001600160a01b038a169150638a91b0e390612c4d908790600401613af0565b6130c160006000805160206142aa83398151915255565b604051638a91b0e360e01b81526001600160a01b03841690638a91b0e3906130ef90859085906004016141e4565b600060405180830381600087803b15801561310957600080fd5b505af115801561311d573d6000803e3d6000fd5b50505050505050565b600060016001600160a01b038316148015906125225750506001600160a01b03908116600090815260209290925260409091205416151590565b606081806001600160401b0381111561317b5761317b613ee0565b6040519080825280602002602001820160405280156131ae57816020015b60608152602001906001900390816131995790505b50915060005b8181101561323057368585838181106131cf576131cf61409e565b90506020028101906131e19190614275565b905061320a6131f36020830183613826565b60208301356132056040850185614020565b6133b6565b84838151811061321c5761321c61409e565b6020908102919091010152506001016131b4565b505092915050565b606081806001600160401b0381111561325357613253613ee0565b60405190808252806020026020018201604052801561328657816020015b60608152602001906001900390816132715790505b50915060005b8181101561323057368585838181106132a7576132a761409e565b90506020028101906132b99190614275565b905060006132e46132cd6020840184613826565b60208401356132df6040860186614020565b6133ec565b8685815181106132f6576132f661409e565b602090810291909101015290508061335b577fe723f28f104e46b47fd3531f3608374ac226bcf3ddda334a23a266453e0efdb78386858151811061333c5761333c61409e565b60200260200101516040516133529291906140b4565b60405180910390a15b505060010161328c565b60008036816133776014828789613c7f565b61338091613ca9565b60601c9350613393603460148789613c7f565b61339c9161428b565b92506133ab8560348189613c7f565b949793965094505050565b60405181838237600038838387895af16133d3573d6000823e3d81fd5b3d8152602081013d6000823e3d01604052949350505050565b604051600090828482376000388483888a5af191503d8152602081013d6000823e3d81016040525094509492505050565b604051818382376000388383875af4613439573d6000823e3d81fd5b3d8152602081013d6000823e3d016040529392505050565b604051600090828482376000388483885af491503d8152602081013d6000823e3d810160405250935093915050565b81516000908190815b818110156134d857846001600160a01b03168682815181106134ad576134ad61409e565b60200260200101516001600160a01b0316036134d0579250600191506113069050565b600101613489565b506000958695509350505050565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b60016000908152602082905260409020546001600160a01b03161561353f576040516329e42f3360e11b815260040160405180910390fd5b60016000818152602092909252604090912080546001600160a01b0319169091179055565b6001600160a01b038116158061358357506001600160a01b0381166001145b156135ac57604051637c84ecfb60e01b81526001600160a01b03821660048201526024016102ba565b6001600160a01b0381811660009081526020849052604090205416156135f057604051631034f46960e21b81526001600160a01b03821660048201526024016102ba565b60016000818152602093909352604080842080546001600160a01b039485168087529286208054959091166001600160a01b03199586161790559190935280549091169091179055565b6125088160405160240161364e9190613af0565b60408051601f198184030181529190526020810180516001600160e01b03166305f3bfab60e11b1790526124ff565b600080613688610874565b6001600160e01b03199093166000908152600293909301602052505060409020546001600160a01b0316151590565b6001600160a01b03811615806136d657506001600160a01b0381166001145b156136ff57604051637c84ecfb60e01b81526001600160a01b03831660048201526024016102ba565b6001600160a01b0382811660009081526020859052604090205481169082161461374757604051637c84ecfb60e01b81526001600160a01b03821660048201526024016102ba565b6001600160a01b0390811660008181526020949094526040808520805494841686529085208054949093166001600160a01b0319948516179092559092528154169055565b8280548282559060005260206000209081019282156137e1579160200282015b828111156137e157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906137ac565b506137ed9291506137f1565b5090565b5b808211156137ed57600081556001016137f2565b6001600160a01b038116811461250857600080fd5b80356124ed81613806565b60006020828403121561383857600080fd5b813561252281613806565b60008083601f84011261385557600080fd5b5081356001600160401b0381111561386c57600080fd5b60208301915083602082850101111561130657600080fd5b6000806000806060858703121561389a57600080fd5b8435935060208501356138ac81613806565b925060408501356001600160401b038111156138c757600080fd5b6138d387828801613843565b95989497509550505050565b6000806000604084860312156138f457600080fd5b8335925060208401356001600160401b0381111561391157600080fd5b61391d86828701613843565b9497909650939450505050565b6000610120828403121561393d57600080fd5b50919050565b60008060006060848603121561395857600080fd5b83356001600160401b0381111561396e57600080fd5b61397a8682870161392a565b9660208601359650604090950135949350505050565b600080602083850312156139a357600080fd5b82356001600160401b038111156139b957600080fd5b6139c585828601613843565b90969095509350505050565b6000602082840312156139e357600080fd5b81356001600160401b038111156139f957600080fd5b61098c8482850161392a565b60008060408385031215613a1857600080fd5b8235613a2381613806565b946020939093013593505050565b60008151808452602080850194506020840160005b83811015613a6b5781516001600160a01b031687529582019590820190600101613a46565b509495945050505050565b604081526000613a896040830185613a31565b905060018060a01b03831660208301529392505050565b60005b83811015613abb578181015183820152602001613aa3565b50506000910152565b60008151808452613adc816020860160208601613aa0565b601f01601f19169290920160200192915050565b6020815260006125226020830184613ac4565b600060208284031215613b1557600080fd5b5035919050565b60018060a01b038616815284602082015260a060408201526000613b4360a0830186613a31565b931515606083015250608001529392505050565b600060208083016020845280855180835260408601915060408160051b87010192506020870160005b82811015613bae57603f19888603018452613b9c858351613ac4565b94509285019290850190600101613b80565b5092979650505050505050565b6001600160e01b03198116811461250857600080fd5b600060208284031215613be357600080fd5b813561252281613bbb565b602080825282516001600160a01b0390811683830152838201516001600160f81b031916604080850191909152840151606080850152805160808501819052600093929183019190849060a08701905b80831015613c6057845184168252938501936001929092019190850190613c3e565b50979650505050505050565b604081526000613a896040830185613ac4565b60008085851115613c8f57600080fd5b83861115613c9c57600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff1981358181169160148510156132305760149490940360031b84901b1690921692915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b0385168152836020820152606060408201526000613d2d606083018486613cdc565b9695505050505050565b600060208284031215613d4957600080fd5b815161252281613bbb565b6000808335601e19843603018112613d6b57600080fd5b83016020810192503590506001600160401b03811115613d8a57600080fd5b80360382131561130657600080fd5b60408152613dba60408201613dad8561381b565b6001600160a01b03169052565b602083013560608201526000613dd36040850185613d54565b610120806080860152613deb61016086018385613cdc565b9250613dfa6060880188613d54565b9250603f19808786030160a0880152613e14858584613cdc565b9450608089013560c088015260a089013560e0880152610100935060c089013584880152613e4560e08a018a613d54565b9250818887030184890152613e5b868483613cdc565b955050613e6a848a018a613d54565b9450925080878603016101408801525050613e86838383613cdc565b93505050508260208301529392505050565b600060208284031215613eaa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600060018201613ed957613ed9613eb1565b5060010190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613f1e57613f1e613ee0565b604052919050565b60006001600160401b03821115613f3f57613f3f613ee0565b50601f01601f191660200190565b600082601f830112613f5e57600080fd5b8135613f71613f6c82613f26565b613ef6565b818152846020838601011115613f8657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600060608486031215613fb857600080fd5b8335613fc381613806565b92506020840135613fd381613806565b915060408401356001600160401b03811115613fee57600080fd5b613ffa86828701613f4d565b9150509250925092565b60008251614016818460208701613aa0565b9190910192915050565b6000808335601e1984360301811261403757600080fd5b8301803591506001600160401b0382111561405157600080fd5b60200191503681900382131561130657600080fd5b8183823760009101908152919050565b808201808211156108ee576108ee613eb1565b6001600160f81b031991909116815260200190565b634e487b7160e01b600052603260045260246000fd5b82815260406020820152600061098c6040830184613ac4565b6001600160a01b0384168152604060208201819052600090610a619083018486613cdc565b60006020828403121561410457600080fd5b81516001600160401b0381111561411a57600080fd5b8201601f8101841361412b57600080fd5b8051614139613f6c82613f26565b81815285602083850101111561414e57600080fd5b610a61826020830160208601613aa0565b60006020828403121561417157600080fd5b8151801515811461252257600080fd5b60008161419057614190613eb1565b506000190190565b80820281158282048414176108ee576108ee613eb1565b6000826141cc57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156108ee576108ee613eb1565b60208152600061098c602083018486613cdc565b6000806040838503121561420b57600080fd5b823561421681613806565b915060208301356001600160401b0381111561423157600080fd5b61423d85828601613f4d565b9150509250929050565b6001600160e01b031981358181169160048510156132305760049490940360031b84901b1690921692915050565b60008235605e1983360301811261401657600080fd5b803560208310156108ee57600019602084900360031b1b169291505056fe36e05829dd1b9a4411d96a3549582172d7f071c1c0db5c573fcf94eb284316085f696e7374616c6c46616c6c6261636b48616e646c6572203d3e2061667465722061737320626c6f636b5f696e7374616c6c46616c6c6261636b48616e646c6572203d3e206265666f72652061737320626c6f636ba2646970667358221220bf02496db3249e2d1367792c0e795e1aecc9a6894a5dd038f18fc440d85e8c7464736f6c63430008170033"; type EtherspotWallet7579ConstructorParams = | [signer?: Signer] @@ -1255,16 +1263,16 @@ export class EtherspotWallet7579__factory extends ContractFactory { override deploy( overrides?: Overrides & { from?: PromiseOrValue } - ): Promise { - return super.deploy(overrides || {}) as Promise; + ): Promise { + return super.deploy(overrides || {}) as Promise; } override getDeployTransaction( overrides?: Overrides & { from?: PromiseOrValue } ): TransactionRequest { return super.getDeployTransaction(overrides || {}); } - override attach(address: string): EtherspotWallet7579 { - return super.attach(address) as EtherspotWallet7579; + override attach(address: string): ModularEtherspotWallet { + return super.attach(address) as ModularEtherspotWallet; } override connect(signer: Signer): EtherspotWallet7579__factory { return super.connect(signer) as EtherspotWallet7579__factory; @@ -1272,13 +1280,13 @@ export class EtherspotWallet7579__factory extends ContractFactory { static readonly bytecode = _bytecode; static readonly abi = _abi; - static createInterface(): EtherspotWallet7579Interface { - return new utils.Interface(_abi) as EtherspotWallet7579Interface; + static createInterface(): ModularEtherspotWalletInterface { + return new utils.Interface(_abi) as ModularEtherspotWalletInterface; } static connect( address: string, signerOrProvider: Signer | Provider - ): EtherspotWallet7579 { - return new Contract(address, _abi, signerOrProvider) as EtherspotWallet7579; + ): ModularEtherspotWallet { + return new Contract(address, _abi, signerOrProvider) as ModularEtherspotWallet; } } diff --git a/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts index cb51b42..309c53f 100644 --- a/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts +++ b/src/sdk/contracts/src/ERC7579/wallet/EtherspotWallet7579.ts @@ -28,153 +28,129 @@ import type { PromiseOrValue, } from "../../../common"; -export declare namespace IExecution { - export type ExecutionStruct = { - target: PromiseOrValue; - value: PromiseOrValue; - callData: PromiseOrValue; - }; - - export type ExecutionStructOutput = [string, BigNumber, string] & { - target: string; - value: BigNumber; - callData: string; - }; -} - -export declare namespace IERC4337 { - export type UserOperationStruct = { - sender: PromiseOrValue; - nonce: PromiseOrValue; - initCode: PromiseOrValue; - callData: PromiseOrValue; - callGasLimit: PromiseOrValue; - verificationGasLimit: PromiseOrValue; - preVerificationGas: PromiseOrValue; - maxFeePerGas: PromiseOrValue; - maxPriorityFeePerGas: PromiseOrValue; - paymasterAndData: PromiseOrValue; - signature: PromiseOrValue; +export type PackedUserOperationStruct = { + sender: PromiseOrValue; + nonce: PromiseOrValue; + initCode: PromiseOrValue; + callData: PromiseOrValue; + accountGasLimits: PromiseOrValue; + preVerificationGas: PromiseOrValue; + gasFees: PromiseOrValue; + paymasterAndData: PromiseOrValue; + signature: PromiseOrValue; +}; + +export type PackedUserOperationStructOutput = [ + string, + BigNumber, + string, + string, + string, + BigNumber, + string, + string, + string +] & { + sender: string; + nonce: BigNumber; + initCode: string; + callData: string; + accountGasLimits: string; + preVerificationGas: BigNumber; + gasFees: string; + paymasterAndData: string; + signature: string; +}; + +export declare namespace ModuleManager { + export type FallbackHandlerStruct = { + handler: PromiseOrValue; + calltype: PromiseOrValue; + allowedCallers: PromiseOrValue[]; }; - export type UserOperationStructOutput = [ - string, - BigNumber, - string, - string, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - BigNumber, - string, - string - ] & { - sender: string; - nonce: BigNumber; - initCode: string; - callData: string; - callGasLimit: BigNumber; - verificationGasLimit: BigNumber; - preVerificationGas: BigNumber; - maxFeePerGas: BigNumber; - maxPriorityFeePerGas: BigNumber; - paymasterAndData: string; - signature: string; + export type FallbackHandlerStructOutput = [string, string, string[]] & { + handler: string; + calltype: string; + allowedCallers: string[]; }; } -export interface EtherspotWallet7579Interface extends utils.Interface { +export interface ModularEtherspotWalletInterface extends utils.Interface { functions: { - "AUTHOR()": FunctionFragment; - "NAME()": FunctionFragment; - "VERSION()": FunctionFragment; + "accountId()": FunctionFragment; "addGuardian(address)": FunctionFragment; "addOwner(address)": FunctionFragment; "changeProposalTimelock(uint256)": FunctionFragment; "discardCurrentProposal()": FunctionFragment; "entryPoint()": FunctionFragment; - "execute(address,uint256,bytes)": FunctionFragment; - "executeBatch((address,uint256,bytes)[])": FunctionFragment; - "executeBatchFromExecutor((address,uint256,bytes)[])": FunctionFragment; - "executeDelegateCall(address,bytes)": FunctionFragment; - "executeDelegateCallFromExecutor(address,bytes)": FunctionFragment; - "executeFromExecutor(address,uint256,bytes)": FunctionFragment; + "execute(bytes32,bytes)": FunctionFragment; + "executeFromExecutor(bytes32,bytes)": FunctionFragment; + "executeUserOp((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes))": FunctionFragment; + "getActiveFallbackHandler(bytes4)": FunctionFragment; + "getActiveHook()": FunctionFragment; "getExecutorsPaginated(address,uint256)": FunctionFragment; "getProposal(uint256)": FunctionFragment; "getValidatorPaginated(address,uint256)": FunctionFragment; "guardianCosign()": FunctionFragment; "guardianCount()": FunctionFragment; "guardianPropose(address)": FunctionFragment; + "implementation()": FunctionFragment; "initializeAccount(bytes)": FunctionFragment; - "installExecutor(address,bytes)": FunctionFragment; - "installFallback(address,bytes)": FunctionFragment; - "installValidator(address,bytes)": FunctionFragment; - "isExecutorInstalled(address)": FunctionFragment; - "isFallbackInstalled(address)": FunctionFragment; + "installModule(uint256,address,bytes)": FunctionFragment; "isGuardian(address)": FunctionFragment; + "isModuleInstalled(uint256,address,bytes)": FunctionFragment; "isOwner(address)": FunctionFragment; "isValidSignature(bytes32,bytes)": FunctionFragment; - "isValidatorInstalled(address)": FunctionFragment; "ownerCount()": FunctionFragment; "proposalId()": FunctionFragment; "proposalTimelock()": FunctionFragment; "removeGuardian(address)": FunctionFragment; "removeOwner(address)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "uninstallExecutor(address,bytes)": FunctionFragment; - "uninstallFallback(address,bytes)": FunctionFragment; - "uninstallValidator(address,bytes)": FunctionFragment; - "validateUserOp((address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes),bytes32,uint256)": FunctionFragment; + "supportsExecutionMode(bytes32)": FunctionFragment; + "supportsModule(uint256)": FunctionFragment; + "uninstallModule(uint256,address,bytes)": FunctionFragment; + "validateUserOp((address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes),bytes32,uint256)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | "AUTHOR" - | "NAME" - | "VERSION" + | "accountId" | "addGuardian" | "addOwner" | "changeProposalTimelock" | "discardCurrentProposal" | "entryPoint" | "execute" - | "executeBatch" - | "executeBatchFromExecutor" - | "executeDelegateCall" - | "executeDelegateCallFromExecutor" | "executeFromExecutor" + | "executeUserOp" + | "getActiveFallbackHandler" + | "getActiveHook" | "getExecutorsPaginated" | "getProposal" | "getValidatorPaginated" | "guardianCosign" | "guardianCount" | "guardianPropose" + | "implementation" | "initializeAccount" - | "installExecutor" - | "installFallback" - | "installValidator" - | "isExecutorInstalled" - | "isFallbackInstalled" + | "installModule" | "isGuardian" + | "isModuleInstalled" | "isOwner" | "isValidSignature" - | "isValidatorInstalled" | "ownerCount" | "proposalId" | "proposalTimelock" | "removeGuardian" | "removeOwner" - | "supportsInterface" - | "uninstallExecutor" - | "uninstallFallback" - | "uninstallValidator" + | "supportsExecutionMode" + | "supportsModule" + | "uninstallModule" | "validateUserOp" ): FunctionFragment; - encodeFunctionData(functionFragment: "AUTHOR", values?: undefined): string; - encodeFunctionData(functionFragment: "NAME", values?: undefined): string; - encodeFunctionData(functionFragment: "VERSION", values?: undefined): string; + encodeFunctionData(functionFragment: "accountId", values?: undefined): string; encodeFunctionData( functionFragment: "addGuardian", values: [PromiseOrValue] @@ -197,35 +173,23 @@ export interface EtherspotWallet7579Interface extends utils.Interface { ): string; encodeFunctionData( functionFragment: "execute", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "executeBatch", - values: [IExecution.ExecutionStruct[]] + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "executeBatchFromExecutor", - values: [IExecution.ExecutionStruct[]] + functionFragment: "executeFromExecutor", + values: [PromiseOrValue, PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "executeDelegateCall", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "executeUserOp", + values: [PackedUserOperationStruct] ): string; encodeFunctionData( - functionFragment: "executeDelegateCallFromExecutor", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "getActiveFallbackHandler", + values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "executeFromExecutor", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] + functionFragment: "getActiveHook", + values?: undefined ): string; encodeFunctionData( functionFragment: "getExecutorsPaginated", @@ -252,32 +216,32 @@ export interface EtherspotWallet7579Interface extends utils.Interface { values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "initializeAccount", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "installExecutor", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "installFallback", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "implementation", + values?: undefined ): string; encodeFunctionData( - functionFragment: "installValidator", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "initializeAccount", + values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "isExecutorInstalled", - values: [PromiseOrValue] + functionFragment: "installModule", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] ): string; encodeFunctionData( - functionFragment: "isFallbackInstalled", + functionFragment: "isGuardian", values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "isGuardian", - values: [PromiseOrValue] + functionFragment: "isModuleInstalled", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] ): string; encodeFunctionData( functionFragment: "isOwner", @@ -287,10 +251,6 @@ export interface EtherspotWallet7579Interface extends utils.Interface { functionFragment: "isValidSignature", values: [PromiseOrValue, PromiseOrValue] ): string; - encodeFunctionData( - functionFragment: "isValidatorInstalled", - values: [PromiseOrValue] - ): string; encodeFunctionData( functionFragment: "ownerCount", values?: undefined @@ -312,33 +272,31 @@ export interface EtherspotWallet7579Interface extends utils.Interface { values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "supportsInterface", + functionFragment: "supportsExecutionMode", values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "uninstallExecutor", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "uninstallFallback", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "supportsModule", + values: [PromiseOrValue] ): string; encodeFunctionData( - functionFragment: "uninstallValidator", - values: [PromiseOrValue, PromiseOrValue] + functionFragment: "uninstallModule", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] ): string; encodeFunctionData( functionFragment: "validateUserOp", values: [ - IERC4337.UserOperationStruct, + PackedUserOperationStruct, PromiseOrValue, PromiseOrValue ] ): string; - decodeFunctionResult(functionFragment: "AUTHOR", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "VERSION", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accountId", data: BytesLike): Result; decodeFunctionResult( functionFragment: "addGuardian", data: BytesLike @@ -355,23 +313,19 @@ export interface EtherspotWallet7579Interface extends utils.Interface { decodeFunctionResult(functionFragment: "entryPoint", data: BytesLike): Result; decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "executeBatch", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "executeBatchFromExecutor", + functionFragment: "executeFromExecutor", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "executeDelegateCall", + functionFragment: "executeUserOp", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "executeDelegateCallFromExecutor", + functionFragment: "getActiveFallbackHandler", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "executeFromExecutor", + functionFragment: "getActiveHook", data: BytesLike ): Result; decodeFunctionResult( @@ -399,39 +353,27 @@ export interface EtherspotWallet7579Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "initializeAccount", + functionFragment: "implementation", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "installExecutor", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "installFallback", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "installValidator", + functionFragment: "initializeAccount", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "isExecutorInstalled", + functionFragment: "installModule", data: BytesLike ): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "isFallbackInstalled", + functionFragment: "isModuleInstalled", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; decodeFunctionResult( functionFragment: "isValidSignature", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "isValidatorInstalled", - data: BytesLike - ): Result; decodeFunctionResult(functionFragment: "ownerCount", data: BytesLike): Result; decodeFunctionResult(functionFragment: "proposalId", data: BytesLike): Result; decodeFunctionResult( @@ -447,19 +389,15 @@ export interface EtherspotWallet7579Interface extends utils.Interface { data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "uninstallExecutor", + functionFragment: "supportsExecutionMode", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "uninstallFallback", + functionFragment: "supportsModule", data: BytesLike ): Result; decodeFunctionResult( - functionFragment: "uninstallValidator", + functionFragment: "uninstallModule", data: BytesLike ): Result; decodeFunctionResult( @@ -468,88 +406,30 @@ export interface EtherspotWallet7579Interface extends utils.Interface { ): Result; events: { - "DisableExecutor(address)": EventFragment; - "DisableValidator(address)": EventFragment; - "EnableExecutor(address)": EventFragment; - "EnableValidator(address)": EventFragment; - "FallbackHandlerChanged(address)": EventFragment; "GuardianAdded(address,address)": EventFragment; "GuardianRemoved(address,address)": EventFragment; + "ModuleInstalled(uint256,address)": EventFragment; + "ModuleUninstalled(uint256,address)": EventFragment; "OwnerAdded(address,address)": EventFragment; "OwnerRemoved(address,address)": EventFragment; "ProposalDiscarded(address,uint256,address)": EventFragment; "ProposalSubmitted(address,uint256,address,address)": EventFragment; - "ProposalTimelockChanged(address,uint256)": EventFragment; "QuorumNotReached(address,uint256,address,uint256)": EventFragment; + "TryExecuteUnsuccessful(uint256,bytes)": EventFragment; }; - getEvent(nameOrSignatureOrTopic: "DisableExecutor"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DisableValidator"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EnableExecutor"): EventFragment; - getEvent(nameOrSignatureOrTopic: "EnableValidator"): EventFragment; - getEvent(nameOrSignatureOrTopic: "FallbackHandlerChanged"): EventFragment; getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleInstalled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ModuleUninstalled"): EventFragment; getEvent(nameOrSignatureOrTopic: "OwnerAdded"): EventFragment; getEvent(nameOrSignatureOrTopic: "OwnerRemoved"): EventFragment; getEvent(nameOrSignatureOrTopic: "ProposalDiscarded"): EventFragment; getEvent(nameOrSignatureOrTopic: "ProposalSubmitted"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ProposalTimelockChanged"): EventFragment; getEvent(nameOrSignatureOrTopic: "QuorumNotReached"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TryExecuteUnsuccessful"): EventFragment; } -export interface DisableExecutorEventObject { - module: string; -} -export type DisableExecutorEvent = TypedEvent< - [string], - DisableExecutorEventObject ->; - -export type DisableExecutorEventFilter = TypedEventFilter; - -export interface DisableValidatorEventObject { - module: string; -} -export type DisableValidatorEvent = TypedEvent< - [string], - DisableValidatorEventObject ->; - -export type DisableValidatorEventFilter = - TypedEventFilter; - -export interface EnableExecutorEventObject { - module: string; -} -export type EnableExecutorEvent = TypedEvent< - [string], - EnableExecutorEventObject ->; - -export type EnableExecutorEventFilter = TypedEventFilter; - -export interface EnableValidatorEventObject { - module: string; -} -export type EnableValidatorEvent = TypedEvent< - [string], - EnableValidatorEventObject ->; - -export type EnableValidatorEventFilter = TypedEventFilter; - -export interface FallbackHandlerChangedEventObject { - handler: string; -} -export type FallbackHandlerChangedEvent = TypedEvent< - [string], - FallbackHandlerChangedEventObject ->; - -export type FallbackHandlerChangedEventFilter = - TypedEventFilter; - export interface GuardianAddedEventObject { account: string; newGuardian: string; @@ -572,6 +452,29 @@ export type GuardianRemovedEvent = TypedEvent< export type GuardianRemovedEventFilter = TypedEventFilter; +export interface ModuleInstalledEventObject { + moduleTypeId: BigNumber; + module: string; +} +export type ModuleInstalledEvent = TypedEvent< + [BigNumber, string], + ModuleInstalledEventObject +>; + +export type ModuleInstalledEventFilter = TypedEventFilter; + +export interface ModuleUninstalledEventObject { + moduleTypeId: BigNumber; + module: string; +} +export type ModuleUninstalledEvent = TypedEvent< + [BigNumber, string], + ModuleUninstalledEventObject +>; + +export type ModuleUninstalledEventFilter = + TypedEventFilter; + export interface OwnerAddedEventObject { account: string; newOwner: string; @@ -621,18 +524,6 @@ export type ProposalSubmittedEvent = TypedEvent< export type ProposalSubmittedEventFilter = TypedEventFilter; -export interface ProposalTimelockChangedEventObject { - account: string; - newTimelock: BigNumber; -} -export type ProposalTimelockChangedEvent = TypedEvent< - [string, BigNumber], - ProposalTimelockChangedEventObject ->; - -export type ProposalTimelockChangedEventFilter = - TypedEventFilter; - export interface QuorumNotReachedEventObject { account: string; proposalId: BigNumber; @@ -647,12 +538,24 @@ export type QuorumNotReachedEvent = TypedEvent< export type QuorumNotReachedEventFilter = TypedEventFilter; -export interface EtherspotWallet7579 extends BaseContract { +export interface TryExecuteUnsuccessfulEventObject { + batchExecutionindex: BigNumber; + result: string; +} +export type TryExecuteUnsuccessfulEvent = TypedEvent< + [BigNumber, string], + TryExecuteUnsuccessfulEventObject +>; + +export type TryExecuteUnsuccessfulEventFilter = + TypedEventFilter; + +export interface ModularEtherspotWallet extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: EtherspotWallet7579Interface; + interface: ModularEtherspotWalletInterface; queryFilter( event: TypedEventFilter, @@ -674,11 +577,7 @@ export interface EtherspotWallet7579 extends BaseContract { removeListener: OnEvent; functions: { - AUTHOR(overrides?: CallOverrides): Promise<[string]>; - - NAME(overrides?: CallOverrides): Promise<[string]>; - - VERSION(overrides?: CallOverrides): Promise<[string]>; + accountId(overrides?: CallOverrides): Promise<[string]>; addGuardian( _newGuardian: PromiseOrValue, @@ -702,40 +601,30 @@ export interface EtherspotWallet7579 extends BaseContract { entryPoint(overrides?: CallOverrides): Promise<[string]>; execute( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeBatch( - executions: IExecution.ExecutionStruct[], - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - executeBatchFromExecutor( - executions: IExecution.ExecutionStruct[], + executeFromExecutor( + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCall( - target: PromiseOrValue, - callData: PromiseOrValue, + executeUserOp( + userOp: PackedUserOperationStruct, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCallFromExecutor( - target: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveFallbackHandler( + functionSig: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[ModuleManager.FallbackHandlerStructOutput]>; - executeFromExecutor( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveHook( + overrides?: CallOverrides + ): Promise<[string] & { hook: string }>; getExecutorsPaginated( cursor: PromiseOrValue, @@ -773,41 +662,29 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - initializeAccount( - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + implementation(overrides?: CallOverrides): Promise<[string]>; - installFallback( - fallbackHandler: PromiseOrValue, + initializeAccount( data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - installValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + installModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + initData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isExecutorInstalled( - executor: PromiseOrValue, + isGuardian( + _address: PromiseOrValue, overrides?: CallOverrides ): Promise<[boolean]>; - isFallbackInstalled( - fallbackHandler: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean] & { enabled: boolean }>; - - isGuardian( - _address: PromiseOrValue, + isModuleInstalled( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + additionalContext: PromiseOrValue, overrides?: CallOverrides ): Promise<[boolean]>; @@ -822,11 +699,6 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise<[string]>; - isValidatorInstalled( - validator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - ownerCount(overrides?: CallOverrides): Promise<[BigNumber]>; proposalId(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -843,42 +715,32 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - supportsInterface( - interfaceID: PromiseOrValue, + supportsExecutionMode( + mode: PromiseOrValue, overrides?: CallOverrides - ): Promise<[boolean]>; + ): Promise<[boolean] & { isSupported: boolean }>; - uninstallExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uninstallFallback( - arg0: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + supportsModule( + modulTypeId: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; - uninstallValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + uninstallModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + deInitData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; validateUserOp( - userOp: IERC4337.UserOperationStruct, + userOp: PackedUserOperationStruct, userOpHash: PromiseOrValue, missingAccountFunds: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; }; - AUTHOR(overrides?: CallOverrides): Promise; - - NAME(overrides?: CallOverrides): Promise; - - VERSION(overrides?: CallOverrides): Promise; + accountId(overrides?: CallOverrides): Promise; addGuardian( _newGuardian: PromiseOrValue, @@ -902,40 +764,28 @@ export interface EtherspotWallet7579 extends BaseContract { entryPoint(overrides?: CallOverrides): Promise; execute( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeBatch( - executions: IExecution.ExecutionStruct[], + executeFromExecutor( + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeBatchFromExecutor( - executions: IExecution.ExecutionStruct[], + executeUserOp( + userOp: PackedUserOperationStruct, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCall( - target: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveFallbackHandler( + functionSig: PromiseOrValue, + overrides?: CallOverrides + ): Promise; - executeDelegateCallFromExecutor( - target: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - executeFromExecutor( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveHook(overrides?: CallOverrides): Promise; getExecutorsPaginated( cursor: PromiseOrValue, @@ -973,41 +823,29 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - initializeAccount( - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + implementation(overrides?: CallOverrides): Promise; - installFallback( - fallbackHandler: PromiseOrValue, + initializeAccount( data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - installValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + installModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + initData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isExecutorInstalled( - executor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isFallbackInstalled( - fallbackHandler: PromiseOrValue, + isGuardian( + _address: PromiseOrValue, overrides?: CallOverrides ): Promise; - isGuardian( - _address: PromiseOrValue, + isModuleInstalled( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + additionalContext: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1022,11 +860,6 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - isValidatorInstalled( - validator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - ownerCount(overrides?: CallOverrides): Promise; proposalId(overrides?: CallOverrides): Promise; @@ -1043,42 +876,32 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - supportsInterface( - interfaceID: PromiseOrValue, + supportsExecutionMode( + mode: PromiseOrValue, overrides?: CallOverrides ): Promise; - uninstallExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uninstallFallback( - arg0: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + supportsModule( + modulTypeId: PromiseOrValue, + overrides?: CallOverrides + ): Promise; - uninstallValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + uninstallModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + deInitData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; validateUserOp( - userOp: IERC4337.UserOperationStruct, + userOp: PackedUserOperationStruct, userOpHash: PromiseOrValue, missingAccountFunds: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; callStatic: { - AUTHOR(overrides?: CallOverrides): Promise; - - NAME(overrides?: CallOverrides): Promise; - - VERSION(overrides?: CallOverrides): Promise; + accountId(overrides?: CallOverrides): Promise; addGuardian( _newGuardian: PromiseOrValue, @@ -1100,40 +923,28 @@ export interface EtherspotWallet7579 extends BaseContract { entryPoint(overrides?: CallOverrides): Promise; execute( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: CallOverrides - ): Promise; - - executeBatch( - executions: IExecution.ExecutionStruct[], - overrides?: CallOverrides - ): Promise; + ): Promise; - executeBatchFromExecutor( - executions: IExecution.ExecutionStruct[], + executeFromExecutor( + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: CallOverrides ): Promise; - executeDelegateCall( - target: PromiseOrValue, - callData: PromiseOrValue, + executeUserOp( + userOp: PackedUserOperationStruct, overrides?: CallOverrides - ): Promise; + ): Promise; - executeDelegateCallFromExecutor( - target: PromiseOrValue, - callData: PromiseOrValue, + getActiveFallbackHandler( + functionSig: PromiseOrValue, overrides?: CallOverrides - ): Promise; + ): Promise; - executeFromExecutor( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + getActiveHook(overrides?: CallOverrides): Promise; getExecutorsPaginated( cursor: PromiseOrValue, @@ -1169,41 +980,29 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - initializeAccount( - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + implementation(overrides?: CallOverrides): Promise; - installExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - installFallback( - fallbackHandler: PromiseOrValue, + initializeAccount( data: PromiseOrValue, overrides?: CallOverrides ): Promise; - installValidator( - validator: PromiseOrValue, - data: PromiseOrValue, + installModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + initData: PromiseOrValue, overrides?: CallOverrides ): Promise; - isExecutorInstalled( - executor: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isFallbackInstalled( - fallbackHandler: PromiseOrValue, + isGuardian( + _address: PromiseOrValue, overrides?: CallOverrides ): Promise; - isGuardian( - _address: PromiseOrValue, + isModuleInstalled( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + additionalContext: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1218,11 +1017,6 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - isValidatorInstalled( - validator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - ownerCount(overrides?: CallOverrides): Promise; proposalId(overrides?: CallOverrides): Promise; @@ -1239,31 +1033,25 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - supportsInterface( - interfaceID: PromiseOrValue, + supportsExecutionMode( + mode: PromiseOrValue, overrides?: CallOverrides ): Promise; - uninstallExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, + supportsModule( + modulTypeId: PromiseOrValue, overrides?: CallOverrides - ): Promise; - - uninstallFallback( - arg0: PromiseOrValue, - data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; + ): Promise; - uninstallValidator( - validator: PromiseOrValue, - data: PromiseOrValue, + uninstallModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + deInitData: PromiseOrValue, overrides?: CallOverrides ): Promise; validateUserOp( - userOp: IERC4337.UserOperationStruct, + userOp: PackedUserOperationStruct, userOpHash: PromiseOrValue, missingAccountFunds: PromiseOrValue, overrides?: CallOverrides @@ -1271,23 +1059,6 @@ export interface EtherspotWallet7579 extends BaseContract { }; filters: { - "DisableExecutor(address)"(module?: null): DisableExecutorEventFilter; - DisableExecutor(module?: null): DisableExecutorEventFilter; - - "DisableValidator(address)"(module?: null): DisableValidatorEventFilter; - DisableValidator(module?: null): DisableValidatorEventFilter; - - "EnableExecutor(address)"(module?: null): EnableExecutorEventFilter; - EnableExecutor(module?: null): EnableExecutorEventFilter; - - "EnableValidator(address)"(module?: null): EnableValidatorEventFilter; - EnableValidator(module?: null): EnableValidatorEventFilter; - - "FallbackHandlerChanged(address)"( - handler?: null - ): FallbackHandlerChangedEventFilter; - FallbackHandlerChanged(handler?: null): FallbackHandlerChangedEventFilter; - "GuardianAdded(address,address)"( account?: null, newGuardian?: null @@ -1303,6 +1074,24 @@ export interface EtherspotWallet7579 extends BaseContract { removedGuardian?: null ): GuardianRemovedEventFilter; + "ModuleInstalled(uint256,address)"( + moduleTypeId?: null, + module?: null + ): ModuleInstalledEventFilter; + ModuleInstalled( + moduleTypeId?: null, + module?: null + ): ModuleInstalledEventFilter; + + "ModuleUninstalled(uint256,address)"( + moduleTypeId?: null, + module?: null + ): ModuleUninstalledEventFilter; + ModuleUninstalled( + moduleTypeId?: null, + module?: null + ): ModuleUninstalledEventFilter; + "OwnerAdded(address,address)"( account?: null, newOwner?: null @@ -1339,15 +1128,6 @@ export interface EtherspotWallet7579 extends BaseContract { proposer?: null ): ProposalSubmittedEventFilter; - "ProposalTimelockChanged(address,uint256)"( - account?: null, - newTimelock?: null - ): ProposalTimelockChangedEventFilter; - ProposalTimelockChanged( - account?: null, - newTimelock?: null - ): ProposalTimelockChangedEventFilter; - "QuorumNotReached(address,uint256,address,uint256)"( account?: null, proposalId?: null, @@ -1360,14 +1140,19 @@ export interface EtherspotWallet7579 extends BaseContract { newOwnerProposed?: null, approvalCount?: null ): QuorumNotReachedEventFilter; + + "TryExecuteUnsuccessful(uint256,bytes)"( + batchExecutionindex?: null, + result?: null + ): TryExecuteUnsuccessfulEventFilter; + TryExecuteUnsuccessful( + batchExecutionindex?: null, + result?: null + ): TryExecuteUnsuccessfulEventFilter; }; estimateGas: { - AUTHOR(overrides?: CallOverrides): Promise; - - NAME(overrides?: CallOverrides): Promise; - - VERSION(overrides?: CallOverrides): Promise; + accountId(overrides?: CallOverrides): Promise; addGuardian( _newGuardian: PromiseOrValue, @@ -1391,40 +1176,28 @@ export interface EtherspotWallet7579 extends BaseContract { entryPoint(overrides?: CallOverrides): Promise; execute( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - executeBatch( - executions: IExecution.ExecutionStruct[], + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeBatchFromExecutor( - executions: IExecution.ExecutionStruct[], + executeFromExecutor( + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCall( - target: PromiseOrValue, - callData: PromiseOrValue, + executeUserOp( + userOp: PackedUserOperationStruct, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCallFromExecutor( - target: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } + getActiveFallbackHandler( + functionSig: PromiseOrValue, + overrides?: CallOverrides ): Promise; - executeFromExecutor( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveHook(overrides?: CallOverrides): Promise; getExecutorsPaginated( cursor: PromiseOrValue, @@ -1454,41 +1227,29 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - initializeAccount( - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + implementation(overrides?: CallOverrides): Promise; - installFallback( - fallbackHandler: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installValidator( - validator: PromiseOrValue, + initializeAccount( data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isExecutorInstalled( - executor: PromiseOrValue, - overrides?: CallOverrides + installModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + initData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isFallbackInstalled( - fallbackHandler: PromiseOrValue, + isGuardian( + _address: PromiseOrValue, overrides?: CallOverrides ): Promise; - isGuardian( - _address: PromiseOrValue, + isModuleInstalled( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + additionalContext: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1503,11 +1264,6 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - isValidatorInstalled( - validator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - ownerCount(overrides?: CallOverrides): Promise; proposalId(overrides?: CallOverrides): Promise; @@ -1524,31 +1280,25 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - supportsInterface( - interfaceID: PromiseOrValue, + supportsExecutionMode( + mode: PromiseOrValue, overrides?: CallOverrides ): Promise; - uninstallExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uninstallFallback( - arg0: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + supportsModule( + modulTypeId: PromiseOrValue, + overrides?: CallOverrides ): Promise; - uninstallValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + uninstallModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + deInitData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; validateUserOp( - userOp: IERC4337.UserOperationStruct, + userOp: PackedUserOperationStruct, userOpHash: PromiseOrValue, missingAccountFunds: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } @@ -1556,11 +1306,7 @@ export interface EtherspotWallet7579 extends BaseContract { }; populateTransaction: { - AUTHOR(overrides?: CallOverrides): Promise; - - NAME(overrides?: CallOverrides): Promise; - - VERSION(overrides?: CallOverrides): Promise; + accountId(overrides?: CallOverrides): Promise; addGuardian( _newGuardian: PromiseOrValue, @@ -1584,40 +1330,28 @@ export interface EtherspotWallet7579 extends BaseContract { entryPoint(overrides?: CallOverrides): Promise; execute( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; - - executeBatch( - executions: IExecution.ExecutionStruct[], + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeBatchFromExecutor( - executions: IExecution.ExecutionStruct[], + executeFromExecutor( + mode: PromiseOrValue, + executionCalldata: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCall( - target: PromiseOrValue, - callData: PromiseOrValue, + executeUserOp( + userOp: PackedUserOperationStruct, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - executeDelegateCallFromExecutor( - target: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } + getActiveFallbackHandler( + functionSig: PromiseOrValue, + overrides?: CallOverrides ): Promise; - executeFromExecutor( - target: PromiseOrValue, - value: PromiseOrValue, - callData: PromiseOrValue, - overrides?: PayableOverrides & { from?: PromiseOrValue } - ): Promise; + getActiveHook(overrides?: CallOverrides): Promise; getExecutorsPaginated( cursor: PromiseOrValue, @@ -1647,41 +1381,29 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - initializeAccount( - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; + implementation(overrides?: CallOverrides): Promise; - installFallback( - fallbackHandler: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - installValidator( - validator: PromiseOrValue, + initializeAccount( data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isExecutorInstalled( - executor: PromiseOrValue, - overrides?: CallOverrides + installModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + initData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; - isFallbackInstalled( - fallbackHandler: PromiseOrValue, + isGuardian( + _address: PromiseOrValue, overrides?: CallOverrides ): Promise; - isGuardian( - _address: PromiseOrValue, + isModuleInstalled( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + additionalContext: PromiseOrValue, overrides?: CallOverrides ): Promise; @@ -1696,11 +1418,6 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: CallOverrides ): Promise; - isValidatorInstalled( - validator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - ownerCount(overrides?: CallOverrides): Promise; proposalId(overrides?: CallOverrides): Promise; @@ -1717,34 +1434,28 @@ export interface EtherspotWallet7579 extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue } ): Promise; - supportsInterface( - interfaceID: PromiseOrValue, + supportsExecutionMode( + mode: PromiseOrValue, overrides?: CallOverrides ): Promise; - uninstallExecutor( - executor: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - uninstallFallback( - arg0: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + supportsModule( + modulTypeId: PromiseOrValue, + overrides?: CallOverrides ): Promise; - uninstallValidator( - validator: PromiseOrValue, - data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } + uninstallModule( + moduleTypeId: PromiseOrValue, + module: PromiseOrValue, + deInitData: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; validateUserOp( - userOp: IERC4337.UserOperationStruct, + userOp: PackedUserOperationStruct, userOpHash: PromiseOrValue, missingAccountFunds: PromiseOrValue, overrides?: PayableOverrides & { from?: PromiseOrValue } ): Promise; }; -} +} \ No newline at end of file diff --git a/src/sdk/contracts/src/ERC7579/wallet/index.ts b/src/sdk/contracts/src/ERC7579/wallet/index.ts index 35b8aad..75bff88 100644 --- a/src/sdk/contracts/src/ERC7579/wallet/index.ts +++ b/src/sdk/contracts/src/ERC7579/wallet/index.ts @@ -1,6 +1,6 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export type { EtherspotWallet7579 } from "./EtherspotWallet7579"; +export type { ModularEtherspotWallet } from "./EtherspotWallet7579"; export type { EtherspotWallet7579Base } from "./EtherspotWallet7579Base"; export type { EtherspotWallet7579Factory } from "./EtherspotWallet7579Factory"; diff --git a/src/sdk/network/constants.ts b/src/sdk/network/constants.ts index e354882..f253d94 100644 --- a/src/sdk/network/constants.ts +++ b/src/sdk/network/constants.ts @@ -1,82 +1,15 @@ import { NetworkConfig } from "."; export enum NetworkNames { - Goerli = 'goerli', - Mumbai = 'mumbai', - BaseGoerli = 'baseGoerli', - BaseSepolia = 'baseSepolia', Sepolia = 'sepolia', - Optimism = 'optimism', - Polygon = 'polygon', - Arbitrum = 'arbitrum', - ArbitrumGoerli = 'arbitrumGoerli', - Chiado = 'chiado', - Fuse = 'fuse', - FuseSparknet = 'fuseSparknet', - Gnosis = 'gnosis', - KromaTestnet = 'kromaTestnet', - Mainnet = 'mainnet', - OptimismGoerli = 'optimismGoerli', - Rootstock = 'rootstock', - RootstockTestnet = 'rootstockTestnet', - VerseTestnet = 'verseTestnet', - Mantle = 'Mantle', - MantleTestnet = 'MantleTestnet', - Avalanche = 'avalanche', - Base = 'base', - Bsc = 'bsc', - BscTestnet = 'bscTestnet', - Fuji = 'fuji', - Linea = 'linea', - LineaTestnet = 'lineaTestnet', - FlareTestnet = 'flareTestnet', - Flare = 'flare', - ScrollSepolia = 'scrollSepolia', - Scroll = 'scroll', - Klaytn = 'klaytn', - KlaytnTestnet = 'klaytnTestnet', } -export const SupportedNetworks = - [1, 5, 10, 14, 30, 31, 56, 97, 100, 114, 122, 123, 137, 420, 1001, 2357, 5000, 5001, 8217, 8453, 10200, 20197, 42161, 43113, 43114, 59140, 59144, 80001, 84531, 84532, 421613, 534351, 534352, 11155111] +export const SupportedNetworks = [11155111] export const NETWORK_NAME_TO_CHAIN_ID: { [key: string]: number; } = { - [NetworkNames.Goerli]: 5, - [NetworkNames.Mumbai]: 80001, - [NetworkNames.BaseGoerli]: 84531, - [NetworkNames.BaseSepolia]: 84532, [NetworkNames.Sepolia]: 11155111, - [NetworkNames.Optimism]: 10, - [NetworkNames.Polygon]: 137, - [NetworkNames.Arbitrum]: 42161, - [NetworkNames.ArbitrumGoerli]: 421613, - [NetworkNames.Chiado]: 10200, - [NetworkNames.Fuse]: 122, - [NetworkNames.FuseSparknet]: 123, - [NetworkNames.Gnosis]: 100, - [NetworkNames.KromaTestnet]: 2357, - [NetworkNames.Mainnet]: 1, - [NetworkNames.OptimismGoerli]: 420, - [NetworkNames.Rootstock]: 30, - [NetworkNames.RootstockTestnet]: 31, - [NetworkNames.VerseTestnet]: 20197, - [NetworkNames.Mantle]: 5000, - [NetworkNames.MantleTestnet]: 5001, - [NetworkNames.Avalanche]: 43114, - [NetworkNames.Base]: 8453, - [NetworkNames.Bsc]: 56, - [NetworkNames.BscTestnet]: 97, - [NetworkNames.Fuji]: 43113, - [NetworkNames.Linea]: 59144, - [NetworkNames.LineaTestnet]: 59140, - [NetworkNames.FlareTestnet]: 114, - [NetworkNames.Flare]: 14, - [NetworkNames.ScrollSepolia]: 534351, - [NetworkNames.Scroll]: 534352, - [NetworkNames.Klaytn]: 8217, - [NetworkNames.KlaytnTestnet]: 1001, }; export const onRamperAllNetworks = ['OPTIMISM', 'POLYGON', 'ARBITRUM', 'FUSE', 'GNOSIS', 'ETHEREUM'] @@ -93,7 +26,9 @@ export const Networks: { etherspot: '0x77E4288A4b15893F520F15C262a07dF9866904e4', zeroDev: '', simpleAccount: '', - } + }, + bootstrap: '0x4f695ad7694863c8280FCEBf2Cb220E361ce4eA0', + multipleOwnerECDSAValidator: '0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124', }, } }; diff --git a/src/sdk/network/interfaces.ts b/src/sdk/network/interfaces.ts index 019b851..a184ec3 100644 --- a/src/sdk/network/interfaces.ts +++ b/src/sdk/network/interfaces.ts @@ -15,5 +15,7 @@ export interface NetworkConfig { zeroDev: string; simpleAccount: string; }; + bootstrap: string; + multipleOwnerECDSAValidator: string; }; }; diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index f7a0056..c72bdde 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -10,9 +10,8 @@ import { import { Factory, PaymasterApi, SdkOptions } from './interfaces'; import { Network } from "./network"; import { BatchUserOpsRequest, Exception, getGasFee, onRampApiKey, openUrl, UserOperation, UserOpsRequest } from "./common"; -import { BigNumber, BigNumberish, ethers, providers } from 'ethers'; +import { BigNumber, BigNumberish, Contract, ethers, providers } from 'ethers'; import { Networks, onRamperAllNetworks } from './network/constants'; -import { UserOperationStruct } from './contracts/account-abstraction/contracts/core/BaseAccount'; import { EtherspotWalletAPI, HttpRpcClient, VerifyingPaymasterAPI } from './base'; import { TransactionDetailsForUserOp, TransactionGasInfoForUserOp } from './base/TransactionDetailsForUserOp'; import { OnRamperDto, SignMessageDto, validateDto } from './dto'; @@ -20,6 +19,7 @@ import { ZeroDevWalletAPI } from './base/ZeroDevWalletAPI'; import { SimpleAccountAPI } from './base/SimpleAccountWalletAPI'; import { ErrorHandler } from './errorHandler/errorHandler.service'; import { EtherspotBundler } from './bundler'; +import { ModularEtherspotWallet } from './contracts/src/ERC7579/wallet'; /** * Prime-Sdk @@ -160,7 +160,7 @@ export class PrimeSdk { paymasterDetails?: PaymasterApi, gasDetails?: TransactionGasInfoForUserOp, callGasLimit?: BigNumberish, - key?: number + key?: BigNumber } = {}) { const { paymasterDetails, gasDetails, callGasLimit, key } = params; let dummySignature = "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"; @@ -200,7 +200,10 @@ export class PrimeSdk { if (callGasLimit) { partialtx.callGasLimit = BigNumber.from(callGasLimit).toHexString(); } - partialtx.factory = this.etherspotWallet.factoryAddress; + + if (await this.etherspotWallet.checkAccountPhantom()) { + partialtx.factory = this.etherspotWallet.factoryAddress; + } const bundlerGasEstimate = await this.bundler.getVerificationGasInfo(partialtx); @@ -278,7 +281,7 @@ export class PrimeSdk { this.userOpsBatch.value = []; } - async getAccountContract() { + async getAccountContract(): Promise { return this.etherspotWallet._getAccountContract(); } From 86b89403d7937c7e377db44ff939013bf6630fe9 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Mon, 20 May 2024 11:21:04 +0530 Subject: [PATCH 03/10] Add install and uninstall module functions --- examples/26-install-module.ts | 60 ++++++++++++++++++++++++++ examples/27-uninstall-module.ts | 60 ++++++++++++++++++++++++++ package.json | 1 + src/sdk/base/BaseAccountAPI.ts | 4 ++ src/sdk/base/EtherspotWalletAPI.ts | 20 +++++++-- src/sdk/base/SimpleAccountWalletAPI.ts | 8 ++++ src/sdk/base/ZeroDevWalletAPI.ts | 8 ++++ src/sdk/common/constants.ts | 7 +++ src/sdk/sdk.ts | 8 ++++ 9 files changed, 173 insertions(+), 3 deletions(-) create mode 100644 examples/26-install-module.ts create mode 100644 examples/27-uninstall-module.ts diff --git a/examples/26-install-module.ts b/examples/26-install-module.ts new file mode 100644 index 0000000..99c51df --- /dev/null +++ b/examples/26-install-module.ts @@ -0,0 +1,60 @@ +import { BigNumber, ethers } from 'ethers'; +import { EtherspotBundler, PrimeSdk } from '../src'; +import { printOp } from '../src/sdk/common/OperationUtils'; +import * as dotenv from 'dotenv'; +import { sleep } from '../src/sdk/common'; + +dotenv.config(); + +async function main() { + const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9'; + + // initializating sdk... + const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) }) + + console.log('address: ', primeSdk.state.EOAAddress); + + // get address of EtherspotWallet + const address: string = await primeSdk.getCounterFactualAddress(); + + console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet address: ${address}`); + + const initData = ethers.utils.defaultAbiCoder.encode( + ["address", "bytes"], + ['0x0000000000000000000000000000000000000001', '0x00'] + ); + + const installData = await primeSdk.installModule('1', '0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124', initData); + console.log('\x1b[33m%s\x1b[0m', `installData: ${installData}`); + + // clear the transaction batch + await primeSdk.clearUserOpsFromBatch(); + + // add transactions to the batch + const userOpsBatch = await primeSdk.addUserOpsToBatch({ to: address, data: installData }); + console.log('transactions: ', userOpsBatch); + + // sign transactions added to the batch + const op = await primeSdk.estimate({ + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + }); + console.log(`Estimated UserOp: ${await printOp(op)}`); + + // sign the userOps and sending to the bundler... + const uoHash = await primeSdk.send(op); + console.log(`UserOpHash: ${uoHash}`); + + // get transaction hash... + console.log('Waiting for transaction...'); + let userOpsReceipt = null; + const timeout = Date.now() + 60000; // 1 minute timeout + while (userOpsReceipt == null && Date.now() < timeout) { + await sleep(2); + userOpsReceipt = await primeSdk.getUserOpReceipt(uoHash); + } + console.log('\x1b[33m%s\x1b[0m', `Transaction Receipt: `, userOpsReceipt); +} + +main() + .catch(console.error) + .finally(() => process.exit()); diff --git a/examples/27-uninstall-module.ts b/examples/27-uninstall-module.ts new file mode 100644 index 0000000..a0a5f40 --- /dev/null +++ b/examples/27-uninstall-module.ts @@ -0,0 +1,60 @@ +import { BigNumber, ethers } from 'ethers'; +import { EtherspotBundler, PrimeSdk } from '../src'; +import { printOp } from '../src/sdk/common/OperationUtils'; +import * as dotenv from 'dotenv'; +import { sleep } from '../src/sdk/common'; + +dotenv.config(); + +async function main() { + const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9'; + + // initializating sdk... + const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) }) + + console.log('address: ', primeSdk.state.EOAAddress); + + // get address of EtherspotWallet + const address: string = await primeSdk.getCounterFactualAddress(); + + console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet address: ${address}`); + + const deInitData = ethers.utils.defaultAbiCoder.encode( + ["address", "bytes"], + ['0x0000000000000000000000000000000000000001', '0x00'] + ); + + const uninstallData = await primeSdk.uninstallModule('1', '0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124', deInitData); + console.log('\x1b[33m%s\x1b[0m', `installData: ${uninstallData}`); + + // clear the transaction batch + await primeSdk.clearUserOpsFromBatch(); + + // add transactions to the batch + const userOpsBatch = await primeSdk.addUserOpsToBatch({ to: address, data: uninstallData }); + console.log('transactions: ', userOpsBatch); + + // sign transactions added to the batch + const op = await primeSdk.estimate({ + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + }); + console.log(`Estimated UserOp: ${await printOp(op)}`); + + // sign the userOps and sending to the bundler... + const uoHash = await primeSdk.send(op); + console.log(`UserOpHash: ${uoHash}`); + + // get transaction hash... + console.log('Waiting for transaction...'); + let userOpsReceipt = null; + const timeout = Date.now() + 60000; // 1 minute timeout + while (userOpsReceipt == null && Date.now() < timeout) { + await sleep(2); + userOpsReceipt = await primeSdk.getUserOpReceipt(uoHash); + } + console.log('\x1b[33m%s\x1b[0m', `Transaction Receipt: `, userOpsReceipt); +} + +main() + .catch(console.error) + .finally(() => process.exit()); diff --git a/package.json b/package.json index 2ce8886..7945ed1 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "21-get-multiple-accounts": "./node_modules/.bin/ts-node ./examples/21-get-multiple-accounts", "22-concurrent-userops": "./node_modules/.bin/ts-node ./examples/22-concurrent-userops", "25-get-quotes": "./node_modules/.bin/ts-node ./examples/25-get-quotes", + "26-install-module": "./node_modules/.bin/ts-node ./examples/26-install-module", "format": "prettier --write \"{src,test,examples}/**/*.ts\"", "lint": "eslint \"{src,test,examples}/**/*.ts\"", "lint-fix": "npm run lint -- --fix", diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index 6856302..1027cb9 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -275,6 +275,10 @@ export abstract class BaseAccountAPI { return this.isPhantom; } + public abstract installModule(moduleTypeId: string, module: string, initData: string): Promise; + + public abstract uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise; + /** * calculate the account address even before it is deployed */ diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index 1cbd8e7..6dff629 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -51,6 +51,20 @@ export class EtherspotWalletAPI extends BaseAccountAPI { this.multipleOwnerECDSAValidatorAddress = Networks[params.optionsLike.chainId].contracts.multipleOwnerECDSAValidator; } + async installModule(moduleTypeId: string, module: string, initData: string): Promise { + const installModuleInterface = new ethers.utils.Interface(['function installModule(uint256 moduleTypeId,address module,bytes initData)']); + const installModuleData = installModuleInterface.encodeFunctionData('installModule', [moduleTypeId, module, initData]); + + return installModuleData; + } + + async uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + const uninstallModuleInterface = new ethers.utils.Interface(['function uninstallModule(uint256 moduleTypeId,address module,bytes deInitData)']); + const uninstallModuleData = uninstallModuleInterface.encodeFunctionData('uninstallModule', [moduleTypeId, module, deinitData]); + + return uninstallModuleData; + } + async checkAccountAddress(address: string): Promise { const accountContract = EtherspotWallet7579__factory.connect(address, this.provider); if (!(await accountContract.isOwner(this.services.walletService.EOAAddress))) { @@ -68,7 +82,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { return this.accountContract; } - async getInitCode(): Promise { + async getInitCodeData(): Promise { const iface = new ethers.utils.Interface(BOOTSTRAP_ABI); const validators: BootstrapConfig[] = makeBootstrapConfig(this.multipleOwnerECDSAValidatorAddress, '0x'); const executors: BootstrapConfig[] = makeBootstrapConfig(constants.AddressZero, '0x'); @@ -99,7 +113,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { throw new Error('no factory to get initCode'); } - const initCode = await this.getInitCode(); + const initCode = await this.getInitCodeData(); const salt = ethers.utils.hexZeroPad(ethers.utils.hexValue(this.index), 32); return hexConcat([ @@ -117,7 +131,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } const salt = ethers.utils.hexZeroPad(ethers.utils.hexValue(this.index), 32); - const initCode = await this.getInitCode(); + const initCode = await this.getInitCodeData(); if (!this.accountAddress) { this.factory = EtherspotWallet7579Factory__factory.connect(this.factoryAddress, this.provider); diff --git a/src/sdk/base/SimpleAccountWalletAPI.ts b/src/sdk/base/SimpleAccountWalletAPI.ts index 91687c8..18b1f78 100644 --- a/src/sdk/base/SimpleAccountWalletAPI.ts +++ b/src/sdk/base/SimpleAccountWalletAPI.ts @@ -115,4 +115,12 @@ export class SimpleAccountAPI extends BaseAccountAPI { const accountContract = await this._getAccountContract(); return accountContract.interface.encodeFunctionData('executeBatch', [targets, datas]); } + + public installModule(moduleTypeId: string, module: string, initData: string): Promise { + throw new Error('Method not implemented.'); + } + + public uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + throw new Error('Method not implemented.'); + } } diff --git a/src/sdk/base/ZeroDevWalletAPI.ts b/src/sdk/base/ZeroDevWalletAPI.ts index fb210cf..c9ebd13 100644 --- a/src/sdk/base/ZeroDevWalletAPI.ts +++ b/src/sdk/base/ZeroDevWalletAPI.ts @@ -171,4 +171,12 @@ export class ZeroDevWalletAPI extends BaseAccountAPI { Operation.DelegateCall, ]) } + + public installModule(moduleTypeId: string, module: string, initData: string): Promise { + throw new Error('Method not implemented.'); + } + + public uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + throw new Error('Method not implemented.'); + } } diff --git a/src/sdk/common/constants.ts b/src/sdk/common/constants.ts index 75985e8..ccadffa 100644 --- a/src/sdk/common/constants.ts +++ b/src/sdk/common/constants.ts @@ -32,3 +32,10 @@ export enum VALIDATOR_MODE { DEFAULT = "0x00", ENABLE = "0x01" } + +export const MODULE_TYPE = { + VALIDATOR: '0x01', + EXECUTOR: '0x02', + FALLBACK: '0x03', + HOOK: '0x04', +} \ No newline at end of file diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index c72bdde..c09dbd6 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -285,6 +285,14 @@ export class PrimeSdk { return this.etherspotWallet._getAccountContract(); } + async installModule(moduleTypeId: string, module: string, initData: string): Promise { + return this.etherspotWallet.installModule(moduleTypeId, module, initData); + } + + async uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + return this.etherspotWallet.uninstallModule(moduleTypeId, module, deinitData); + } + async totalGasEstimated(userOp: UserOperation): Promise { const callGasLimit = BigNumber.from(await userOp.callGasLimit); const verificationGasLimit = BigNumber.from(await userOp.verificationGasLimit); From 1f2c59fe9d6d2b71793ac09bbfff40d6a5c15eb2 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Wed, 22 May 2024 10:33:08 +0530 Subject: [PATCH 04/10] Update install and uninstall module functions --- examples/26-install-module.ts | 6 +++--- examples/27-uninstall-module.ts | 6 +++--- package.json | 1 + src/sdk/base/BaseAccountAPI.ts | 4 ---- src/sdk/base/EtherspotWalletAPI.ts | 21 +++++++++++++++++---- src/sdk/base/SimpleAccountWalletAPI.ts | 4 ++-- src/sdk/base/ZeroDevWalletAPI.ts | 4 ++-- src/sdk/common/constants.ts | 10 +++++----- src/sdk/sdk.ts | 6 +++--- 9 files changed, 36 insertions(+), 26 deletions(-) diff --git a/examples/26-install-module.ts b/examples/26-install-module.ts index 99c51df..663bc17 100644 --- a/examples/26-install-module.ts +++ b/examples/26-install-module.ts @@ -2,7 +2,7 @@ import { BigNumber, ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; -import { sleep } from '../src/sdk/common'; +import { MODULE_TYPE, sleep } from '../src/sdk/common'; dotenv.config(); @@ -24,8 +24,8 @@ async function main() { ['0x0000000000000000000000000000000000000001', '0x00'] ); - const installData = await primeSdk.installModule('1', '0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124', initData); - console.log('\x1b[33m%s\x1b[0m', `installData: ${installData}`); + // get installData of module + const installData = await primeSdk.installModule(MODULE_TYPE.VALIDATOR, '0x6a00da4DEEf677Ad854B7c14F17Ed9312c2B5fDf', initData); // clear the transaction batch await primeSdk.clearUserOpsFromBatch(); diff --git a/examples/27-uninstall-module.ts b/examples/27-uninstall-module.ts index a0a5f40..3dc45ff 100644 --- a/examples/27-uninstall-module.ts +++ b/examples/27-uninstall-module.ts @@ -2,7 +2,7 @@ import { BigNumber, ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; -import { sleep } from '../src/sdk/common'; +import { MODULE_TYPE, sleep } from '../src/sdk/common'; dotenv.config(); @@ -24,8 +24,8 @@ async function main() { ['0x0000000000000000000000000000000000000001', '0x00'] ); - const uninstallData = await primeSdk.uninstallModule('1', '0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124', deInitData); - console.log('\x1b[33m%s\x1b[0m', `installData: ${uninstallData}`); + // get uninstallData of module + const uninstallData = await primeSdk.uninstallModule(MODULE_TYPE.VALIDATOR, '0x6a00da4DEEf677Ad854B7c14F17Ed9312c2B5fDf', deInitData); // clear the transaction batch await primeSdk.clearUserOpsFromBatch(); diff --git a/package.json b/package.json index 7945ed1..ae72d30 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "22-concurrent-userops": "./node_modules/.bin/ts-node ./examples/22-concurrent-userops", "25-get-quotes": "./node_modules/.bin/ts-node ./examples/25-get-quotes", "26-install-module": "./node_modules/.bin/ts-node ./examples/26-install-module", + "27-uninstall-module": "./node_modules/.bin/ts-node ./examples/27-uninstall-module", "format": "prettier --write \"{src,test,examples}/**/*.ts\"", "lint": "eslint \"{src,test,examples}/**/*.ts\"", "lint-fix": "npm run lint -- --fix", diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index 1027cb9..6856302 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -275,10 +275,6 @@ export abstract class BaseAccountAPI { return this.isPhantom; } - public abstract installModule(moduleTypeId: string, module: string, initData: string): Promise; - - public abstract uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise; - /** * calculate the account address even before it is deployed */ diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index 6dff629..8f9d0de 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -5,7 +5,7 @@ import { EtherspotWallet7579Factory__factory, EtherspotWallet7579__factory } fro import { ModularEtherspotWallet, EtherspotWallet7579Factory } from '../contracts/src/ERC7579/wallet'; import { BOOTSTRAP_ABI, BootstrapConfig, _makeBootstrapConfig, makeBootstrapConfig } from './Bootstrap'; import { Networks } from '../network/constants'; -import { CALL_TYPE, EXEC_TYPE, getExecuteMode } from '../common'; +import { CALL_TYPE, EXEC_TYPE, MODULE_TYPE, getExecuteMode } from '../common'; /** * constructor params, added no top of base params: @@ -51,14 +51,24 @@ export class EtherspotWalletAPI extends BaseAccountAPI { this.multipleOwnerECDSAValidatorAddress = Networks[params.optionsLike.chainId].contracts.multipleOwnerECDSAValidator; } - async installModule(moduleTypeId: string, module: string, initData: string): Promise { + async installModule(moduleTypeId: MODULE_TYPE, module: string, initData: string): Promise { + const accountContract = EtherspotWallet7579__factory.connect(await this.getAccountAddress(), this.provider); + if (await accountContract.isModuleInstalled(moduleTypeId, module, initData)) { + throw new Error('the module is already installed') + } + const installModuleInterface = new ethers.utils.Interface(['function installModule(uint256 moduleTypeId,address module,bytes initData)']); const installModuleData = installModuleInterface.encodeFunctionData('installModule', [moduleTypeId, module, initData]); return installModuleData; } - async uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + async uninstallModule(moduleTypeId: MODULE_TYPE, module: string, deinitData: string): Promise { + const accountContract = EtherspotWallet7579__factory.connect(await this.getAccountAddress(), this.provider); + if (!(await accountContract.isModuleInstalled(moduleTypeId, module, deinitData))) { + throw new Error('the module is not installed in the wallet') + } + const uninstallModuleInterface = new ethers.utils.Interface(['function uninstallModule(uint256 moduleTypeId,address module,bytes deInitData)']); const uninstallModuleData = uninstallModuleInterface.encodeFunctionData('uninstallModule', [moduleTypeId, module, deinitData]); @@ -144,7 +154,10 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } async getNonce(key: BigNumber = BigNumber.from(0)): Promise { - const dummyKey = ethers.utils.getAddress(key.toHexString()) + "00000000" + if (key.eq(BigNumber.from(0))) { + return await this.nonceManager.getNonce(await this.getAccountAddress(), BigInt(key.toString())); + } + const dummyKey = ethers.utils.getAddress(key.toHexString()) + "00000000"; return await this.nonceManager.getNonce(await this.getAccountAddress(), BigInt(dummyKey)); } diff --git a/src/sdk/base/SimpleAccountWalletAPI.ts b/src/sdk/base/SimpleAccountWalletAPI.ts index 18b1f78..aeed620 100644 --- a/src/sdk/base/SimpleAccountWalletAPI.ts +++ b/src/sdk/base/SimpleAccountWalletAPI.ts @@ -116,11 +116,11 @@ export class SimpleAccountAPI extends BaseAccountAPI { return accountContract.interface.encodeFunctionData('executeBatch', [targets, datas]); } - public installModule(moduleTypeId: string, module: string, initData: string): Promise { + installModule(): Promise { throw new Error('Method not implemented.'); } - public uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + uninstallModule(): Promise { throw new Error('Method not implemented.'); } } diff --git a/src/sdk/base/ZeroDevWalletAPI.ts b/src/sdk/base/ZeroDevWalletAPI.ts index c9ebd13..e7af074 100644 --- a/src/sdk/base/ZeroDevWalletAPI.ts +++ b/src/sdk/base/ZeroDevWalletAPI.ts @@ -172,11 +172,11 @@ export class ZeroDevWalletAPI extends BaseAccountAPI { ]) } - public installModule(moduleTypeId: string, module: string, initData: string): Promise { + installModule(): Promise { throw new Error('Method not implemented.'); } - public uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + uninstallModule(): Promise { throw new Error('Method not implemented.'); } } diff --git a/src/sdk/common/constants.ts b/src/sdk/common/constants.ts index ccadffa..f57dbb6 100644 --- a/src/sdk/common/constants.ts +++ b/src/sdk/common/constants.ts @@ -33,9 +33,9 @@ export enum VALIDATOR_MODE { ENABLE = "0x01" } -export const MODULE_TYPE = { - VALIDATOR: '0x01', - EXECUTOR: '0x02', - FALLBACK: '0x03', - HOOK: '0x04', +export enum MODULE_TYPE { + VALIDATOR = '0x01', + EXECUTOR = '0x02', + FALLBACK = '0x03', + HOOK = '0x04', } \ No newline at end of file diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index c09dbd6..0a101f5 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -9,7 +9,7 @@ import { } from './wallet'; import { Factory, PaymasterApi, SdkOptions } from './interfaces'; import { Network } from "./network"; -import { BatchUserOpsRequest, Exception, getGasFee, onRampApiKey, openUrl, UserOperation, UserOpsRequest } from "./common"; +import { BatchUserOpsRequest, Exception, getGasFee, MODULE_TYPE, onRampApiKey, openUrl, UserOperation, UserOpsRequest } from "./common"; import { BigNumber, BigNumberish, Contract, ethers, providers } from 'ethers'; import { Networks, onRamperAllNetworks } from './network/constants'; import { EtherspotWalletAPI, HttpRpcClient, VerifyingPaymasterAPI } from './base'; @@ -285,11 +285,11 @@ export class PrimeSdk { return this.etherspotWallet._getAccountContract(); } - async installModule(moduleTypeId: string, module: string, initData: string): Promise { + async installModule(moduleTypeId: MODULE_TYPE, module: string, initData: string): Promise { return this.etherspotWallet.installModule(moduleTypeId, module, initData); } - async uninstallModule(moduleTypeId: string, module: string, deinitData: string): Promise { + async uninstallModule(moduleTypeId: MODULE_TYPE, module: string, deinitData: string): Promise { return this.etherspotWallet.uninstallModule(moduleTypeId, module, deinitData); } From 6a233bc5e468fece8dde38f2a22faa8460862a97 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Tue, 28 May 2024 09:37:17 +0530 Subject: [PATCH 05/10] Update package name and version --- CHANGELOG.md | 6 ++++++ examples/02-transfer-funds.ts | 2 +- examples/03-transfer-erc20.ts | 2 +- examples/26-install-module.ts | 2 +- examples/27-uninstall-module.ts | 2 +- package-lock.json | 8 ++++---- package.json | 4 ++-- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d22115..19b730d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # Changelog +## [1.8.2] - 2024-05-28 +### New +- Added support for EP7.0 and Etherspot's Modular accounts +- Added `installModule` function to install module +- Added `uninstallModule` function to remove module + ## [1.8.1] - 2024-05-14 ### New - Added signTypedData method to all providers supported diff --git a/examples/02-transfer-funds.ts b/examples/02-transfer-funds.ts index 6ce743f..fad03f6 100644 --- a/examples/02-transfer-funds.ts +++ b/examples/02-transfer-funds.ts @@ -34,7 +34,7 @@ async function main() { // estimate transactions added to the batch and get the fee data for the UserOp const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address }); console.log(`Estimate UserOp: ${await printOp(op)}`); diff --git a/examples/03-transfer-erc20.ts b/examples/03-transfer-erc20.ts index dce0df1..bf0ee05 100644 --- a/examples/03-transfer-erc20.ts +++ b/examples/03-transfer-erc20.ts @@ -42,7 +42,7 @@ async function main() { // estimate transactions added to the batch and get the fee data for the UserOp const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address }); console.log(`Estimate UserOp: ${await printOp(op)}`); diff --git a/examples/26-install-module.ts b/examples/26-install-module.ts index 663bc17..e0cc14f 100644 --- a/examples/26-install-module.ts +++ b/examples/26-install-module.ts @@ -36,7 +36,7 @@ async function main() { // sign transactions added to the batch const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address }); console.log(`Estimated UserOp: ${await printOp(op)}`); diff --git a/examples/27-uninstall-module.ts b/examples/27-uninstall-module.ts index 3dc45ff..54a39a6 100644 --- a/examples/27-uninstall-module.ts +++ b/examples/27-uninstall-module.ts @@ -36,7 +36,7 @@ async function main() { // sign transactions added to the batch const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') + key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address }); console.log(`Estimated UserOp: ${await printOp(op)}`); diff --git a/package-lock.json b/package-lock.json index ad171f0..c4d97b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@etherspot/prime-sdk", - "version": "1.8.1", + "name": "@etherspot/prime-sdk-2.0", + "version": "1.8.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@etherspot/prime-sdk", - "version": "1.8.1", + "name": "@etherspot/prime-sdk-2.0", + "version": "1.8.2", "license": "MIT", "dependencies": { "@apollo/client": "3.8.7", diff --git a/package.json b/package.json index 0c9266b..07b2d6e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@etherspot/prime-sdk", - "version": "1.8.1", + "name": "@etherspot/prime-sdk-2.0", + "version": "1.8.2", "description": "Etherspot Prime (Account Abstraction) SDK", "keywords": [ "ether", From c2c1c7da5f722fa062306606d4c614f1459db9d5 Mon Sep 17 00:00:00 2001 From: Ardian <34317628+arddluma@users.noreply.github.com> Date: Tue, 28 May 2024 11:28:20 +0200 Subject: [PATCH 06/10] chore: Add npm config for new version --- .circleci/config.yml | 10 +++++----- package.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c0b42e..ba41cd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,12 +111,12 @@ jobs: name: Publish package to npm command: | cd ~/etherspot-prime-sdk - npm publish + npm publish --tag v2-modular - run: name: Announce Publish command: | chmod +x .circleci/announcePublish.sh - .circleci/announcePublish.sh "Etherspot Prime SDK" "$(node -e "console.log(require('./package.json').version)")" + .circleci/announcePublish.sh "Etherspot Prime SDK Modular" "$(node -e "console.log(require('./package.json').version)")" publish-github-release: docker: - image: ardd97/ghr @@ -127,7 +127,7 @@ jobs: command: | PACKAGE_VERSION="$(jq .version package.json -r)" echo $PACKAGE_VERSION - ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" "$PACKAGE_VERSION" + ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -n "V2 Modular" "$PACKAGE_VERSION" workflows: version: 2.1 @@ -150,7 +150,7 @@ workflows: filters: branches: only: - - master + - v2-modular - publish-github-release: context: general-vars requires: @@ -158,4 +158,4 @@ workflows: filters: branches: only: - - master + - v2-modular diff --git a/package.json b/package.json index 07b2d6e..0ef95ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@etherspot/prime-sdk-2.0", - "version": "1.8.2", + "name": "@etherspot/prime-sdk", + "version": "2.0.0", "description": "Etherspot Prime (Account Abstraction) SDK", "keywords": [ "ether", From 8ed060aafb99a7b708188920341bdfd3189bc149 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Tue, 28 May 2024 17:56:20 +0530 Subject: [PATCH 07/10] changes as per the comments --- package-lock.json | 8 ++++---- src/sdk/base/BaseAccountAPI.ts | 2 +- src/sdk/base/ERC4337EthersProvider.ts | 2 +- src/sdk/base/EtherspotWalletAPI.ts | 10 ++-------- src/sdk/base/HttpRpcClient.ts | 2 +- src/sdk/base/VerifyingPaymasterAPI.ts | 3 +++ src/sdk/common/ERC4337Utils.ts | 1 + 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index c4d97b5..219d186 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@etherspot/prime-sdk-2.0", - "version": "1.8.2", + "name": "@etherspot/prime-sdk", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@etherspot/prime-sdk-2.0", - "version": "1.8.2", + "name": "@etherspot/prime-sdk", + "version": "2.0.0", "license": "MIT", "dependencies": { "@apollo/client": "3.8.7", diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index 7d0ba73..3044cfe 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -466,7 +466,7 @@ export abstract class BaseAccountAPI { * Sign the filled userOp. * @param userOp the UserOperation to sign (with signature field ignored) */ - async signUserOp(userOp: any): Promise { + async signUserOp(userOp: UserOperation): Promise { if (this.paymasterAPI != null) { const paymasterAndData = await this.paymasterAPI.getPaymasterAndData(userOp); userOp.paymasterAndData = paymasterAndData.result.paymasterAndData; diff --git a/src/sdk/base/ERC4337EthersProvider.ts b/src/sdk/base/ERC4337EthersProvider.ts index cf2f8eb..3385063 100644 --- a/src/sdk/base/ERC4337EthersProvider.ts +++ b/src/sdk/base/ERC4337EthersProvider.ts @@ -113,7 +113,7 @@ export class ERC4337EthersProvider extends BaseProvider { // eslint-disable-next-line @typescript-eslint/no-unused-vars wait: async (confirmations?: number): Promise => { const transactionReceipt = await waitPromise; - if (userOp.factory != null) { + if (userOp.factory != null && userOp.factory.length > 0) { // checking if the wallet has been deployed by the transaction; it must be if we are here await this.smartAccountAPI.checkAccountPhantom(); } diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index 8f9d0de..2936bd3 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -57,10 +57,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { throw new Error('the module is already installed') } - const installModuleInterface = new ethers.utils.Interface(['function installModule(uint256 moduleTypeId,address module,bytes initData)']); - const installModuleData = installModuleInterface.encodeFunctionData('installModule', [moduleTypeId, module, initData]); - - return installModuleData; + return accountContract.interface.encodeFunctionData('installModule', [moduleTypeId, module, initData]); } async uninstallModule(moduleTypeId: MODULE_TYPE, module: string, deinitData: string): Promise { @@ -69,10 +66,7 @@ export class EtherspotWalletAPI extends BaseAccountAPI { throw new Error('the module is not installed in the wallet') } - const uninstallModuleInterface = new ethers.utils.Interface(['function uninstallModule(uint256 moduleTypeId,address module,bytes deInitData)']); - const uninstallModuleData = uninstallModuleInterface.encodeFunctionData('uninstallModule', [moduleTypeId, module, deinitData]); - - return uninstallModuleData; + return accountContract.interface.encodeFunctionData('uninstallModule', [moduleTypeId, module, deinitData]); } async checkAccountAddress(address: string): Promise { diff --git a/src/sdk/base/HttpRpcClient.ts b/src/sdk/base/HttpRpcClient.ts index da187e9..3a6b9d0 100644 --- a/src/sdk/base/HttpRpcClient.ts +++ b/src/sdk/base/HttpRpcClient.ts @@ -51,7 +51,7 @@ export class HttpRpcClient { } } - async getVerificationGasInfo(tx: any): Promise { + async getVerificationGasInfo(tx: UserOperationStruct): Promise { const hexifiedUserOp = deepHexlify(await resolveProperties(tx)); try { const response = await this.userOpJsonRpcProvider.send('eth_estimateUserOperationGas', [hexifiedUserOp, this.entryPointAddress]); diff --git a/src/sdk/base/VerifyingPaymasterAPI.ts b/src/sdk/base/VerifyingPaymasterAPI.ts index b7eaa46..821a547 100644 --- a/src/sdk/base/VerifyingPaymasterAPI.ts +++ b/src/sdk/base/VerifyingPaymasterAPI.ts @@ -47,6 +47,9 @@ export class VerifyingPaymasterAPI extends PaymasterAPI { // A dummy value here is required in order to calculate a correct preVerificationGas value. paymasterData: DUMMY_PAYMASTER_AND_DATA, signature: userOp.signature ?? '0x', + paymaster: userOp?.paymaster, + paymasterVerificationGasLimit: userOp?.paymasterVerificationGasLimit, + paymasterPostOpGasLimit: userOp?.paymasterPostOpGasLimit, }; const op = await ethers.utils.resolveProperties(pmOp); op.preVerificationGas = calcPreVerificationGas(op); diff --git a/src/sdk/common/ERC4337Utils.ts b/src/sdk/common/ERC4337Utils.ts index 2e4dbb6..92c12a8 100644 --- a/src/sdk/common/ERC4337Utils.ts +++ b/src/sdk/common/ERC4337Utils.ts @@ -18,6 +18,7 @@ export interface UserOperation { paymasterVerificationGasLimit?: BigNumberish paymasterPostOpGasLimit?: BigNumberish paymasterData?: BytesLike + paymasterAndData?: BytesLike signature: BytesLike } From 258c22b979f51f4c354622b8a279fc06151ff03d Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Tue, 28 May 2024 18:28:34 +0530 Subject: [PATCH 08/10] changes as per the comments --- src/sdk/base/BaseAccountAPI.ts | 1 - src/sdk/common/ERC4337Utils.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/sdk/base/BaseAccountAPI.ts b/src/sdk/base/BaseAccountAPI.ts index 3044cfe..ebb3021 100644 --- a/src/sdk/base/BaseAccountAPI.ts +++ b/src/sdk/base/BaseAccountAPI.ts @@ -469,7 +469,6 @@ export abstract class BaseAccountAPI { async signUserOp(userOp: UserOperation): Promise { if (this.paymasterAPI != null) { const paymasterAndData = await this.paymasterAPI.getPaymasterAndData(userOp); - userOp.paymasterAndData = paymasterAndData.result.paymasterAndData; userOp.verificationGasLimit = paymasterAndData.result.verificationGasLimit; userOp.preVerificationGas = paymasterAndData.result.preVerificationGas; userOp.callGasLimit = paymasterAndData.result.callGasLimit; diff --git a/src/sdk/common/ERC4337Utils.ts b/src/sdk/common/ERC4337Utils.ts index 92c12a8..2e4dbb6 100644 --- a/src/sdk/common/ERC4337Utils.ts +++ b/src/sdk/common/ERC4337Utils.ts @@ -18,7 +18,6 @@ export interface UserOperation { paymasterVerificationGasLimit?: BigNumberish paymasterPostOpGasLimit?: BigNumberish paymasterData?: BytesLike - paymasterAndData?: BytesLike signature: BytesLike } From be59c029b1fb60095e10212e2f8187dcf39331a2 Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Wed, 29 May 2024 15:49:13 +0530 Subject: [PATCH 09/10] changes as per the comments, removed apollo client and ApiService --- package-lock.json | 194 ----------------------- package.json | 1 - src/sdk/api/api.service.ts | 176 -------------------- src/sdk/api/exceptions/constants.ts | 9 -- src/sdk/api/exceptions/http.exception.ts | 9 -- src/sdk/api/exceptions/index.ts | 3 - src/sdk/api/index.ts | 2 - src/sdk/api/interfaces.ts | 6 - src/sdk/api/utils/build-api-uri.ts | 11 -- src/sdk/api/utils/catch-api-error.ts | 42 ----- src/sdk/api/utils/index.ts | 3 - src/sdk/api/utils/map-api-result.ts | 28 ---- src/sdk/base/VerifyingPaymasterAPI.ts | 6 +- src/sdk/common/constants.ts | 12 +- 14 files changed, 4 insertions(+), 498 deletions(-) delete mode 100644 src/sdk/api/api.service.ts delete mode 100644 src/sdk/api/exceptions/constants.ts delete mode 100644 src/sdk/api/exceptions/http.exception.ts delete mode 100644 src/sdk/api/exceptions/index.ts delete mode 100644 src/sdk/api/utils/build-api-uri.ts delete mode 100644 src/sdk/api/utils/catch-api-error.ts delete mode 100644 src/sdk/api/utils/index.ts delete mode 100644 src/sdk/api/utils/map-api-result.ts diff --git a/package-lock.json b/package-lock.json index 219d186..f0690d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "2.0.0", "license": "MIT", "dependencies": { - "@apollo/client": "3.8.7", "@lifi/sdk": "2.5.0", "@thehubbleproject/bls": "0.5.1", "@walletconnect/universal-provider": "2.10.0", @@ -51,47 +50,6 @@ "node": ">=0.10.0" } }, - "node_modules/@apollo/client": { - "version": "3.8.7", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.8.7.tgz", - "integrity": "sha512-DnQtFkQrCyxHTSa9gR84YRLmU/al6HeXcLZazVe+VxKBmx/Hj4rV8xWtzfWYX5ijartsqDR7SJgV037MATEecA==", - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "@wry/context": "^0.7.3", - "@wry/equality": "^0.5.6", - "@wry/trie": "^0.4.3", - "graphql-tag": "^2.12.6", - "hoist-non-react-statics": "^3.3.2", - "optimism": "^0.17.5", - "prop-types": "^15.7.2", - "response-iterator": "^0.2.6", - "symbol-observable": "^4.0.0", - "ts-invariant": "^0.10.3", - "tslib": "^2.3.0", - "zen-observable-ts": "^1.2.5" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-ws": "^5.5.5", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", - "subscriptions-transport-ws": "^0.9.0 || ^0.11.0" - }, - "peerDependenciesMeta": { - "graphql-ws": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "subscriptions-transport-ws": { - "optional": true - } - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -818,14 +776,6 @@ "@ethersproject/strings": "^5.7.0" } }, - "node_modules/@graphql-typed-document-node/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", - "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1956,39 +1906,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@wry/context": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", - "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/equality": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", - "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/trie": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.4.3.tgz", - "integrity": "sha512-I6bHwH0fSf6RqQcnnXLJKhkSXG45MFral3GxPaY4uAl0LYDZM+YDVDAiU9bYwjTuysy1S0IeecWtmq1SZA3M1w==", - "dependencies": { - "tslib": "^2.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", @@ -3346,20 +3263,6 @@ "node": ">= 10.x" } }, - "node_modules/graphql-tag": { - "version": "2.12.6", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", - "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, "node_modules/graphql-ws": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.14.2.tgz", @@ -3490,14 +3393,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, "node_modules/http-shutdown": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/http-shutdown/-/http-shutdown-1.2.2.tgz", @@ -3791,11 +3686,6 @@ "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3943,17 +3833,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -7171,14 +7050,6 @@ "inBundle": true, "license": "ISC" }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -7229,16 +7100,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optimism": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.17.5.tgz", - "integrity": "sha512-TEcp8ZwK1RczmvMnvktxHSF2tKgMWjJ71xEFGX5ApLh67VsMSTy1ZUlipJw8W+KaqgOmQ+4pqwkeivY89j+4Vw==", - "dependencies": { - "@wry/context": "^0.7.0", - "@wry/trie": "^0.4.3", - "tslib": "^2.3.0" - } - }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -7449,16 +7310,6 @@ "node": ">=0.4.0" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -7529,11 +7380,6 @@ "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.0.tgz", "integrity": "sha512-pNsHDxbGORSvuSScqNJ+3Km6QAVqk8CfsCBIEoDgpqLrkD2f3QM4I7d1ozJJ172OmIcoUcerZaNWqtLkRXTV3A==" }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -7640,14 +7486,6 @@ "node": ">=4" } }, - "node_modules/response-iterator": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/response-iterator/-/response-iterator-0.2.6.tgz", - "integrity": "sha512-pVzEEzrsg23Sh053rmDUvLSkGXluZio0qu8VT6ukrYuvtjVfCbDZH9d6PGXb8HZfzdNZt8feXv/jvUzlhRgLnw==", - "engines": { - "node": ">=0.8" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -7997,14 +7835,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-observable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", - "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", - "engines": { - "node": ">=0.10" - } - }, "node_modules/system-architecture": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", @@ -8046,17 +7876,6 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "node_modules/ts-invariant": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", - "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", - "dependencies": { - "tslib": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -8100,11 +7919,6 @@ } } }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -8473,14 +8287,6 @@ "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" - }, - "node_modules/zen-observable-ts": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", - "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", - "dependencies": { - "zen-observable": "0.8.15" - } } } } diff --git a/package.json b/package.json index 0ef95ab..331fa5d 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "url": "https://github.com/etherspot/etherspot-prime-sdk/issues" }, "dependencies": { - "@apollo/client": "3.8.7", "@lifi/sdk": "2.5.0", "@thehubbleproject/bls": "0.5.1", "@walletconnect/universal-provider": "2.10.0", diff --git a/src/sdk/api/api.service.ts b/src/sdk/api/api.service.ts deleted file mode 100644 index c230244..0000000 --- a/src/sdk/api/api.service.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { ApolloClient, DocumentNode, InMemoryCache, HttpLink, NormalizedCacheObject, Observable, split } from '@apollo/client/core'; -import { setContext } from '@apollo/client/link/context'; -import { WebSocketLink } from '@apollo/client/link/ws'; -import { getMainDefinition } from '@apollo/client/utilities'; -import fetch from 'cross-fetch'; -import { BigNumber } from 'ethers'; -import { isBigNumber } from '../common'; -import { ApiOptions, ApiRequestOptions, ApiRequestQueryOptions } from './interfaces'; -import { buildApiUri, catchApiError, mapApiResult } from './utils'; - -export class ApiService { - private readonly options: ApiOptions; - - private apolloClient: ApolloClient; - - constructor(options: ApiOptions) { - - this.options = { - port: null, - useSsl: false, - ...options, - }; - - this.onInit(); - } - - async query(query: DocumentNode, options?: ApiRequestQueryOptions): Promise { - options = { - variables: {}, - fetchPolicy: 'no-cache', - ...options, - }; - - const { - variables, - fetchPolicy, - models, - } = options; - - return this.wrapCall( - () => - this.apolloClient.query({ - query, - fetchPolicy, - variables: this.prepareApiVariables(variables), - }), - models, - ); - } - - async mutate(mutation: DocumentNode, options?: ApiRequestOptions): Promise { - options = { - variables: {}, - ...options, - }; - - const { - variables, - models, - } = options; - - return this.wrapCall( - () => - this.apolloClient.mutate({ - mutation, - variables: this.prepareApiVariables(variables), - }), - models, - ); - } - - subscribe(query: DocumentNode, options?: ApiRequestOptions): Observable { - const { - variables, - models, - } = options; - - return this.apolloClient - .subscribe({ - query, - variables: this.prepareApiVariables(variables), - }) - - .map(({ data }) => mapApiResult(data, models)); - } - - protected onInit(): void { - const httpLink = new HttpLink({ - fetch, - uri: buildApiUri(this.options, 'http'), - }); - - const wsLink = new WebSocketLink({ - webSocketImpl: WebSocket, - uri: buildApiUri(this.options, 'ws', 'graphql'), - options: { - reconnect: true, - lazy: true, - }, - }); - - const authLink = setContext(async () => { - - return { - headers: {}, - }; - }); - - const link = split( - // split based on operation type - ({ query }) => { - const definition = getMainDefinition(query); - return definition.kind === 'OperationDefinition' && definition.operation === 'subscription'; - }, - wsLink, - authLink.concat(httpLink), - ); - - this.apolloClient = new ApolloClient({ - link, - cache: new InMemoryCache(), - }); - } - - private async wrapCall( - call: () => Promise<{ data?: T }>, - models?: { - [key in K]: { new (...args: any): T[K] }; - }, - ): Promise { - const wrapped = async () => { - let result: T; - - try { - const { data } = await call(); - result = mapApiResult(data, models); - } catch (err) { - catchApiError(err); - } - - return result; - }; - - let result: T; - - try { - result = await wrapped(); - } catch (err) { - throw err; - } - - return result; - } - - private prepareApiVariables( - variables: { [keys: string]: any }, - ): { [key: string]: any } { - const result: { [key: string]: any } = {}; - - const keys = Object.keys(variables || {}); - - for (const key of keys) { - let value: any; - if (isBigNumber(variables[key])) { - value = BigNumber.from(variables[key]).toHexString(); - } else if (variables[key] instanceof Date) { - value = variables[key].getTime(); - } else { - value = variables[key]; - } - result[key] = value; - } - - return result; - } -} diff --git a/src/sdk/api/exceptions/constants.ts b/src/sdk/api/exceptions/constants.ts deleted file mode 100644 index 6a0b49b..0000000 --- a/src/sdk/api/exceptions/constants.ts +++ /dev/null @@ -1,9 +0,0 @@ -export enum HttpExceptionCodes { - BadRequest = 'BAD_REQUEST', - Unauthorized = 'UNAUTHORIZED', - Forbidden = 'FORBIDDEN', - NotFound = 'NOT_FOUND', - InternalServerError = 'INTERNAL_SERVER_ERROR', - ValidationError = 'VALIDATION_ERROR', -} - diff --git a/src/sdk/api/exceptions/http.exception.ts b/src/sdk/api/exceptions/http.exception.ts deleted file mode 100644 index 0b06d6e..0000000 --- a/src/sdk/api/exceptions/http.exception.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Exception } from '../../common'; -import { HttpExceptionCodes } from './constants'; - -export class HttpException extends Exception { - constructor(public code: HttpExceptionCodes, message?: string) { - super(message || code); - } -} - diff --git a/src/sdk/api/exceptions/index.ts b/src/sdk/api/exceptions/index.ts deleted file mode 100644 index 135a1d3..0000000 --- a/src/sdk/api/exceptions/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './constants'; -export * from './http.exception'; - diff --git a/src/sdk/api/index.ts b/src/sdk/api/index.ts index a062bd7..c96fb1e 100644 --- a/src/sdk/api/index.ts +++ b/src/sdk/api/index.ts @@ -1,4 +1,2 @@ -export * from './api.service'; -export * from './exceptions'; export * from './interfaces'; export * from './restApi.service'; diff --git a/src/sdk/api/interfaces.ts b/src/sdk/api/interfaces.ts index a50cc81..9191526 100644 --- a/src/sdk/api/interfaces.ts +++ b/src/sdk/api/interfaces.ts @@ -1,5 +1,3 @@ -import { FetchPolicy } from '@apollo/client/core'; - export interface ApiOptions { host: string; port?: number; @@ -13,10 +11,6 @@ export interface ApiRequestOptions { }; } -export interface ApiRequestQueryOptions extends ApiRequestOptions { - fetchPolicy?: FetchPolicy; -} - export interface QueryParams { [key: string]: any; } diff --git a/src/sdk/api/utils/build-api-uri.ts b/src/sdk/api/utils/build-api-uri.ts deleted file mode 100644 index d5b4fb6..0000000 --- a/src/sdk/api/utils/build-api-uri.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ApiOptions } from '../interfaces'; - -/** - * @ignore - */ -export function buildApiUri(options: ApiOptions, protocol: string, path = ''): string { - const { useSsl, host, port } = options; - - return `${protocol}${useSsl ? 's' : ''}://${host}${port ? `:${port}` : ''}/${path}`; -} - diff --git a/src/sdk/api/utils/catch-api-error.ts b/src/sdk/api/utils/catch-api-error.ts deleted file mode 100644 index c622321..0000000 --- a/src/sdk/api/utils/catch-api-error.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ApolloError } from '@apollo/client/core'; -import { ValidationException } from '../../common'; -import { HttpExceptionCodes, HttpException } from '../exceptions'; - -/** - * @ignore - */ -export function catchApiError(error: ApolloError): void { - let exception: Error; - - try { - const { code, errors } = error.graphQLErrors[0].extensions as { - code: string; - errors: any; - }; - - switch (code) { - case HttpExceptionCodes.BadRequest: - case HttpExceptionCodes.Unauthorized: - case HttpExceptionCodes.Forbidden: - case HttpExceptionCodes.NotFound: - exception = new HttpException(code); - break; - - case HttpExceptionCodes.InternalServerError: - exception = new HttpException(code, error.message); - break; - - case HttpExceptionCodes.ValidationError: - exception = new ValidationException(errors); - break; - } - } catch (err) { - // - } - - if (!exception) { - exception = error; - } - - throw exception; -} diff --git a/src/sdk/api/utils/index.ts b/src/sdk/api/utils/index.ts deleted file mode 100644 index b342a38..0000000 --- a/src/sdk/api/utils/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './build-api-uri'; -export * from './catch-api-error'; -export * from './map-api-result'; diff --git a/src/sdk/api/utils/map-api-result.ts b/src/sdk/api/utils/map-api-result.ts deleted file mode 100644 index 9ffc533..0000000 --- a/src/sdk/api/utils/map-api-result.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { plainToClass } from 'class-transformer'; - -/** - * @ignore - */ -export function mapApiResult( - data: T, - models?: { - [key in K]: { new (...args: any): T[K] }; - }, -): T { - const mappedData = { ...data }; - - if (models) { - const keys = Object.keys(models); - - for (const key of keys) { - const plain = mappedData[key]; - const model = models[key]; - - if (model && plain && !(plain instanceof model)) { - mappedData[key] = plainToClass(model, plain); - } - } - } - - return mappedData; -} diff --git a/src/sdk/base/VerifyingPaymasterAPI.ts b/src/sdk/base/VerifyingPaymasterAPI.ts index 821a547..13dadda 100644 --- a/src/sdk/base/VerifyingPaymasterAPI.ts +++ b/src/sdk/base/VerifyingPaymasterAPI.ts @@ -47,9 +47,9 @@ export class VerifyingPaymasterAPI extends PaymasterAPI { // A dummy value here is required in order to calculate a correct preVerificationGas value. paymasterData: DUMMY_PAYMASTER_AND_DATA, signature: userOp.signature ?? '0x', - paymaster: userOp?.paymaster, - paymasterVerificationGasLimit: userOp?.paymasterVerificationGasLimit, - paymasterPostOpGasLimit: userOp?.paymasterPostOpGasLimit, + paymaster: userOp.paymaster, + paymasterVerificationGasLimit: userOp.paymasterVerificationGasLimit, + paymasterPostOpGasLimit: userOp.paymasterPostOpGasLimit, }; const op = await ethers.utils.resolveProperties(pmOp); op.preVerificationGas = calcPreVerificationGas(op); diff --git a/src/sdk/common/constants.ts b/src/sdk/common/constants.ts index f57dbb6..98dd691 100644 --- a/src/sdk/common/constants.ts +++ b/src/sdk/common/constants.ts @@ -14,6 +14,7 @@ export const onRampApiKey = 'pk_prod_01H66WYDRFM95JBTJ4VMGY1FAX'; export enum CALL_TYPE { SINGLE = "0x00", BATCH = "0x01", + STATIC = "0xFE", DELEGATE_CALL = "0xFF" } @@ -22,17 +23,6 @@ export enum EXEC_TYPE { TRY_EXEC = "0x01" } -export const VALIDATOR_TYPE = { - ROOT: "0x00", - VALIDATOR: "0x01", - PERMISSION: "0x02" -} as const - -export enum VALIDATOR_MODE { - DEFAULT = "0x00", - ENABLE = "0x01" -} - export enum MODULE_TYPE { VALIDATOR = '0x01', EXECUTOR = '0x02', From 0ad97eb9253cc93d12e8b05f5ed323d4f0c2ecdf Mon Sep 17 00:00:00 2001 From: kaushalrajbacancy Date: Thu, 30 May 2024 11:18:41 +0530 Subject: [PATCH 10/10] changes as per the comments, removed extra logs from CHANGELOG.md --- CHANGELOG.md | 257 +---------------------------- examples/02-transfer-funds.ts | 6 +- examples/03-transfer-erc20.ts | 6 +- examples/26-install-module.ts | 6 +- examples/27-uninstall-module.ts | 6 +- src/sdk/base/EtherspotWalletAPI.ts | 11 +- 6 files changed, 15 insertions(+), 277 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19b730d..a2de422 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,261 +1,6 @@ # Changelog -## [1.8.2] - 2024-05-28 +## [2.0.0] - 2024-05-30 ### New - Added support for EP7.0 and Etherspot's Modular accounts - Added `installModule` function to install module - Added `uninstallModule` function to remove module - -## [1.8.1] - 2024-05-14 -### New -- Added signTypedData method to all providers supported -### Bug Fix -- Sign message rpc parameters should be in the correct order according to the rpc documentation msg params should always be first - -## [1.8.0] - 2024-04-29 -### Breaking changes -- Removed (deprecated) networks Goerli, Op Goerli, Arb Goerli, Mumbai, Klaytn and Mantle Testnet (Goerli) -- Added OP Sepolia, Arb Sepolia, Mantle Sepolia, Polygon Amoy testnet, Ancient8 mainnet, Ancient8 testnet supported networks -- Changed testnet bundler rpc urls to the new format - -## [1.7.1] - 2024-04-12 -### New -- Added `getSupportedAssets` to get supported tokens -- Added `getQuotes` to get transaction quotes -- Added `getTransactionStatus` to get the transaction status -- The default provider is `Connext` - -## [1.7.0] - 2024-04-10 -### New -- Added `getExchangeOffers` endpoint into DataUtils -### Breaking changes -- The type name `UserOpsTransaction` has been changed to `UserOpTransaction` - -## [1.6.5] - 2024-04-03 -### New -- Added Rootstock testnet and mainnet network support - -## [1.6.4] - 2024-03-20 -### New -- Added `getTransactions` endpoint into DataUtils -### Breaking changes -- The parameters named `projectKey` and `graphqlEndpoint` have been removed in the PrimeSdk module - -## [1.6.3] - 2024-03-19 -### New -- Added ArkaPaymaster as a sub-module - -## [1.6.2] - 2024-03-15 -### Bug Fixes -- Fixed browser-side querystring issue - -## [1.6.1] - 2024-03-14 -### New -- Added Base Sepolia Network - -## [1.6.0] - 2024-03-08 -### Bug Fixes -- Passed the dummy signature based on the type of smart wallet account to the paymaster - -## [1.5.4] - 2024-03-01 -### New -- The `DataUtils` module has been updated to fetch data from REST APIs provided by the new backend -- Added these endpoints into DataUtils: `getAccountBalances`, `getTransaction`, `getNftList`, `getAdvanceRoutesLiFi`, `getStepTransaction`, `getTokenLists`, `getTokenListTokens` and `fetchExchangeRates` -### Breaking changes -- Updated the `DataUtils` module to include a data API key parameter instead of project key and GraphQL endpoint parameters (If the data API key is not provided, it will automatically use the default API key, which has a strict rate limit) -- Added new parameter named `chainId` in `getTokenLists` and `getTokenListTokens` endpoints - -## [1.5.3] - 2024-02-28 -### Bug Fix -- Added Error Handling on bundler side -### Breaking Changes -- Removed `possibleSolution` parameter from error handling and passed that value into `message` itself and added a new parameter called `rawError` to report what the exact error is - -## [1.5.2] - 2024-02-12 -### New -- Added `GenericBundler` and `EtherspotBundler` as bundlerProviders and removed bundlerUrl params from SdkOptions - -## [1.5.1] - 2024-02-08 -### Bug fixes -- Added `key` param on SimpleAccount and ZeroDev wallets - -## [1.5.0] - 2024-01-26 -### Breaking changes -- Refactored `estimate` method -- Added `key` in `estimate` method to include `key` of semi-abstracted nonce (https://eips.ethereum.org/EIPS/eip-4337#semi-abstracted-nonce-support) - -## [1.4.2] - 2024-01-09 -### New -- Integrate index nonce in sdkOptions for enabling the creation of multiple accounts under the same owner. - -## [1.4.1] - 2023-12-27 -### Bug Fixes -- Added an optional parameter called accountAddress in SDKOptions to specify the contract address they wish to connect and added checks to verify that. This one is for users who changed the owner of the contract address - -## [1.4.0] -### Breaking Changes -- Changed the data service to initialise as a seperate entity independent of the primeSdk object -- Removed unnecessary state variables and changed the walletAddress variable name to EOAAddress for better understanding -- Optimised the fetching of accountAddress since before it was fetching from on chain for every request to getCounterFactualAddress from the rpc, now it stores the account address locally in the initialised PrimeSDK object -- Fixed network state variable to output the network which it is connected to - -## [1.3.14] -### New -- Added ability to override callDataLimit on estimate step by the user - -## [1.3.13] - 2023-11-22 -### Bug Fixes -- Removed UnsupportedChainId error and now can add custom network details - -## [1.3.12] - 2023-11-17 -### New -- Added Klaytn mainnet and Testnet (Baobab) - -## [1.3.11] - 2023-11-08 -### Breaking Changes -- Removed api_key from estimate function on the sdk and added the same on the queryString, please refer examples/13-paymaster.ts for more info - -### Bug Fixes -- Updated paymaster url to accept arka apiKey and chainId as queryString -- Added optional parameters such as entryPointAddress and Factory walletAddress for custom chain interaction -- Bug fixes for handling errors on connecting with custom chain interaction - - -## [1.3.10] - 2023-10-31 -### New -- Added getExchangeSupportedAssets to gets exchange supported tokens - -## [1.3.9] - 2023-10-28 -### Bug Fixes -- Upgraded Apollo package dependencies -- Updated Error messages with optional possibleSolution parameter for common errors from bundler or Validation Errors on sdk - -## [1.3.8] - 2023-10-25 -### Bug Fixes -- Added SimpleAccount execute fn in the batch itself and errored when adding more than one transaction if the first transaction is native transfer - -## [1.3.7] - 2023-10-25 -### Bug Fixes -- If Condition Typo Fix - -## [1.3.6] - 2023-10-25 -### Bug Fixes -- Added addUserOp fn to execute single transaction since simpleAccount transfers native tokens only using execute fn and does not support in userOp batching - -## [1.3.4] - 2023-10-24 -### New -- Added BNB (BSC) Testnet bundler url - -## [1.3.4] - 2023-10-20 -### New -- Added getTokenLists and getTokenListTokens to fetch token details -- Added fetchExchangeRates to fetch exchange rates of tokens - -## [1.3.3] - 2023-10-18 -### New -- Added Scroll testnet and Mainnet network support - -## [1.3.2] - 2023-10-18 -### New -- Added Flare testnet and Mainnet network support -- Added an example to execute token paymasters using ARKA - -## [1.3.1] - 2023-10-13 -### Fixes -- Updated all chains to the latest zeroDev factory contract as previously only goerli chain has the latest factory(0x5de4839a76cf55d0c90e2061ef4386d962E15ae3) and others was on previous factory contract which doesn't work on the latest changes made by zeroDev - -## [1.3.0] - 2023-10-12 -### New -- Added latest zeroDev wallet Factory(0x5de4839a76cf55d0c90e2061ef4386d962E15ae3) and simpleAccount wallet factory(0x9406Cc6185a346906296840746125a0E44976454) -- Updated network config to include bundler urls deployed - -## [1.2.11] - 2023-09-20 -### Breaking Changes -- Removed paymaster initialisation from sdk init place and added to estimate step to specify how each userOp is submitted rather than global paymaster initialisation - -## [1.2.10] - 2023-09-27 -### Fixes -- Added `buffer` dependency to support both node and browser environments - -## [1.2.9] - 2023-09-26 -### New -- Added Mantle testnet - -## [1.2.8] - 2023-09-21 -### Fixes -- Fixed the issue with getExchangeOffers endpoint (Account must need to be deployed to access this endpoint) -- Removed getTransactions endpoint - -## [1.2.7] - 2023-09-20 -### Fixes -- Fixed the issue on usage of axios when paymaster is called via react native by replacing it to fetch. - -## [1.2.6] - 2023-09-12 -### Fixes -- Fixed the issue on setting gas prices by the user if specified on estimate step - -## [1.2.4] - 2023-09-11 -### Breaking Changes -- Changed the paymasterApi to include api_key for ARKA -- Changed paymaster response object to return paymasterAndData, VerificationGasLimit, PreVerificationGas, callGasLimit to set to the userOp before sending to the bundler - -## [1.2.2] - 2023-08-31 -### Breaking Changes -- Changed the wallet factory address so the smart wallet address will generate a new address. Whoever wishes to access the old wallet should use version 1.2.0 to connect to the old smart wallet - -## [1.2.0] - 2023-08-31 -### New -- Added wallet connect 2.0 support - -## [1.1.7] - 2023-08-24 -### New -- Added getAccountBalances to get account balances -- Added getTransaction to get transaction -- Added getTransactions to get transactions -- Added getNftList to get NFT list belonging to account -- Added getExchangeOffers to get exchange offers -- Added getAdvanceRoutesLiFi to get advance routes -- Added getStepTransaction to get step transaction from LIFI -- Added getCrossChainQuotes to get multi chain quotes -## [1.1.6] - 2023-08-24 -### Bug Fixes -- Fixes on User hash was created before initialising the paymaster response if given which leads to "Invalid signature or paymaster signature" - -## [1.1.4] - 2023-08-21 -### Breaking Changes -- Changed the way of initialising the Paymaster url to string as before it was unreachable code to get VerifyingPaymasterApi class to pass on to the Prime-Sdk -- Changed the response object got from the paymaster to be compatible with our Arka service - -## [1.1.2] - 2023-07-31 -### New -- Added onRamper to get the url - -## [1.1.1] - 2023-07-27 -### New -- Added skandha_getGasPrice from the bundler if the bundler url is skandha bundler url - -## [1.1.0] - 2023-07-14 -### New -- Added Mantle Mainnet config as supported networks -### Breaking Changes -- Changed the wallet factory address so the smart wallet address will generate a new address. Whoever wishes to access the old wallet should use version 1.0.3 to connect to the old smart wallet -- Renamed sign method to estimate and get the return object as UserOps without signature -- Now signing the UserOps is moved into send method so provider would be requested to sign only while calling send method -- getUserOpsReceipt returns the whole object with UserOpsReceipt with transaction Receipt as compared to previously returned transaction hash -- getUserOpsReceipt only returns if the transaction is included into the block on-chain and would give results only for 15k blocks from the latest block number - -## [1.0.3] - 2023-07-10 -### Fixed -- Fuse and ArbitrumGoerli bundler url and native transfer funds example - -## [1.0.2] - 2023-07-07 -### New -- Added all supported networks ArbitrumGoerli, Chiado, Fuse, FuseSparknet, Gnosis, KromaTestnet, Mainnet, OptimismGoerli, RSKTestnet, VerseTestnet 🚀 - -## [1.0.1] - 2023-06-22 -### New -- Added all supported networks Goerli, BaseGoerli, Sepolia, Optimism, Polygon and Arbitrum 🚀 - -## [1.0.0] - 2023-06-01 - -### New -- Initial version published 🚀 diff --git a/examples/02-transfer-funds.ts b/examples/02-transfer-funds.ts index fad03f6..eeba792 100644 --- a/examples/02-transfer-funds.ts +++ b/examples/02-transfer-funds.ts @@ -1,4 +1,4 @@ -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; @@ -33,9 +33,7 @@ async function main() { console.log('balances: ', balance); // estimate transactions added to the batch and get the fee data for the UserOp - const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address - }); + const op = await primeSdk.estimate(); console.log(`Estimate UserOp: ${await printOp(op)}`); // sign the UserOp and sending to the bundler... diff --git a/examples/03-transfer-erc20.ts b/examples/03-transfer-erc20.ts index bf0ee05..cd3eb68 100644 --- a/examples/03-transfer-erc20.ts +++ b/examples/03-transfer-erc20.ts @@ -1,4 +1,4 @@ -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import { ERC20_ABI } from '../src/sdk/helpers/abi/ERC20_ABI'; @@ -41,9 +41,7 @@ async function main() { console.log('transactions: ', userOpsBatch); // estimate transactions added to the batch and get the fee data for the UserOp - const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address - }); + const op = await primeSdk.estimate(); console.log(`Estimate UserOp: ${await printOp(op)}`); // sign the UserOp and sending to the bundler... diff --git a/examples/26-install-module.ts b/examples/26-install-module.ts index e0cc14f..f340ac2 100644 --- a/examples/26-install-module.ts +++ b/examples/26-install-module.ts @@ -1,4 +1,4 @@ -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; @@ -35,9 +35,7 @@ async function main() { console.log('transactions: ', userOpsBatch); // sign transactions added to the batch - const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address - }); + const op = await primeSdk.estimate(); console.log(`Estimated UserOp: ${await printOp(op)}`); // sign the userOps and sending to the bundler... diff --git a/examples/27-uninstall-module.ts b/examples/27-uninstall-module.ts index 54a39a6..68a481f 100644 --- a/examples/27-uninstall-module.ts +++ b/examples/27-uninstall-module.ts @@ -1,4 +1,4 @@ -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { EtherspotBundler, PrimeSdk } from '../src'; import { printOp } from '../src/sdk/common/OperationUtils'; import * as dotenv from 'dotenv'; @@ -35,9 +35,7 @@ async function main() { console.log('transactions: ', userOpsBatch); // sign transactions added to the batch - const op = await primeSdk.estimate({ - key: BigNumber.from('0x1E714c551Fe6234B6eE406899Ec3Be9234Ad2124') // multipleOwnerECDSAValidator address - }); + const op = await primeSdk.estimate(); console.log(`Estimated UserOp: ${await printOp(op)}`); // sign the userOps and sending to the bundler... diff --git a/src/sdk/base/EtherspotWalletAPI.ts b/src/sdk/base/EtherspotWalletAPI.ts index 2936bd3..ad63951 100644 --- a/src/sdk/base/EtherspotWalletAPI.ts +++ b/src/sdk/base/EtherspotWalletAPI.ts @@ -148,11 +148,12 @@ export class EtherspotWalletAPI extends BaseAccountAPI { } async getNonce(key: BigNumber = BigNumber.from(0)): Promise { - if (key.eq(BigNumber.from(0))) { - return await this.nonceManager.getNonce(await this.getAccountAddress(), BigInt(key.toString())); - } - const dummyKey = ethers.utils.getAddress(key.toHexString()) + "00000000"; - return await this.nonceManager.getNonce(await this.getAccountAddress(), BigInt(dummyKey)); + const accountAddress = await this.getAccountAddress(); + const dummyKey = key.eq(0) + ? ethers.utils.getAddress(this.multipleOwnerECDSAValidatorAddress) + "00000000" + : ethers.utils.getAddress(key.toHexString()) + "00000000"; + + return await this.nonceManager.getNonce(accountAddress, BigInt(dummyKey)); } /**