@dgpub/prime-sdk
Version:
Etherspot Prime (Account Abstraction) SDK
483 lines (482 loc) • 11.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IEtherspotWallet__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "contract IEntryPoint",
name: "entryPoint",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
],
name: "EtherspotWalletInitialized",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "from",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "EtherspotWalletReceived",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "newGuardian",
type: "address",
},
],
name: "GuardianAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "removedGuardian",
type: "address",
},
],
name: "GuardianRemoved",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnerAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "removedOwner",
type: "address",
},
],
name: "OwnerRemoved",
type: "event",
},
{
anonymous: false,
inputs: [
{
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: "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: "uint256",
name: "newTimelock",
type: "uint256",
},
],
name: "ProposalTimelockChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{
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: "addDeposit",
outputs: [],
stateMutability: "payable",
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: "contract IEntryPoint",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "dest",
type: "address",
},
{
internalType: "uint256",
name: "value",
type: "uint256",
},
{
internalType: "bytes",
name: "func",
type: "bytes",
},
],
name: "execute",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address[]",
name: "dest",
type: "address[]",
},
{
internalType: "uint256[]",
name: "value",
type: "uint256[]",
},
{
internalType: "bytes[]",
name: "func",
type: "bytes[]",
},
],
name: "executeBatch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getDeposit",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
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: [],
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: "bytes32",
name: "hash",
type: "bytes32",
},
{
internalType: "bytes",
name: "signature",
type: "bytes",
},
],
name: "isValidSignature",
outputs: [
{
internalType: "bytes4",
name: "magicValue",
type: "bytes4",
},
],
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: "address payable",
name: "withdrawAddress",
type: "address",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "withdrawDepositTo",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
];
class IEtherspotWallet__factory {
static createInterface() {
return new ethers_1.utils.Interface(_abi);
}
static connect(address, signerOrProvider) {
return new ethers_1.Contract(address, _abi, signerOrProvider);
}
}
exports.IEtherspotWallet__factory = IEtherspotWallet__factory;
IEtherspotWallet__factory.abi = _abi;