UNPKG

@dgpub/prime-sdk

Version:

Etherspot Prime (Account Abstraction) SDK

507 lines (506 loc) 13.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IEtherspotPaymaster__factory = void 0; const ethers_1 = require("ethers"); const _abi = [ { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "paymaster", type: "address", }, { indexed: true, internalType: "address[]", name: "accounts", type: "address[]", }, ], name: "AddedBatchToWhitelist", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "paymaster", type: "address", }, { indexed: true, internalType: "address", name: "account", type: "address", }, ], name: "AddedToWhitelist", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "paymaster", type: "address", }, { indexed: true, internalType: "address[]", name: "accounts", type: "address[]", }, ], name: "RemovedBatchFromWhitelist", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "paymaster", type: "address", }, { indexed: true, internalType: "address", name: "account", type: "address", }, ], name: "RemovedFromWhitelist", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "paymaster", type: "address", }, { indexed: false, internalType: "address", name: "sender", type: "address", }, ], name: "SponsorSuccessful", type: "event", }, { inputs: [ { internalType: "address[]", name: "_accounts", type: "address[]", }, ], name: "addBatchToWhitelist", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint32", name: "unstakeDelaySec", type: "uint32", }, ], name: "addStake", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "address", name: "_account", type: "address", }, ], name: "addToWhitelist", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_sponsor", type: "address", }, { internalType: "address", name: "_account", type: "address", }, ], name: "check", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "depositFunds", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [], name: "getDeposit", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", 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: "uint48", name: "validUntil", type: "uint48", }, { internalType: "uint48", name: "validAfter", type: "uint48", }, ], name: "getHash", outputs: [ { internalType: "bytes32", name: "", type: "bytes32", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "_sponsor", type: "address", }, ], name: "getSponsorBalance", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "bytes", name: "paymasterAndData", type: "bytes", }, ], name: "parsePaymasterAndData", outputs: [ { internalType: "uint48", name: "validUntil", type: "uint48", }, { internalType: "uint48", name: "validAfter", type: "uint48", }, { internalType: "bytes", name: "signature", type: "bytes", }, ], stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "enum IEtherspotPaymaster.PostOpMode", name: "mode", type: "uint8", }, { internalType: "bytes", name: "context", type: "bytes", }, { internalType: "uint256", name: "actualGasCost", type: "uint256", }, ], name: "postOp", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address[]", name: "_accounts", type: "address[]", }, ], name: "removeBatchFromWhitelist", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "_account", type: "address", }, ], name: "removeFromWhitelist", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "unlockStake", 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: "bytes32", name: "userOpHash", type: "bytes32", }, { internalType: "uint256", name: "maxCost", type: "uint256", }, ], name: "validatePaymasterUserOp", outputs: [ { internalType: "bytes", name: "context", type: "bytes", }, { internalType: "uint256", name: "validationData", type: "uint256", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address payable", name: "_sponsor", type: "address", }, { internalType: "uint256", name: "_amount", type: "uint256", }, ], name: "withdrawFunds", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address payable", name: "withdrawAddress", type: "address", }, ], name: "withdrawStake", outputs: [], stateMutability: "nonpayable", type: "function", }, ]; class IEtherspotPaymaster__factory { static createInterface() { return new ethers_1.utils.Interface(_abi); } static connect(address, signerOrProvider) { return new ethers_1.Contract(address, _abi, signerOrProvider); } } exports.IEtherspotPaymaster__factory = IEtherspotPaymaster__factory; IEtherspotPaymaster__factory.abi = _abi;