UNPKG

@descent-protocol/sdk

Version:

A Typescript library for interacting with the Descent Protocol

97 lines (96 loc) 5.15 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var MultiStaticcall_factory_exports = {}; __export(MultiStaticcall_factory_exports, { MultiStaticcall__factory: () => MultiStaticcall__factory }); module.exports = __toCommonJS(MultiStaticcall_factory_exports); var import_ethers = require("ethers"); const _abi = [ { inputs: [ { components: [ { internalType: "address", name: "target", type: "address" }, { internalType: "bytes", name: "callData", type: "bytes" } ], internalType: "struct MultiStaticcall.Staticcall[]", name: "staticcalls", type: "tuple[]" } ], name: "multiStaticcall", outputs: [ { components: [ { internalType: "bytes", name: "returnDatum", type: "bytes" }, { internalType: "bool", name: "success", type: "bool" } ], internalType: "struct MultiStaticcall.ReturnDatum[]", name: "returnData", type: "tuple[]" } ], stateMutability: "view", type: "function" } ]; const _bytecode = "0x608060405234801561001057600080fd5b506104a7806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e719c88814610030575b600080fd5b61004361003e3660046101b3565b610059565b604051610050919061024c565b60405180910390f35b60608167ffffffffffffffff811115610074576100746102d8565b6040519080825280602002602001820160405280156100ba57816020015b6040805180820190915260608152600060208201528152602001906001900390816100925790505b50905060005b828110156101ac5760408051808201909152606081526000602082015260008585848181106100f1576100f16102ee565b90506020028101906101039190610304565b61010c9061037e565b905080600001516001600160a01b0316816020015160405161012e9190610438565b600060405180830381855afa9150503d8060008114610169576040519150601f19603f3d011682016040523d82523d6000602084013e61016e565b606091505b508352151560208301528351829085908590811061018e5761018e6102ee565b60200260200101819052505050806101a59061044a565b90506100c0565b5092915050565b600080602083850312156101c657600080fd5b823567ffffffffffffffff808211156101de57600080fd5b818501915085601f8301126101f257600080fd5b81358181111561020157600080fd5b8660208260051b850101111561021657600080fd5b60209290920196919550909350505050565b60005b8381101561024357818101518382015260200161022b565b50506000910152565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156102ca57603f19898403018552815180518785528051808987015260606102a3828289018d8601610228565b928a01511515868b015296890196601f01601f191690940101925090860190600101610273565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e1983360301811261031a57600080fd5b9190910192915050565b6040805190810167ffffffffffffffff81118282101715610347576103476102d8565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610376576103766102d8565b604052919050565b60006040823603121561039057600080fd5b610398610324565b82356001600160a01b03811681146103af57600080fd5b815260208381013567ffffffffffffffff808211156103cd57600080fd5b9085019036601f8301126103e057600080fd5b8135818111156103f2576103f26102d8565b610404601f8201601f1916850161034d565b9150808252368482850101111561041a57600080fd5b80848401858401376000908201840152918301919091525092915050565b6000825161031a818460208701610228565b60006001820161046a57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220acd7d21b3cf7b720dd7521008e15170ad0bbb5e6f137ebce924a89b04a61c50a64736f6c63430008150033"; const isSuperArgs = (xs) => xs.length > 1; class MultiStaticcall__factory extends import_ethers.ContractFactory { constructor(...args) { if (isSuperArgs(args)) { super(...args); } else { super(_abi, _bytecode, args[0]); } } getDeployTransaction(overrides) { return super.getDeployTransaction(overrides || {}); } deploy(overrides) { return super.deploy(overrides || {}); } connect(runner) { return super.connect(runner); } static bytecode = _bytecode; static abi = _abi; static createInterface() { return new import_ethers.Interface(_abi); } static connect(address, runner) { return new import_ethers.Contract(address, _abi, runner); } }