UNPKG

@solace-fi/sdk-nightly

Version:

Note - Unstable nightly build, documentation not up-to-date for nightly build

3,458 lines (3,451 loc) 724 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var ethers$3 = require('ethers'); var utils = require('ethers/lib/utils'); var invariant = _interopDefault(require('tiny-invariant')); var axios = _interopDefault(require('axios')); var multicall = require('ethers-multicall'); var multicall__default = _interopDefault(multicall); var call = require('ethers-multicall/dist/call'); var calls = require('ethers-multicall/dist/calls'); var BondTellerErc20_ABI = [ { anonymous: false, inputs: [ ], name: "AddressesSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "approved", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Approval", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "operator", type: "address" }, { indexed: false, internalType: "bool", name: "approved", type: "bool" } ], name: "ApprovalForAll", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "string", name: "baseURI", type: "string" } ], name: "BaseURISet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "deployment", type: "address" } ], name: "ContractDeployed", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "lockID", type: "uint256" }, { indexed: false, internalType: "uint256", name: "principalAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" }, { indexed: false, internalType: "uint40", name: "vestingStart", type: "uint40" }, { indexed: false, internalType: "uint40", name: "vestingTime", type: "uint40" } ], name: "CreateBond", type: "event" }, { anonymous: false, inputs: [ ], name: "FeesSet", type: "event" }, { anonymous: false, inputs: [ ], name: "GovernanceLocked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "pendingGovernance", type: "address" } ], name: "GovernancePending", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldGovernance", type: "address" }, { indexed: false, internalType: "address", name: "newGovernance", type: "address" } ], name: "GovernanceTransferred", type: "event" }, { anonymous: false, inputs: [ ], name: "Paused", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "bondID", type: "uint256" }, { indexed: false, internalType: "address", name: "recipient", type: "address" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" } ], name: "RedeemBond", type: "event" }, { anonymous: false, inputs: [ ], name: "TermsSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "from", type: "address" }, { indexed: true, internalType: "address", name: "to", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Transfer", type: "event" }, { anonymous: false, inputs: [ ], name: "Unpaused", type: "event" }, { inputs: [ ], name: "DOMAIN_SEPARATOR", outputs: [ { internalType: "bytes32", name: "seperator", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "PERMIT_TYPEHASH", outputs: [ { internalType: "bytes32", name: "typehash", type: "bytes32" } ], stateMutability: "pure", type: "function" }, { inputs: [ ], name: "acceptGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "approve", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" } ], name: "balanceOf", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "baseURI", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "bondDepo", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "bondPrice", outputs: [ { internalType: "uint256", name: "price_", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "", type: "uint256" } ], name: "bonds", outputs: [ { internalType: "uint256", name: "payoutAmount", type: "uint256" }, { internalType: "uint256", name: "payoutAlreadyClaimed", type: "uint256" }, { internalType: "uint256", name: "principalPaid", type: "uint256" }, { internalType: "uint40", name: "vestingStart", type: "uint40" }, { internalType: "uint40", name: "localVestingTerm", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "amountOut", type: "uint256" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "calculateAmountIn", outputs: [ { internalType: "uint256", name: "amountIn", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "amountIn", type: "uint256" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "calculateAmountOut", outputs: [ { internalType: "uint256", name: "amountOut", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes32", name: "salt", type: "bytes32" } ], name: "calculateMinimalProxyDeploymentAddress", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "capacity", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "capacityIsPayout", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "bondID", type: "uint256" } ], name: "claimPayout", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "string", name: "name_", type: "string" }, { internalType: "address", name: "governance_", type: "address" }, { internalType: "address", name: "principal_", type: "address" }, { internalType: "bool", name: "isPermittable_", type: "bool" }, { internalType: "bytes32", name: "salt_", type: "bytes32" } ], name: "clone", outputs: [ { internalType: "address", name: "teller", type: "address" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "dao", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256" }, { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "address", name: "depositor", type: "address" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "deposit", outputs: [ { internalType: "uint256", name: "payout", type: "uint256" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256" }, { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "address", name: "depositor", type: "address" }, { internalType: "bool", name: "stake", type: "bool" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" } ], name: "depositSigned", outputs: [ { internalType: "uint256", name: "payout", type: "uint256" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "endTime", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "exists", outputs: [ { internalType: "bool", name: "status", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "getApproved", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "globalVestingTerm", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "governance", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "governanceIsLocked", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "halfLife", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "name_", type: "string" }, { internalType: "address", name: "governance_", type: "address" }, { internalType: "address", name: "solace_", type: "address" }, { internalType: "address", name: "xsLocker_", type: "address" }, { internalType: "address", name: "pool_", type: "address" }, { internalType: "address", name: "dao_", type: "address" }, { internalType: "address", name: "principal_", type: "address" }, { internalType: "bool", name: "isPermittable_", type: "bool" }, { internalType: "address", name: "bondDepo_", type: "address" } ], name: "initialize", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" }, { internalType: "address", name: "operator", type: "address" } ], name: "isApprovedForAll", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "isPermittable", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "lastPriceUpdate", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "lockGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "maxPayout", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "minimumPrice", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "name", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "nextPrice", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "nonces", outputs: [ { internalType: "uint256", name: "nonce", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "numBonds", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "ownerOf", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "pause", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "paused", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "pendingGovernance", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "spender", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" } ], name: "permit", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "priceAdjDenom", outputs: [ { internalType: "uint128", name: "", type: "uint128" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "priceAdjNum", outputs: [ { internalType: "uint128", name: "", type: "uint128" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "principal", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "protocolFeeBps", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "safeTransfer", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "safeTransferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "bytes", name: "_data", type: "bytes" } ], name: "safeTransferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "solace_", type: "address" }, { internalType: "address", name: "xsLocker_", type: "address" }, { internalType: "address", name: "pool_", type: "address" }, { internalType: "address", name: "dao_", type: "address" }, { internalType: "address", name: "principal_", type: "address" }, { internalType: "bool", name: "isPermittable_", type: "bool" }, { internalType: "address", name: "bondDepo_", type: "address" } ], name: "setAddresses", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "operator", type: "address" }, { internalType: "bool", name: "approved", type: "bool" } ], name: "setApprovalForAll", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "protocolFee", type: "uint256" } ], name: "setFees", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "pendingGovernance_", type: "address" } ], name: "setPendingGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { components: [ { internalType: "uint256", name: "startPrice", type: "uint256" }, { internalType: "uint256", name: "minimumPrice", type: "uint256" }, { internalType: "uint256", name: "maxPayout", type: "uint256" }, { internalType: "uint128", name: "priceAdjNum", type: "uint128" }, { internalType: "uint128", name: "priceAdjDenom", type: "uint128" }, { internalType: "uint256", name: "capacity", type: "uint256" }, { internalType: "bool", name: "capacityIsPayout", type: "bool" }, { internalType: "uint40", name: "startTime", type: "uint40" }, { internalType: "uint40", name: "endTime", type: "uint40" }, { internalType: "uint40", name: "globalVestingTerm", type: "uint40" }, { internalType: "uint40", name: "halfLife", type: "uint40" } ], internalType: "struct BondTellerErc20.Terms", name: "terms", type: "tuple" } ], name: "setTerms", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "solace", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "startTime", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4" } ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "symbol", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "termsSet", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "index", type: "uint256" } ], name: "tokenByIndex", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" }, { internalType: "uint256", name: "index", type: "uint256" } ], name: "tokenOfOwnerByIndex", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "tokenURI", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "totalSupply", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "transfer", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "transferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "underwritingPool", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "unpause", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "xsLocker", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" } ]; var BondTellerEth_ABI = [ { anonymous: false, inputs: [ ], name: "AddressesSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "approved", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Approval", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "operator", type: "address" }, { indexed: false, internalType: "bool", name: "approved", type: "bool" } ], name: "ApprovalForAll", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "string", name: "baseURI", type: "string" } ], name: "BaseURISet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "lockID", type: "uint256" }, { indexed: false, internalType: "uint256", name: "principalAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" }, { indexed: false, internalType: "uint40", name: "vestingStart", type: "uint40" }, { indexed: false, internalType: "uint40", name: "vestingTime", type: "uint40" } ], name: "CreateBond", type: "event" }, { anonymous: false, inputs: [ ], name: "FeesSet", type: "event" }, { anonymous: false, inputs: [ ], name: "GovernanceLocked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "pendingGovernance", type: "address" } ], name: "GovernancePending", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldGovernance", type: "address" }, { indexed: false, internalType: "address", name: "newGovernance", type: "address" } ], name: "GovernanceTransferred", type: "event" }, { anonymous: false, inputs: [ ], name: "Paused", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "bondID", type: "uint256" }, { indexed: false, internalType: "address", name: "recipient", type: "address" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" } ], name: "RedeemBond", type: "event" }, { anonymous: false, inputs: [ ], name: "TermsSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "from", type: "address" }, { indexed: true, internalType: "address", name: "to", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Transfer", type: "event" }, { anonymous: false, inputs: [ ], name: "Unpaused", type: "event" }, { stateMutability: "payable", type: "fallback" }, { inputs: [ ], name: "DOMAIN_SEPARATOR", outputs: [ { internalType: "bytes32", name: "seperator", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "PERMIT_TYPEHASH", outputs: [ { internalType: "bytes32", name: "typehash", type: "bytes32" } ], stateMutability: "pure", type: "function" }, { inputs: [ ], name: "acceptGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "approve", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" } ], name: "balanceOf", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "baseURI", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "bondDepo", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "bondPrice", outputs: [ { internalType: "uint256", name: "price_", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "", type: "uint256" } ], name: "bonds", outputs: [ { internalType: "uint256", name: "payoutAmount", type: "uint256" }, { internalType: "uint256", name: "payoutAlreadyClaimed", type: "uint256" }, { internalType: "uint256", name: "principalPaid", type: "uint256" }, { internalType: "uint40", name: "vestingStart", type: "uint40" }, { internalType: "uint40", name: "localVestingTerm", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "amountOut", type: "uint256" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "calculateAmountIn", outputs: [ { internalType: "uint256", name: "amountIn", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "amountIn", type: "uint256" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "calculateAmountOut", outputs: [ { internalType: "uint256", name: "amountOut", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "capacity", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "capacityIsPayout", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "bondID", type: "uint256" } ], name: "claimPayout", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "dao", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "address", name: "depositor", type: "address" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "depositEth", outputs: [ { internalType: "uint256", name: "payout", type: "uint256" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], stateMutability: "payable", type: "function" }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256" }, { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "address", name: "depositor", type: "address" }, { internalType: "bool", name: "stake", type: "bool" } ], name: "depositWeth", outputs: [ { internalType: "uint256", name: "payout", type: "uint256" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256" }, { internalType: "uint256", name: "minAmountOut", type: "uint256" }, { internalType: "address", name: "depositor", type: "address" }, { internalType: "bool", name: "stake", type: "bool" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" } ], name: "depositWethSigned", outputs: [ { internalType: "uint256", name: "payout", type: "uint256" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "endTime", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "exists", outputs: [ { internalType: "bool", name: "status", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "getApproved", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "globalVestingTerm", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "governance", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "governanceIsLocked", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "halfLife", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "string", name: "name_", type: "string" }, { internalType: "address", name: "governance_", type: "address" }, { internalType: "address", name: "solace_", type: "address" }, { internalType: "address", name: "xsLocker_", type: "address" }, { internalType: "address", name: "pool_", type: "address" }, { internalType: "address", name: "dao_", type: "address" }, { internalType: "address", name: "principal_", type: "address" }, { internalType: "bool", name: "isPermittable_", type: "bool" }, { internalType: "address", name: "bondDepo_", type: "address" } ], name: "initialize", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" }, { internalType: "address", name: "operator", type: "address" } ], name: "isApprovedForAll", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "isPermittable", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "lastPriceUpdate", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "lockGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "maxPayout", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "minimumPrice", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "name", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "nextPrice", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "nonces", outputs: [ { internalType: "uint256", name: "nonce", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "numBonds", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "ownerOf", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "pause", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "paused", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "pendingGovernance", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "spender", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" } ], name: "permit", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "priceAdjDenom", outputs: [ { internalType: "uint128", name: "", type: "uint128" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "priceAdjNum", outputs: [ { internalType: "uint128", name: "", type: "uint128" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "principal", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "protocolFeeBps", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "safeTransfer", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "safeTransferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "bytes", name: "_data", type: "bytes" } ], name: "safeTransferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "solace_", type: "address" }, { internalType: "address", name: "xsLocker_", type: "address" }, { internalType: "address", name: "pool_", type: "address" }, { internalType: "address", name: "dao_", type: "address" }, { internalType: "address", name: "principal_", type: "address" }, { internalType: "bool", name: "isPermittable_", type: "bool" }, { internalType: "address", name: "bondDepo_", type: "address" } ], name: "setAddresses", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "operator", type: "address" }, { internalType: "bool", name: "approved", type: "bool" } ], name: "setApprovalForAll", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "uint256", name: "protocolFee", type: "uint256" } ], name: "setFees", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "pendingGovernance_", type: "address" } ], name: "setPendingGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { components: [ { internalType: "uint256", name: "startPrice", type: "uint256" }, { internalType: "uint256", name: "minimumPrice", type: "uint256" }, { internalType: "uint256", name: "maxPayout", type: "uint256" }, { internalType: "uint128", name: "priceAdjNum", type: "uint128" }, { internalType: "uint128", name: "priceAdjDenom", type: "uint128" }, { internalType: "uint256", name: "capacity", type: "uint256" }, { internalType: "bool", name: "capacityIsPayout", type: "bool" }, { internalType: "uint40", name: "startTime", type: "uint40" }, { internalType: "uint40", name: "endTime", type: "uint40" }, { internalType: "uint40", name: "globalVestingTerm", type: "uint40" }, { internalType: "uint40", name: "halfLife", type: "uint40" } ], internalType: "struct BondTellerEth.Terms", name: "terms", type: "tuple" } ], name: "setTerms", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "solace", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "startTime", outputs: [ { internalType: "uint40", name: "", type: "uint40" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "bytes4", name: "interfaceId", type: "bytes4" } ], name: "supportsInterface", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "symbol", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "termsSet", outputs: [ { internalType: "bool", name: "", type: "bool" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "index", type: "uint256" } ], name: "tokenByIndex", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" }, { internalType: "uint256", name: "index", type: "uint256" } ], name: "tokenOfOwnerByIndex", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "tokenURI", outputs: [ { internalType: "string", name: "", type: "string" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "totalSupply", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenID", type: "uint256" } ], name: "transfer", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "transferFrom", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "underwritingPool", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "unpause", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ ], name: "xsLocker", outputs: [ { internalType: "address", name: "", type: "address" } ], stateMutability: "view", type: "function" }, { stateMutability: "payable", type: "receive" } ]; var BondTellerFtm_ABI = [ { anonymous: false, inputs: [ ], name: "AddressesSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "approved", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Approval", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "operator", type: "address" }, { indexed: false, internalType: "bool", name: "approved", type: "bool" } ], name: "ApprovalForAll", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "string", name: "baseURI", type: "string" } ], name: "BaseURISet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "lockID", type: "uint256" }, { indexed: false, internalType: "uint256", name: "principalAmount", type: "uint256" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" }, { indexed: false, internalType: "uint40", name: "vestingStart", type: "uint40" }, { indexed: false, internalType: "uint40", name: "vestingTime", type: "uint40" } ], name: "CreateBond", type: "event" }, { anonymous: false, inputs: [ ], name: "FeesSet", type: "event" }, { anonymous: false, inputs: [ ], name: "GovernanceLocked", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "pendingGovernance", type: "address" } ], name: "GovernancePending", type: "event" }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "oldGovernance", type: "address" }, { indexed: false, internalType: "address", name: "newGovernance", type: "address" } ], name: "GovernanceTransferred", type: "event" }, { anonymous: false, inputs: [ ], name: "Paused", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "uint256", name: "bondID", type: "uint256" }, { indexed: false, internalType: "address", name: "recipient", type: "address" }, { indexed: false, internalType: "uint256", name: "payoutAmount", type: "uint256" } ], name: "RedeemBond", type: "event" }, { anonymous: false, inputs: [ ], name: "TermsSet", type: "event" }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "from", type: "address" }, { indexed: true, internalType: "address", name: "to", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "Transfer", type: "event" }, { anonymous: false, inputs: [ ], name: "Unpaused", type: "event" }, { stateMutability: "payable", type: "fallback" }, { inputs: [ ], name: "DOMAIN_SEPARATOR", outputs: [ { internalType: "bytes32", name: "seperator", type: "bytes32" } ], stateMutability: "view", type: "function" }, { inputs: [ ], name: "PERMIT_TYPEHASH", outputs: [ { internalType: "bytes32", name: "typehash", type: "bytes32" } ], stateMutability: "pure", type: "function" }, { inputs: [ ], name: "acceptGovernance", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" } ], name: "approve", outputs: [ ], stateMutability: "nonpayable", type: "function" }, { inputs: [ { internalType: "address", name: "owner", type: "address" } ], name: "balanceOf", outputs: [ { internalType: "uint256", name: "", type: "uint256" } ], stateMutability: "view", type: "function"