From 5aa12e3c00f85d4dbd71a098e5486e7348196d40 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Wed, 24 Jul 2024 20:55:44 -0700 Subject: [PATCH] (fix) remove quipuswap --- package.json | 1 - src/amm/amm.controllers.ts | 24 +- src/chains/tezos/tezos.base.ts | 3 - src/connectors/connectors.routes.ts | 7 - src/connectors/quipuswap/quipuswap.config.ts | 31 -- .../quipuswap/quipuswap.controllers.ts | 310 ------------ src/connectors/quipuswap/quipuswap.ts | 121 ----- src/connectors/quipuswap/utils/api.ts | 132 ----- src/connectors/quipuswap/utils/base.ts | 198 -------- src/connectors/quipuswap/utils/calculus.ts | 467 ------------------ .../quipuswap/utils/config/config.ts | 78 --- .../quipuswap/utils/config/constants.ts | 22 - .../quipuswap/utils/config/tokens.ts | 57 --- .../quipuswap/utils/map.dex.pairs.ts | 48 -- .../utils/shared/backend.token.map.ts | 12 - .../quipuswap/utils/shared/errors.ts | 42 -- .../quipuswap/utils/shared/helpers.ts | 94 ---- .../quipuswap/utils/shared/types.ts | 96 ---- .../quipuswap/utils/swap.outputs.ts | 121 ----- .../utils/swap.router.sdk.adapters.ts | 48 -- src/connectors/quipuswap/utils/trade.ts | 118 ----- src/services/connection-manager.ts | 6 - src/templates/root.yml | 4 - .../quipuswap/quipuswap.routes.test.ts | 435 ---------------- .../connectors/quipuswap/quipuswap.test.ts | 93 ---- yarn.lock | 466 +++++++---------- 26 files changed, 193 insertions(+), 2841 deletions(-) delete mode 100644 src/connectors/quipuswap/quipuswap.config.ts delete mode 100644 src/connectors/quipuswap/quipuswap.controllers.ts delete mode 100644 src/connectors/quipuswap/quipuswap.ts delete mode 100644 src/connectors/quipuswap/utils/api.ts delete mode 100644 src/connectors/quipuswap/utils/base.ts delete mode 100644 src/connectors/quipuswap/utils/calculus.ts delete mode 100644 src/connectors/quipuswap/utils/config/config.ts delete mode 100644 src/connectors/quipuswap/utils/config/constants.ts delete mode 100644 src/connectors/quipuswap/utils/config/tokens.ts delete mode 100644 src/connectors/quipuswap/utils/map.dex.pairs.ts delete mode 100644 src/connectors/quipuswap/utils/shared/backend.token.map.ts delete mode 100644 src/connectors/quipuswap/utils/shared/errors.ts delete mode 100644 src/connectors/quipuswap/utils/shared/helpers.ts delete mode 100644 src/connectors/quipuswap/utils/shared/types.ts delete mode 100644 src/connectors/quipuswap/utils/swap.outputs.ts delete mode 100644 src/connectors/quipuswap/utils/swap.router.sdk.adapters.ts delete mode 100644 src/connectors/quipuswap/utils/trade.ts delete mode 100644 test-bronze/connectors/quipuswap/quipuswap.routes.test.ts delete mode 100644 test-bronze/connectors/quipuswap/quipuswap.test.ts diff --git a/package.json b/package.json index 4d3ae06a3b..4f8ce3ffe8 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "osmojs": "16.5.1", "promise-retry": "^2.0.1", "quickswap-sdk": "^3.0.8", - "quipuswap-v3-sdk": "^0.0.7", "swagger-ui-express": "^4.1.6", "swap-router-sdk": "^1.21.1", "tslib": "^2.3.1", diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index 54ba964bb7..744097df87 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -63,11 +63,6 @@ import { trade as plentyTrade, estimateGas as plentyEstimateGas, } from '../connectors/plenty/plenty.controllers'; -import { - price as quipuPrice, - trade as quipuTrade, - estimateGas as quipuEstimateGas, -} from '../connectors/quipuswap/quipuswap.controllers'; import { getInitializedChain, getConnector, @@ -85,7 +80,6 @@ import { import { Algorand } from '../chains/algorand/algorand'; import { Tinyman } from '../connectors/tinyman/tinyman'; import { Plenty } from '../connectors/plenty/plenty'; -import { QuipuSwap } from '../connectors/quipuswap/quipuswap'; import { Osmosis } from '../chains/osmosis/osmosis'; import { Carbonamm } from '../connectors/carbon/carbonAMM'; @@ -97,8 +91,8 @@ export async function price(req: PriceRequest): Promise { return chain.controller.price(chain as unknown as Osmosis, req); } - const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap = - await getConnector( + const connector: Uniswapish | RefAMMish | Tinyman | Plenty = + await getConnector( req.chain, req.network, req.connector @@ -106,8 +100,6 @@ export async function price(req: PriceRequest): Promise { if (connector instanceof Plenty) { return plentyPrice(chain, connector, req); - } else if (connector instanceof QuipuSwap) { - return quipuPrice(chain, connector, req); } else if (connector instanceof Carbonamm) { return carbonPrice(chain, connector, req); } else if ('routerAbi' in connector) { @@ -128,8 +120,8 @@ export async function trade(req: TradeRequest): Promise { return chain.controller.trade(chain as unknown as Osmosis, req); } - const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap = - await getConnector( + const connector: Uniswapish | RefAMMish | Tinyman | Plenty = + await getConnector( req.chain, req.network, req.connector @@ -137,8 +129,6 @@ export async function trade(req: TradeRequest): Promise { if (connector instanceof Plenty) { return plentyTrade(chain, connector, req); - } else if (connector instanceof QuipuSwap) { - return quipuTrade(chain, connector, req); } else if (connector instanceof Carbonamm) { return carbonTrade(chain, connector, req); } else if ('routerAbi' in connector) { @@ -238,8 +228,8 @@ export async function estimateGas( return chain.controller.estimateGas(chain as unknown as Osmosis); } - const connector: Uniswapish | RefAMMish | Tinyman | Plenty | QuipuSwap = - await getConnector( + const connector: Uniswapish | RefAMMish | Tinyman | Plenty = + await getConnector( req.chain, req.network, req.connector @@ -247,8 +237,6 @@ export async function estimateGas( if (connector instanceof Plenty) { return plentyEstimateGas(chain, connector); - } else if (connector instanceof QuipuSwap) { - return quipuEstimateGas(chain, connector); } else if (connector instanceof Carbonamm) { return carbonEstimateGas(chain, connector); } else if ('routerAbi' in connector) { diff --git a/src/chains/tezos/tezos.base.ts b/src/chains/tezos/tezos.base.ts index d896b217df..cff3ff4cc3 100644 --- a/src/chains/tezos/tezos.base.ts +++ b/src/chains/tezos/tezos.base.ts @@ -208,9 +208,6 @@ export class TezosBase { if (spender === 'plenty') { // plenty doesn't need an allowance return { value: constants.MaxUint256, decimals: tokenDecimals }; - } else if (spender === 'quipuswap') { - // quipuswap doesn't need an allowance - return { value: constants.MaxUint256, decimals: tokenDecimals }; } let value = BigNumber.from(0); diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index e03e551f0f..56d45c1da2 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -21,7 +21,6 @@ import { CurveConfig } from './curve/curveswap.config'; import { PlentyConfig } from './plenty/plenty.config'; import { XRPLCLOBConfig } from './xrpl/xrpl.clob.config'; import { KujiraConfig } from './kujira/kujira.config'; -import { QuipuswapConfig } from './quipuswap/quipuswap.config'; import { OsmosisConfig } from '../chains/osmosis/osmosis.config'; import { CarbonConfig } from './carbon/carbon.config'; import { BalancerConfig } from './balancer/balancer.config'; @@ -166,12 +165,6 @@ export namespace ConnectorsRoutes { 'Enter your kujira account number (input 0 if unsure) >>> ', }, }, - { - name: 'quipuswap', - trading_type: QuipuswapConfig.config.tradingTypes, - chain_type: QuipuswapConfig.config.chainType, - available_networks: QuipuswapConfig.config.availableNetworks, - }, { name: 'osmosis', trading_type: OsmosisConfig.config.tradingTypes('swap'), diff --git a/src/connectors/quipuswap/quipuswap.config.ts b/src/connectors/quipuswap/quipuswap.config.ts deleted file mode 100644 index aa7fb5f3a7..0000000000 --- a/src/connectors/quipuswap/quipuswap.config.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ConfigManagerV2 } from '../../services/config-manager-v2'; -import { AvailableNetworks } from '../../services/config-manager-types'; - -export namespace QuipuswapConfig { - export interface NetworkConfig { - allowedSlippage: string; - gasLimitEstimate: number; - apiUrl: (network: string) => string; - tradingTypes: Array; - availableNetworks: Array; - chainType: string; - } - - export const config: NetworkConfig = { - allowedSlippage: ConfigManagerV2.getInstance().get( - 'quipuswap.allowedSlippage' - ), - gasLimitEstimate: ConfigManagerV2.getInstance().get( - 'quipuswap.gasLimitEstimate' - ), - apiUrl: (network: string) => - ConfigManagerV2.getInstance().get( - 'quipuswap.network.' + network + '.apiUrl' - ), - tradingTypes: ['AMM'], - chainType: 'TEZOS', - availableNetworks: [ - { chain: 'tezos', networks: ['mainnet'] }, - ], - }; -} diff --git a/src/connectors/quipuswap/quipuswap.controllers.ts b/src/connectors/quipuswap/quipuswap.controllers.ts deleted file mode 100644 index ef534acbd2..0000000000 --- a/src/connectors/quipuswap/quipuswap.controllers.ts +++ /dev/null @@ -1,310 +0,0 @@ -import Decimal from 'decimal.js-light'; -import BigNumber from "bignumber.js"; -import { - HttpException, - LOAD_WALLET_ERROR_CODE, - LOAD_WALLET_ERROR_MESSAGE, - PRICE_FAILED_ERROR_CODE, - PRICE_FAILED_ERROR_MESSAGE, - TRADE_FAILED_ERROR_CODE, - TRADE_FAILED_ERROR_MESSAGE, - SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_CODE, - SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_MESSAGE, - SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_CODE, - SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_MESSAGE, - UNKNOWN_ERROR_ERROR_CODE, - UNKNOWN_ERROR_MESSAGE, - TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, - TOKEN_NOT_SUPPORTED_ERROR_CODE, -} from '../../services/error-handler'; -import { latency } from '../../services/base'; -import { Tezosish } from '../../services/common-interfaces'; -import { logger } from '../../services/logger'; -import { - EstimateGasResponse, - PriceRequest, - PriceResponse, - TradeRequest, - TradeResponse, -} from '../../amm/amm.requests'; -import { TezosToolkit } from '@taquito/taquito'; -import { OperationContentsAndResultTransaction } from '@taquito/rpc'; -import { QuipuSwap } from './quipuswap'; -import { Token, TradeInfo } from './utils/shared/types'; -import { Trade } from 'swap-router-sdk'; - - -async function estimateTradeGasCost( - tezosish: Tezosish, - quipuswap: QuipuSwap, - trade: Trade, - caller?: string -) { - let wallet: TezosToolkit; - try { - wallet = await tezosish.getWallet(caller, undefined, true); - } catch (err) { - logger.error(`Tezos: wallet ${caller} not available.`); - throw new HttpException( - 500, - LOAD_WALLET_ERROR_MESSAGE + err, - LOAD_WALLET_ERROR_CODE - ); - } - - const swapParams = await quipuswap.getSwapParams(wallet, trade); - const batchEstimate = await wallet.estimate.batch(swapParams); - - let gasCost = 0, gasLimitTransaction = 0; - batchEstimate.forEach(estimate => { - gasCost += estimate.totalCost; - gasLimitTransaction += estimate.gasLimit; - }); - const gasPrice = tezosish.gasPrice / 10 ** 6; - return { gasCost, gasLimitTransaction, gasPrice }; -} - -export function getQuipuTrade( - quipuswap: QuipuSwap, - req: PriceRequest -) { - const requestAmount = new BigNumber( - req.amount - ); - - let expectedTrade: TradeInfo; - let expectedAmount: BigNumber; - if (req.side === 'BUY') { - expectedTrade = quipuswap.estimateBuyTrade( - req.base, - req.quote, - requestAmount, - ); - expectedAmount = expectedTrade.inputAmount; - } else { - expectedTrade = quipuswap.estimateSellTrade( - req.base, - req.quote, - requestAmount, - req.allowedSlippage - ); - expectedAmount = expectedTrade.outputAmount; - } - - return { expectedTrade, expectedAmount }; -} - -export async function price( - tezosish: Tezosish, - quipuswap: QuipuSwap, - req: PriceRequest -): Promise { - const startTimestamp: number = Date.now(); - let expectedTrade: TradeInfo; - let expectedAmount: BigNumber; - try { - ({ expectedTrade, expectedAmount } = getQuipuTrade(quipuswap, req)); - } catch (e) { - if (e instanceof Error) { - throw new HttpException( - 500, - PRICE_FAILED_ERROR_MESSAGE + e.message, - PRICE_FAILED_ERROR_CODE - ); - } else { - throw new HttpException( - 500, - UNKNOWN_ERROR_MESSAGE, - UNKNOWN_ERROR_ERROR_CODE - ); - } - } - - const { gasCost, gasLimitTransaction, gasPrice } = await estimateTradeGasCost( - tezosish, - quipuswap, - expectedTrade.trade - ); - - const baseToken: Token = getFullTokenFromSymbol(quipuswap, req.base); - const quoteToken: Token = getFullTokenFromSymbol(quipuswap, req.quote); - - return { - network: tezosish.chain, - timestamp: startTimestamp, - latency: latency(startTimestamp, Date.now()), - base: baseToken.contractAddress, - quote: quoteToken.contractAddress, - amount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals), - rawAmount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals).replace('.', ''), - expectedAmount: new Decimal(expectedAmount.toString()).toFixed(quoteToken.metadata.decimals), - price: new Decimal(expectedTrade.price.toString()).toFixed(8), - gasPrice: gasPrice / 10 ** 6, - gasPriceToken: tezosish.nativeTokenSymbol, - gasLimit: gasLimitTransaction, - gasCost: new Decimal(gasCost).dividedBy(10 ** 6).toFixed(6), - }; -} - -export async function trade( - tezosish: Tezosish, - quipuswap: QuipuSwap, - req: TradeRequest -): Promise { - const startTimestamp: number = Date.now(); - const limitPrice = req.limitPrice; - - let expectedTrade: TradeInfo; - let expectedAmount: BigNumber; - try { - ({ expectedTrade, expectedAmount } = getQuipuTrade(quipuswap, req)); - } catch (e) { - if (e instanceof Error) { - logger.error(`QuipuSwap: could not get trade info - ${e.message}`); - throw new HttpException( - 500, - TRADE_FAILED_ERROR_MESSAGE + e.message, - TRADE_FAILED_ERROR_CODE - ); - } else { - logger.error('QuipuSwap: unknown error trying to get trade info'); - throw new HttpException( - 500, - UNKNOWN_ERROR_MESSAGE, - UNKNOWN_ERROR_ERROR_CODE - ); - } - } - - const { gasCost, gasLimitTransaction, gasPrice } = await estimateTradeGasCost( - tezosish, - quipuswap, - expectedTrade.trade, - req.address - ); - - const baseToken = getFullTokenFromSymbol(quipuswap, req.base); - const quoteToken = getFullTokenFromSymbol(quipuswap, req.quote); - - if (req.side === 'BUY') { - const price = expectedTrade.price; - logger.info( - `Expected execution price is ${price.toString()}, ` + - `limit price is ${limitPrice}.` - ); - if ( - limitPrice && - price.gt(new BigNumber(limitPrice)) - ) { - logger.error('QuipuSwap: swap price exceeded limit price for buy trade'); - throw new HttpException( - 500, - SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_MESSAGE( - price.toString(), - limitPrice - ), - SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_CODE - ); - } - - const tx = await quipuswap.executeTrade(tezosish.provider, expectedTrade.trade); - - logger.info( - `Trade has been executed, txHash is ${tx.hash}, gasPrice is ${gasPrice}.` - ); - - return { - network: tezosish.chain, - timestamp: startTimestamp, - latency: latency(startTimestamp, Date.now()), - base: baseToken.contractAddress, - quote: quoteToken.contractAddress, - amount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals), - rawAmount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals).replace('.', ''), - expectedIn: new Decimal(expectedAmount.toString()).toFixed(quoteToken.metadata.decimals), - price: new Decimal(price.toString()).toSignificantDigits(8).toString(), - gasPrice: gasPrice / 10 ** 6, - gasPriceToken: tezosish.nativeTokenSymbol, - gasLimit: gasLimitTransaction, - gasCost: new Decimal(gasCost).dividedBy(10 ** 6).toFixed(6), - txHash: tx.hash, - nonce: parseInt((tx.operations[0] as OperationContentsAndResultTransaction).counter), - }; - } else { - const price = expectedTrade.price; - logger.info( - `Expected execution price is ${price.toString()}, ` + - `limit price is ${limitPrice}.` - ); - if ( - limitPrice && - price.lt(new BigNumber(limitPrice)) - ) { - logger.error('QuipuSwap: swap price lower than limit price for sell trade'); - throw new HttpException( - 500, - SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_MESSAGE( - price, - limitPrice - ), - SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_CODE - ); - } - - const tx = await quipuswap.executeTrade(tezosish.provider, expectedTrade.trade); - - logger.info( - `Trade has been executed, txHash is ${tx.hash}, gasPrice is ${gasPrice}.` - ); - - return { - network: tezosish.chain, - timestamp: startTimestamp, - latency: latency(startTimestamp, Date.now()), - base: baseToken.contractAddress, - quote: quoteToken.contractAddress, - amount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals), - rawAmount: new Decimal(req.amount).toFixed(baseToken.metadata.decimals).replace('.', ''), - expectedOut: new Decimal(expectedAmount.toString()).toFixed(quoteToken.metadata.decimals), - price: new Decimal(price.toString()).toSignificantDigits(8).toString(), - gasPrice: gasPrice / 10 ** 6, - gasPriceToken: tezosish.nativeTokenSymbol, - gasLimit: gasLimitTransaction, - gasCost: new Decimal(gasCost).dividedBy(10 ** 6).toFixed(6), - txHash: tx.hash, - nonce: parseInt((tx.operations[0] as OperationContentsAndResultTransaction).counter), - }; - } -} - -export function getFullTokenFromSymbol( - quipuswap: QuipuSwap, - tokenSymbol: string -): Token { - try { - return quipuswap.getTokenFromSymbol(tokenSymbol) as Token; - } catch { - throw new HttpException( - 500, - TOKEN_NOT_SUPPORTED_ERROR_MESSAGE + tokenSymbol, - TOKEN_NOT_SUPPORTED_ERROR_CODE - ); - } -} - -export function estimateGas( - tezosish: Tezosish, - quipuswap: QuipuSwap -): EstimateGasResponse { - const gasPrice: number = tezosish.gasPrice / 10 ** 6; - const gasLimitTransaction: number = tezosish.gasLimitTransaction; - const gasLimitEstimate: number = quipuswap.gasLimitEstimate; - return { - network: tezosish.chain, - timestamp: Date.now(), - gasPrice, - gasPriceToken: tezosish.nativeTokenSymbol, - gasLimit: gasLimitTransaction, - gasCost: new BigNumber(Math.ceil(gasPrice * gasLimitEstimate)).dividedBy(10 ** 6).toFixed(6), - }; -} diff --git a/src/connectors/quipuswap/quipuswap.ts b/src/connectors/quipuswap/quipuswap.ts deleted file mode 100644 index e3d3bd28e1..0000000000 --- a/src/connectors/quipuswap/quipuswap.ts +++ /dev/null @@ -1,121 +0,0 @@ -import BigNumber from "bignumber.js"; -import { isFractionString } from '../../services/validators'; -import { UniswapishPriceError } from '../../services/error-handler'; -import { QuipuBase } from "./utils/base"; -import { QuipuswapConfig } from "./quipuswap.config"; -import { SupportedNetwork, TradeInfo } from "./utils/shared/types"; -import { Trade } from "swap-router-sdk"; -import { ExecutedTrade } from "../plenty/plenty.types"; -import { TezosToolkit } from "@taquito/taquito"; - - -export class QuipuSwap extends QuipuBase { - private static _instances: { [name: string]: QuipuSwap }; - private _gasLimitEstimate: number; - - constructor(network: SupportedNetwork) { - const config = QuipuswapConfig.config; - super(config.apiUrl(network), network); - this._gasLimitEstimate = config.gasLimitEstimate; - } - - public static getInstance(network: string): QuipuSwap { - if (QuipuSwap._instances === undefined) { - QuipuSwap._instances = {}; - } - if (!(network in QuipuSwap._instances)) { - QuipuSwap._instances[network] = new QuipuSwap(network as SupportedNetwork); - } - - return QuipuSwap._instances[network]; - } - - /** - * Default gas limit used to estimate gasCost for swap transactions. - */ - public get gasLimitEstimate(): number { - return this._gasLimitEstimate; - } - - /** - * Gets the allowed slippage percent from the optional parameter or the value - * in the configuration. - * - * @param allowedSlippageStr (Optional) should be of the form '1/10'. - */ - public getAllowedSlippage(allowedSlippageStr?: string): BigNumber { - if (allowedSlippageStr !== undefined && isFractionString(allowedSlippageStr)) { - const fractionSplit = allowedSlippageStr.split('/'); - const numerator = BigNumber(fractionSplit[0]); - const denominator = BigNumber(fractionSplit[1]); - if (fractionSplit[0] !== '0') - return numerator.multipliedBy(100).dividedBy(denominator); - } - const fractionSplit = QuipuswapConfig.config.allowedSlippage.split('/'); - const numerator = BigNumber(fractionSplit[0]); - const denominator = BigNumber(fractionSplit[1]); - return BigNumber(numerator.multipliedBy(100).dividedBy(denominator)); - } - - /** - * Given the amount of `baseToken` to put into a transaction, calculate the - * amount of `quoteToken` that can be expected from the transaction. - * - * This is typically used for calculating token sell prices. - * - * @param baseToken Token input for the transaction - * @param quoteToken Output from the transaction - * @param amount Amount of `baseToken` to put into the transaction - * @param allowedSlippage (Optional) should be of the form '1/10'. - */ - public estimateSellTrade( - baseToken: string, - quoteToken: string, - amount: BigNumber, - allowedSlippage?: string - ): TradeInfo { - const allowedSlippageBig = this.getAllowedSlippage(allowedSlippage); - return this.getSellingInfo(baseToken, quoteToken, amount, allowedSlippageBig); - } - - /** - * Given the amount of `baseToken` desired to acquire from a transaction, - * calculate the amount of `quoteToken` needed for the transaction. - * - * This is typically used for calculating token buy prices. - * - * @param baseToken Token output from the transaction - * @param quoteToken Token input for the transaction - * @param amount Amount of `baseToken` desired from the transaction - */ - public estimateBuyTrade( - baseToken: string, - quoteToken: string, - amount: BigNumber, - ): TradeInfo { - return this.getBuyingInfo(baseToken, quoteToken, amount); - } - - /** - * Given a wallet and a Uniswap-ish trade, try to execute it on blockchain. - * - * @param wallet TezosToolkit instance - * @param trade Expected trade - */ - async executeTrade( - wallet: TezosToolkit, - trade: Trade, - ): Promise { - const paramsWithKind = await this.getSwapParams(wallet, trade); - const batchOp = await wallet.contract.batch(paramsWithKind).send(); - const status = batchOp.status; - if (status === "applied") { - return { - hash: batchOp.hash, - operations: batchOp.results - }; - } else { - throw new UniswapishPriceError('QuipuSwap: trade failed' + status); - } - } -} diff --git a/src/connectors/quipuswap/utils/api.ts b/src/connectors/quipuswap/utils/api.ts deleted file mode 100644 index 51aa5a6e65..0000000000 --- a/src/connectors/quipuswap/utils/api.ts +++ /dev/null @@ -1,132 +0,0 @@ -import BigNumber from "bignumber.js"; -import { ResponseInterface } from 'swap-router-sdk/dist/interface/response.interface'; -import { RoutePair } from "swap-router-sdk/dist/interface/route-pair.interface"; -import { Optional, SupportedNetwork, Token } from "./shared/types"; -import { getTokenSlug, getUniqArray, isExist, isMainnet } from "./shared/helpers"; -import { KNOWN_DEX_TYPES, TEZ_TOKEN_MAINNET_WHITELISTED_POOLS_ADDRESSES, TOKEN_TOKEN_MAINNET_WHITELISTED_POOLS, networkTokens } from "./config/config"; -import { extractTokensPools } from "./map.dex.pairs"; -import { ZERO_AMOUNT_BN } from "./config/constants"; -import { DexTypeEnum, RouteDirectionEnum } from "swap-router-sdk"; -import { mapBackendToken } from "./shared/backend.token.map"; -import { QUIPU_TOKEN, TEZOS_TOKEN, WTEZ_TOKEN } from "./config/tokens"; - - -const optionalStringToBigNumber = (value: Optional) => (isExist(value) ? new BigNumber(value) : undefined); - - -const getAllRouterPairs = (routePairsRes: ResponseInterface) => { - const allPairs = routePairsRes.routePairs.map(rawPair => ({ - ...rawPair, - dexId: optionalStringToBigNumber(rawPair.dexId), - dexType: rawPair.dexType, - aTokenPool: new BigNumber(rawPair.aTokenPool), - aTokenMultiplier: optionalStringToBigNumber(rawPair.aTokenMultiplier), - bTokenPool: new BigNumber(rawPair.bTokenPool), - bTokenMultiplier: optionalStringToBigNumber(rawPair.bTokenMultiplier), - cTokenPool: optionalStringToBigNumber(rawPair.cTokenPool), - cTokenMultiplier: optionalStringToBigNumber(rawPair.cTokenMultiplier), - dTokenPool: optionalStringToBigNumber(rawPair.dTokenPool), - dTokenMultiplier: optionalStringToBigNumber(rawPair.dTokenMultiplier), - initialA: optionalStringToBigNumber(rawPair.initialA), - futureA: optionalStringToBigNumber(rawPair.futureA), - fees: rawPair.fees && { - liquidityProvidersFee: optionalStringToBigNumber(rawPair.fees.liquidityProvidersFee), - stakersFee: optionalStringToBigNumber(rawPair.fees.stakersFee), - interfaceFee: optionalStringToBigNumber(rawPair.fees.interfaceFee), - devFee: optionalStringToBigNumber(rawPair.fees.devFee), - swapFee: optionalStringToBigNumber(rawPair.fees.swapFee), - auctionFee: optionalStringToBigNumber(rawPair.fees.auctionFee) - }, - liquidity: optionalStringToBigNumber(rawPair.liquidity), - sqrtPrice: optionalStringToBigNumber(rawPair.sqrtPrice), - curTickIndex: optionalStringToBigNumber(rawPair.curTickIndex), - curTickWitness: optionalStringToBigNumber(rawPair.curTickWitness), - ticks: - rawPair.ticks && - Object.fromEntries( - Object.entries(rawPair.ticks).map(([key, tick]) => [ - key, - { - prev: new BigNumber(tick.prev), - next: new BigNumber(tick.next), - sqrtPrice: new BigNumber(tick.sqrtPrice), - tickCumulativeOutside: new BigNumber(tick.tickCumulativeOutside), - liquidityNet: new BigNumber(tick.liquidityNet) - } - ]) - ), - lastCumulative: rawPair.lastCumulative && { - time: rawPair.lastCumulative.time, - tick: { - sum: new BigNumber(rawPair.lastCumulative.tick.sum), - blockStartValue: new BigNumber(rawPair.lastCumulative.tick.blockStartValue) - } - } - })); - - const filteredPairs = allPairs.filter( - pair => - !pair.aTokenPool.isZero() && - !pair.bTokenPool.isZero() && - (!pair.cTokenPool || !pair.cTokenPool.isZero()) && - (!pair.dTokenPool || !pair.dTokenPool.isZero()) - ); - - return filteredPairs; -}; - - -const tokensMap = (network: SupportedNetwork) => new Map( - networkTokens(network).tokens - .map((token): [string, Token] => { - const mappedToken = mapBackendToken(token); - - return [getTokenSlug(mappedToken), mappedToken]; - }) - .concat([ - [getTokenSlug(TEZOS_TOKEN), TEZOS_TOKEN], - [getTokenSlug(WTEZ_TOKEN(network)), WTEZ_TOKEN(network)], - [getTokenSlug(QUIPU_TOKEN(network)), QUIPU_TOKEN(network)] - ]) -); - - -export const getWhitelistedPairs = (routePairsRes: ResponseInterface, network: SupportedNetwork) => { - const filteredPairs = getAllRouterPairs(routePairsRes); - const routePairs = filteredPairs.filter(routePair => KNOWN_DEX_TYPES.includes(routePair.dexType)); - - const whitelistedPairs = getUniqArray( - routePairs - .filter(pair => { - try { - extractTokensPools( - { - ...pair, - aTokenAmount: ZERO_AMOUNT_BN, - bTokenAmount: ZERO_AMOUNT_BN, - direction: RouteDirectionEnum.Direct - }, - tokensMap(network) - ); - - return ( - (pair.dexType !== DexTypeEnum.QuipuSwap && pair.dexType !== DexTypeEnum.QuipuSwapTokenToTokenDex) || - !isMainnet(network) || - TEZ_TOKEN_MAINNET_WHITELISTED_POOLS_ADDRESSES.includes(pair.dexAddress) || - TOKEN_TOKEN_MAINNET_WHITELISTED_POOLS.some( - ({ address, id }) => pair.dexId?.eq(id) && pair.dexAddress === address - ) - ); - } catch { - return false; - } - }) - .map(({ dexType, dexAddress, dexId }) => ({ dexType, dexAddress, dexId })), - ({ dexAddress, dexId }) => getTokenSlug({ contractAddress: dexAddress, fa2TokenId: dexId?.toNumber() }) - ); - - return { - routePairs, - whitelistedPairs - }; -}; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/base.ts b/src/connectors/quipuswap/utils/base.ts deleted file mode 100644 index 7c829d0ddd..0000000000 --- a/src/connectors/quipuswap/utils/base.ts +++ /dev/null @@ -1,198 +0,0 @@ -import ws from 'ws'; -import { BigNumber } from 'bignumber.js'; -import { ParamsWithKind, TezosToolkit } from '@taquito/taquito'; -import { getTokens, toAtomic, toReal } from './shared/helpers'; -import { QSNetwork, SupportedNetwork } from './shared/types'; -import { STABLESWAP_REFERRAL, networkInfo } from './config/config'; -import { QUIPUSWAP_REFERRAL_CODE } from './config/constants'; -import { SwapPair } from './shared/types'; -import { getWhitelistedPairs } from './api'; -import { getRoutePairsCombinations } from './swap.router.sdk.adapters'; -import { Trade, getBestTradeExactInput, getBestTradeExactOutput, getTradeInputAmount, getTradeOpParams, getTradeOutputAmount, parseTransferParamsToParamsWithKind } from 'swap-router-sdk'; -import { ResponseInterface } from 'swap-router-sdk/dist/interface/response.interface'; -import { RoutePair } from 'swap-router-sdk/dist/interface/route-pair.interface'; -import { WhitelistedPair } from 'swap-router-sdk/dist/interface/whitelisted-pair.interface'; -import { calculateTradeExactInput, calculateTradeExactOutput } from './trade'; - - -export class QuipuBase { - private readonly _network: QSNetwork; - private _api: ws.WebSocket; - private _routePairs: RoutePair[] = []; - private _whitelistedPairs: WhitelistedPair[] = []; - private _ready: boolean = false; - private initialized: Promise = Promise.resolve(false); - - - constructor(apiUrl: string, network: SupportedNetwork) { - this._network = networkInfo(network); - this._api = new ws(apiUrl); - - this.initialized = new Promise((resolve, reject) => { - this._api.onmessage = (event: ws.MessageEvent) => { - this.parseMessage(event.data.toString()); - this._ready = true; - if (this._routePairs.length > 0) - resolve(true); - }; - this._api.onerror = (error: ws.ErrorEvent) => { - this._ready = false; - reject(error); - }; - this._api.onclose = () => { - this._ready = false; - resolve(false); - } - }); - } - - - public ready = (): boolean => { - return this._ready; - } - - - public init = async () => { - return await this.initialized; - }; - - - public getTokenFromSymbol = (symbol: string) => { - const tokens = getTokens(this._network); - const token = tokens.find(token => token.metadata.symbol === symbol); - if (!token) { - throw new Error(`Token: ${symbol} not found`); - } - return token; - } - - - private parseMessage = (message: string) => { - const rawResponse: ResponseInterface = JSON.parse(message); - const { routePairs, whitelistedPairs } = getWhitelistedPairs(rawResponse, this._network.id); - this._routePairs = routePairs; - this._whitelistedPairs = whitelistedPairs; - }; - - - private getOutputTrade = ( - inputAmount: BigNumber, - swapPair: SwapPair - ) => { - const routePairsCombinations = getRoutePairsCombinations(swapPair, this._routePairs, this._whitelistedPairs); - const atomic = toAtomic(inputAmount, swapPair.inputToken); - const bestTradeExact = getBestTradeExactInput(atomic, routePairsCombinations); - const atomicOutputAmount = getTradeOutputAmount(bestTradeExact); - return { - outputAmount: toReal(atomicOutputAmount ?? BigNumber(0), swapPair.outputToken), - trade: bestTradeExact, - }; - }; - - - private getInputTrade = ( - outputAmount: BigNumber, - swapPair: SwapPair - ) => { - const routePairsCombinations = getRoutePairsCombinations(swapPair, this._routePairs, this._whitelistedPairs); - const atomic = toAtomic(outputAmount, swapPair.outputToken); - const bestTradeExact = getBestTradeExactOutput(atomic, routePairsCombinations); - const atomicInputAmount = getTradeInputAmount(bestTradeExact); - return { - inputAmount: toReal(atomicInputAmount ?? BigNumber(0), swapPair.inputToken), - trade: bestTradeExact - }; - }; - - - protected getSellingInfo = (inputTokenSymbol: string, outputTokenSymbol: string, inputAmount: BigNumber, slippageTolerance: BigNumber) => { - const inputToken = this.getTokenFromSymbol(inputTokenSymbol); - const outputToken = this.getTokenFromSymbol(outputTokenSymbol); - - const swapPair: SwapPair = { inputToken, outputToken }; - const { outputAmount, trade } = this.getOutputTrade(inputAmount, swapPair); - - if (!trade) { - throw new Error('No trade found'); - } - - const bestTradeWithSlippageTolerance = calculateTradeExactInput( - toAtomic(inputAmount, inputToken), - trade, - slippageTolerance.toNumber() - ); - - const lastBestTrade = bestTradeWithSlippageTolerance[bestTradeWithSlippageTolerance.length - 1]; - const outputTokenDecimalPower = BigNumber(10).pow(outputToken.metadata.decimals); - const outputAmountWithSlippage = BigNumber(lastBestTrade.bTokenAmount).div(outputTokenDecimalPower); - - return { - trade: bestTradeWithSlippageTolerance, - inputToken: inputToken, - inputAmount: inputAmount, - outputToken: outputToken, - outputAmount: outputAmountWithSlippage, - price: outputAmount.div(inputAmount), - }; - }; - - - protected getBuyingInfo = (outputTokenSymbol: string, inputTokenSymbol: string, outputAmount: BigNumber) => { - const inputToken = this.getTokenFromSymbol(inputTokenSymbol); - const outputToken = this.getTokenFromSymbol(outputTokenSymbol); - - const swapPair: SwapPair = { inputToken, outputToken }; - const { inputAmount, trade } = this.getInputTrade(outputAmount, swapPair); - - if (!trade) { - throw new Error('No trade found'); - } - - const bestTradeWithSlippageTolerance = calculateTradeExactOutput( - toAtomic(outputAmount, outputToken), - trade - ); - - const firstBestTrade = bestTradeWithSlippageTolerance[0]; - const inputTokenDecimalPower = BigNumber(10).pow(inputToken.metadata.decimals); - const inputAmountWithSlippage = BigNumber(firstBestTrade.aTokenAmount).div(inputTokenDecimalPower); - - return { - trade: bestTradeWithSlippageTolerance, - inputToken: inputToken, - inputAmount: inputAmountWithSlippage, - outputToken: outputToken, - outputAmount: outputAmount, - price: inputAmount.div(outputAmount), - }; - }; - - - public getSwapParams = async ( - tezos: TezosToolkit, - trade: Trade - ) => { - const accountPkh = await tezos.signer.publicKeyHash(); - - type TTK = Parameters[2]; - const tradeTransferParams = await getTradeOpParams( - trade, - accountPkh, - tezos as unknown as TTK, - STABLESWAP_REFERRAL, - accountPkh, - QUIPUSWAP_REFERRAL_CODE.toNumber() - ); - - const walletParamsWithKind = tradeTransferParams.map(tradeTransferParam => - parseTransferParamsToParamsWithKind(tradeTransferParam) as ParamsWithKind - ); - - return walletParamsWithKind; - }; - - - public close = () => { - this._api.close(); - }; -} \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/calculus.ts b/src/connectors/quipuswap/utils/calculus.ts deleted file mode 100644 index 11c7e3451e..0000000000 --- a/src/connectors/quipuswap/utils/calculus.ts +++ /dev/null @@ -1,467 +0,0 @@ - -import { BigNumber } from "bignumber.js"; -import { DexFees } from "swap-router-sdk/dist/interface/dex-fees.interface"; -import { aPrecision, calculateYCache, getDCache, precision } from "./config/constants"; -import assert from "assert"; -import { DexTimestampError, DexWrongIndexError, DexWrongPrecisionError, TooBigPriceChangeErr, assertNonNegative } from "./shared/errors"; -import { dateToSeconds, mockTezosNow } from "./shared/helpers"; -import { TradeOperation } from "swap-router-sdk"; -import { sqrtPriceForTick, calcSwapFee, calcNewPriceX, shiftRight, shiftLeft, calcNewPriceY } from 'quipuswap-v3-sdk/dist/helpers/math' -import { Int, Nat, quipuswapV3Types } from "quipuswap-v3-sdk/dist/types"; - -type P = { - x: BigNumber, - y: BigNumber, - dx: BigNumber, - dy: BigNumber, - u: BigNumber, - n: number -}; - -type SwapRequiredTickState = { - prev: BigNumber; - next: BigNumber; - sqrtPrice: BigNumber; - tickCumulativeOutside: BigNumber; - liquidityNet: BigNumber; -}; - -type SwapRequiredConstants = Pick; - -interface TickCumulative { - sum: BigNumber; - blockStartValue: BigNumber; -} - -interface SwapRequiredCumulative { - time: string; - tick: TickCumulative; -} - -interface SwapRequiredStorage { - liquidity: Nat; - sqrtPrice: Nat; - curTickIndex: Nat; - curTickWitness: Nat; - ticks: Record; - constants: SwapRequiredConstants; - lastCumulative: SwapRequiredCumulative; -} - -interface XToYRecParam { - s: SwapRequiredStorage; - dx: Nat; - dy: Nat; -} - -type YToXRecParam = XToYRecParam; - -const HUNDRED_PERCENT_BPS = 10000; - - -export const util = (x: BigNumber, y: BigNumber) => { - const plus = x.plus(y); - const minus = x.minus(y); - return [plus.exponentiatedBy(8).minus(minus.exponentiatedBy(8)), minus.exponentiatedBy(7).plus(plus.exponentiatedBy(7)).multipliedBy(8)]; -}; - -export const newton = (p: P): BigNumber => { - if (p.n === 0) return p.dy; else { - const _util = util(p.x.plus(p.dx), p.y.minus(p.dy)), - new_u = _util[0], - new_du_dy = _util[1]; // new_u - p.u > 0 because dy remains an underestimate - // dy is an underestimate because we start at 0 and the utility curve is convex - - p.dy = p.dy.plus(new_u.minus(p.u).dividedBy(new_du_dy)); - p.n -= 1; - return newton(p); - } -}; - -type Pool = { - initialA?: BigNumber, - initialATime?: string, - futureA?: BigNumber, - futureATime?: string, - tokensInfo: { - rate?: BigNumber; - reserves: BigNumber; - }[], - fee?: DexFees -}; - -export const ediv = (a: BigNumber, b: BigNumber) => { - let _b$s; - - return a.div(b.abs()).integerValue(BigNumber.ROUND_FLOOR).times((_b$s = b.s) != null ? _b$s : 1); -}; - -const getXp = (_ref: Pool) => { - const tokensInfo = _ref.tokensInfo; - return tokensInfo.map((tokenInfo) => { - return ediv(tokenInfo.rate!.times(tokenInfo.reserves), precision); - }); -}; - -const getA = (t0: Date, a0: BigNumber, t1: Date, a1: BigNumber) => { - const now = mockTezosNow(); - - if (now >= dateToSeconds(t1)) { - return a1; - } - - const tNum = assertNonNegative(now - dateToSeconds(t0), new DexTimestampError("t0=" + t0.toISOString() + " is in the future")); - const tDen = assertNonNegative(dateToSeconds(t1) - dateToSeconds(t0), new DexTimestampError("t1=" + t1.toISOString() + " is before t0=" + t0.toISOString())); - const diff = a1.minus(a0).abs(); - const value = ediv(diff.times(tNum), tDen); - return a1.gt(a0) ? a0.plus(value) : a0.minus(value).abs(); // always a0 > (a0-a1) * (now-t0)/(t1-t0) if t1 > now && a0 > a1 -}; - -const getD = (xp: BigNumber[], ampF: BigNumber): BigNumber => { - const cacheKey = xp.map((x) => { - return x.toFixed(); - }).join(',') + "," + ampF.toFixed(); - - if (getDCache.has(cacheKey)) { - return getDCache.get(cacheKey); - } - - const sumC = xp.reduce((acc, value) => { - return acc.plus(value); - }, new BigNumber(0)); - const tokensCount = xp.length; - const aNnF = ampF.times(tokensCount); - let d = sumC; - let prevD = new BigNumber(0); - - const _loop = () => { - const dConst = d; - const counted = xp.reduce((accum, value) => { - return [accum[0].times(dConst), accum[1].times(value.times(tokensCount))]; - }, [d, new BigNumber(1)]); - const dP = ediv(counted[0], counted[1]); - prevD = d; - d = ediv(ediv(aNnF.times(sumC), aPrecision).plus(dP.times(tokensCount)).times(d), ediv(assertNonNegative(aNnF.minus(aPrecision), new DexWrongPrecisionError('One of tokens has a wrong precision')).times(d), aPrecision).plus(new BigNumber(tokensCount).plus(1).times(dP))); // Equality with the precision of 1 - }; - - while (d.minus(prevD).abs().gt(1)) { - _loop(); - } - - getDCache.set(cacheKey, d); - return d; -}; - -const calculateY = (c: BigNumber, aNnF: BigNumber, s_: BigNumber, d: BigNumber, tokensCount: number) => { - const cacheKey = "" + [c, aNnF, s_, d, tokensCount].map((x) => { - return x.toFixed(); - }).join(','); - - if (calculateYCache.has(cacheKey)) { - return calculateYCache.get(cacheKey); - } - - c = c.times(d).times(aPrecision).div(aNnF.times(tokensCount)).integerValue(BigNumber.ROUND_CEIL); - const b = s_.plus(ediv(d.times(aPrecision), aNnF)); - let y = d; - let prevY = new BigNumber(0); - - while (y.minus(prevY).abs().gt(1)) { - prevY = y; - y = y.pow(2).plus(c).div(assertNonNegative(y.times(2).plus(b).minus(d))).integerValue(BigNumber.ROUND_CEIL); - } - - calculateYCache.set(cacheKey, y); - return y; -}; - -const getY = (i: number, j: number, x: BigNumber, xp: BigNumber[], s: Pool) => { - const tokensCount = s.tokensInfo.length; - assert(i !== j, 'Both tokens are same'); - const ampF = getA(new Date(s.initialATime!), s.initialA!, new Date(s.futureATime!), s.futureA!); - const aNnF = ampF.times(tokensCount); - const d = getD(xp, ampF); - - const prepareParams = (accum: { s_: BigNumber, c: BigNumber[] }, value: BigNumber, iter: number) => { - if (iter !== j) { - const _x = iter === i ? x : value; - - accum.s_ = accum.s_.plus(_x); - accum.c[0] = accum.c[0].times(d); - accum.c[1] = accum.c[1].times(_x.times(tokensCount)); - } - - return accum; - }; - - const res = xp.reduce(prepareParams, { - s_: new BigNumber(0), - c: [d, new BigNumber(1)] - }); - const c = res.c[0].div(res.c[1]).integerValue(BigNumber.ROUND_CEIL); - return calculateY(c, aNnF, res.s_, d, s.tokensInfo.length); -}; - -export const performSwap = (i: number, j: number, dx: BigNumber, pool: Pool) => { - const xp = getXp(pool); - const xpI = xp[i]; - const xpJ = xp[j]; - const tI = pool.tokensInfo[i]; - const tJ = pool.tokensInfo[j]; - assert(xpI && tI, new DexWrongIndexError(i)); - assert(xpJ && tJ, new DexWrongIndexError(j)); - const rateIF = tI.rate!; - const rateJF = tJ.rate!; - const x = xpI.plus(ediv(dx.times(rateIF), precision)); - const y = getY(i, j, x, xp, pool); - const dy = assertNonNegative(xpJ.minus(y)); - return ediv(dy.times(precision), rateJF); -}; - -export const sumAllFees = (fees: DexFees) => { - return Object.values(fees).reduce((sum, value) => { - return sum.plus(value != null ? value : 0); - }, new Nat(0)); -}; - -export const makeSwapRequiredStorage = (pair: TradeOperation) => { - const liquidity = new Nat(pair.liquidity!.toString()), - sqrtPrice = new Nat(pair.sqrtPrice!.toString()), - curTickIndex = new Nat(pair.curTickIndex!.toString()), - curTickWitness = new Nat(pair.curTickWitness!.toString()), - ticks = pair.ticks, - lastCumulative = pair.lastCumulative as SwapRequiredCumulative, - fees = pair.fees; - return { - liquidity: liquidity, - sqrtPrice: sqrtPrice, - curTickIndex: curTickIndex, - curTickWitness: curTickWitness, - lastCumulative: lastCumulative, - ticks: ticks!, - constants: { - feeBps: fees == null ? new Nat(0) : new Nat(fees.liquidityProvidersFee!.toString()) - }, - }; -}; - -const floorLogHalfBps = (x: Nat, y: Nat, outOfBoundsError: Error) => { - const tenx = x.multipliedBy(10); - - if (tenx.isLessThan(y.multipliedBy(7)) || tenx.isGreaterThan(y.multipliedBy(15))) { - throw outOfBoundsError; - } - - const xPlusY = x.plus(y); - const num = x.toBignumber().minus(y).multipliedBy(60003).multipliedBy(xPlusY); - const denom = xPlusY.multipliedBy(xPlusY).plus(x.multipliedBy(2).multipliedBy(y)); - return num.dividedToIntegerBy(denom); -} - -const fixCurTickIndexRec = ( - curTickIndexNew: Int, - curIndexSqrtPrice: Nat, - sqrtPriceNew: Nat -): Int => { - if (sqrtPriceNew.isLessThan(curIndexSqrtPrice)) { - const prevTickIndex = curTickIndexNew.minus(1); - const prevIndexSqrtPrice = sqrtPriceForTick(prevTickIndex); - - return fixCurTickIndexRec(prevTickIndex, prevIndexSqrtPrice, sqrtPriceNew); - } else { - const nextTickIndex = curTickIndexNew.plus(1); - const nextIndexSqrtPrice = sqrtPriceForTick(nextTickIndex); - - if (nextIndexSqrtPrice.isLessThanOrEqualTo(sqrtPriceNew)) { - return fixCurTickIndexRec(nextTickIndex, nextIndexSqrtPrice, sqrtPriceNew); - } else { - return curTickIndexNew; - } - } -} - -const fixCurTickIndex = (curTickIndex: Int, sqrtPriceNew: Nat) => { - return fixCurTickIndexRec(curTickIndex, sqrtPriceForTick(curTickIndex), sqrtPriceNew); -} - -const calcNewCurTickIndex = (curTickIndex: Int, sqrtPriceOld: Nat, sqrtPriceNew: Nat) => { - const curTickIndexDelta = floorLogHalfBps( - sqrtPriceNew, - sqrtPriceOld, - new TooBigPriceChangeErr() - ); - - const curTickIndexNew = curTickIndex.plus(curTickIndexDelta); - - return fixCurTickIndex(curTickIndexNew, sqrtPriceNew); -} - -const oneMinusFeeBps = (feeBps: Nat) => { - return new Nat(HUNDRED_PERCENT_BPS).minus(feeBps); -} - -const xToYRec = (p: XToYRecParam): XToYRecParam => { - if (p.s.liquidity.isZero()) { - return p; - } - - let totalFee = calcSwapFee(p.s.constants.feeBps, p.dx.toBignumber()); - let sqrtPriceNew = calcNewPriceX(p.s.sqrtPrice as quipuswapV3Types.x80n, p.s.liquidity, p.dx.minus(totalFee)); - const curTickIndexNew = calcNewCurTickIndex(p.s.curTickIndex as Int, p.s.sqrtPrice, sqrtPriceNew); - if (curTickIndexNew.gte(p.s.curTickWitness)) { - const dy = shiftRight( - p.s.sqrtPrice.toBignumber().minus(sqrtPriceNew).multipliedBy(p.s.liquidity), - new BigNumber(80) - ).integerValue(BigNumber.ROUND_FLOOR); - const newStorage = { - ...p.s, - sqrtPrice: sqrtPriceNew, - curTickIndex: curTickIndexNew - }; - - return { - s: newStorage, - dx: new Nat(0), - dy: p.dy.plus(dy) - }; - } - const tick = p.s.ticks[p.s.curTickWitness.toFixed()]; - const loNew = tick.prev; - sqrtPriceNew = new quipuswapV3Types.x80n(tick.sqrtPrice.minus(1)); - const dy = shiftRight( - p.s.sqrtPrice.minus(sqrtPriceNew).multipliedBy(p.s.liquidity), - new BigNumber(80) - ).integerValue(BigNumber.ROUND_FLOOR); - const dxForDy = shiftLeft(dy, new BigNumber(160)) - .dividedBy(p.s.sqrtPrice.multipliedBy(sqrtPriceNew)) - .integerValue(BigNumber.ROUND_CEIL); - const dxConsumed = dxForDy - .multipliedBy(HUNDRED_PERCENT_BPS) - .dividedBy(oneMinusFeeBps(p.s.constants.feeBps)) - .integerValue(BigNumber.ROUND_CEIL); - totalFee = dxConsumed.minus(dxForDy); - const sums = p.s.lastCumulative; - const tickCumulativeOutsideNew = sums.tick.sum.minus(tick.tickCumulativeOutside); - const tickNew = { - ...tick, - tickCumulativeOutside: tickCumulativeOutsideNew - }; - const ticksNew: Record = { - ...p.s.ticks, - [p.s.curTickWitness.toFixed()]: tickNew - }; - const storageNew = { - ...p.s, - curTickWitness: new Nat(loNew.toString()), - sqrtPrice: sqrtPriceNew, - curTickIndex: curTickIndexNew.minus(1), - ticks: ticksNew, - liquidity: p.s.liquidity.minus(tick.liquidityNet) - }; - const paramNew = { - s: storageNew, - dx: p.dx.minus(dxConsumed), - dy: p.dy.plus(dy) - }; - - return xToYRec(paramNew); -} - -export const calculateXToY = (s: SwapRequiredStorage, dx: Nat) => { - const r = xToYRec({ s, dx, dy: new Nat(0) }); - - return { - output: r.dy, - inputLeft: r.dx, - newStoragePart: r.s - }; -} - -export const yToXRec = (p: YToXRecParam): YToXRecParam => { - if (p.s.liquidity.isZero()) { - return p; - } - - let totalFee = calcSwapFee(p.s.constants.feeBps.toBignumber(), p.dy.toBignumber()); - let dyMinusFee = p.dy.minus(totalFee); - let sqrtPriceNew = calcNewPriceY(p.s.sqrtPrice, p.s.liquidity, dyMinusFee); - const curTickIndexNew = calcNewCurTickIndex(p.s.curTickIndex, p.s.sqrtPrice, sqrtPriceNew); - const tick = p.s.ticks[p.s.curTickWitness.toFixed()]; - const nextTickIndex = tick.next; - if (curTickIndexNew.lt(nextTickIndex)) { - const dx = p.s.liquidity - .toBignumber() - .multipliedBy(shiftLeft(sqrtPriceNew.toBignumber().minus(p.s.sqrtPrice), new BigNumber(80))) - .dividedBy(sqrtPriceNew.multipliedBy(p.s.sqrtPrice)) - .integerValue(BigNumber.ROUND_FLOOR); - const sNew = { - ...p.s, - sqrtPrice: new quipuswapV3Types.x80n(sqrtPriceNew), - curTickIndex: curTickIndexNew - }; - - return { s: sNew, dy: new Nat(0), dx: p.dx.plus(dx) }; - } - - const nextTick = p.s.ticks[nextTickIndex.toFixed()]; - sqrtPriceNew = new Nat(nextTick.sqrtPrice.toString()); - - const dx = new Nat( - p.s.liquidity - .toBignumber() - .multipliedBy(shiftLeft(sqrtPriceNew.toBignumber().minus(p.s.sqrtPrice), new BigNumber(80))) - .dividedBy(sqrtPriceNew.multipliedBy(p.s.sqrtPrice)) - .integerValue(BigNumber.ROUND_FLOOR) - ); - const _280 = new BigNumber(2).pow(80); - const dyForDx = new Nat( - p.s.liquidity - .toBignumber() - .multipliedBy(sqrtPriceNew.toBignumber().minus(p.s.sqrtPrice)) - .dividedBy(_280) - .integerValue(BigNumber.ROUND_CEIL) - ); - dyMinusFee = dyForDx; - const dyConsumed = dyMinusFee - .toBignumber() - .multipliedBy(HUNDRED_PERCENT_BPS) - .dividedBy(oneMinusFeeBps(p.s.constants.feeBps)) - .integerValue(BigNumber.ROUND_CEIL); - totalFee = dyConsumed.minus(dyForDx); - const sums = p.s.lastCumulative; - const tickCumulativeOutsideNew = sums.tick.sum.minus(nextTick.tickCumulativeOutside); - const nextTickNew = { - ...nextTick, - tickCumulativeOutside: tickCumulativeOutsideNew - }; - const ticksNew: Record = { - ...p.s.ticks, - [nextTickIndex.toFixed()]: nextTickNew - }; - const storageNew = { - ...p.s, - sqrtPrice: new quipuswapV3Types.x80n(sqrtPriceNew), - curTickWitness: new Nat(nextTickIndex.toString()), - curTickIndex: new Nat(nextTickIndex.toString()), - ticks: ticksNew, - liquidity: new Nat(p.s.liquidity.plus(nextTick.liquidityNet)) - }; - const paramNew = { - s: storageNew, - dy: p.dy.minus(dyConsumed), - dx: p.dx.plus(dx) - }; - - return yToXRec(paramNew); -} - - -export const calculateYToX = (s: SwapRequiredStorage, dy: Nat) => { - const r = yToXRec({ s, dy, dx: new Nat(0) }); - - return { - output: r.dx, - inputLeft: r.dy, - newStoragePart: r.s - }; -} diff --git a/src/connectors/quipuswap/utils/config/config.ts b/src/connectors/quipuswap/utils/config/config.ts deleted file mode 100644 index 2db9d86d15..0000000000 --- a/src/connectors/quipuswap/utils/config/config.ts +++ /dev/null @@ -1,78 +0,0 @@ -import GhostnetTokens from '../../../../templates/lists/tezos.ghostnet.tokens.json'; -import MainnetTokens from '../../../../templates/lists/tezos.mainnet.tokens.json'; -import { DexTypeEnum } from 'swap-router-sdk'; -import { ConnectType, QSNetwork, QSNetworkType, NetworkType, SupportedNetwork, Token } from '../shared/types'; -import { mapBackendToken } from '../shared/backend.token.map'; - -export const KNOWN_DEX_TYPES = [ - DexTypeEnum.QuipuSwap, - DexTypeEnum.QuipuSwapTokenToTokenDex, - DexTypeEnum.QuipuSwapCurveLike, - DexTypeEnum.QuipuSwap20, - DexTypeEnum.QuipuSwapV3, - DexTypeEnum.YupanaWtez -]; - -const tokenStandardiser = (token: typeof MainnetTokens.tokens[0]): Token => { - // token.symbol = token.symbol.toUpperCase(); - // return token; - return mapBackendToken({ - contractAddress: token.address ?? 'tez', - type: token.standard, - fa2TokenId: token.tokenId ?? undefined, - metadata: { - decimals: token.decimals, - name: token.name, - symbol: token.symbol.toUpperCase(), - } - }) -}; - -const TOKENS_MAP = { - [NetworkType.MAINNET]: { - ...MainnetTokens, - tokens: MainnetTokens.tokens.map(tokenStandardiser) - }, - [NetworkType.GHOSTNET]: { - ...GhostnetTokens, - tokens: GhostnetTokens.tokens.map(tokenStandardiser) - } -}; - -export const networkTokens = (network: SupportedNetwork) => TOKENS_MAP[network]; - -export const TEZ_TOKEN_MAINNET_WHITELISTED_POOLS_ADDRESSES = [ - 'KT1K4EwTpbvYN9agJdjpyJm4ZZdhpUNKB3F6', - 'KT1WxgZ1ZSfMgmsSDDcUn8Xn577HwnQ7e1Lb', - 'KT1PL1YciLdwMbydt21Ax85iZXXyGSrKT2BE', - 'KT1KFszq8UFCcWxnXuhZPUyHT9FK3gjmSKm6', - 'KT1Ucg1fTZXBD8P426rTRXyu7YQUgYXV7RVu', - 'KT1EtjRRCBC2exyCRXz8UfV7jz7svnkqi7di', - 'KT1X3zxdTzPB9DgVzA3ad6dgZe9JEamoaeRy' -]; - -export const TOKEN_TOKEN_MAINNET_WHITELISTED_POOLS = [{ address: 'KT1VNEzpf631BLsdPJjt2ZhgUitR392x6cSi', id: 21 }]; - -const MAINNET_NETWORK: QSNetwork = { - id: NetworkType.MAINNET as SupportedNetwork, - connectType: ConnectType.DEFAULT, - name: 'Mainnet', - type: QSNetworkType.MAIN, - disabled: false -}; - -const GHOSTNET_NETWORK: QSNetwork = { - ...MAINNET_NETWORK, - id: NetworkType.GHOSTNET as SupportedNetwork, - name: 'Ghostnet', - type: QSNetworkType.TEST -}; - -const networks = { - [NetworkType.MAINNET]: MAINNET_NETWORK, - [NetworkType.GHOSTNET]: GHOSTNET_NETWORK, -}; - -export const networkInfo = (network: SupportedNetwork) => networks[network]; - -export const STABLESWAP_REFERRAL = 'tz1Sw2mFAUzbkm7dkGCDrbeBsJTTtV7JD8Ey'; diff --git a/src/connectors/quipuswap/utils/config/constants.ts b/src/connectors/quipuswap/utils/config/constants.ts deleted file mode 100644 index 13f20dfb2b..0000000000 --- a/src/connectors/quipuswap/utils/config/constants.ts +++ /dev/null @@ -1,22 +0,0 @@ -import BigNumber from 'bignumber.js'; - -export const ZERO_AMOUNT = 0; -export const ZERO_AMOUNT_BN = new BigNumber(ZERO_AMOUNT); -export const MAX_HOPS_COUNT = 3; - -// Referal code -export const QUIPUSWAP_REFERRAL_CODE = new BigNumber(1); - -export const precision = new BigNumber(1e18); - -export const aPrecision = new BigNumber(100); - -export const getDCache = new Map(); - -export const calculateYCache = new Map(); - -export const feeDenominator = new BigNumber(10000000000); - -export const SWAP_RATIO_DENOMINATOR = new BigNumber('1000000000000000000'); - -export const SAVED_TOKENS_KEY = 'savedCustomTokens'; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/config/tokens.ts b/src/connectors/quipuswap/utils/config/tokens.ts deleted file mode 100644 index 236d43bd2a..0000000000 --- a/src/connectors/quipuswap/utils/config/tokens.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { NetworkType, Standard, SupportedNetwork, Token } from "../shared/types"; - -export const TEZOS_TOKEN: Token = { - type: Standard.Fa12, - contractAddress: 'tez', - metadata: { - decimals: 6, - name: 'Tezos', - symbol: 'XTZ', - } -}; - -export const MAINNET_QUIPU_TOKEN: Token = { - type: Standard.Fa2, - contractAddress: 'KT193D4vozYnhGJQVtw7CoxxqphqUEEwK6Vb', - fa2TokenId: 0, - metadata: { - decimals: 6, - symbol: 'QUIPU', - name: 'Quipuswap Governance Token', - } -}; - -const GHOSTNET_QUIPU_TOKEN: Token = { - ...MAINNET_QUIPU_TOKEN, - contractAddress: 'KT19363aZDTjeRyoDkSLZhCk62pS4xfvxo6c' -}; - -export const networksQuipuTokens = { - [NetworkType.MAINNET]: MAINNET_QUIPU_TOKEN, - [NetworkType.GHOSTNET]: GHOSTNET_QUIPU_TOKEN -}; - -export const MAINNET_WTEZ_TOKEN: Token = { - type: Standard.Fa2, - contractAddress: 'KT1UpeXdK6AJbX58GJ92pLZVCucn2DR8Nu4b', - fa2TokenId: 0, - metadata: { - decimals: 6, - symbol: 'wTEZ', - name: 'Wrapped Tezos FA2 token', - } -}; - -export const GHOSTNET_WTEZ_TOKEN: Token = { - ...MAINNET_WTEZ_TOKEN, - contractAddress: 'KT1L8ujeb25JWKa4yPB61ub4QG2NbaKfdJDK' -}; - -export const networksWtezTokens = { - [NetworkType.MAINNET]: MAINNET_WTEZ_TOKEN, - [NetworkType.GHOSTNET]: GHOSTNET_WTEZ_TOKEN -}; - -export const QUIPU_TOKEN = (network: SupportedNetwork) => networksQuipuTokens[network]; - -export const WTEZ_TOKEN = (network: SupportedNetwork) => networksWtezTokens[network]; diff --git a/src/connectors/quipuswap/utils/map.dex.pairs.ts b/src/connectors/quipuswap/utils/map.dex.pairs.ts deleted file mode 100644 index 824f58f96e..0000000000 --- a/src/connectors/quipuswap/utils/map.dex.pairs.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { TradeOperation } from "swap-router-sdk"; -import { TokensMap } from "./shared/types"; -import { swapRouterSdkTokenSlugToQuipuTokenSlug } from "./swap.router.sdk.adapters"; -import { isExist } from "./shared/helpers"; - - -const SECOND_TUPLE_INDEX = 1; -const SINGLE_TOKEN_VALUE = 1; - - -export const extractTokensPools = (operation: TradeOperation, knownTokens: TokensMap) => { - const { - aTokenSlug, - bTokenSlug, - cTokenSlug, - dTokenSlug, - aTokenPool, - bTokenPool, - cTokenPool, - dTokenPool, - aTokenStandard, - bTokenStandard, - cTokenStandard, - dTokenStandard - } = operation; - - const tokensAmounts = [aTokenPool, bTokenPool, cTokenPool, dTokenPool]; - const tokensStandards = [aTokenStandard, bTokenStandard, cTokenStandard, dTokenStandard]; - const tokensPools = [aTokenSlug, bTokenSlug, cTokenSlug, dTokenSlug] - .map((tokenSlug, index) => { - if (!tokenSlug) { - return null; - } - - const token = knownTokens.get(swapRouterSdkTokenSlugToQuipuTokenSlug(tokenSlug, tokensStandards[index])); - - if (!isExist(token)) { - throw new Error(`No Token Metadata of ${tokenSlug}`); - } - - return { token, pool: tokensAmounts[index]! }; - }) - .filter(isExist); - const [tokenBPool] = tokensPools.splice(SECOND_TUPLE_INDEX, SINGLE_TOKEN_VALUE); - tokensPools.push(tokenBPool); - - return tokensPools; -}; diff --git a/src/connectors/quipuswap/utils/shared/backend.token.map.ts b/src/connectors/quipuswap/utils/shared/backend.token.map.ts deleted file mode 100644 index 8739f0c481..0000000000 --- a/src/connectors/quipuswap/utils/shared/backend.token.map.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { RawToken, Standard, Token } from './types'; - -export const mapBackendToken = (raw: RawToken, newSymbol?: string): Token => ({ - ...raw, - fa2TokenId: raw.fa2TokenId === undefined ? undefined : Number(raw.fa2TokenId), - type: raw.type as Standard, - metadata: { - ...raw.metadata, - decimals: raw.metadata.decimals, - symbol: newSymbol ?? raw.metadata.symbol - } -}); \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/shared/errors.ts b/src/connectors/quipuswap/utils/shared/errors.ts deleted file mode 100644 index 9b68eeced6..0000000000 --- a/src/connectors/quipuswap/utils/shared/errors.ts +++ /dev/null @@ -1,42 +0,0 @@ -import BigNumber from "bignumber.js"; - -export class InvalidTokensListError extends Error { - constructor(json: unknown) { - super(`Invalid response for tokens list was received: ${JSON.stringify(json)}`); - } -} - -export class DexWrongIndexError extends Error { - constructor(index: number) { - super("There is no asset with index " + index + " in the pool"); - } -} - -export class MathNatError extends Error { - constructor(value: BigNumber) { - super("A non-negative value was expected but actual one is " + value.toFixed()); - } - -} - -export class DexTimestampError extends Error { } - -export class DexWrongPrecisionError extends Error { }; - -export class TooBigPriceChangeErr extends Error { }; - -export class DexFeeOverflowError extends Error { - constructor(output: BigNumber, fee: BigNumber) { - super("The possible output (" + output.toFixed() + ") is less than fee (" + fee.toFixed() + ")"); - } -} - -export const assertNonNegative = (rawValue: number | BigNumber, error?: Error) => { - const value = new BigNumber(rawValue); - - if (value.gte(0)) { - return value; - } - - throw error != null ? error : new MathNatError(value); -}; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/shared/helpers.ts b/src/connectors/quipuswap/utils/shared/helpers.ts deleted file mode 100644 index 444384e494..0000000000 --- a/src/connectors/quipuswap/utils/shared/helpers.ts +++ /dev/null @@ -1,94 +0,0 @@ -import BigNumber from "bignumber.js"; -import { NetworkType, Nullable, Optional, QSNetwork, Standard, SupportedNetwork, Token, TokenAddress, TokenId, TokenWithQSNetworkType, Undefined } from "./types"; -import { TEZOS_TOKEN, networksQuipuTokens } from "../config/tokens"; -import { mapBackendToken } from "./backend.token.map"; -import { InvalidTokensListError } from "./errors"; -import { networkTokens } from "../config/config"; - -export const isMainnet = (network: SupportedNetwork) => network === NetworkType.MAINNET; - -export const isNull = (value: Nullable): value is null => value === null; -export const isUndefined = (value: Undefined): value is undefined => value === undefined; -export const isExist = (value: Optional): value is T => !isNull(value) && !isUndefined(value); - -const SEPARATOR = '_'; -const FALLBACK_DECIMALS = 0; - -export const getUniqArray = (list: T[], getKey: (el: T) => string): T[] => { - const map: Record = {}; - - return list.filter(el => { - const key = getKey(el); - if (!(key in map)) { - map[key] = true; - - return true; - } - - return false; - }); -}; - -export const getTokenIdFromSlug = (slug: string): TokenId => { - const [contractAddress, fa2TokenId] = slug.split('_'); - - return { - contractAddress, - fa2TokenId: fa2TokenId ? +fa2TokenId : undefined, - type: fa2TokenId === undefined ? Standard.Fa12 : Standard.Fa2 - }; -}; - -export const getTokenSlug = (token: TokenAddress) => - isExist(token.fa2TokenId) ? `${token.contractAddress}${SEPARATOR}${token.fa2TokenId}` : token.contractAddress; - -export const isTezosToken = (token: TokenAddress) => - getTokenSlug(token).toLocaleLowerCase() === getTokenSlug(TEZOS_TOKEN).toLocaleLowerCase(); - -export const toReal = (atomic: BigNumber, decimalsOrToken: Optional) => - atomic.shiftedBy( - -(typeof decimalsOrToken === 'number' ? decimalsOrToken : decimalsOrToken?.metadata.decimals ?? FALLBACK_DECIMALS) - ); - -export const toAtomic = (real: BigNumber, decimalsOrToken: Optional): BigNumber => - real.shiftedBy( - typeof decimalsOrToken === 'number' ? decimalsOrToken : decimalsOrToken?.metadata.decimals ?? FALLBACK_DECIMALS - ); - - -export const getFallbackTokens = (network: QSNetwork) => { - let tokens: Array = [ - { - ...TEZOS_TOKEN, - network: network.id - }, - networksQuipuTokens[network.id] - ]; - return getUniqArray(tokens, getTokenSlug); -}; - -export const isTokenEqual = (a: TokenAddress, b: TokenAddress) => - a.contractAddress === b.contractAddress && a.fa2TokenId === b.fa2TokenId; - -export const getTokens = (network: QSNetwork) => { - let tokens = getFallbackTokens(network); - - const _networkTokens = networkTokens(network.id); - const arr: Token[] = _networkTokens?.tokens?.length ? _networkTokens.tokens.map(token => mapBackendToken(token)) : []; - - if (arr.length) { - tokens = tokens.filter(fallbackToken => !arr.some(token => isTokenEqual(fallbackToken, token))).concat(arr); - } else { - throw new InvalidTokensListError(networkTokens); - } - - return getUniqArray(tokens, getTokenSlug); -}; - -export const mockTezosNow = () => { - return Math.floor(Date.now() / 1000); -}; - -export const dateToSeconds = (date: Date) => { - return Math.floor(date.getTime() / 1000); -}; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/shared/types.ts b/src/connectors/quipuswap/utils/shared/types.ts deleted file mode 100644 index 084e854b59..0000000000 --- a/src/connectors/quipuswap/utils/shared/types.ts +++ /dev/null @@ -1,96 +0,0 @@ -import BigNumber from 'bignumber.js'; -import { Trade } from 'swap-router-sdk'; - - -export const NetworkType: Record = { - MAINNET: "mainnet", - GHOSTNET: "ghostnet" -} - -export type Optional = T | null | undefined; -export type Undefined = T | undefined; -export type Nullable = T | null; - -export interface RawToken extends Omit { - type: string; -} - -export type TokenId = Pick; - -export interface TokenAddress { - contractAddress: string; - fa2TokenId?: number; -} - -export enum Standard { - Null = 'Null', - Fa12 = 'FA12', - Fa2 = 'FA2' -} - -export interface TokenMetadata { - decimals: number; - symbol: string; - name: string; -} - -export interface Token extends TokenAddress { - type: Standard; - metadata: TokenMetadata; -} - -export type TokensMap = Map>; - -export type SupportedNetwork = 'mainnet' | 'ghostnet'; - -export enum ConnectType { - DEFAULT = 'DEFAULT', - CUSTOM = 'CUSTOM' -} - -export enum QSNetworkType { - MAIN = 'MAIN', - TEST = 'TEST' -} - -export interface QSNetwork { - id: SupportedNetwork; - connectType: ConnectType; - name: string; - type: QSNetworkType; - disabled: boolean; -} - -export interface TokenWithQSNetworkType extends Token { - network?: SupportedNetwork; -} - -export enum SwapField { - INPUT_AMOUNT = 'inputAmount', - OUTPUT_AMOUNT = 'outputAmount', - INPUT_TOKEN = 'inputToken', - OUTPUT_TOKEN = 'outputToken', - RECIPIENT = 'recipient', -} - -export interface SwapFormValues { - [SwapField.INPUT_TOKEN]: Token; - [SwapField.OUTPUT_TOKEN]: Token; - [SwapField.INPUT_AMOUNT]: BigNumber; - [SwapField.OUTPUT_AMOUNT]: BigNumber; - [SwapField.RECIPIENT]: string; -} - -export interface SwapPair { - inputToken: Token; - outputToken: Token; -} - -export type TradeInfo = { - trade: Trade, - inputToken: Token, - inputAmount: BigNumber, - outputToken: Token, - outputAmount: BigNumber, - price: BigNumber, -}; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/swap.outputs.ts b/src/connectors/quipuswap/utils/swap.outputs.ts deleted file mode 100644 index 86a4eba762..0000000000 --- a/src/connectors/quipuswap/utils/swap.outputs.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { BigNumber } from "bignumber.js"; -import { RouteDirectionEnum, TradeOperation, getPairFeeRatio } from "swap-router-sdk"; -import { calculateXToY, calculateYToX, ediv, makeSwapRequiredStorage, newton, performSwap, sumAllFees, util } from "./calculus"; -import { SWAP_RATIO_DENOMINATOR, feeDenominator } from "./config/constants"; -import { DexFeeOverflowError, assertNonNegative } from "./shared/errors"; -import { Nat } from "quipuswap-v3-sdk/dist/types"; - - -export const findFlatCfmmSwapOutput = (aTokenAmount: BigNumber, pair: TradeOperation) => { - let _pair$aTokenMultiplie, _pair$bTokenMultiplie; - - const feeRatio = getPairFeeRatio(pair); - const aTokenMultiplier = (_pair$aTokenMultiplie = pair.aTokenMultiplier) != null ? _pair$aTokenMultiplie : new BigNumber(1); - const bTokenMultiplier = (_pair$bTokenMultiplie = pair.bTokenMultiplier) != null ? _pair$bTokenMultiplie : new BigNumber(1); - const x = pair.aTokenPool.multipliedBy(aTokenMultiplier); - const y = pair.bTokenPool.multipliedBy(bTokenMultiplier); - - const _util2 = util(x, y), u = _util2[0]; - - const p = { - x: x, - y: y, - dx: aTokenAmount.multipliedBy(aTokenMultiplier), - dy: new BigNumber(0), - u: u, - n: 5 - }; - return newton(p).multipliedBy(feeRatio).dividedToIntegerBy(bTokenMultiplier); -}; - - -export const findQuipuCurveLikeSwapOutput = (aTokenAmount: BigNumber, pair: TradeOperation) => { - try { - const tokensInfo = [{ - rate: pair.aTokenMultiplier, - reserves: pair.aTokenPool - }, { - rate: pair.bTokenMultiplier, - reserves: pair.bTokenPool - }]; - - if (pair.cTokenMultiplier) { - tokensInfo.push({ - rate: pair.cTokenMultiplier, - reserves: pair.cTokenPool! - }); - } - - if (pair.dTokenMultiplier) { - tokensInfo.push({ - rate: pair.dTokenMultiplier, - reserves: pair.dTokenPool! - }); - } - - const pool = { - initialA: pair.initialA, - initialATime: pair.initialATime, - futureA: pair.futureA, - futureATime: pair.futureATime, - tokensInfo: tokensInfo, - fee: pair.fees - }; - const dy = performSwap(0, 1, aTokenAmount, pool); - const fee = ediv(sumAllFees(pool.fee!).times(dy), feeDenominator); - return assertNonNegative(dy.minus(fee), new DexFeeOverflowError(dy, fee)); - } catch (e) { - console.error(e); - return new BigNumber(0); - } -}; - -export const findPlentyBridgeSwapOutput = (aTokenAmount: BigNumber) => { - return aTokenAmount; -}; - -export const findSpicyWrapOutput = (aTokenAmount: BigNumber, pair: TradeOperation) => { - let _pair$aTokenMultiplie; - - const swapRatioNumerator = (_pair$aTokenMultiplie = pair.aTokenMultiplier) != null ? _pair$aTokenMultiplie : new BigNumber(0); - const feeRatio = getPairFeeRatio(pair); - - if (pair.direction === RouteDirectionEnum.Direct) { - const swapRatio = swapRatioNumerator.dividedBy(SWAP_RATIO_DENOMINATOR); - return aTokenAmount.multipliedBy(swapRatio).dividedToIntegerBy(1); - } else { - const _swapRatio = SWAP_RATIO_DENOMINATOR.dividedBy(swapRatioNumerator).multipliedBy(feeRatio); - - return aTokenAmount.multipliedBy(_swapRatio).dividedToIntegerBy(1); - } -}; - -export const findQuipuSwapV3Output = (aTokenAmount: BigNumber, pair: TradeOperation) => { - try { - const direction = pair.direction; - const calculationFunction = direction === RouteDirectionEnum.Direct ? calculateXToY : calculateYToX; - - const _calculationFunction = calculationFunction(makeSwapRequiredStorage(pair), new Nat(aTokenAmount.integerValue(Nat.ROUND_DOWN))), - output = _calculationFunction.output; - - return output; - } catch (e) { - return new Nat(0); - } -}; - -export const findAmmSwapOutput = (aTokenAmount: BigNumber, pair: TradeOperation) => { - const feeRatio = getPairFeeRatio(pair); - const aTokenAmountWithFee = aTokenAmount.times(feeRatio); - const numerator = aTokenAmountWithFee.times(pair.bTokenPool); - const denominator = pair.aTokenPool.plus(aTokenAmountWithFee); - return numerator.idiv(denominator); -}; - -export const findAmmSwapInput = (bTokenAmount: BigNumber, pair: TradeOperation) => { - const feeRatio = getPairFeeRatio(pair); - const numerator = pair.aTokenPool.times(bTokenAmount); - const denominator = pair.bTokenPool.minus(bTokenAmount).times(feeRatio); - const input = numerator.idiv(denominator).plus(1); - return input.isGreaterThan(0) ? input : new BigNumber(Infinity); -}; \ No newline at end of file diff --git a/src/connectors/quipuswap/utils/swap.router.sdk.adapters.ts b/src/connectors/quipuswap/utils/swap.router.sdk.adapters.ts deleted file mode 100644 index d099765eb3..0000000000 --- a/src/connectors/quipuswap/utils/swap.router.sdk.adapters.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - TokenStandardEnum, - getAllowedRoutePairsCombinations as originalGetAllowedRoutePairsCombinations -} from "swap-router-sdk"; -import { RoutePair } from "swap-router-sdk/dist/interface/route-pair.interface"; -import { getTokenIdFromSlug, getTokenSlug, isExist, isTezosToken } from "./shared/helpers"; -import { SwapPair, Token } from "./shared/types"; -import { MAX_HOPS_COUNT } from "./config/constants"; -import { WhitelistedPair } from "swap-router-sdk/dist/interface/whitelisted-pair.interface"; - -const FALLBACK_TOKEN_ID = 0; - - -export const swapRouterSdkTokenSlugToQuipuTokenSlug = (inputSlug: string, tokenStandard?: TokenStandardEnum) => { - const { contractAddress, fa2TokenId } = getTokenIdFromSlug(inputSlug); - - if (isExist(fa2TokenId)) { - return getTokenSlug({ - contractAddress, - fa2TokenId: tokenStandard === TokenStandardEnum.FA2 ? fa2TokenId : undefined - }); - } - - return inputSlug; -}; - - -export const getSwapRouterSdkTokenSlug = (token: Token) => - getTokenSlug({ - ...token, - fa2TokenId: isTezosToken(token) ? undefined : token.fa2TokenId ?? FALLBACK_TOKEN_ID - }); - - -export const getRoutePairsCombinations = ( - swapPair: SwapPair, - routePairs: RoutePair[], - whitelistedPairs: WhitelistedPair[] -) => { - const { inputToken, outputToken } = swapPair; - return originalGetAllowedRoutePairsCombinations( - inputToken ? getSwapRouterSdkTokenSlug(inputToken) : undefined, - outputToken ? getSwapRouterSdkTokenSlug(outputToken) : undefined, - routePairs, - whitelistedPairs, - MAX_HOPS_COUNT - ); -}; diff --git a/src/connectors/quipuswap/utils/trade.ts b/src/connectors/quipuswap/utils/trade.ts deleted file mode 100644 index 9fe7a59a5c..0000000000 --- a/src/connectors/quipuswap/utils/trade.ts +++ /dev/null @@ -1,118 +0,0 @@ -import BigNumber from "bignumber.js"; -import { DexTypeEnum, Trade, TradeOperation } from "swap-router-sdk"; -import { findAmmSwapInput, findAmmSwapOutput, findFlatCfmmSwapOutput, findPlentyBridgeSwapOutput, findQuipuCurveLikeSwapOutput, findQuipuSwapV3Output, findSpicyWrapOutput } from "./swap.outputs"; - - -const findSwapOutput = (aTokenAmount: BigNumber, pair: TradeOperation) => { - switch (pair.dexType) { - case DexTypeEnum.Youves: - case DexTypeEnum.PlentyStableSwap: - case DexTypeEnum.PlentyCtez: - return findFlatCfmmSwapOutput(aTokenAmount, pair); - - case DexTypeEnum.QuipuSwapCurveLike: - return findQuipuCurveLikeSwapOutput(aTokenAmount, pair); - - case DexTypeEnum.PlentyBridge: - return findPlentyBridgeSwapOutput(aTokenAmount); - - case DexTypeEnum.SpicyWrap: - return findSpicyWrapOutput(aTokenAmount, pair); - - case DexTypeEnum.QuipuSwapV3: - return findQuipuSwapV3Output(aTokenAmount, pair); - - case DexTypeEnum.YupanaWtez: - return aTokenAmount; - - default: - return findAmmSwapOutput(aTokenAmount, pair); - } -}; - -const getTradeOperationExactInput = (aTokenAmount: BigNumber, pair: TradeOperation, slippageToleranceRatio: number) => ({ - ...pair, - aTokenAmount: aTokenAmount.integerValue(BigNumber.ROUND_DOWN), - bTokenAmount: findSwapOutput(BigNumber(aTokenAmount).multipliedBy(slippageToleranceRatio), pair) -}); - -export const calculateTradeExactInput = (inputAssetAmount: BigNumber, routePairs: Trade, slippageTolerancePercent: number) => { - if (slippageTolerancePercent === void 0) { - slippageTolerancePercent = 0; - } - - if (routePairs.length === 0) { - return []; - } - - const trade = []; - const slippageToleranceRatio = (100 - slippageTolerancePercent) / 100; - const tradeOperationSlippageToleranceRatio = Math.pow(slippageToleranceRatio, 1 / routePairs.length); - let currentInput = inputAssetAmount; - - for (let i = 0; i < routePairs.length; i++) { - const tradeOperation = getTradeOperationExactInput(currentInput, routePairs[i], tradeOperationSlippageToleranceRatio); - - if (tradeOperation.bTokenAmount.isNegative()) { - return []; - } - - trade.push(tradeOperation); - currentInput = tradeOperation.bTokenAmount; - } - - return trade; -}; - -const findSwapInput = (bTokenAmount: BigNumber, pair: TradeOperation) => { - switch (pair.dexType) { - case DexTypeEnum.Youves: - case DexTypeEnum.PlentyStableSwap: - case DexTypeEnum.PlentyCtez: - // return findFlatCfmmSwapInput(bTokenAmount, pair); - return BigNumber(Infinity); - - case DexTypeEnum.QuipuSwapCurveLike: - // return findQuipuCurveLikeSwapInput(bTokenAmount, pair); - return new BigNumber(Infinity); - - case DexTypeEnum.PlentyBridge: - return new BigNumber(0); - - case DexTypeEnum.QuipuSwapV3: - // return findQuipuSwapV3Input(bTokenAmount, pair); - return new BigNumber(Infinity); - - case DexTypeEnum.YupanaWtez: - return bTokenAmount; - - default: - return findAmmSwapInput(bTokenAmount, pair); - } -}; - -const getTradeOperationExactOutput = (bTokenAmount: BigNumber, pair: TradeOperation) => ({ - ...pair, - bTokenAmount: bTokenAmount, - aTokenAmount: findSwapInput(bTokenAmount, pair) -}); - -export const calculateTradeExactOutput = (outputAssetAmount: BigNumber, routePairs: Trade) => { - const trade = []; - - if (routePairs.length > 0) { - const lastTradeIndex = routePairs.length - 1; - const firstTradeOperation = getTradeOperationExactOutput(outputAssetAmount, routePairs[lastTradeIndex]); - trade.unshift(firstTradeOperation); - - if (routePairs.length > 1) { - for (let i = lastTradeIndex - 1; i >= 0; i--) { - const previousTradeInput = trade[0].aTokenAmount; - const tradeOperation = getTradeOperationExactOutput(previousTradeInput, routePairs[i]); - trade.unshift(tradeOperation); - } - } - } - - return trade; -}; \ No newline at end of file diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 456d1eeedf..f369abd576 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -43,7 +43,6 @@ import { Kujira } from '../chains/kujira/kujira'; import { KujiraCLOB } from '../connectors/kujira/kujira'; import { PancakeswapLP } from '../connectors/pancakeswap/pancakeswap.lp'; import { XRPLCLOB } from '../connectors/xrpl/xrpl'; -import { QuipuSwap } from '../connectors/quipuswap/quipuswap'; import { Carbonamm } from '../connectors/carbon/carbonAMM'; import { Balancer } from '../connectors/balancer/balancer'; @@ -159,7 +158,6 @@ export type ConnectorUnion = | XRPLCLOB | Curve | KujiraCLOB - | QuipuSwap; export type Connector = T extends Uniswapish ? Uniswapish @@ -179,8 +177,6 @@ export type Connector = T extends Uniswapish ? XRPLCLOB : T extends KujiraCLOB ? KujiraCLOB - : T extends QuipuSwap - ? QuipuSwap : never; export async function getConnector( @@ -251,8 +247,6 @@ export async function getConnector( connector === 'balancer' ) { connectorInstance = Balancer.getInstance(chain, network); - } else if (chain === 'tezos' && connector === 'quipuswap') { - connectorInstance = QuipuSwap.getInstance(network); } else if (chain === 'ethereum' && connector === 'carbonamm') { connectorInstance = Carbonamm.getInstance(chain, network); } else { diff --git a/src/templates/root.yml b/src/templates/root.yml index d15d5b0028..56b4a2e87d 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -124,10 +124,6 @@ configurations: configurationPath: kujira.yml schemaPath: kujira-schema.json - $namespace quipuswap: - configurationPath: quipuswap.yml - schemaPath: quipuswap-schema.json - $namespace carbon: configurationPath: carbon.yml schemaPath: carbon-schema.json diff --git a/test-bronze/connectors/quipuswap/quipuswap.routes.test.ts b/test-bronze/connectors/quipuswap/quipuswap.routes.test.ts deleted file mode 100644 index ebd76d39a9..0000000000 --- a/test-bronze/connectors/quipuswap/quipuswap.routes.test.ts +++ /dev/null @@ -1,435 +0,0 @@ -import { BigNumber } from 'bignumber.js'; -import express from 'express'; -import { Express } from 'express-serve-static-core'; -import request from 'supertest'; -import { AmmRoutes } from '../../../src/amm/amm.routes'; -import { patch, unpatch } from '../../../test/services/patch'; -import { Tezos } from '../../../src/chains/tezos/tezos'; -import { QuipuSwap } from '../../../src/connectors/quipuswap/quipuswap'; -let app: Express; -let tezos: Tezos; -let quipuswap: QuipuSwap; - - -beforeAll(async () => { - app = express(); - app.use(express.json()); - - tezos = Tezos.getInstance('mainnet'); - await tezos.init(); - quipuswap = QuipuSwap.getInstance('mainnet'); - - - app.use('/amm', AmmRoutes.router); -}); - -afterEach(() => { - unpatch(); -}); - -afterAll(async () => { - await tezos.close(); -}); - -const address: string = 'tz1TGu6TN5GSez2ndXXeDX6LgUDvLzPLqgYV'; - -const patchGetWallet = () => { - patch(tezos, 'getWallet', () => { - return { - signer: { - publicKeyHash: () => 'tz1TGu6TN5GSez2ndXXeDX6LgUDvLzPLqgYV' - }, - estimate: { - batch: () => [ - { - totalCost: 100, - gasLimit: 100, - }, - { - totalCost: 200, - gasLimit: 200, - } - ] - } - }; - }); -}; - -const patchGasPrice = () => { - patch(tezos, 'gasPrice', () => 123456); -}; - -const patchEstimateBuyTrade = () => { - patch(quipuswap, 'estimateBuyTrade', () => { - return { - trade: [], - inputAmount: new BigNumber(1000000), - outputAmount: new BigNumber(1000000), - price: new BigNumber(1), - }; - }); -}; - -const patchEstimateSellTrade = () => { - patch(quipuswap, 'estimateSellTrade', () => { - return { - trade: [], - inputAmount: new BigNumber(1000000), - outputAmount: new BigNumber(1000000), - price: new BigNumber(1), - }; - }); -}; - -const patchExecuteTrade = () => { - patch(quipuswap, 'executeTrade', () => { - return { hash: '000000000000000', operations: [{ counter: 21 }] }; - }); -}; - -describe('POST /amm/price', () => { - it('should return 200 for BUY', async () => { - patchGetWallet(); - patchGasPrice(); - patchEstimateBuyTrade(); - patchExecuteTrade(); - - await request(app) - .post(`/amm/price`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - side: 'BUY', - }) - .set('Accept', 'application/json') - .expect(200) - .then((res: any) => { - expect(res.body.amount).toEqual('1.000000'); - expect(res.body.rawAmount).toEqual('1000000'); - }); - }); - - it('should return 200 for SELL', async () => { - patchGetWallet(); - patchGasPrice(); - patchEstimateSellTrade(); - patchExecuteTrade(); - - await request(app) - .post(`/amm/price`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - side: 'SELL', - }) - .set('Accept', 'application/json') - .expect(200) - .then((res: any) => { - expect(res.body.amount).toEqual('1.000000'); - expect(res.body.rawAmount).toEqual('1000000'); - }); - }); - - it('should return 500 for unrecognized quote symbol', async () => { - patchGetWallet(); - patchEstimateSellTrade(); - - await request(app) - .post(`/amm/price`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: '$', - base: 'XTZ', - amount: '1', - side: 'SELL', - }) - .set('Accept', 'application/json') - .expect(500); - }); - - it('should return 500 for unrecognized base symbol', async () => { - patchGetWallet(); - patchEstimateSellTrade(); - - await request(app) - .post(`/amm/price`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: '$', - amount: '1', - side: 'SELL', - }) - .set('Accept', 'application/json') - .expect(500); - }); - - it('should return 500 when the estimateSellTrade operation fails', async () => { - patchGetWallet(); - patchEstimateSellTrade(); - - patch(quipuswap, 'estimateSellTrade', () => { - return 'error'; - }); - - await request(app) - .post(`/amm/price`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - side: 'SELL', - }) - .set('Accept', 'application/json') - .expect(500); - }); -}); - -describe('POST /amm/trade', () => { - const patchForBuy = () => { - patchGetWallet(); - patchGasPrice(); - patchEstimateBuyTrade(); - patchExecuteTrade(); - }; - - it('should return 200 for BUY', async () => { - patchForBuy(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'BUY', - }) - .set('Accept', 'application/json') - .expect(200) - .then((res: any) => { - expect(res.body.nonce).toEqual(21); - }); - }); - - const patchForSell = () => { - patchGetWallet(); - patchGasPrice(); - patchEstimateSellTrade(); - patchExecuteTrade(); - }; - - it('should return 200 for SELL', async () => { - patchForSell(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'SELL', - }) - .set('Accept', 'application/json') - .expect(200) - .then((res: any) => { - expect(res.body.nonce).toEqual(21); - }); - }); - - it('should return 200 for SELL with limitPrice', async () => { - patchForSell(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'SELL', - limitPrice: '1', - }) - .set('Accept', 'application/json') - .expect(200); - }); - - it('should return 200 for BUY with limitPrice', async () => { - patchForBuy(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'BUY', - limitPrice: '999999999999999999999', - }) - .set('Accept', 'application/json') - .expect(200); - }); - - it('should return 500 for BUY with price greater than limitPrice', async () => { - patchForBuy(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'BUY', - limitPrice: '0.9', - }) - .set('Accept', 'application/json') - .expect(500); - }); - - it('should return 500 for SELL with price lower than limitPrice', async () => { - patchForSell(); - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'SELL', - limitPrice: '99999999999', - }) - .set('Accept', 'application/json') - .expect(500); - }); - - it('should return 404 when parameters are incorrect', async () => { - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: 1, - address: 'da8', - side: 'comprar', - }) - .set('Accept', 'application/json') - .expect(404); - }); - - it('should return 500 when the routerSwap operation fails', async () => { - patchGetWallet(); - patch(quipuswap, 'routerSwap', () => { - return 'error'; - }); - - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'SELL', - maxFeePerGas: '5000000000', - maxPriorityFeePerGas: '5000000000', - }) - .set('Accept', 'application/json') - .expect(500); - }); - - it('should return 500 when the priceSwapOut operation fails', async () => { - patchGetWallet(); - patch(quipuswap, 'priceSwapOut', () => { - return 'error'; - }); - - await request(app) - .post(`/amm/trade`) - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - quote: 'USDT', - base: 'XTZ', - amount: '1', - address, - side: 'BUY', - maxFeePerGas: '5000000000', - maxPriorityFeePerGas: '5000000000', - }) - .set('Accept', 'application/json') - .expect(500); - }); -}); - -describe('POST /amm/estimateGas', () => { - it('should return 200 for valid connector', async () => { - patchGasPrice(); - - await request(app) - .post('/amm/estimateGas') - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'quipuswap', - }) - .set('Accept', 'application/json') - .expect(200) - .then((res: any) => { - expect(res.body.network).toEqual('mainnet'); - expect(res.body.gasPrice).toEqual(0.123456); - expect(res.body.gasCost).toEqual('0.001852'); - }); - }); - - it('should return 500 for invalid connector', async () => { - patchGasPrice(); - - await request(app) - .post('/amm/estimateGas') - .send({ - chain: 'tezos', - network: 'mainnet', - connector: 'pangolin', - }) - .set('Accept', 'application/json') - .expect(500); - }); -}); diff --git a/test-bronze/connectors/quipuswap/quipuswap.test.ts b/test-bronze/connectors/quipuswap/quipuswap.test.ts deleted file mode 100644 index d174b14a54..0000000000 --- a/test-bronze/connectors/quipuswap/quipuswap.test.ts +++ /dev/null @@ -1,93 +0,0 @@ -import BigNumber from 'bignumber.js'; -import { Tezosish } from '../../../src/services/common-interfaces'; -import { patch } from '../../../test/services/patch'; -import { Tezos } from '../../../src/chains/tezos/tezos'; -import { QuipuSwap } from '../../../src/connectors/quipuswap/quipuswap'; - - -describe('QuipuSwap', () => { - let quipuswap: QuipuSwap; - let tezos: Tezosish; - - const patchProvider = () => { - patch(tezos.provider.signer, 'publicKeyHash', () => 'tz1TGu6TN5GSez2ndXXeDX6LgUDvLzPLqgYV'); - patch(tezos.provider.contract, 'batch', () => { - return { - send: () => { - return { - status: 'applied', - hash: 'hash', - results: [] - } - } - } - }); - }; - - beforeAll(async () => { - tezos = Tezos.getInstance('mainnet'); - quipuswap = QuipuSwap.getInstance('mainnet'); - - await tezos.init(); - await quipuswap.init(); - }); - - describe('gasLimitEstimate', () => { - it('should return the gas limit estimate', () => { - const gasLimitEstimate = quipuswap.gasLimitEstimate; - expect(gasLimitEstimate).toEqual(15000); - }); - }); - - describe('getAllowedSlippage', () => { - it('should return the allowed slippage from the configuration', () => { - const allowedSlippage = quipuswap.getAllowedSlippage(); - expect(allowedSlippage).toEqual(new BigNumber('0.5')); - }); - - it('should return the allowed slippage from the parameter', () => { - const allowedSlippage = quipuswap.getAllowedSlippage('1/20'); - expect(allowedSlippage).toEqual(new BigNumber('5')); - }); - - it('should return the allowed slippage from the configuration if the parameter is invalid', () => { - const allowedSlippage = quipuswap.getAllowedSlippage('invalid'); - expect(allowedSlippage).toEqual(new BigNumber('0.5')); - }); - }); - - describe('estimateSellTrade', () => { - it('should return the expected trade for a valid trade', async () => { - const baseToken = 'QUIPU'; - const quoteToken = 'XTZ'; - const amount = new BigNumber(1); - const expectedTrade = quipuswap.estimateSellTrade(baseToken, quoteToken, amount); - expect(expectedTrade.outputAmount).toBeDefined(); - expect(expectedTrade.trade).toBeDefined(); - }); - }); - - describe('estimateBuyTrade', () => { - it('should return the expected trade for a valid trade', async () => { - const baseToken = 'DOGA'; - const quoteToken = 'XTZ'; - const amount = new BigNumber(1); - const expectedTrade = quipuswap.estimateBuyTrade(baseToken, quoteToken, amount); - expect(expectedTrade.inputAmount).toBeDefined(); - expect(expectedTrade.trade).toBeDefined(); - }); - }); - - describe('executeTrade', () => { - it('should execute the trade and return the hash and operations', async () => { - patchProvider(); - const baseToken = 'CTEZ'; - const quoteToken = 'XTZ'; - const amount = new BigNumber(1); - const expectedTrade = quipuswap.estimateBuyTrade(baseToken, quoteToken, amount); - const executedTrade = await quipuswap.executeTrade(tezos.provider, expectedTrade.trade); - expect(executedTrade.hash).toBeDefined(); - expect(executedTrade.operations).toBeDefined(); - }); - }); -}); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b1c88a054d..5bfe60322f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,137 +1462,137 @@ "@ethersproject-xdc/abi@file:vendor/@ethersproject-xdc/abi": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-d3b83b4b-5670-4cfa-8927-e3f939fd58a2-1721879684682/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/abstract-provider@file:vendor/@ethersproject-xdc/abstract-provider": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-d9f4bb1b-ff8d-4c50-9469-9cc65bcdb3f3-1721879684681/node_modules/@ethersproject-xdc/web" "@ethersproject-xdc/abstract-signer@file:vendor/@ethersproject-xdc/abstract-signer": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-9cdfe1ad-82f2-42f3-bbf8-efd624b45647-1721879684681/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-9cdfe1ad-82f2-42f3-bbf8-efd624b45647-1721879684681/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-9cdfe1ad-82f2-42f3-bbf8-efd624b45647-1721879684681/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-9cdfe1ad-82f2-42f3-bbf8-efd624b45647-1721879684681/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-9cdfe1ad-82f2-42f3-bbf8-efd624b45647-1721879684681/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/address@file:vendor/@ethersproject-xdc/address": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-e8ad9c28-a5b9-4442-920e-4f4bf9076d81-1721879684682/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-e8ad9c28-a5b9-4442-920e-4f4bf9076d81-1721879684682/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-e8ad9c28-a5b9-4442-920e-4f4bf9076d81-1721879684682/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-e8ad9c28-a5b9-4442-920e-4f4bf9076d81-1721879684682/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-e8ad9c28-a5b9-4442-920e-4f4bf9076d81-1721879684682/node_modules/@ethersproject-xdc/rlp" "@ethersproject-xdc/base64@file:vendor/@ethersproject-xdc/base64": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-ac940ee8-f7d7-44f8-a8e6-a8a2aa43673b-1711378365615/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-93ae344c-018a-477d-af5d-b69f755457a4-1721879684681/node_modules/@ethersproject-xdc/bytes" "@ethersproject-xdc/basex@file:vendor/@ethersproject-xdc/basex": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-ea605f60-0653-41fe-b791-43df4937abe8-1721879684682/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-ea605f60-0653-41fe-b791-43df4937abe8-1721879684682/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/bignumber@file:vendor/@ethersproject-xdc/bignumber": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-29497dd2-a9ac-4bac-b478-c4971f2588ae-1721879684682/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-29497dd2-a9ac-4bac-b478-c4971f2588ae-1721879684682/node_modules/@ethersproject-xdc/logger" bn.js "^5.2.1" "@ethersproject-xdc/bytes@file:vendor/@ethersproject-xdc/bytes": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-99ecb1f1-f3c4-4352-b857-7f806ce05f5d-1711378365616/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-bd236a37-8e03-41ad-a4af-eaac4225e68d-1721879684683/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/constants@file:vendor/@ethersproject-xdc/constants": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-91a31af6-9be3-4e31-94b5-304ef35e3207-1711378365616/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-baf4b9ba-62f8-42d6-8287-d27c943d4a69-1721879684683/node_modules/@ethersproject-xdc/bignumber" "@ethersproject-xdc/contracts@file:vendor/@ethersproject-xdc/contracts": version "5.6.0" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-52e292ba-84c5-45a7-b1f3-f939774b98bb-1721879684683/node_modules/@ethersproject-xdc/transactions" "@ethersproject-xdc/hash@file:vendor/@ethersproject-xdc/hash": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-38eaf37e-ab8a-4bca-b9e7-50cd08304dbb-1721879684683/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/hdnode@file:vendor/@ethersproject-xdc/hdnode": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-1213571d-3805-46a9-bba3-88e6b7901054-1721879684684/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/json-wallets@file:vendor/@ethersproject-xdc/json-wallets": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-29f6d3aa-dcda-4a43-a617-75cf8d45cbb6-1721879684685/node_modules/@ethersproject-xdc/transactions" aes-js "3.0.0" scrypt-js "3.0.1" "@ethersproject-xdc/keccak256@file:vendor/@ethersproject-xdc/keccak256": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-9cb7534e-f2d4-4bb8-8726-aa8d2ae70a68-1711378365617/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-8d0a8f9c-d147-4b8e-959d-3c63bcf8b8e0-1721879684685/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1601,67 +1601,67 @@ "@ethersproject-xdc/networks@file:vendor/@ethersproject-xdc/networks": version "5.7.1" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-3318040d-6ee2-4fe1-8d35-2e90df014a04-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-bfa16d07-cba8-4510-996a-b1d69d20c556-1721879684685/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/pbkdf2@file:vendor/@ethersproject-xdc/pbkdf2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-0f982bc7-f8eb-4552-9909-1c8b7b12eddf-1721879684685/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-0f982bc7-f8eb-4552-9909-1c8b7b12eddf-1721879684685/node_modules/@ethersproject-xdc/sha2" "@ethersproject-xdc/properties@file:vendor/@ethersproject-xdc/properties": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-d600654f-dc20-45bd-8730-5aea66cd419c-1711378365618/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-bc8eccd5-5b51-47a8-9803-1755570ec9e8-1721879684685/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/providers@file:vendor/@ethersproject-xdc/providers": version "5.6.2" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-ee2ba69a-cc0c-41af-88c6-30ffae5c448b-1721879684684/node_modules/@ethersproject-xdc/web" bech32 "1.1.4" ws "7.4.6" "@ethersproject-xdc/random@file:vendor/@ethersproject-xdc/random": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-a70c132b-0ffa-42ca-9b8f-fbe214ba7ea0-1721879684686/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-a70c132b-0ffa-42ca-9b8f-fbe214ba7ea0-1721879684686/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/rlp@file:vendor/@ethersproject-xdc/rlp": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-d6902a40-01a5-4343-871f-54db6b0e8f8c-1721879684690/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-d6902a40-01a5-4343-871f-54db6b0e8f8c-1721879684690/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/sha2@file:vendor/@ethersproject-xdc/sha2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-88ad5ee4-7e12-4ed7-be4b-188d35566849-1721879684687/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-88ad5ee4-7e12-4ed7-be4b-188d35566849-1721879684687/node_modules/@ethersproject-xdc/logger" hash.js "1.1.7" "@ethersproject-xdc/signing-key@file:vendor/@ethersproject-xdc/signing-key": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-32d3e0a3-2b2f-4a25-9b5a-1d69bd24adb3-1721879684685/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-32d3e0a3-2b2f-4a25-9b5a-1d69bd24adb3-1721879684685/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-32d3e0a3-2b2f-4a25-9b5a-1d69bd24adb3-1721879684685/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1669,76 +1669,76 @@ "@ethersproject-xdc/solidity@file:vendor/@ethersproject-xdc/solidity": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-eb63c393-a41a-4597-81e8-e641e651432d-1721879684687/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/strings@file:vendor/@ethersproject-xdc/strings": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-b7e536eb-a854-4b73-b5b4-fd51b3643dc7-1721879684686/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-b7e536eb-a854-4b73-b5b4-fd51b3643dc7-1721879684686/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-b7e536eb-a854-4b73-b5b4-fd51b3643dc7-1721879684686/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/transactions@file:vendor/@ethersproject-xdc/transactions": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-0432da5a-9797-471f-b626-90836d12c1dc-1721879684686/node_modules/@ethersproject-xdc/signing-key" "@ethersproject-xdc/units@file:vendor/@ethersproject-xdc/units": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7931985f-9462-4b93-a8ff-25b82e114654-1721879684690/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7931985f-9462-4b93-a8ff-25b82e114654-1721879684690/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7931985f-9462-4b93-a8ff-25b82e114654-1721879684690/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/wallet@file:vendor/@ethersproject-xdc/wallet": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-3f8596d7-53df-4375-8e66-533a5844e07c-1721879684686/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/web@file:vendor/@ethersproject-xdc/web": version "5.7.1" dependencies: - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-a3031507-804d-4a4b-aede-67df8313f698-1721879684690/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-a3031507-804d-4a4b-aede-67df8313f698-1721879684690/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-a3031507-804d-4a4b-aede-67df8313f698-1721879684690/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-a3031507-804d-4a4b-aede-67df8313f698-1721879684690/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-a3031507-804d-4a4b-aede-67df8313f698-1721879684690/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/wordlists@file:vendor/@ethersproject-xdc/wordlists": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5c9ac473-5144-478c-989e-026c1500a366-1721879684690/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5c9ac473-5144-478c-989e-026c1500a366-1721879684690/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5c9ac473-5144-478c-989e-026c1500a366-1721879684690/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5c9ac473-5144-478c-989e-026c1500a366-1721879684690/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5c9ac473-5144-478c-989e-026c1500a366-1721879684690/node_modules/@ethersproject-xdc/strings" "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.12", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.0", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": version "5.7.0" @@ -3966,7 +3966,7 @@ "@taquito/core" "^17.2.0" axios "0.26.0" -"@taquito/local-forging@^15.0.1", "@taquito/local-forging@^15.1.0": +"@taquito/local-forging@^15.0.1": version "15.1.0" resolved "https://registry.yarnpkg.com/@taquito/local-forging/-/local-forging-15.1.0.tgz#11404d4b90d4b1f4f6e3f7aa591e8227bf08e246" integrity sha512-ib/2RqtxQQC9SjyTB9T5OSc5yUx9GUSdMOA4dmtiiFcN2+AG+aw7ixn6Hjt9Td8ZIOPt9H6HkyTypKrX7+cENw== @@ -3983,7 +3983,7 @@ "@taquito/utils" "^17.2.0" bignumber.js "^9.1.0" -"@taquito/michel-codec@^15.0.1", "@taquito/michel-codec@^15.1.0": +"@taquito/michel-codec@^15.0.1": version "15.1.0" resolved "https://registry.yarnpkg.com/@taquito/michel-codec/-/michel-codec-15.1.0.tgz#b4452757ff02c40b110ec5ecafad1f659e1de4e3" integrity sha512-wKucIhs7vhaq5H+YSF2f6Qu9+g+QiEL6MPc5ROpxBrXJTeKSwBOEIpfqcKfkfMuecJyHZJW3glNfkpAVTCgkxg== @@ -3995,7 +3995,7 @@ dependencies: "@taquito/core" "^17.2.0" -"@taquito/michelson-encoder@^15.0.1", "@taquito/michelson-encoder@^15.1.0": +"@taquito/michelson-encoder@^15.0.1": version "15.1.0" resolved "https://registry.yarnpkg.com/@taquito/michelson-encoder/-/michelson-encoder-15.1.0.tgz#1b3250445d4cc7e945e6a0ed9f8deaf209e62ada" integrity sha512-uQMEu3g+8WcYb5ZV6+XGvoWJhKoNxU0F2RqodLJB7UxQ1rI/OMa+VlxSLMt4niIxpKXqnO9j4tD7Y4mPC3ufaA== @@ -4034,25 +4034,6 @@ "@taquito/utils" "^17.2.0" bignumber.js "^9.1.0" -"@taquito/signer@^15.0.1": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/signer/-/signer-15.1.0.tgz#0cb7bc9612e7f5ffbefc274f0aa6da27f5d755fd" - integrity sha512-VP7hS8cYQ6cMerVkbD5X3AqpoIXvh72xNuv3++R4reEjdl+E3VWs1CZZGnJj6yzlFV21SrdGKSILx8Rl3Ql4DA== - dependencies: - "@stablelib/blake2b" "^1.0.1" - "@stablelib/ed25519" "^1.0.3" - "@stablelib/hmac" "^1.0.1" - "@stablelib/nacl" "^1.0.4" - "@stablelib/pbkdf2" "^1.0.1" - "@stablelib/sha512" "^1.0.1" - "@taquito/taquito" "^15.1.0" - "@taquito/utils" "^15.1.0" - "@types/bn.js" "^5.1.1" - bip39 "^3.0.4" - elliptic "^6.5.4" - pbkdf2 "^3.1.2" - typedarray-to-buffer "^4.0.0" - "@taquito/signer@^17.0.0": version "17.2.0" resolved "https://registry.yarnpkg.com/@taquito/signer/-/signer-17.2.0.tgz#4173d4fab3b4a7599aa7be5f3934b691dff73e67" @@ -4086,20 +4067,6 @@ bignumber.js "^9.1.0" rxjs "^6.6.3" -"@taquito/taquito@^15.0.1", "@taquito/taquito@^15.1.0": - version "15.1.0" - resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-15.1.0.tgz#9a3340a8bcaa8bd6e9567776cea1c1659aafe5e9" - integrity sha512-2AXWeNoXsmMOSkJVXtXjOlJkS+hKXITaSybMA6nJuS1YWY4e7iAr678Y6UgVEHRJxeGohX4R4Ww12Ymr3Sfedg== - dependencies: - "@taquito/http-utils" "^15.1.0" - "@taquito/local-forging" "^15.1.0" - "@taquito/michel-codec" "^15.1.0" - "@taquito/michelson-encoder" "^15.1.0" - "@taquito/rpc" "^15.1.0" - "@taquito/utils" "^15.1.0" - bignumber.js "^9.1.0" - rxjs "^6.6.3" - "@taquito/taquito@^17.0.0", "@taquito/taquito@^17.2.0": version "17.2.0" resolved "https://registry.yarnpkg.com/@taquito/taquito/-/taquito-17.2.0.tgz#cbf896340ed8ced8defbb01d98c286c166eea062" @@ -6111,7 +6078,7 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -blakejs@^1.1.0, blakejs@^1.1.1, blakejs@^1.2.1: +blakejs@^1.1.0, blakejs@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== @@ -6592,11 +6559,6 @@ cbor@^5.2.0: bignumber.js "^9.0.1" nofilter "^1.0.4" -chai-bignumber@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-3.1.0.tgz#e196456c760df21f0e124f6df922289ea15a7e4c" - integrity sha512-omxEc80jAU+pZwRmoWr3aEzeLad4JW3iBhLRQlgISvghBdIxrMT7mVAGsDz4WSyCkKowENshH2j9OABAhld7QQ== - chain-registry@^1.15.0: version "1.19.0" resolved "https://registry.yarnpkg.com/chain-registry/-/chain-registry-1.19.0.tgz#6d2d56b56efebee0d15ced8f9bd8329a099ce04d" @@ -6651,11 +6613,6 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -child_process@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" - integrity sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g== - chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -7533,11 +7490,6 @@ dot-prop@^6.0.1: dependencies: is-obj "^2.0.0" -dotenv@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== - dotenv@^14.2.0: version "14.3.2" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-14.3.2.tgz#7c30b3a5f777c79a3429cb2db358eef6751e8369" @@ -8235,36 +8187,36 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: "ethers-xdc@file:./vendor/ethers-xdc": version "5.7.2" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-3faff01f-0772-46f1-9b80-915623b4e15b-1721879684675/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" @@ -13220,26 +13172,6 @@ quickswap-sdk@^3.0.8: tiny-warning "^1.0.3" toformat "^2.0.0" -quipuswap-v3-sdk@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/quipuswap-v3-sdk/-/quipuswap-v3-sdk-0.0.7.tgz#7b86a38eb7bf0f4c7e73ce68c637bac4eb07e37b" - integrity sha512-zkye1ykEGJ3TA2P1nmNQQ9cv4R4A4hK+3dfPJMk9AGp/GQuO30R2JxUobacDo4HvSTlmx6Xk3srEOTnajbwUTg== - dependencies: - "@taquito/http-utils" "^15.0.1" - "@taquito/local-forging" "^15.0.1" - "@taquito/michel-codec" "^15.0.1" - "@taquito/michelson-encoder" "^15.0.1" - "@taquito/rpc" "^15.0.1" - "@taquito/signer" "^15.0.1" - "@taquito/taquito" "^15.0.1" - blakejs "^1.1.1" - chai-bignumber "^3.0.0" - child_process "^1.0.2" - dotenv "10.0.0" - ts-node "^10.2.1" - typescript "^4.4.3" - yargs "^17.2.1" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -14945,25 +14877,6 @@ ts-node@^10.0.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -ts-node@^10.2.1: - version "10.9.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" - integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - tsconfig-paths@^3.14.1: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -15126,11 +15039,6 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@^4.4.3: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - typescript@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" @@ -16364,7 +16272,7 @@ yargs@^12.0.2: y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" -yargs@^17.2.1, yargs@^17.3.1: +yargs@^17.3.1: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==