From a5ccfe02633f5c9371c356556e9306908f9762c3 Mon Sep 17 00:00:00 2001 From: Agustin Pane Date: Mon, 25 Apr 2022 15:04:12 +0200 Subject: [PATCH] feat: undo changes --- src/modules/bridges/index.ts | 2 +- src/modules/contracts/btc_skybridge-abi.json | 773 ------------------- src/modules/contracts/index.ts | 32 - src/modules/contracts/token-abi.json | 429 ---------- 4 files changed, 1 insertion(+), 1235 deletions(-) delete mode 100644 src/modules/contracts/btc_skybridge-abi.json delete mode 100644 src/modules/contracts/token-abi.json diff --git a/src/modules/bridges/index.ts b/src/modules/bridges/index.ts index bee0b85..da46ef2 100644 --- a/src/modules/bridges/index.ts +++ b/src/modules/bridges/index.ts @@ -1,4 +1,4 @@ -export const SKYBRIDGE_BRIDGES = ['btc_erc', 'btc_skypool', "btc_bep20"] as const; +export const SKYBRIDGE_BRIDGES = ['btc_erc', 'btc_skypool'] as const; export type SkybridgeBridge = typeof SKYBRIDGE_BRIDGES[number]; export const isSkybridgeBridge = (value: any): value is SkybridgeBridge => diff --git a/src/modules/contracts/btc_skybridge-abi.json b/src/modules/contracts/btc_skybridge-abi.json deleted file mode 100644 index 72c8c60..0000000 --- a/src/modules/contracts/btc_skybridge-abi.json +++ /dev/null @@ -1,773 +0,0 @@ -[ - { - "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" - } -] diff --git a/src/modules/contracts/index.ts b/src/modules/contracts/index.ts index 2c48f82..b2705b3 100644 --- a/src/modules/contracts/index.ts +++ b/src/modules/contracts/index.ts @@ -4,8 +4,6 @@ import WBTC_ABI from './wbtc-abi.json'; import SBBTC_ABI from './sbbtc-abi.json'; import BTC_ERC_ABI from './btc_erc-abi.json'; import BTC_SKYPOOL_ABI from './btc_skypool-abi.json'; -import ABI_SKYBRIDGE from './btc_skybridge-abi.json'; -import ABI_TOKEN from './token-abi.json'; const WBTC = { test: { @@ -52,26 +50,6 @@ export const CONTRACTS = { }, WBTC, 'WBTC.SKYPOOL': WBTC, - 'sbBTC.BEP20': { - test: { - address: '0x89B16adb7A48a3A7b69f3C741baFCe7D00f98794', - abi: ABI_TOKEN, - }, - production: { - address: '0xdBa68BeF9b541999Fd9650FF72C19d5E1ceeCd10', - abi: ABI_TOKEN, - }, - }, - 'BTCB.BEP20': { - test: { - address: '0xa88921dc290f888b5ee574cf2cd1599f412f1534', - abi: ABI_TOKEN, - }, - production: { - address: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c', - abi: ABI_TOKEN, - }, - }, }, bridges: { btc_erc: { @@ -94,15 +72,5 @@ export const CONTRACTS = { abi: BTC_SKYPOOL_ABI as AbiItem[], }, }, - btc_bep20: { - test: { - address: '0xC217994720062d2E8340852c58DfFcDbB66bbfA3', - abi: ABI_SKYBRIDGE, - }, - production: { - address: '0xad22900062e4cd766102a1f33e530f5303fe1adf', - abi: ABI_SKYBRIDGE, - }, - }, }, } as const; diff --git a/src/modules/contracts/token-abi.json b/src/modules/contracts/token-abi.json deleted file mode 100644 index c0dc008..0000000 --- a/src/modules/contracts/token-abi.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "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" - } -]