UNPKG

@descent-protocol/sdk

Version:

A Typescript library for interacting with the Descent Protocol

278 lines (270 loc) 16.4 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { Contract, ContractFactory, ContractTransactionResponse, Interface, } from "ethers"; import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; import type { NonPayableOverrides } from "../common"; import type { VaultRouter, VaultRouterInterface } from "../VaultRouter"; const _abi = [ { inputs: [], stateMutability: "nonpayable", type: "constructor", }, { inputs: [], name: "AlreadyInitialized", type: "error", }, { inputs: [ { internalType: "uint256", name: "expectedLength", type: "uint256", }, { internalType: "uint256", name: "length", type: "uint256", }, ], name: "InvalidEncodedParameterLength", type: "error", }, { inputs: [], name: "MisMatchedInputsLength", type: "error", }, { inputs: [], name: "NewOwnerIsZeroAddress", type: "error", }, { inputs: [], name: "NoHandoverRequest", type: "error", }, { inputs: [], name: "Unauthorized", type: "error", }, { inputs: [], name: "UnsafeCast", type: "error", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "pendingOwner", type: "address", }, ], name: "OwnershipHandoverCanceled", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "pendingOwner", type: "address", }, ], name: "OwnershipHandoverRequested", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "oldOwner", type: "address", }, { indexed: true, internalType: "address", name: "newOwner", type: "address", }, ], name: "OwnershipTransferred", type: "event", }, { inputs: [ { internalType: "address", name: "_token", type: "address", }, { internalType: "address", name: "_vaultAddress", type: "address", }, { internalType: "bool", name: "isMax", type: "bool", }, ], name: "approveTokenForVault", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "cancelOwnershipHandover", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "address", name: "pendingOwner", type: "address", }, ], name: "completeOwnershipHandover", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "bytes", name: "_packedOperations", type: "bytes", }, { internalType: "bytes[]", name: "_encodedParameters", type: "bytes[]", }, ], name: "multiInteract", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "owner", outputs: [ { internalType: "address", name: "result", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "pendingOwner", type: "address", }, ], name: "ownershipHandoverExpiresAt", outputs: [ { internalType: "uint256", name: "result", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [], name: "requestOwnershipHandover", outputs: [], stateMutability: "payable", type: "function", }, { inputs: [ { internalType: "address", name: "newOwner", type: "address", }, ], name: "transferOwnership", outputs: [], stateMutability: "payable", type: "function", }, ] as const; const _bytecode = "0x608060405234801561001057600080fd5b5061001a3361001f565b61005b565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b61146e8061006a6000396000f3fe6080604052600436106100865760003560e01c8063715018a611610059578063715018a6146100dd5780638da5cb5b146100e5578063f04e283e14610116578063f2fde38b14610129578063fee81cf41461013c57600080fd5b8063256929621461008b5780632b492640146100955780633f7d7bc9146100b557806354d1f13d146100d5575b600080fd5b61009361017d565b005b3480156100a157600080fd5b506100936100b0366004610e5e565b6101cd565b3480156100c157600080fd5b506100936100d0366004610f38565b610c36565b610093610c5c565b610093610c98565b3480156100f157600080fd5b50638b78c6d819546040516001600160a01b0390911681526020015b60405180910390f35b610093610124366004610f88565b610cac565b610093610137366004610f88565b610cec565b34801561014857600080fd5b5061016f610157366004610f88565b63389a75e1600c908152600091909152602090205490565b60405190815260200161010d565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b8281146101ed57604051633a89615b60e01b815260040160405180910390fd5b6000805b82811015610c2e5785858281811061020b5761020b610fac565b919091013560f81c92506000905082600981111561022b5761022b610fc2565b600981111561023c5761023c610fc2565b14610c2e5760058260ff16600981111561025857610258610fc2565b600981111561026957610269610fc2565b036103975761029d84848381811061028357610283610fac565b90506020028101906102959190610fd8565b610120610d13565b60008060008060008888878181106102b7576102b7610fac565b90506020028101906102c99190610fd8565b8101906102d691906110c9565b6040805160a0810182526001600160a01b03871660608201908152608082018790528152602080820186905281830185905282518084018452308152908101879052915163187945bd60e11b8152969b5094995092975090955093506e22d473030f116ddee9f6b43ac78ba3926330f28b7a9261035b9290913390879060040161117c565b600060405180830381600087803b15801561037557600080fd5b505af1158015610389573d6000803e3d6000fd5b505050505050505050610c26565b60068260ff1660098111156103ae576103ae610fc2565b60098111156103bf576103bf610fc2565b03610546576103f38484838181106103d9576103d9610fac565b90506020028101906103eb9190610fd8565b610140610d13565b60008060008060008089898881811061040e5761040e610fac565b90506020028101906104209190610fd8565b81019061042d9190611200565b9550955095509550955095506e22d473030f116ddee9f6b43ac78ba36001600160a01b0316632b67b57033604051806060016040528060405180608001604052808c6001600160a01b031681526020016104908c6001600160a01b038016610d41565b6001600160a01b031681526020016104ae8b65ffffffffffff610d41565b65ffffffffffff1681526020016104cd8a65ffffffffffff8016610d41565b65ffffffffffff16905281523060208201526040908101879052516001600160e01b031960e085901b1681526105099291908690600401611275565b600060405180830381600087803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b50505050505050505050610c26565b60078260ff16600981111561055d5761055d610fc2565b600981111561056e5761056e610fc2565b03610679576105a184848381811061058857610588610fac565b905060200281019061059a9190610fd8565b6040610d13565b6000808585848181106105b6576105b6610fac565b90506020028101906105c89190610fd8565b8101906105d591906112f3565b90925090506e22d473030f116ddee9f6b43ac78ba36336c785163330610602856001600160a01b03610d41565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529183166024830152821660448201529085166064820152608401600060405180830381600087803b15801561065a57600080fd5b505af115801561066e573d6000803e3d6000fd5b505050505050610c26565b60018260ff16600981111561069057610690610fc2565b60098111156106a1576106a1610fc2565b03610784576106d48484838181106106bb576106bb610fac565b90506020028101906106cd9190610fd8565b6060610d13565b60008060008686858181106106eb576106eb610fac565b90506020028101906106fd9190610fd8565b81019061070a919061131f565b60405163f970c3b760e01b81526001600160a01b0380841660048301523360248301526044820183905293965091945092509084169063f970c3b7906064015b600060405180830381600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b50505050505050610c26565b60028260ff16600981111561079b5761079b610fc2565b60098111156107ac576107ac610fc2565b0361089c576107df8484838181106107c6576107c6610fac565b90506020028101906107d89190610fd8565b6080610d13565b6000806000808787868181106107f7576107f7610fac565b90506020028101906108099190610fd8565b8101906108169190611360565b604051635820ba6360e01b81526001600160a01b038085166004830152336024830152808416604483015260648201839052949850929650909450925090851690635820ba63906084015b600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505050505050610c26565b60038260ff1660098111156108b3576108b3610fc2565b60098111156108c4576108c4610fc2565b03610964576108de8484838181106107c6576107c6610fac565b6000806000808787868181106108f6576108f6610fac565b90506020028101906109089190610fd8565b8101906109159190611360565b6040516349a66ca360e01b81526001600160a01b0380851660048301523360248301528084166044830152606482018390529498509296509094509250908516906349a66ca390608401610861565b60048260ff16600981111561097b5761097b610fc2565b600981111561098c5761098c610fc2565b03610a20576109a68484838181106106bb576106bb610fac565b60008060008686858181106109bd576109bd610fac565b90506020028101906109cf9190610fd8565b8101906109dc919061131f565b604051634fa7391960e01b81526001600160a01b03808416600483015233602483015260448201839052939650919450925090841690634fa739199060640161074a565b60088260ff166009811115610a3757610a37610fc2565b6009811115610a4857610a48610fc2565b03610b8657610a7c848483818110610a6257610a62610fac565b9050602002810190610a749190610fd8565b610100610d13565b600080600080878786818110610a9457610a94610fac565b9050602002810190610aa69190610fd8565b810190610ab391906113b1565b935093509350935060008082806020019051810190610ad29190611414565b91509150600083604081518110610aeb57610aeb610fac565b016020015160405163d505accf60e01b8152336004820152306024820152604481018890526064810187905260f89190911c6084820181905260a4820185905260c4820184905291506001600160a01b0388169063d505accf9060e401600060405180830381600087803b158015610b6257600080fd5b505af1158015610b76573d6000803e3d6000fd5b5050505050505050505050610c26565b60098260ff166009811115610b9d57610b9d610fc2565b6009811115610bae57610bae610fc2565b03610c2657610bc884848381811061058857610588610fac565b600080858584818110610bdd57610bdd610fac565b9050602002810190610bef9190610fd8565b810190610bfc91906112f3565b91509150816001600160a01b03163b600003610c1757600080fd5b610c2382333084610d6b565b50505b6001016101f1565b505050505050565b610c3e610dbf565b610c57838383610c4f576000610dda565b600019610dda565b505050565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610ca0610dbf565b610caa6000610e20565b565b610cb4610dbf565b63389a75e1600c52806000526020600c208054421115610cdc57636f5e88186000526004601cfd5b60009055610ce981610e20565b50565b610cf4610dbf565b8060601b610d0a57637448fbae6000526004601cfd5b610ce981610e20565b808214610c575760405163582379b960e11b8152600481018290526024810183905260440160405180910390fd5b600082821015610d645760405163c4bd89a960e01b815260040160405180910390fd5b5090919050565b60405181606052826040528360601b602c526323b872dd60601b600c52602060006064601c6000895af13d156001600051141716610db157637939f4246000526004601cfd5b600060605260405250505050565b638b78c6d819543314610caa576382b429006000526004601cfd5b816014528060345263095ea7b360601b60005260206000604460106000875af13d156001600051141716610e1657633e3f8f736000526004601cfd5b6000603452505050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60008060008060408587031215610e7457600080fd5b843567ffffffffffffffff80821115610e8c57600080fd5b818701915087601f830112610ea057600080fd5b813581811115610eaf57600080fd5b886020828501011115610ec157600080fd5b602092830196509450908601359080821115610edc57600080fd5b818701915087601f830112610ef057600080fd5b813581811115610eff57600080fd5b8860208260051b8501011115610f1457600080fd5b95989497505060200194505050565b6001600160a01b0381168114610ce957600080fd5b600080600060608486031215610f4d57600080fd5b8335610f5881610f23565b92506020840135610f6881610f23565b915060408401358015158114610f7d57600080fd5b809150509250925092565b600060208284031215610f9a57600080fd5b8135610fa581610f23565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000808335601e19843603018112610fef57600080fd5b83018035915067ffffffffffffffff82111561100a57600080fd5b60200191503681900382131561101f57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261104d57600080fd5b813567ffffffffffffffff8082111561106857611068611026565b604051601f8301601f19908116603f0116810190828211818310171561109057611090611026565b816040528381528660208588010111156110a957600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a086880312156110e157600080fd5b85356110ec81610f23565b9450602086013593506040860135925060608601359150608086013567ffffffffffffffff81111561111d57600080fd5b6111298882890161103c565b9150509295509295909350565b6000815180845260005b8181101561115c57602081850181015186830182015201611140565b506000602082860101526020601f19601f83011685010191505092915050565b600061010061119f83885180516001600160a01b03168252602090810151910152565b60208701516040840152604087015160608401526111d3608084018780516001600160a01b03168252602090810151910152565b6001600160a01b03851660c084015260e083018190526111f581840185611136565b979650505050505050565b60008060008060008060c0878903121561121957600080fd5b863561122481610f23565b95506020870135945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561125c57600080fd5b61126889828a0161103c565b9150509295509295509295565b600061010060018060a01b0380871684528551818151166020860152816020820151166040860152604081015165ffffffffffff80821660608801528060608401511660808801525050508060208701511660a085015250604085015160c08401528060e08401526112e981840185611136565b9695505050505050565b6000806040838503121561130657600080fd5b823561131181610f23565b946020939093013593505050565b60008060006060848603121561133457600080fd5b833561133f81610f23565b9250602084013561134f81610f23565b929592945050506040919091013590565b6000806000806080858703121561137657600080fd5b843561138181610f23565b9350602085013561139181610f23565b925060408501356113a181610f23565b9396929550929360600135925050565b600080600080608085870312156113c757600080fd5b84356113d281610f23565b93506020850135925060408501359150606085013567ffffffffffffffff8111156113fc57600080fd5b6114088782880161103c565b91505092959194509250565b6000806040838503121561142757600080fd5b50508051602090910151909290915056fea264697066735822122002d0219beb8676a13f2c86e79246f9b974b7fc22b9374067fa3536150410ae3c64736f6c63430008150033"; type VaultRouterConstructorParams = | [signer?: Signer] | ConstructorParameters<typeof ContractFactory>; const isSuperArgs = ( xs: VaultRouterConstructorParams ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1; export class VaultRouter__factory extends ContractFactory { constructor(...args: VaultRouterConstructorParams) { if (isSuperArgs(args)) { super(...args); } else { super(_abi, _bytecode, args[0]); } } override getDeployTransaction( overrides?: NonPayableOverrides & { from?: string } ): Promise<ContractDeployTransaction> { return super.getDeployTransaction(overrides || {}); } override deploy(overrides?: NonPayableOverrides & { from?: string }) { return super.deploy(overrides || {}) as Promise< VaultRouter & { deploymentTransaction(): ContractTransactionResponse; } >; } override connect(runner: ContractRunner | null): VaultRouter__factory { return super.connect(runner) as VaultRouter__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): VaultRouterInterface { return new Interface(_abi) as VaultRouterInterface; } static connect(address: string, runner?: ContractRunner | null): VaultRouter { return new Contract(address, _abi, runner) as unknown as VaultRouter; } }