@swingby-protocol/sdk
Version:
An implementation of the Swingby standard development kit for NodeJS and JavaScript.
1,085 lines (1,081 loc) • 37 kB
text/typescript
import type { AbiItem } from 'web3-utils';
export const ABI_TOKEN: AbiItem[] = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'owner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'spender', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'Approval',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'previousOwner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newOwner', type: 'address' },
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'from', type: 'address' },
{ indexed: true, internalType: 'address', name: 'to', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'Transfer',
type: 'event',
},
{
inputs: [
{ internalType: 'address', name: 'owner', type: 'address' },
{ internalType: 'address', name: 'spender', type: 'address' },
],
name: 'allowance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [
{ internalType: 'address', name: 'spender', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'approve',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'balanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'burn',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'decimals',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [
{ internalType: 'address', name: 'spender', type: 'address' },
{ internalType: 'uint256', name: 'subtractedValue', type: 'uint256' },
],
name: 'decreaseAllowance',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'getOwner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [
{ internalType: 'address', name: 'spender', type: 'address' },
{ internalType: 'uint256', name: 'addedValue', type: 'uint256' },
],
name: 'increaseAllowance',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'target', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'mint',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'mintable',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [],
name: 'name',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'symbol',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [],
name: 'totalSupply',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
constant: true,
},
{
inputs: [
{ internalType: 'address', name: 'recipient', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'transfer',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'sender', type: 'address' },
{ internalType: 'address', name: 'recipient', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'transferFrom',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
];
export const ABI_SKYBRIDGE: AbiItem[] = [
{
inputs: [
{ internalType: 'address', name: '_lpToken', type: 'address' },
{ internalType: 'address', name: '_wbtc', type: 'address' },
{ internalType: 'uint256', name: '_existingBTCFloat', type: 'uint256' },
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amountOfLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountOfFloat', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'withdrawal', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'txid', type: 'bytes32' },
],
name: 'BurnLPTokensForFloat',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'to', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amountOfFloat', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountOfLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'depositFees', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'txid', type: 'bytes32' },
],
name: 'IssueLPTokensForFloat',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'previousOwner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newOwner', type: 'address' },
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'feesToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'rewards', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountLPTokensForNode', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
],
name: 'RewardsCollection',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'from', type: 'address' },
{ indexed: false, internalType: 'address', name: 'to', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'Swap',
type: 'event',
},
{ stateMutability: 'nonpayable', type: 'fallback' },
{
inputs: [],
name: 'WBTC_ADDR',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'churnedInCount',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'depositFeesBPS',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'feesLPTokensForNode',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'initialExchangeRate',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lockedLPTokensForNode',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lpToken',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'nodeRewardsRatio',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'tssThreshold',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'whitelist',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'withdrawalFeeBPS',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'address', name: '_to', type: 'address' },
{ internalType: 'uint256', name: '_amount', type: 'uint256' },
{ internalType: 'uint256', name: '_totalSwapped', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bytes32[]', name: '_redeemedFloatTxIds', type: 'bytes32[]' },
],
name: 'singleTransferERC20',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'bytes32[]', name: '_addressesAndAmounts', type: 'bytes32[]' },
{ internalType: 'uint256', name: '_totalSwapped', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bytes32[]', name: '_redeemedFloatTxIds', type: 'bytes32[]' },
],
name: 'multiTransferERC20TightlyPacked',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'uint256', name: '_incomingAmount', type: 'uint256' },
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
],
name: 'collectSwapFeesForBTC',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'bytes32', name: '_addressesAndAmountOfFloat', type: 'bytes32' },
{ internalType: 'bool', name: '_zerofee', type: 'bool' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordIncomingFloat',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'bytes32', name: '_addressesAndAmountOfLPtoken', type: 'bytes32' },
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordOutcomingFloat',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'distributeNodeRewards',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordUTXOSweepMinerFee',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_newOwner', type: 'address' },
{ internalType: 'bytes32[]', name: '_rewardAddressAndAmounts', type: 'bytes32[]' },
{ internalType: 'bool[]', name: '_isRemoved', type: 'bool[]' },
{ internalType: 'uint8', name: '_churnedInCount', type: 'uint8' },
{ internalType: 'uint8', name: '_tssThreshold', type: 'uint8' },
{ internalType: 'uint8', name: '_nodeRewardsRatio', type: 'uint8' },
{ internalType: 'uint8', name: '_withdrawalFeeBPS', type: 'uint8' },
],
name: 'churn',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: '_txid', type: 'bytes32' }],
name: 'isTxUsed',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getCurrentPriceLP',
outputs: [{ internalType: 'uint256', name: 'nowPrice', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'uint256', name: '_amountOfFloat', type: 'uint256' },
],
name: 'getDepositFeeRate',
outputs: [{ internalType: 'uint256', name: 'depositFeeRate', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_tokenA', type: 'address' },
{ internalType: 'address', name: '_tokenB', type: 'address' },
],
name: 'getFloatReserve',
outputs: [
{ internalType: 'uint256', name: 'reserveA', type: 'uint256' },
{ internalType: 'uint256', name: 'reserveB', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getActiveNodes',
outputs: [{ internalType: 'bytes32[]', name: '', type: 'bytes32[]' }],
stateMutability: 'view',
type: 'function',
},
];
export const ABI_SKYBRIDGE_V2: AbiItem[] = [
{
inputs: [
{ internalType: 'address', name: '_lpToken', type: 'address' },
{ internalType: 'address', name: '_btct', type: 'address' },
{ internalType: 'address', name: '_wETH', type: 'address' },
{ internalType: 'uint256', name: '_existingBTCFloat', type: 'uint256' },
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amountOfLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountOfFloat', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'withdrawal', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'txid', type: 'bytes32' },
],
name: 'BurnLPTokensForFloat',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
{ indexed: false, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'balance', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
name: 'Deposit',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: 'rewardLPTsForNodes', type: 'uint256' },
],
name: 'DistributeNodeRewards',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'to', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amountOfFloat', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountOfLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'depositFees', type: 'uint256' },
{ indexed: false, internalType: 'bytes32', name: 'txid', type: 'bytes32' },
],
name: 'IssueLPTokensForFloat',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: 'address', name: 'previousOwner', type: 'address' },
{ indexed: true, internalType: 'address', name: 'newOwner', type: 'address' },
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'feesToken', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'rewards', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'amountLPTokensForNode', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'currentPriceLP', type: 'uint256' },
],
name: 'RewardsCollection',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: 'ExpirationTime', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
name: 'SetExpirationTime',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'from', type: 'address' },
{ indexed: false, internalType: 'address', name: 'to', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'Swap',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'bytes32', name: 'SwapID', type: 'bytes32' },
{ indexed: false, internalType: 'string', name: 'DestAddr', type: 'string' },
{ indexed: false, internalType: 'address', name: 'RefundAddr', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'AmountWBTC', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
name: 'SwapTokensToBTC',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
{ indexed: false, internalType: 'address', name: 'user', type: 'address' },
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'balance', type: 'uint256' },
{ indexed: false, internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
name: 'Withdraw',
type: 'event',
},
{ stateMutability: 'nonpayable', type: 'fallback' },
{
inputs: [],
name: 'BTCT_ADDR',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'address', name: '_user', type: 'address' },
],
name: 'balanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_newOwner', type: 'address' },
{ internalType: 'bytes32[]', name: '_rewardAddressAndAmounts', type: 'bytes32[]' },
{ internalType: 'bool[]', name: '_isRemoved', type: 'bool[]' },
{ internalType: 'uint8', name: '_churnedInCount', type: 'uint8' },
{ internalType: 'uint8', name: '_tssThreshold', type: 'uint8' },
{ internalType: 'uint8', name: '_nodeRewardsRatio', type: 'uint8' },
{ internalType: 'uint8', name: '_withdrawalFeeBPS', type: 'uint8' },
{ internalType: 'uint256', name: '_expirationTime', type: 'uint256' },
],
name: 'churn',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'churnedInCount',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'uint256', name: '_incomingAmount', type: 'uint256' },
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bool', name: '_isUpdatelimitBTCForSPFlow2', type: 'bool' },
],
name: 'collectSwapFeesForBTC',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'depositFeesBPS',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'distributeNodeRewards',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'expirationTime',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'feesLPTokensForNode',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getActiveNodes',
outputs: [{ internalType: 'bytes32[]', name: '', type: 'bytes32[]' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getCurrentPriceLP',
outputs: [{ internalType: 'uint256', name: 'nowPrice', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'uint256', name: '_amountOfFloat', type: 'uint256' },
],
name: 'getDepositFeeRate',
outputs: [{ internalType: 'uint256', name: 'depositFeeRate', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_tokenA', type: 'address' },
{ internalType: 'address', name: '_tokenB', type: 'address' },
],
name: 'getFloatReserve',
outputs: [
{ internalType: 'uint256', name: 'reserveA', type: 'uint256' },
{ internalType: 'uint256', name: 'reserveB', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'initialExchangeRate',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: '_txid', type: 'bytes32' }],
name: 'isTxUsed',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'limitBTCForSPFlow2',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lockedLPTokensForNode',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'lpToken',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'bytes32[]', name: '_addressesAndAmounts', type: 'bytes32[]' },
{ internalType: 'uint256', name: '_totalSwapped', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bytes32[]', name: '_redeemedFloatTxIds', type: 'bytes32[]' },
],
name: 'multiTransferERC20TightlyPacked',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'nodeRewardsRatio',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'oldestActiveIndex',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'bytes32', name: '_addressesAndAmountOfFloat', type: 'bytes32' },
{ internalType: 'bool', name: '_zerofee', type: 'bool' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordIncomingFloat',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'bytes32', name: '_addressesAndAmountOfLPtoken', type: 'bytes32' },
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordOutcomingFloat',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_to', type: 'address' },
{ internalType: 'uint256', name: '_totalSwapped', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bytes32[]', name: '_usedTxIds', type: 'bytes32[]' },
],
name: 'recordSkyPoolsTX',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: '_minerFee', type: 'uint256' },
{ internalType: 'bytes32', name: '_txid', type: 'bytes32' },
],
name: 'recordUTXOSweepMinerFee',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'uint256', name: '_amount', type: 'uint256' },
],
name: 'redeemERC20Token',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: '_amount', type: 'uint256' }],
name: 'redeemEther',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_destToken', type: 'address' },
{ internalType: 'address', name: '_to', type: 'address' },
{ internalType: 'uint256', name: '_amount', type: 'uint256' },
{ internalType: 'uint256', name: '_totalSwapped', type: 'uint256' },
{ internalType: 'uint256', name: '_rewardsAmount', type: 'uint256' },
{ internalType: 'bytes32[]', name: '_redeemedFloatTxIds', type: 'bytes32[]' },
],
name: 'singleTransferERC20',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: '_loopCount', type: 'uint256' }],
name: 'spCleanUpOldTXs',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_token', type: 'address' },
{ internalType: 'uint256', name: '_amount', type: 'uint256' },
],
name: 'spDeposit',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'address', name: 'fromToken', type: 'address' },
{ internalType: 'address', name: 'toToken', type: 'address' },
{ internalType: 'uint256', name: 'fromAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'toAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'expectedAmount', type: 'uint256' },
{ internalType: 'address[]', name: 'callees', type: 'address[]' },
{ internalType: 'bytes', name: 'exchangeData', type: 'bytes' },
{ internalType: 'uint256[]', name: 'startIndexes', type: 'uint256[]' },
{ internalType: 'uint256[]', name: 'values', type: 'uint256[]' },
{ internalType: 'address payable', name: 'beneficiary', type: 'address' },
{ internalType: 'address payable', name: 'partner', type: 'address' },
{ internalType: 'uint256', name: 'feePercent', type: 'uint256' },
{ internalType: 'bytes', name: 'permit', type: 'bytes' },
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
{ internalType: 'bytes16', name: 'uuid', type: 'bytes16' },
],
internalType: 'struct Utils.SimpleData',
name: '_data',
type: 'tuple',
},
],
name: 'spFlow1SimpleSwap',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'bool', name: '_fork', type: 'bool' },
{ internalType: 'address', name: '_factory', type: 'address' },
{ internalType: 'bytes32', name: '_initCode', type: 'bytes32' },
{ internalType: 'uint256', name: '_amountIn', type: 'uint256' },
{ internalType: 'uint256', name: '_amountOutMin', type: 'uint256' },
{ internalType: 'address[]', name: '_path', type: 'address[]' },
],
name: 'spFlow1Uniswap',
outputs: [{ internalType: 'uint256', name: 'receivedAmount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'string', name: '_destinationAddressForBTC', type: 'string' },
{
components: [
{ internalType: 'address', name: 'fromToken', type: 'address' },
{ internalType: 'address', name: 'toToken', type: 'address' },
{ internalType: 'uint256', name: 'fromAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'toAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'expectedAmount', type: 'uint256' },
{ internalType: 'address[]', name: 'callees', type: 'address[]' },
{ internalType: 'bytes', name: 'exchangeData', type: 'bytes' },
{ internalType: 'uint256[]', name: 'startIndexes', type: 'uint256[]' },
{ internalType: 'uint256[]', name: 'values', type: 'uint256[]' },
{ internalType: 'address payable', name: 'beneficiary', type: 'address' },
{ internalType: 'address payable', name: 'partner', type: 'address' },
{ internalType: 'uint256', name: 'feePercent', type: 'uint256' },
{ internalType: 'bytes', name: 'permit', type: 'bytes' },
{ internalType: 'uint256', name: 'deadline', type: 'uint256' },
{ internalType: 'bytes16', name: 'uuid', type: 'bytes16' },
],
internalType: 'struct Utils.SimpleData',
name: '_data',
type: 'tuple',
},
],
name: 'spFlow2SimpleSwap',
outputs: [{ internalType: 'uint256', name: 'receivedAmount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'string', name: '_destinationAddressForBTC', type: 'string' },
{ internalType: 'bool', name: '_fork', type: 'bool' },
{ internalType: 'address', name: '_factory', type: 'address' },
{ internalType: 'bytes32', name: '_initCode', type: 'bytes32' },
{ internalType: 'uint256', name: '_amountIn', type: 'uint256' },
{ internalType: 'uint256', name: '_amountOutMin', type: 'uint256' },
{ internalType: 'address[]', name: '_path', type: 'address[]' },
],
name: 'spFlow2Uniswap',
outputs: [{ internalType: 'uint256', name: 'receivedAmount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'spGetPendingSwaps',
outputs: [
{
components: [
{ internalType: 'bytes32', name: 'SwapID', type: 'bytes32' },
{ internalType: 'string', name: 'DestAddr', type: 'string' },
{ internalType: 'address', name: 'RefundAddr', type: 'address' },
{ internalType: 'uint256', name: 'AmountWBTC', type: 'uint256' },
{ internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
internalType: 'struct SwapContract.spPendingTx[]',
name: 'data',
type: 'tuple[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
name: 'spPendingTXs',
outputs: [
{ internalType: 'bytes32', name: 'SwapID', type: 'bytes32' },
{ internalType: 'string', name: 'DestAddr', type: 'string' },
{ internalType: 'address', name: 'RefundAddr', type: 'address' },
{ internalType: 'uint256', name: 'AmountWBTC', type: 'uint256' },
{ internalType: 'uint256', name: 'Timestamp', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'swapCount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '', type: 'address' },
{ internalType: 'address', name: '', type: 'address' },
],
name: 'tokens',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'tssThreshold',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'wETH',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '', type: 'address' }],
name: 'whitelist',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'withdrawalFeeBPS',
outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{ stateMutability: 'payable', type: 'receive' },
] as any;