diff --git a/jest.config.js b/jest.config.js index dbd4b77a3a..5c7ce4a695 100644 --- a/jest.config.js +++ b/jest.config.js @@ -36,6 +36,15 @@ module.exports = { globalTeardown: '/test/teardown.ts', moduleNameMapper: { eccrypto: '/test/mock/eccrypto-mock.js', + // Add carbon sdk subpath imports that are unsupported until jest v29.4.0 + '@bancor/carbon-sdk/strategy-management': + '/node_modules/@bancor/carbon-sdk/dist/strategy-management/index.cjs', + '@bancor/carbon-sdk/utils': + '/node_modules/@bancor/carbon-sdk/dist/utils/index.cjs', + '@bancor/carbon-sdk/contracts-api': + '/node_modules/@bancor/carbon-sdk/dist/contracts-api/index.cjs', + '@bancor/carbon-sdk/chain-cache': + '/node_modules/@bancor/carbon-sdk/dist/chain-cache/index.cjs', }, testPathIgnorePatterns: ['/node_modules/', 'test-helpers'], }; diff --git a/package.json b/package.json index 61f8b13a10..bf1252ccfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hummingbot-gateway", - "version": "1.24.0", + "version": "dev-1.25.0", "description": "Middleware that helps Hummingbot clients access standardized DEX API endpoints on different blockchain networks", "main": "index.js", "license": "Apache-2.0", @@ -23,6 +23,7 @@ "test:scripts": "jest -i --verbose ./test-scripts/*.test.ts" }, "dependencies": { + "@bancor/carbon-sdk": "^0.0.93-DEV", "@cosmjs/proto-signing": "^0.31.1", "@cosmjs/stargate": "^0.31.1", "@crocswap/sdk": "^2.4.5", @@ -163,4 +164,4 @@ "resolutions": { "web3-utils": "1.7.3" } -} +} \ No newline at end of file diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index a04db850cd..c8ba28bf10 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -34,6 +34,11 @@ import { poolPrice as uniswapV3PoolPrice, estimateGas as uniswapEstimateGas, } from '../connectors/uniswap/uniswap.controllers'; +import { + price as carbonPrice, + trade as carbonTrade, + estimateGas as carbonEstimateGas, +} from '../connectors/carbon/carbon.controllers'; import { price as refPrice, trade as refTrade, @@ -81,6 +86,7 @@ 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 { Carbonamm } from '../connectors/carbon/carbonAMM'; export async function price(req: PriceRequest): Promise { const chain = await getInitializedChain< @@ -97,6 +103,8 @@ export async function price(req: PriceRequest): Promise { 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) { // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish return uniswapPrice(chain, connector, req); @@ -122,6 +130,8 @@ export async function trade(req: TradeRequest): Promise { 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) { // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish return uniswapTrade(chain, connector, req); @@ -211,6 +221,8 @@ export async function estimateGas( 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) { // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish return uniswapEstimateGas(chain, connector); diff --git a/src/app.ts b/src/app.ts index d457994a83..a2db518650 100644 --- a/src/app.ts +++ b/src/app.ts @@ -112,7 +112,7 @@ export const startSwagger = async () => { export const startGateway = async () => { const port = ConfigManagerV2.getInstance().get('server.port'); - const gateway_version="1.24.0"; // gateway version + const gateway_version="dev-1.25.0"; // gateway version if (!ConfigManagerV2.getInstance().get('server.id')) { ConfigManagerV2.getInstance().set( 'server.id', diff --git a/src/chains/ethereum/ethereum.ts b/src/chains/ethereum/ethereum.ts index e0d55aafd1..1694ac7820 100644 --- a/src/chains/ethereum/ethereum.ts +++ b/src/chains/ethereum/ethereum.ts @@ -14,6 +14,7 @@ import { Perp } from '../../connectors/perp/perp'; import { SushiswapConfig } from '../../connectors/sushiswap/sushiswap.config'; import { OpenoceanConfig } from '../../connectors/openocean/openocean.config'; import { Curve } from '../../connectors/curve/curve'; +import { CarbonConfig } from '../../connectors/carbon/carbon.config'; // MKR does not match the ERC20 perfectly so we need to use a separate ABI. const MKR_ADDRESS = '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2'; @@ -188,6 +189,11 @@ export class Ethereum extends EthereumBase implements Ethereumish { ); } else if (reqSpender === 'uniswapLP') { spender = UniswapConfig.config.uniswapV3NftManagerAddress(this._chain); + } else if (reqSpender === 'carbonamm') { + spender = CarbonConfig.config.carbonContractsConfig( + 'ethereum', + this._chain + ).carbonControllerAddress; } else if (reqSpender === 'perp') { const perp = Perp.getInstance(this._chain, 'optimism'); if (!perp.ready()) { diff --git a/src/chains/ethereum/ethereum.validators.ts b/src/chains/ethereum/ethereum.validators.ts index d9256a7486..e8280547b2 100644 --- a/src/chains/ethereum/ethereum.validators.ts +++ b/src/chains/ethereum/ethereum.validators.ts @@ -63,6 +63,7 @@ export const validateSpender: Validator = mkValidator( val === 'pancakeswapLP' || val === 'xsswap' || val === 'curve' || + val === 'carbonamm' || isAddress(val)) ); diff --git a/src/chains/xrpl/xrpl.ts b/src/chains/xrpl/xrpl.ts index f35d5cdfc2..9a3463c7d0 100644 --- a/src/chains/xrpl/xrpl.ts +++ b/src/chains/xrpl/xrpl.ts @@ -21,7 +21,7 @@ import { rootPath } from '../../paths'; import { TokenListType, walletPath, MarketListType } from '../../services/base'; import { ConfigManagerCertPassphrase } from '../../services/config-manager-cert-passphrase'; import { getXRPLConfig } from './xrpl.config'; -// import { logger } from '../../services/logger'; +import { logger } from '../../services/logger'; import { TransactionResponseStatusCode, TokenBalance } from './xrpl.requests'; import { XRPLOrderStorage } from './xrpl.order-storage'; import { OrderTracker } from './xrpl.order-tracker'; @@ -45,8 +45,6 @@ export type MarketInfo = { baseCode: string; quoteIssuer: string; quoteCode: string; - baseTokenID: number; - quoteTokenID: number; }; export type Fee = { @@ -56,6 +54,9 @@ export type Fee = { openLedger: string; }; +const MAX_POLL_RETRY = 5; +const POLL_RETRY_INTERVAL = 300; + export class XRPL implements XRPLish { private static _instances: { [name: string]: XRPL }; public rpcUrl; @@ -219,6 +220,8 @@ export class XRPL implements XRPLish { this.tokenList = await this.getTokenList(tokenListSource, tokenListType); if (this.tokenList) { this.tokenList.forEach((token: XRPTokenInfo) => { + //TODO: There are duplicate codes with different issuer, + // find way to resolve this. if (!this._tokenMap[token.code]) { this._tokenMap[token.code] = []; } @@ -284,12 +287,7 @@ export class XRPL implements XRPLish { } public getTokenForSymbol(code: string): XRPTokenInfo[] | undefined { - let query = code; - - // Special case for SOLO on mainnet - if (code === 'SOLO') { - query = '534F4C4F00000000000000000000000000000000'; - } + let query = convertHexToString(code); return this._tokenMap[query] ? this._tokenMap[query] : undefined; } @@ -510,15 +508,28 @@ export class XRPL implements XRPLish { async getTransaction(txHash: string): Promise { await this.ensureConnection(); - const tx_resp = await this._client.request({ - command: 'tx', - transaction: txHash, - binary: false, - }); + let retryCount = 0; + let result: any = undefined; + while (retryCount < MAX_POLL_RETRY && result === undefined) { + try { + const tx_resp = await this._client.request({ + command: 'tx', + transaction: txHash, + binary: false, + }); - const result = tx_resp; + result = tx_resp; + } catch (error) { + retryCount++; + if (retryCount >= 5) { + throw new Error(`Transaction ${txHash} not found, error: ` + String(error)); + } + logger.info(`Transaction ${txHash} not found, retrying ${retryCount}/${MAX_POLL_RETRY}...`); + await new Promise(resolve => setTimeout(resolve, POLL_RETRY_INTERVAL)); // Add delay + } + } - return result; + return result as TxResponse; } async close() { diff --git a/src/clob/clob.requests.ts b/src/clob/clob.requests.ts index 5975ba95f3..f0f2cc26bf 100644 --- a/src/clob/clob.requests.ts +++ b/src/clob/clob.requests.ts @@ -5,9 +5,11 @@ import { PerpetualMarket, Position, } from '@injectivelabs/sdk-ts'; -import { OrderType, Side } from '../amm/amm.requests'; import { NetworkSelectionRequest } from '../services/common-interfaces'; +export type OrderType = 'LIMIT' | 'LIMIT_MAKER' | 'MARKET'; +export type Side = 'BUY' | 'SELL'; + export interface ClobMarketsRequest extends NetworkSelectionRequest { market?: string; } diff --git a/src/connectors/carbon/carbon.config.ts b/src/connectors/carbon/carbon.config.ts new file mode 100644 index 0000000000..1d35a64167 --- /dev/null +++ b/src/connectors/carbon/carbon.config.ts @@ -0,0 +1,58 @@ +import { ContractsConfig } from '@bancor/carbon-sdk/contracts-api'; +import { MatchType } from '@bancor/carbon-sdk'; +import { AvailableNetworks } from '../../services/config-manager-types'; +import { ConfigManagerV2 } from '../../services/config-manager-v2'; + +export namespace CarbonConfig { + export interface NetworkConfig { + allowedSlippage: string; + gasLimitEstimate: number; + ttl: number; + tradingTypes: Array; + chainType: string; + matchType: MatchType; + availableNetworks: Array; + carbonContractsConfig: ( + chain: string, + network: string + ) => Required; + } + + export const config: NetworkConfig = { + allowedSlippage: ConfigManagerV2.getInstance().get( + `carbon.allowedSlippage` + ), + gasLimitEstimate: ConfigManagerV2.getInstance().get( + `carbon.gasLimitEstimate` + ), + ttl: ConfigManagerV2.getInstance().get(`carbon.ttl`), + tradingTypes: ['AMM'], + chainType: 'EVM', + matchType: MatchType.Fast, + availableNetworks: [ + { + chain: 'ethereum', + networks: Object.keys( + ConfigManagerV2.getInstance().get('carbon.contractAddresses.ethereum') + ).filter((network) => + Object.keys( + ConfigManagerV2.getInstance().get('ethereum.networks') + ).includes(network) + ), + }, + ], + carbonContractsConfig: (chain: string, network: string) => { + return { + carbonControllerAddress: ConfigManagerV2.getInstance().get( + `carbon.contractAddresses.${chain}.${network}.carbonControllerAddress` + ), + multiCallAddress: ConfigManagerV2.getInstance().get( + `carbon.contractAddresses.${chain}.${network}.multiCallAddress` + ), + voucherAddress: ConfigManagerV2.getInstance().get( + `carbon.contractAddresses.${chain}.${network}.voucherAddress` + ), + }; + }, + }; +} diff --git a/src/connectors/carbon/carbon.controllers.ts b/src/connectors/carbon/carbon.controllers.ts new file mode 100644 index 0000000000..1ee4d9dce6 --- /dev/null +++ b/src/connectors/carbon/carbon.controllers.ts @@ -0,0 +1,396 @@ +import Decimal from 'decimal.js-light'; +import { BigNumber, Wallet } from 'ethers'; +import { Token } from '@uniswap/sdk-core'; +import { + HttpException, + LOAD_WALLET_ERROR_CODE, + LOAD_WALLET_ERROR_MESSAGE, + TOKEN_NOT_SUPPORTED_ERROR_CODE, + TOKEN_NOT_SUPPORTED_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, +} from '../../services/error-handler'; +import { TokenInfo } from '../../chains/ethereum/ethereum-base'; +import { latency, gasCostInEthString } from '../../services/base'; +import { + Ethereumish, + ExpectedTrade, + Uniswapish, + UniswapLPish, + Tokenish, + Fractionish, +} from '../../services/common-interfaces'; +import { logger } from '../../services/logger'; +import { + EstimateGasResponse, + PriceRequest, + PriceResponse, + TradeRequest, + TradeResponse, +} from '../../amm/amm.requests'; +import { Carbonamm } from '../carbon/carbonAMM'; + +export interface TradeInfo { + baseToken: Tokenish; + quoteToken: Tokenish; + requestAmount: BigNumber; + expectedTrade: ExpectedTrade; +} + +export async function txWriteData( + ethereumish: Ethereumish, + address: string, + maxFeePerGas?: string, + maxPriorityFeePerGas?: string +): Promise<{ + wallet: Wallet; + maxFeePerGasBigNumber: BigNumber | undefined; + maxPriorityFeePerGasBigNumber: BigNumber | undefined; +}> { + let maxFeePerGasBigNumber: BigNumber | undefined; + if (maxFeePerGas) { + maxFeePerGasBigNumber = BigNumber.from(maxFeePerGas); + } + let maxPriorityFeePerGasBigNumber: BigNumber | undefined; + if (maxPriorityFeePerGas) { + maxPriorityFeePerGasBigNumber = BigNumber.from(maxPriorityFeePerGas); + } + + let wallet: Wallet; + try { + wallet = await ethereumish.getWallet(address); + } catch (err) { + logger.error(`Wallet ${address} not available.`); + throw new HttpException( + 500, + LOAD_WALLET_ERROR_MESSAGE + err, + LOAD_WALLET_ERROR_CODE + ); + } + return { wallet, maxFeePerGasBigNumber, maxPriorityFeePerGasBigNumber }; +} + +export async function getTradeInfo( + ethereumish: Ethereumish, + uniswapish: Uniswapish, + baseAsset: string, + quoteAsset: string, + baseAmount: Decimal, + tradeSide: string, + allowedSlippage?: string +): Promise { + const baseToken: Tokenish = getFullTokenFromSymbol( + ethereumish, + uniswapish, + baseAsset + ); + const quoteToken: Tokenish = getFullTokenFromSymbol( + ethereumish, + uniswapish, + quoteAsset + ); + const requestAmount: BigNumber = BigNumber.from( + baseAmount.toFixed(baseToken.decimals).replace('.', '') + ); + + let expectedTrade: ExpectedTrade; + if (tradeSide === 'BUY') { + expectedTrade = await uniswapish.estimateBuyTrade( + quoteToken, + baseToken, + requestAmount, + allowedSlippage + ); + } else { + expectedTrade = await uniswapish.estimateSellTrade( + baseToken, + quoteToken, + requestAmount, + allowedSlippage + ); + } + + return { + baseToken, + quoteToken, + requestAmount, + expectedTrade, + }; +} + +export async function price( + ethereumish: Ethereumish, + uniswapish: Uniswapish, + req: PriceRequest +): Promise { + const startTimestamp: number = Date.now(); + let tradeInfo: TradeInfo; + try { + tradeInfo = await getTradeInfo( + ethereumish, + uniswapish, + req.base, + req.quote, + new Decimal(req.amount), + req.side, + req.allowedSlippage + ); + } 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 trade = tradeInfo.expectedTrade.trade; + const expectedAmount = tradeInfo.expectedTrade.expectedAmount; + + const tradePrice = + req.side === 'BUY' ? trade.executionPrice.invert() : trade.executionPrice; + + const gasLimitTransaction = ethereumish.gasLimitTransaction; + const gasPrice = ethereumish.gasPrice; + const gasLimitEstimate = uniswapish.gasLimitEstimate; + return { + network: ethereumish.chain, + timestamp: startTimestamp, + latency: latency(startTimestamp, Date.now()), + base: tradeInfo.baseToken.address, + quote: tradeInfo.quoteToken.address, + amount: new Decimal(req.amount).toFixed(tradeInfo.baseToken.decimals), + rawAmount: tradeInfo.requestAmount.toString(), + expectedAmount: expectedAmount.toSignificant(8), + price: tradePrice.toSignificant(8), + gasPrice: gasPrice, + gasPriceToken: ethereumish.nativeTokenSymbol, + gasLimit: gasLimitTransaction, + gasCost: gasCostInEthString(gasPrice, gasLimitEstimate), + }; +} + +export async function trade( + ethereumish: Ethereumish, + uniswapish: Uniswapish, + req: TradeRequest +): Promise { + const startTimestamp: number = Date.now(); + + const limitPrice = req.limitPrice; + const { wallet, maxFeePerGasBigNumber, maxPriorityFeePerGasBigNumber } = + await txWriteData( + ethereumish, + req.address, + req.maxFeePerGas, + req.maxPriorityFeePerGas + ); + + let tradeInfo: TradeInfo; + try { + tradeInfo = await getTradeInfo( + ethereumish, + uniswapish, + req.base, + req.quote, + new Decimal(req.amount), + req.side + ); + } catch (e) { + if (e instanceof Error) { + logger.error(`Could not get trade info. ${e.message}`); + throw new HttpException( + 500, + TRADE_FAILED_ERROR_MESSAGE + e.message, + TRADE_FAILED_ERROR_CODE + ); + } else { + logger.error('Unknown error trying to get trade info.'); + throw new HttpException( + 500, + UNKNOWN_ERROR_MESSAGE, + UNKNOWN_ERROR_ERROR_CODE + ); + } + } + + const gasPrice: number = ethereumish.gasPrice; + const gasLimitTransaction: number = ethereumish.gasLimitTransaction; + const gasLimitEstimate: number = uniswapish.gasLimitEstimate; + + if (req.side === 'BUY') { + const price: Fractionish = + tradeInfo.expectedTrade.trade.executionPrice.invert(); + if ( + limitPrice && + new Decimal(price.toFixed(8)).gt(new Decimal(limitPrice)) + ) { + logger.error('Swap price exceeded limit price.'); + throw new HttpException( + 500, + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_MESSAGE( + price.toFixed(8), + limitPrice + ), + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_CODE + ); + } + + const tx = await uniswapish.executeTrade( + wallet, + tradeInfo.expectedTrade.trade, + gasPrice, + uniswapish.router, + uniswapish.ttl, + uniswapish.routerAbi, + gasLimitTransaction, + req.nonce, + maxFeePerGasBigNumber, + maxPriorityFeePerGasBigNumber, + req.allowedSlippage + ); + + if (tx.hash) { + await ethereumish.txStorage.saveTx( + ethereumish.chain, + ethereumish.chainId, + tx.hash, + new Date(), + ethereumish.gasPrice + ); + } + + logger.info( + `Trade has been executed, txHash is ${tx.hash}, nonce is ${tx.nonce}, gasPrice is ${gasPrice}.` + ); + + return { + network: ethereumish.chain, + timestamp: startTimestamp, + latency: latency(startTimestamp, Date.now()), + base: tradeInfo.baseToken.address, + quote: tradeInfo.quoteToken.address, + amount: new Decimal(req.amount).toFixed(tradeInfo.baseToken.decimals), + rawAmount: tradeInfo.requestAmount.toString(), + expectedIn: tradeInfo.expectedTrade.expectedAmount.toSignificant(8), + price: price.toSignificant(8), + gasPrice: gasPrice, + gasPriceToken: ethereumish.nativeTokenSymbol, + gasLimit: gasLimitTransaction, + gasCost: gasCostInEthString(gasPrice, gasLimitEstimate), + nonce: tx.nonce, + txHash: tx.hash, + }; + } else { + const price: Fractionish = tradeInfo.expectedTrade.trade.executionPrice; + logger.info( + `Expected execution price is ${price.toFixed(6)}, ` + + `limit price is ${limitPrice}.` + ); + if ( + limitPrice && + new Decimal(price.toFixed(8)).lt(new Decimal(limitPrice)) + ) { + logger.error('Swap price lower than limit price.'); + throw new HttpException( + 500, + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_MESSAGE( + price.toFixed(8), + limitPrice + ), + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_CODE + ); + } + + const tx = await uniswapish.executeTrade( + wallet, + tradeInfo.expectedTrade.trade, + gasPrice, + uniswapish.router, + uniswapish.ttl, + uniswapish.routerAbi, + gasLimitTransaction, + req.nonce, + maxFeePerGasBigNumber, + maxPriorityFeePerGasBigNumber + ); + + logger.info( + `Trade has been executed, txHash is ${tx.hash}, nonce is ${tx.nonce}, gasPrice is ${gasPrice}.` + ); + + return { + network: ethereumish.chain, + timestamp: startTimestamp, + latency: latency(startTimestamp, Date.now()), + base: tradeInfo.baseToken.address, + quote: tradeInfo.quoteToken.address, + amount: new Decimal(req.amount).toFixed(tradeInfo.baseToken.decimals), + rawAmount: tradeInfo.requestAmount.toString(), + expectedOut: tradeInfo.expectedTrade.expectedAmount.toSignificant(8), + price: price.toSignificant(8), + gasPrice: gasPrice, + gasPriceToken: ethereumish.nativeTokenSymbol, + gasLimit: gasLimitTransaction, + gasCost: gasCostInEthString(gasPrice, gasLimitEstimate), + nonce: tx.nonce, + txHash: tx.hash, + }; + } +} + +export function getFullTokenFromSymbol( + ethereumish: Ethereumish, + uniswapish: Uniswapish | UniswapLPish, + tokenSymbol: string +): Tokenish | Token { + const tokenInfo: TokenInfo | undefined = + ethereumish.getTokenBySymbol(tokenSymbol); + let fullToken: Tokenish | Token | undefined; + if (tokenInfo) { + fullToken = uniswapish.getTokenByAddress(tokenInfo.address); + } else if (tokenSymbol === 'ETH' && uniswapish instanceof Carbonamm) { + fullToken = uniswapish.getTokenByAddress( + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' + ); + } + if (!fullToken) + throw new HttpException( + 500, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE + tokenSymbol, + TOKEN_NOT_SUPPORTED_ERROR_CODE + ); + return fullToken; +} + +export async function estimateGas( + ethereumish: Ethereumish, + uniswapish: Uniswapish +): Promise { + const gasPrice: number = ethereumish.gasPrice; + const gasLimitTransaction: number = ethereumish.gasLimitTransaction; + const gasLimitEstimate: number = uniswapish.gasLimitEstimate; + return { + network: ethereumish.chain, + timestamp: Date.now(), + gasPrice, + gasPriceToken: ethereumish.nativeTokenSymbol, + gasLimit: gasLimitTransaction, + gasCost: gasCostInEthString(gasPrice, gasLimitEstimate), + }; +} diff --git a/src/connectors/carbon/carbon.utils.ts b/src/connectors/carbon/carbon.utils.ts new file mode 100644 index 0000000000..ec2ab5e755 --- /dev/null +++ b/src/connectors/carbon/carbon.utils.ts @@ -0,0 +1,28 @@ +const ETH_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'.toLowerCase(); + +export const decodeStrategyId = (strategyIdRaw: string): string[] => { + const strategyId = BigInt(strategyIdRaw); + const pairId = (strategyId >> BigInt(128)).toString(); + + const strategyIndex = ( + strategyId & BigInt('0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF') + ).toString(10); + + return [pairId, strategyIndex]; +}; + +export const encodeStrategyId = ( + strategyIndexRaw: string, + pairIdRaw: string +): string => { + const pairId = BigInt(pairIdRaw); + const strategyIndex = BigInt(strategyIndexRaw); + + const strategyID = (pairId << BigInt(128)) | strategyIndex; + + return '0x' + strategyID.toString(16); +}; + +export const isETHAddress = (address: string) => { + return address.toLowerCase() === ETH_ADDRESS; +}; diff --git a/src/connectors/carbon/carbonAMM.ts b/src/connectors/carbon/carbonAMM.ts new file mode 100644 index 0000000000..692e6c7d8e --- /dev/null +++ b/src/connectors/carbon/carbonAMM.ts @@ -0,0 +1,428 @@ +import { + BigNumber, + ContractInterface, + PopulatedTransaction, + Transaction, + Wallet, +} from 'ethers'; +import { getAddress } from 'ethers/lib/utils'; +import { Token } from '@uniswap/sdk'; +import { Fraction } from '@uniswap/sdk-core'; +import { ChainCache, initSyncedCache } from '@bancor/carbon-sdk/chain-cache'; +import { + ContractsApi, + ContractsConfig, +} from '@bancor/carbon-sdk/contracts-api'; +import { Toolkit } from '@bancor/carbon-sdk/strategy-management'; +import { Action, MatchActionBNStr, TradeActionBNStr } from '@bancor/carbon-sdk'; + +import { Decimal } from '@bancor/carbon-sdk/utils'; + +import { Ethereum } from '../../chains/ethereum/ethereum'; +import { EVMTxBroadcaster } from '../../chains/ethereum/evm.broadcaster'; + +import { isFractionString } from '../../services/validators'; +import { percentRegexp } from '../../services/config-manager-v2'; +import { Uniswapish, UniswapishTrade } from '../../services/common-interfaces'; +import { logger } from '../../services/logger'; + +import carbonControllerAbi from './carbon_controller_abi.json'; + +import { CarbonConfig } from './carbon.config'; +import { isETHAddress } from './carbon.utils'; + +type TradeData = { + tradeActions: TradeActionBNStr[]; + actionsTokenRes: Action[]; + totalSourceAmount: string; + totalTargetAmount: string; + effectiveRate: string; + actionsWei: MatchActionBNStr[]; +}; + +export interface CarbonTrade { + from: string; + to: string; + amount: string; + tradeData: TradeData; + executionPrice: Fraction; + tradeByTarget: boolean; +} + +export class Carbonamm implements Uniswapish { + private static _instances: { [name: string]: Carbonamm }; + public carbonContractConfig: Required; + public carbonSDK!: Toolkit; // will be initialized in init() + public sdkCache!: ChainCache; // will be initialized in init() + public api: ContractsApi; + private tokenList: Record = {}; + public router: any; + public routerAbi: any; + private _chain: Ethereum; + private _ready: boolean = false; + private _conf: CarbonConfig.NetworkConfig; + private _gasLimitEstimate: number; + private _allowedSlippage: string; + private _ttl: number; + private _nativeToken: Token; + + private constructor(chain: string, network: string) { + if (chain === 'ethereum') { + this._chain = Ethereum.getInstance(network); + } else { + throw new Error('Unsupported chain'); + } + + this._nativeToken = + chain === 'ethereum' + ? new Token( + 1, + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + 18, + 'ETH', + 'Ethereum' + ) + : new Token(1, '', 18); + + this._conf = CarbonConfig.config; + this._allowedSlippage = this._conf.allowedSlippage; + this.carbonContractConfig = this._conf.carbonContractsConfig( + chain, + network + ); + + this.api = new ContractsApi( + this._chain.provider, + this.carbonContractConfig + ); + + this._gasLimitEstimate = this._conf.gasLimitEstimate; + this._ttl = this._conf.ttl; + + this.router = this.carbonContractConfig.carbonControllerAddress; + this.routerAbi = carbonControllerAbi; + } + + public static getInstance(chain: string, network: string): Carbonamm { + if (Carbonamm._instances === undefined) { + Carbonamm._instances = {}; + } + if (!(chain + network in Carbonamm._instances)) { + Carbonamm._instances[chain + network] = new Carbonamm(chain, network); + } + + return Carbonamm._instances[chain + network]; + } + + public async loadTokens() { + for (const token of this._chain.storedTokenList) { + this.tokenList[token.address] = new Token( + this._chain.chainId, + token.address, + token.decimals, + token.symbol, + token.name + ); + } + } + + private isNativeAddress(address: string) { + if (this._chain.chainName === 'ethereum') return isETHAddress(address); + return false; + } + + /** + * Given a token's address, return the connector's native representation of + * the token. + * + * @param address Token address + */ + public getTokenByAddress(address: string): Token { + return this.isNativeAddress(address) + ? this._nativeToken + : this.tokenList[getAddress(address)]; + } + + /** + * Default time-to-live for swap transactions, in seconds. + */ + public get ttl(): number { + return Math.floor(new Date().getTime() / 1000) + this._ttl; + } + + /** + * Default gas limit for swap transactions. + */ + public get gasLimitEstimate(): number { + return this._gasLimitEstimate; + } + + public async init() { + if (!this._chain.ready()) { + await this._chain.init(); + } + + if (!this._ready) { + const { cache, startDataSync } = initSyncedCache(this.api.reader); + this.sdkCache = cache; + + const decimalsMap = new Map(); + this._chain.storedTokenList.forEach((token) => { + decimalsMap.set(token.address, token.decimals); + }); + + this.carbonSDK = new Toolkit(this.api, this.sdkCache, (address) => + decimalsMap.get(address.toLowerCase()) + ); + + logger.info('Loading tokens...'); + await this.loadTokens(); + + logger.info('Starting Data Sync...'); + await startDataSync(); + + this._ready = true; + } + } + + public ready(): boolean { + return this._ready; + } + + /** + * 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): number { + if (allowedSlippageStr != null && isFractionString(allowedSlippageStr)) { + const fractionSplit = allowedSlippageStr.split('/'); + return Number(fractionSplit[0]) / Number(fractionSplit[1]); + } + + const allowedSlippage = this._allowedSlippage; + + const matches = allowedSlippage.match(percentRegexp); + if (matches) return Number(matches[1]) / Number(matches[2]); + throw new Error( + 'Encountered a malformed percent string in the config for ALLOWED_SLIPPAGE.' + ); + } + + /** + * 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 quoteToken Token input for the transaction + * @param baseToken Token output from the transaction + * @param amount Amount of `baseToken` desired from the transaction, in wei + */ + async estimateBuyTrade( + quoteToken: Token, + baseToken: Token, + amount: BigNumber + ) { + const tradeByTarget = true; + return await this.estimateTrade( + quoteToken, + baseToken, + amount, + tradeByTarget + ); + } + + /** + * 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 + */ + async estimateSellTrade( + baseToken: Token, + quoteToken: Token, + amount: BigNumber + ) { + const tradeByTarget = false; + return await this.estimateTrade( + baseToken, + quoteToken, + amount, + tradeByTarget + ); + } + + /** + * Given the amount of `inputToken` to put into a transaction, calculate the + * amount of `outputToken` that can be expected from the transaction. + * + * Used to calculate buy and sell prices + * + * @param inputToken Token input for the transaction + * @param outputToken Output from the transaction + * @param amount Amount of `inputToken` to put into the transaction + */ + async estimateTrade( + inputToken: Token, + outputToken: Token, + amount: BigNumber, + tradeByTarget: boolean + ): Promise<{ trade: CarbonTrade; expectedAmount: Fraction }> { + const amountWei = amount.toString(); + + // Because the toolkit expects floating point amounts + const parsedAmount = new Decimal(amountWei) + .div( + new Decimal(10).pow( + tradeByTarget ? outputToken.decimals : inputToken.decimals + ) + ) + .toString(); + + const tradeData = await this.carbonSDK.getTradeData( + inputToken.address, + outputToken.address, + parsedAmount, + tradeByTarget, + this._conf.matchType + ); + + if (!tradeData || tradeData.tradeActions.length === 0) { + throw new Error( + `No trade actions possible for ${inputToken.address} to ${outputToken.address}` + ); + } + + const expectedAmountFraction = new Decimal( + tradeByTarget ? tradeData.totalSourceAmount : tradeData.totalTargetAmount + ).toFraction(); + + const expectedAmount = new Fraction( + expectedAmountFraction[0].toFixed(0).toString(), + expectedAmountFraction[1].toFixed(0).toString() + ); + + const effectiveRateFraction = new Decimal( + tradeData.effectiveRate + ).toFraction(); + + const executionPrice = new Fraction( + effectiveRateFraction[0].toFixed(0).toString(), + effectiveRateFraction[1].toFixed(0).toString() + ); + + return { + trade: { + from: inputToken.address, + to: outputToken.address, + amount: amountWei, + tradeData: tradeData, + executionPrice: executionPrice, + tradeByTarget: tradeByTarget, + }, + expectedAmount: expectedAmount, + }; + } + + /** + * Given a wallet and a Uniswap-ish trade, try to execute it on blockchain. + * + * @param wallet Wallet + * @param trade Expected trade + * @param gasPrice Base gas price, for pre-EIP1559 transactions + * @param router smart contract address + * @param ttl How long the swap is valid before expiry, in seconds + * @param abi Router contract ABI + * @param gasLimit Gas limit + * @param nonce (Optional) EVM transaction nonce + * @param maxFeePerGas (Optional) Maximum total fee per gas you want to pay + * @param maxPriorityFeePerGas (Optional) Maximum tip per gas you want to pay + */ + async executeTrade( + wallet: Wallet, + trade: UniswapishTrade, + gasPrice: number, + _router: string, + ttl: number, + _abi: ContractInterface, + gasLimit: number, + nonce?: number, + maxFeePerGas?: BigNumber, + maxPriorityFeePerGas?: BigNumber, + allowedSlippage?: string + ): Promise { + const carbonTrade = trade; + + let overrideParams: { + gasLimit: string | number; + value: number; + nonce: number | undefined; + maxFeePerGas?: BigNumber | undefined; + maxPriorityFeePerGas?: BigNumber | undefined; + gasPrice?: string; + }; + if (maxFeePerGas || maxPriorityFeePerGas) { + overrideParams = { + gasLimit, + value: 0, + nonce, + maxFeePerGas, + maxPriorityFeePerGas, + }; + } else { + overrideParams = { + gasPrice: (gasPrice * 1e9).toFixed(0), + gasLimit: gasLimit.toFixed(0), + value: 0, + nonce: nonce, + }; + } + + const slippage = this.getAllowedSlippage(allowedSlippage); + const deadlineMs = ttl * 1000; // in ms + let tradeTransaction: PopulatedTransaction; + + if (carbonTrade.tradeByTarget) { + const maxInput = new Decimal(1) + .add(slippage) + .times(carbonTrade.tradeData.totalSourceAmount) + .toString(); + + tradeTransaction = await this.carbonSDK.composeTradeByTargetTransaction( + carbonTrade.from, + carbonTrade.to, + carbonTrade.tradeData.tradeActions, + deadlineMs.toString(), + maxInput, + { ...overrideParams } + ); + } else { + const minReturn = new Decimal(1) + .sub(slippage) + .times(carbonTrade.tradeData.totalTargetAmount) + .toString(); + + tradeTransaction = await this.carbonSDK.composeTradeBySourceTransaction( + carbonTrade.from, + carbonTrade.to, + carbonTrade.tradeData.tradeActions, + deadlineMs.toString(), + minReturn, + { ...overrideParams } + ); + } + + const txResponse = await EVMTxBroadcaster.getInstance( + this._chain, + wallet.address + ).broadcast(tradeTransaction); + + return txResponse; + } +} diff --git a/src/connectors/carbon/carbon_controller_abi.json b/src/connectors/carbon/carbon_controller_abi.json new file mode 100644 index 0000000000..26200544a9 --- /dev/null +++ b/src/connectors/carbon/carbon_controller_abi.json @@ -0,0 +1,1761 @@ +{ + "address": "0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AccessDenied", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "BalanceMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "DeadlineExpired", + "type": "error" + }, + { + "inputs": [], + "name": "GreaterThanMaxInput", + "type": "error" + }, + { + "inputs": [], + "name": "IdenticalAddresses", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientCapacity", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientLiquidity", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientNativeTokenReceived", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFee", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidIndices", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRate", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTradeActionAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTradeActionStrategyId", + "type": "error" + }, + { + "inputs": [], + "name": "LowerThanMinReturn", + "type": "error" + }, + { + "inputs": [], + "name": "NativeAmountMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "OrderDisabled", + "type": "error" + }, + { + "inputs": [], + "name": "OutDated", + "type": "error" + }, + { + "inputs": [], + "name": "Overflow", + "type": "error" + }, + { + "inputs": [], + "name": "PairAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "PairDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownDelegator", + "type": "error" + }, + { + "inputs": [], + "name": "UnnecessaryNativeTokenReceived", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroValue", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "Token", + "name": "token", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "FeesWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "pairId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token1", + "type": "address" + } + ], + "name": "PairCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "prevFeePPM", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newFeePPM", + "type": "uint32" + } + ], + "name": "PairTradingFeePPMUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order0", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order1", + "type": "tuple" + } + ], + "name": "StrategyCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order0", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order1", + "type": "tuple" + } + ], + "name": "StrategyDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order0", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct Order", + "name": "order1", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "reason", + "type": "uint8" + } + ], + "name": "StrategyUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "trader", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "sourceToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "Token", + "name": "targetToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sourceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "targetAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "tradingFeeAmount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "bool", + "name": "byTargetAmount", + "type": "bool" + } + ], + "name": "TokensTraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "prevFeePPM", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "newFeePPM", + "type": "uint32" + } + ], + "name": "TradingFeePPMUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token", + "type": "address" + } + ], + "name": "accumulatedFees", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "sourceToken", + "type": "address" + }, + { + "internalType": "Token", + "name": "targetToken", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "internalType": "struct TradeAction[]", + "name": "tradeActions", + "type": "tuple[]" + } + ], + "name": "calculateTradeSourceAmount", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "sourceToken", + "type": "address" + }, + { + "internalType": "Token", + "name": "targetToken", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "internalType": "struct TradeAction[]", + "name": "tradeActions", + "type": "tuple[]" + } + ], + "name": "calculateTradeTargetAmount", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "controllerType", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + } + ], + "name": "createPair", + "outputs": [ + { + "components": [ + { + "internalType": "uint128", + "name": "id", + "type": "uint128" + }, + { + "internalType": "Token[2]", + "name": "tokens", + "type": "address[2]" + } + ], + "internalType": "struct Pair", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "internalType": "struct Order[2]", + "name": "orders", + "type": "tuple[2]" + } + ], + "name": "createStrategy", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + } + ], + "name": "deleteStrategy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + } + ], + "name": "pair", + "outputs": [ + { + "components": [ + { + "internalType": "uint128", + "name": "id", + "type": "uint128" + }, + { + "internalType": "Token[2]", + "name": "tokens", + "type": "address[2]" + } + ], + "internalType": "struct Pair", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + } + ], + "name": "pairTradingFeePPM", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pairs", + "outputs": [ + { + "internalType": "Token[2][]", + "name": "", + "type": "address[2][]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "postUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "roleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "roleEmergencyStopper", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "roleFeesManager", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint32", + "name": "newPairTradingFeePPM", + "type": "uint32" + } + ], + "name": "setPairTradingFeePPM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "newTradingFeePPM", + "type": "uint32" + } + ], + "name": "setTradingFeePPM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + }, + { + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "endIndex", + "type": "uint256" + } + ], + "name": "strategiesByPair", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "Token[2]", + "name": "tokens", + "type": "address[2]" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "internalType": "struct Order[2]", + "name": "orders", + "type": "tuple[2]" + } + ], + "internalType": "struct Strategy[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token0", + "type": "address" + }, + { + "internalType": "Token", + "name": "token1", + "type": "address" + } + ], + "name": "strategiesByPairCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "strategy", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "Token[2]", + "name": "tokens", + "type": "address[2]" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "internalType": "struct Order[2]", + "name": "orders", + "type": "tuple[2]" + } + ], + "internalType": "struct Strategy", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "sourceToken", + "type": "address" + }, + { + "internalType": "Token", + "name": "targetToken", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "internalType": "struct TradeAction[]", + "name": "tradeActions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "minReturn", + "type": "uint128" + } + ], + "name": "tradeBySourceAmount", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "sourceToken", + "type": "address" + }, + { + "internalType": "Token", + "name": "targetToken", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "internalType": "struct TradeAction[]", + "name": "tradeActions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "maxInput", + "type": "uint128" + } + ], + "name": "tradeByTargetAmount", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "tradingFeePPM", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "strategyId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "internalType": "struct Order[2]", + "name": "currentOrders", + "type": "tuple[2]" + }, + { + "components": [ + { + "internalType": "uint128", + "name": "y", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "z", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "A", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "B", + "type": "uint64" + } + ], + "internalType": "struct Order[2]", + "name": "newOrders", + "type": "tuple[2]" + } + ], + "name": "updateStrategy", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "Token", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "withdrawFees", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] +} \ No newline at end of file diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index 6c43afc33a..41c01a5560 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -22,6 +22,7 @@ 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 { CarbonConfig } from './carbon/carbon.config'; export namespace ConnectorsRoutes { export const router = Router(); @@ -168,7 +169,13 @@ export namespace ConnectorsRoutes { trading_type: QuipuswapConfig.config.tradingTypes, chain_type: QuipuswapConfig.config.chainType, available_networks: QuipuswapConfig.config.availableNetworks, - } + }, + { + name: 'carbonamm', + trading_type: CarbonConfig.config.tradingTypes, + chain_type: CarbonConfig.config.chainType, + available_networks: CarbonConfig.config.availableNetworks, + }, ], }); }) diff --git a/src/connectors/xrpl/xrpl.ts b/src/connectors/xrpl/xrpl.ts index 75fc418bda..75c3de54dd 100644 --- a/src/connectors/xrpl/xrpl.ts +++ b/src/connectors/xrpl/xrpl.ts @@ -43,6 +43,8 @@ import { import LRUCache from 'lru-cache'; import { getXRPLConfig } from '../../chains/xrpl/xrpl.config'; import { isUndefined } from 'mathjs'; +import { convertStringToHex } from './xrpl.utils'; +import { logger } from '../../services/logger'; // const XRP_FACTOR = 1000000; const ORDERBOOK_LIMIT = 50; @@ -85,6 +87,11 @@ export class XRPLCLOB implements CLOBish { } public async loadMarkets() { + // Make a while loop and wait for the XRPL to be ready + while (!this._xrpl.ready()) { + await new Promise((resolve) => setTimeout(resolve, 100)); + } + const rawMarkets = await this.fetchMarkets(); for (const market of rawMarkets) { this.parsedMarkets[market.marketId] = market; @@ -92,11 +99,9 @@ export class XRPLCLOB implements CLOBish { } public async init() { - if (!this._xrpl.ready() || Object.keys(this.parsedMarkets).length === 0) { - await this._xrpl.init(); - await this.loadMarkets(); - this._ready = true; - } + await this._xrpl.init(); + await this.loadMarkets(); + this._ready = true; } public ready(): boolean { @@ -121,8 +126,8 @@ export class XRPLCLOB implements CLOBish { } const marketsAsArray: Array = []; - for (const market in this.parsedMarkets) { - marketsAsArray.push(this.parsedMarkets[market]); + for (const marketId in this.parsedMarkets) { + marketsAsArray.push(this.parsedMarkets[marketId]); } return { markets: marketsAsArray }; @@ -141,7 +146,9 @@ export class XRPLCLOB implements CLOBish { loadedMarkets.push(processedMarket); }; - await promiseAllInBatches(getMarket, markets, 1, 1); + logger.info(`Fetching markets for ${this.chain} ${this.network}`); + + await promiseAllInBatches(getMarket, markets, 15, 300); return loadedMarkets; } @@ -154,8 +161,8 @@ export class XRPLCLOB implements CLOBish { quoteTransferRate: number; const zeroTransferRate = 1000000000; - const baseCurrency = market.baseCode; - const quoteCurrency = market.quoteCode; + const baseCurrency = convertStringToHex(market.baseCode); + const quoteCurrency = convertStringToHex(market.quoteCode); const baseIssuer = market.baseIssuer; const quoteIssuer = market.quoteIssuer; @@ -389,9 +396,22 @@ export class XRPLCLOB implements CLOBish { const quoteCurrency = market.quoteCurrency; const baseIssuer = market.baseIssuer; const quoteIssuer = market.quoteIssuer; + let price = parseFloat(req.price) + + // If it is market order + // Increase price by 3% if it is buy order + // Decrease price by 3% if it is sell order + if (req.orderType == 'MARKET') { + const midPrice = await this.getMidPriceForMarket(market); + if (req.side == TradeType.BUY) { + price = midPrice * 1.03; + } else { + price = midPrice * 0.97; + } + } const wallet = await this.getWallet(req.address); - const total = parseFloat(req.price) * parseFloat(req.amount); + const total = price * parseFloat(req.amount); let we_pay: Token = { currency: '', @@ -436,8 +456,25 @@ export class XRPLCLOB implements CLOBish { we_get.value = xrpToDrops(we_get.value); } + let flag = 0; + + switch (req.orderType) { + case 'LIMIT': + flag = 0; + break; + case 'LIMIT_MAKER': + flag = 65536; + break; + case 'MARKET': + flag = 131072; + break; + default: + throw new Error('Order type not supported'); + } + const offer: Transaction = { TransactionType: 'OfferCreate', + Flags: flag, Account: wallet.classicAddress, TakerGets: we_pay.currency == 'XRP' ? we_pay.value : we_pay, TakerPays: we_get.currency == 'XRP' ? we_get.value : we_get, @@ -459,7 +496,7 @@ export class XRPLCLOB implements CLOBish { filledAmount: '0', state: 'PENDING_OPEN', tradeType: req.side, - orderType: 'LIMIT', + orderType: req.orderType, createdAt: currentTime, createdAtLedgerIndex: currentLedgerIndex, updatedAt: currentTime, @@ -534,7 +571,7 @@ export class XRPLCLOB implements CLOBish { const prepared = await this._client.autofill(offer); const signed = wallet.sign(prepared); await this._xrpl.ensureConnection(); - await this._client.submit(signed.tx_blob); + await this._client.submitAndWait(signed.tx_blob); this._isSubmittingTxn = false; return { prepared, signed }; } diff --git a/src/connectors/xrpl/xrpl.types.ts b/src/connectors/xrpl/xrpl.types.ts index 71db38ae42..1c7eea59c8 100644 --- a/src/connectors/xrpl/xrpl.types.ts +++ b/src/connectors/xrpl/xrpl.types.ts @@ -31,10 +31,10 @@ export enum OrderStatus { export enum OrderType { LIMIT = 'LIMIT', - PASSIVE = 'PASSIVE', + LIMIT_MAKER = 'LIMIT_MAKER', // Limit Maker or Post Only Order IOC = 'IOC', // Immediate or Cancel FOK = 'FOK', // Fill or Kill - SELL = 'SELL', // Sell + MARKET = 'MARKET', // Sell or Market Order } export enum TransactionIntentType { diff --git a/src/connectors/xrpl/xrpl.utils.ts b/src/connectors/xrpl/xrpl.utils.ts index ba36bf655e..bc43127bf9 100644 --- a/src/connectors/xrpl/xrpl.utils.ts +++ b/src/connectors/xrpl/xrpl.utils.ts @@ -122,3 +122,15 @@ export function convertHexToString(hex: string): string { return hex; } + +export function convertStringToHex(str: string): string { + if (str.length > 3) { + let hex = Buffer.from(str).toString('hex'); + while (hex.length < 40) { + hex += '00'; // pad with zeros to reach 160 bits (40 hex characters) + } + return hex.toUpperCase(); + } + + return str; +} \ No newline at end of file diff --git a/src/services/common-interfaces.ts b/src/services/common-interfaces.ts index 25e8ac78ce..8497b3945c 100644 --- a/src/services/common-interfaces.ts +++ b/src/services/common-interfaces.ts @@ -113,6 +113,7 @@ import { import { BalanceRequest } from '../network/network.requests'; import { TradeV2 } from '@traderjoe-xyz/sdk-v2'; import { CurveTrade } from '../connectors/curve/curve'; +import { CarbonTrade } from '../connectors/carbon/carbonAMM'; // TODO Check the possibility to have clob/solana/serum equivalents here // Check this link https://hummingbot.org/developers/gateway/building-gateway-connectors/#5-add-sdk-classes-to-uniswapish-interface @@ -160,7 +161,8 @@ export type UniswapishTrade = | VVSTrade | TradeXsswap | TradeV2 - | CurveTrade; + | CurveTrade + | CarbonTrade; export type UniswapishTradeOptions = | MMFTradeOptions diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index f2c1c11b36..1863e29305 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -43,6 +43,7 @@ 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'; export type ChainUnion = | Algorand @@ -234,8 +235,9 @@ export async function getConnector( connectorInstance = Curve.getInstance(chain, network); } else if (chain === 'tezos' && connector === 'quipuswap') { connectorInstance = QuipuSwap.getInstance(network); - } - else { + } else if (chain === 'ethereum' && connector === 'carbonamm') { + connectorInstance = Carbonamm.getInstance(chain, network); + } else { throw new Error('unsupported chain or connector'); } diff --git a/src/services/schema/carbon-schema.json b/src/services/schema/carbon-schema.json new file mode 100644 index 0000000000..688e2c9bd8 --- /dev/null +++ b/src/services/schema/carbon-schema.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "allowedSlippage": { + "type": "string" + }, + "gasLimitEstimate": { + "type": "integer" + }, + "ttl": { + "type": "integer" + }, + "matchType": { + "enum": [ + "FAST", + "BEST" + ] + }, + "contractAddresses": { + "type": "object", + "patternProperties": { + "^[\\w-]+$": { + "type": "object", + "patternProperties": { + "^\\w+$": { + "type": "object", + "properties": { + "carbonControllerAddress": { + "type": "string" + }, + "multiCallAddress": { + "type": "string" + }, + "voucherAddress": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "allowedSlippage", + "ttl", + "contractAddresses", + "matchType" + ] +} \ No newline at end of file diff --git a/src/templates/carbon.yml b/src/templates/carbon.yml new file mode 100644 index 0000000000..49bdacd10e --- /dev/null +++ b/src/templates/carbon.yml @@ -0,0 +1,21 @@ +# allowedSlippage: how much the execution price is allowed to move unfavorably from the trade +# execution price. It uses a rational number for precision. +allowedSlippage: '1/100' + +# ttl: how long a trade is valid in seconds. After this time passes carbon will not +# perform the trade, but the gas will still be sent. +ttl: 300 + +# The maximum gas used to estimate gasCost for a Carbon trade. +gasLimitEstimate: 200000 + +# Type of matching using the Carbon SDK matching engine +# Available options: 'FAST', 'BEST' +matchType: 'FAST' + +contractAddresses: + ethereum: + mainnet: + carbonControllerAddress: '0xC537e898CD774e2dCBa3B14Ea6f34C93d5eA45e1' + multiCallAddress: '0x5ba1e12693dc8f9c48aad8770482f4739beed696' + voucherAddress: '0x3660F04B79751e31128f6378eAC70807e38f554E' \ No newline at end of file diff --git a/src/templates/lists/xrpl_markets.json b/src/templates/lists/xrpl_markets.json index ec4a4a1e9b..8d55f78d90 100644 --- a/src/templates/lists/xrpl_markets.json +++ b/src/templates/lists/xrpl_markets.json @@ -1,73 +1,490 @@ [ { "id": 1, - "marketId": "SOLO-XRP", - "baseIssuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", - "baseCode": "534F4C4F00000000000000000000000000000000", - "quoteIssuer": "", - "quoteCode": "XRP", - "baseTokenID": 31, - "quoteTokenID": 0 + "marketId": "XRP-USD", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "quoteCode": "USD" }, { "id": 2, - "marketId": "SOLO-USDC", - "baseIssuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", - "baseCode": "534F4C4F00000000000000000000000000000000", - "quoteIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", - "quoteCode": "USDC", - "baseTokenID": 31, - "quoteTokenID": 18465 + "marketId": "XRP-EUR", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "quoteCode": "EUR" }, { "id": 3, - "marketId": "USDC-XRP", - "baseIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", - "baseCode": "USDC", - "quoteIssuer": "", - "quoteCode": "XRP", - "baseTokenID": 18465, - "quoteTokenID": 0 + "marketId": "XRP-GBP", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "r4GN9eEoz9K4BhMQXe4H1eYNtvtkwGdt8g", + "quoteCode": "GBP" }, { "id": 4, - "marketId": "USDC-USD", - "baseIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", - "baseCode": "USDC", - "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", - "quoteCode": "USD", - "baseTokenID": 18465, - "quoteTokenID": 16603 + "marketId": "XRP-BTC", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL", + "quoteCode": "BTC" }, { "id": 5, - "marketId": "BTC-XRP", - "baseIssuer": "rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL", - "baseCode": "BTC", - "quoteIssuer": "", - "quoteCode": "XRP", - "baseTokenID": 1381, - "quoteTokenID": 0 + "marketId": "XRP-ETH", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcA8X3TVMST1n3CJeAdGk1RdRCHii7N2h", + "quoteCode": "ETH" }, { "id": 6, - "marketId": "BTC-USD", - "baseIssuer": "rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL", - "baseCode": "BTC", - "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", - "quoteCode": "USD", - "baseTokenID": 1381, - "quoteTokenID": 16603 - } - , + "marketId": "XRP-LTC", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcRzGWq6Ng3jeYhqnmM4zcWcUh69hrQ8V", + "quoteCode": "LTC" + }, { "id": 7, - "marketId": "XRP-USD", + "marketId": "XRP-CNY", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "quoteCode": "CNY" + }, + { + "id": 8, + "marketId": "XRP-BCH", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds", + "quoteCode": "BCH" + }, + { + "id": 9, + "marketId": "XRP-ETC", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rDAN8tzydyNfnNf2bfUQY6iR96UbpvNsze", + "quoteCode": "ETC" + }, + { + "id": 10, + "marketId": "XRP-DSH", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcXY84C4g14iFp6taFXjjQGVeHqSCh9RX", + "quoteCode": "DSH" + }, + { + "id": 11, + "marketId": "XRP-XAU", "baseIssuer": "", "baseCode": "XRP", + "quoteIssuer": "rcoef87SYMJ58NAFx7fNM5frVknmvHsvJ", + "quoteCode": "XAU" + }, + { + "id": 12, + "marketId": "XRP-SGB", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rctArjqVvTHihekzDeecKo6mkTYTUSBNc", + "quoteCode": "SGB" + }, + { + "id": 13, + "marketId": "XRP-USDT", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcvxE9PS9YBwxtGg1qNeewV6ZB3wGubZq", + "quoteCode": "USDT" + }, + { + "id": 14, + "marketId": "XRP-USDC", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", + "quoteCode": "USDC" + }, + { + "id": 15, + "marketId": "XRP-WXRP", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rEa5QY8tdbjgitLyfKF1E5Qx3VGgvbUhB3", + "quoteCode": "WXRP" + }, + { + "id": 16, + "marketId": "XRP-GALA", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rf5YPb9y9P3fTjhxNaZqmrwaj5ar8PG1gM", + "quoteCode": "GALA" + }, + { + "id": 17, + "marketId": "XRP-FLR", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rcxJwVnftZzXqyH9YheB8TgeiZUhNo1Eu", + "quoteCode": "FLR" + }, + { + "id": 18, + "marketId": "XRP-XAH", + "baseIssuer": "", + "baseCode": "XRP", + "quoteIssuer": "rswh1fvyLqHizBS2awu1vs6QcmwTBd9qiv", + "quoteCode": "XAH" + }, + { + "id": 19, + "marketId": "USD-XRP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 20, + "marketId": "USD-EUR", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "quoteCode": "EUR" + }, + { + "id": 21, + "marketId": "USD-GBP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "r4GN9eEoz9K4BhMQXe4H1eYNtvtkwGdt8g", + "quoteCode": "GBP" + }, + { + "id": 22, + "marketId": "USD-BTC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL", + "quoteCode": "BTC" + }, + { + "id": 23, + "marketId": "USD-BCH", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds", + "quoteCode": "BCH" + }, + { + "id": 24, + "marketId": "USD-LTC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rcRzGWq6Ng3jeYhqnmM4zcWcUh69hrQ8V", + "quoteCode": "LTC" + }, + { + "id": 25, + "marketId": "USD.b-XRP", + "baseIssuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", + "baseCode": "USD", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 26, + "marketId": "USD-USDT", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rcvxE9PS9YBwxtGg1qNeewV6ZB3wGubZq", + "quoteCode": "USDT" + }, + { + "id": 27, + "marketId": "USD-USDC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", + "quoteCode": "USDC" + }, + { + "id": 28, + "marketId": "USD-WXRP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rEa5QY8tdbjgitLyfKF1E5Qx3VGgvbUhB3", + "quoteCode": "WXRP" + }, + { + "id": 29, + "marketId": "USD-GALA", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rf5YPb9y9P3fTjhxNaZqmrwaj5ar8PG1gM", + "quoteCode": "GALA" + }, + { + "id": 30, + "marketId": "USD-FLR", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "USD", + "quoteIssuer": "rcxJwVnftZzXqyH9YheB8TgeiZUhNo1Eu", + "quoteCode": "FLR" + }, + { + "id": 30, + "marketId": "EUR-XRP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 31, + "marketId": "EUR-USD", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", - "quoteCode": "USD", - "baseTokenID": 0, - "quoteTokenID": 16603 + "quoteCode": "USD" + }, + { + "id": 32, + "marketId": "EUR-GBP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "r4GN9eEoz9K4BhMQXe4H1eYNtvtkwGdt8g", + "quoteCode": "GBP" + }, + { + "id": 33, + "marketId": "EUR-USD.b", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", + "quoteCode": "USD" + }, + { + "id": 34, + "marketId": "EUR-BTC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rchGBxcD1A1C2tdxF6papQYZ8kjRKMYcL", + "quoteCode": "BTC" + }, + { + "id": 35, + "marketId": "EUR-BCH", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds", + "quoteCode": "BCH" + }, + { + "id": 36, + "marketId": "EUR-LTC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rcRzGWq6Ng3jeYhqnmM4zcWcUh69hrQ8V", + "quoteCode": "LTC" + }, + { + "id": 37, + "marketId": "EUR-USDT", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rcvxE9PS9YBwxtGg1qNeewV6ZB3wGubZq", + "quoteCode": "USDT" + }, + { + "id": 38, + "marketId": "EUR-USDC", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", + "quoteCode": "USDC" + }, + { + "id": 39, + "marketId": "EUR-WXRP", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rEa5QY8tdbjgitLyfKF1E5Qx3VGgvbUhB3", + "quoteCode": "WXRP" + }, + { + "id": 40, + "marketId": "EUR-GALA", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rf5YPb9y9P3fTjhxNaZqmrwaj5ar8PG1gM", + "quoteCode": "GALA" + }, + { + "id": 41, + "marketId": "EUR-FLR", + "baseIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "baseCode": "EUR", + "quoteIssuer": "rcxJwVnftZzXqyH9YheB8TgeiZUhNo1Eu", + "quoteCode": "FLR" + }, + { + "id": 42, + "marketId": "SGB-XRP", + "baseIssuer": "rctArjqVvTHihekzDeecKo6mkTYTUSBNc", + "baseCode": "SGB", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 43, + "marketId": "ELS-XRP", + "baseIssuer": "rHXuEaRYnnJHbDeuBH5w8yPh5uwNVh5zAg", + "baseCode": "ELS", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 44, + "marketId": "USDT-XRP", + "baseIssuer": "rcvxE9PS9YBwxtGg1qNeewV6ZB3wGubZq", + "baseCode": "USDT", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 45, + "marketId": "USDC-XRP", + "baseIssuer": "rcEGREd8NmkKRE8GE424sksyt1tJVFZwu", + "baseCode": "USDC", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 46, + "marketId": "SOLO-XRP", + "baseIssuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", + "baseCode": "SOLO", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 47, + "marketId": "WXRP-XRP", + "baseIssuer": "rEa5QY8tdbjgitLyfKF1E5Qx3VGgvbUhB3", + "baseCode": "WXRP", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 48, + "marketId": "GALA-XRP", + "baseIssuer": "rf5YPb9y9P3fTjhxNaZqmrwaj5ar8PG1gM", + "baseCode": "GALA", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 49, + "marketId": "FLR-XRP", + "baseIssuer": "rcxJwVnftZzXqyH9YheB8TgeiZUhNo1Eu", + "baseCode": "FLR", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 50, + "marketId": "SOLO-USD", + "baseIssuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", + "baseCode": "SOLO", + "quoteIssuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "quoteCode": "USD" + }, + { + "id": 51, + "marketId": "SOLO-USD.b", + "baseIssuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", + "baseCode": "SOLO", + "quoteIssuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", + "quoteCode": "USD" + }, + { + "id": 52, + "marketId": "ICOIN-XRP", + "baseIssuer": "rJSTh1VLk52tFC3VRXkNWu7Q4nYmfZv7BZ", + "baseCode": "icoin", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 53, + "marketId": "CORE-XRP", + "baseIssuer": "rcoreNywaoz2ZCQ8Lg2EbSLnGuRBmun6D", + "baseCode": "CORE", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 54, + "marketId": "XMEME-XRP", + "baseIssuer": "r4UPddYeGeZgDhSGPkooURsQtmGda4oYQW", + "baseCode": "XMEME", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 55, + "marketId": "CSC-XRP", + "baseIssuer": "rCSCManTZ8ME9EoLrSHHYKW8PPwWMgkwr", + "baseCode": "CSC", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 56, + "marketId": "FURY-XRP", + "baseIssuer": "rnoKi9s9b6WYaNGWQy4qVdnKo6Lj2eHE1D", + "baseCode": "FURY", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 57, + "marketId": "XSPECTAR-XRP", + "baseIssuer": "rh5jzTCdMRCVjQ7LT6zucjezC47KATkuvv", + "baseCode": "xSPECTAR", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 58, + "marketId": "RPR-XRP", + "baseIssuer": "r3qWgpz2ry3BhcRJ8JE6rxM8esrfhuKp4R", + "baseCode": "RPR", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 59, + "marketId": "XRDOGE-XRP", + "baseIssuer": "rLqUC2eCPohYvJCEBJ77eCCqVL2uEiczjA", + "baseCode": "XRdoge", + "quoteIssuer": "", + "quoteCode": "XRP" + }, + { + "id": 60, + "marketId": "EQUILIBRIUM-XRP", + "baseIssuer": "rpakCr61Q92abPXJnVboKENmpKssWyHpwu", + "baseCode": "Equilibrium", + "quoteIssuer": "", + "quoteCode": "XRP" } ] diff --git a/src/templates/lists/xrpl_tokens.json b/src/templates/lists/xrpl_tokens.json index c343b41892..af6ad9de2a 100644 --- a/src/templates/lists/xrpl_tokens.json +++ b/src/templates/lists/xrpl_tokens.json @@ -9,7 +9,7 @@ }, { "id": 31, - "code": "534F4C4F00000000000000000000000000000000", + "code": "SOLO", "issuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz", "title": "Sologenic", "trustlines": 288976, @@ -12374,5 +12374,26 @@ "issuer": "rPK6DvvoF8CVHGURSGNccCxKDXMnRAchHD", "trustlines": 443, "placeInTop": null + }, + { + "id": 99001, + "code": "XAH", + "issuer": "rswh1fvyLqHizBS2awu1vs6QcmwTBd9qiv", + "trustlines": 0, + "placeInTop": null + }, + { + "id": 99002, + "code": "FURY", + "issuer": "rnoKi9s9b6WYaNGWQy4qVdnKo6Lj2eHE1D", + "trustlines": 0, + "placeInTop": null + }, + { + "id": 99003, + "code": "XMEME", + "issuer": "r4UPddYeGeZgDhSGPkooURsQtmGda4oYQW", + "trustlines": 0, + "placeInTop": null } ] diff --git a/src/templates/root.yml b/src/templates/root.yml index 1a2f2a51e2..3d83344085 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -122,4 +122,8 @@ configurations: $namespace quipuswap: configurationPath: quipuswap.yml - schemaPath: quipuswap-schema.json \ No newline at end of file + schemaPath: quipuswap-schema.json + + $namespace carbon: + configurationPath: carbon.yml + schemaPath: carbon-schema.json diff --git a/src/templates/xrpl.yml b/src/templates/xrpl.yml index f5072942e8..8eaeccb4e7 100644 --- a/src/templates/xrpl.yml +++ b/src/templates/xrpl.yml @@ -21,8 +21,8 @@ networks: marketListSource: "/home/gateway/conf/lists/xrpl_markets_devnet.json" nativeCurrencySymbol: "XRP" network: "xrpl" -requestTimeout: 5000 -connectionTimeout: 5000 +requestTimeout: 10000 +connectionTimeout: 10000 feeCushion: 1.2 maxFeeXRP: "2" orderDbPath: "db/xrpl.level" diff --git a/test-bronze/connectors/carbon/carbonAMM.test.ts b/test-bronze/connectors/carbon/carbonAMM.test.ts new file mode 100644 index 0000000000..8f51873e68 --- /dev/null +++ b/test-bronze/connectors/carbon/carbonAMM.test.ts @@ -0,0 +1,676 @@ +import request from 'supertest'; +import Decimal from 'decimal.js-light'; +import { Token } from '@uniswap/sdk'; +import { EncodedStrategy, TokenPair } from '@bancor/carbon-sdk'; +import { + buildStrategyObject, + encodeStrategy, +} from '@bancor/carbon-sdk/strategy-management'; +import { BigNumber } from '@bancor/carbon-sdk/utils'; +import { gatewayApp } from '../../../src/app'; +import { patch, unpatch } from '../../../test/services/patch'; +import { Ethereum } from '../../../src/chains/ethereum/ethereum'; +import { EVMTxBroadcaster } from '../../../src/chains/ethereum/evm.broadcaster'; +import { Carbonamm } from '../../../src/connectors/carbon/carbonAMM'; +import { encodeStrategyId } from '../../../src/connectors/carbon/carbon.utils'; +import { patchEVMNonceManager } from '../../../test/evm.nonce.mock'; +import { Avalanche } from '../../../src/chains/avalanche/avalanche'; + +let ethereum: Ethereum; +let carbon: Carbonamm; + +const TX_HASH = + '0xf6f81a37796bd06a797484467302e4d6f72832409545e2e01feb86dd8b22e4b2'; // noqa: mock +const DEFAULT_FEE = 2000; + +const ETH = new Token( + 1, + '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + 18, + 'ETH' +); + +const USDC = new Token( + 1, + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + 6, + 'USDC' +); + +const DAI = new Token( + 1, + '0x6B175474E89094C44Da98b954EedeAC495271d0F', + 18, + 'DAI' +); + +const INVALID_REQUEST = { + chain: 'unknown', + connector: 'carbon', +}; + +const MARKETS = [ + { + ticker: 'DAI-USDC', + baseToken: { + chainId: 1, + address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + name: 'Dai', + symbol: 'DAI', + decimals: 18, + logoURI: + 'https://assets.coingecko.com/coins/images/9956/thumb/4943.png?1636636734', + }, + quoteToken: { + chainId: 1, + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + logoURI: + 'https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389', + }, + makerFee: 10, + }, + { + ticker: 'DAI-ETH', + baseToken: { + chainId: 1, + address: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + name: 'Dai', + symbol: 'DAI', + decimals: 18, + logoURI: + 'https://assets.coingecko.com/coins/images/9956/thumb/4943.png?1636636734', + }, + quoteToken: { + chainId: 1, + address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, + makerFee: 2000, + }, + { + ticker: 'USDC-ETH', + baseToken: { + chainId: 1, + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + logoURI: + 'https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389', + }, + quoteToken: { + chainId: 1, + address: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + name: 'Ethereum', + symbol: 'ETH', + decimals: 18, + }, + makerFee: 2000, + }, +]; + +const ORDERS = [ + { + id: '729', + pairId: '4', + owner: '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8', + baseToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + quoteToken: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + baseDecimals: 6, + quoteDecimals: 18, + buyPriceLow: '0.95', + buyPriceMarginal: '0.98', + buyPriceHigh: '0.98', + buyBudget: '1000', + sellPriceLow: '1.03', + sellPriceMarginal: '1.035', + sellPriceHigh: '1.04', + sellBudget: '1000', + }, + { + id: '730', + pairId: '4', + owner: '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8', + baseToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + quoteToken: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + baseDecimals: 6, + quoteDecimals: 18, + buyPriceLow: '0.90', + buyPriceMarginal: '0.95', + buyPriceHigh: '0.95', + buyBudget: '2000', + sellPriceLow: '1.03', + sellPriceMarginal: '1.03', + sellPriceHigh: '1.05', + sellBudget: '2000', + }, + { + id: '731', + pairId: '1', + owner: '0x7e57780cf01209a1522b9dCeFa9ff191DDd1c70f', + baseToken: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE', + quoteToken: '0x6B175474E89094C44Da98b954EedeAC495271d0F', + baseDecimals: 18, + quoteDecimals: 18, + buyPriceLow: '1500', + buyPriceMarginal: '1900', + buyPriceHigh: '1900', + buyBudget: '1000', + sellPriceLow: '2200', + sellPriceMarginal: '2300', + sellPriceHigh: '2400', + sellBudget: '1000', + }, +]; + +beforeAll(async () => { + ethereum = Ethereum.getInstance('mainnet'); + patchEVMNonceManager(ethereum.nonceManager); + ethereum.init(); + carbon = Carbonamm.getInstance('ethereum', 'mainnet'); + patchReader(); + + await carbon.init(); +}); + +beforeEach(() => { + patchReader(); +}); + +afterEach(() => { + unpatch(); +}); + +afterAll(async () => { + await ethereum.close(); +}); + +const buildEncodedStrategy = (order: { + id: string; + pairId: string; + baseToken: string; + quoteToken: string; + baseDecimals: number; + quoteDecimals: number; + buyPriceLow: string; + buyPriceMarginal: string; + buyPriceHigh: string; + buyBudget: string; + sellPriceLow: string; + sellPriceMarginal: string; + sellPriceHigh: string; + sellBudget: string; +}) => { + const strategyObject = buildStrategyObject( + order.baseToken, + order.quoteToken, + order.baseDecimals, + order.quoteDecimals, + order.buyPriceLow, + order.buyPriceMarginal, + order.buyPriceHigh, + order.buyBudget, + order.sellPriceLow, + order.sellPriceMarginal, + order.sellPriceHigh, + order.sellBudget + ); + + return { + id: BigNumber.from(encodeStrategyId(order.id, order.pairId)), + ...encodeStrategy(strategyObject), + }; +}; + +const patchAllowedSlippage = (allowedSlippage: string) => { + patch(carbon, '_allowedSlippage', allowedSlippage); +}; + +const patchReader = () => { + patch(carbon.api.reader, 'tokensByOwner', (owner: string): BigNumber[] => { + const ownerOrders = ORDERS.filter((order) => owner === order.owner); + if (!owner || ownerOrders.length === 0) return []; + return ownerOrders.map((order) => + BigNumber.from(encodeStrategyId(order.id, order.pairId)) + ); + }); + + patch(carbon.api.reader, 'pairs', (): TokenPair[] => { + return MARKETS.map((market) => [ + market.baseToken.address, + market.quoteToken.address, + ]); + }); + + patch( + carbon.api.reader, + 'strategiesByPair', + (token0: string, token1: string): EncodedStrategy[] => { + return ORDERS.filter((order) => { + return ( + (order.baseToken === token0 && order.quoteToken === token1) || + (order.baseToken === token1 && order.quoteToken === token0) + ); + }).map(buildEncodedStrategy); + } + ); + + patch( + carbon.api.reader, + 'strategies', + (ids: BigNumber[]): EncodedStrategy[] => { + return ORDERS.filter((order) => { + return ids.includes( + BigNumber.from(encodeStrategyId(order.id, order.pairId)) + ); + }).map(buildEncodedStrategy); + } + ); + + patch(carbon.api.reader, 'strategy', (id: BigNumber): EncodedStrategy => { + const order = ORDERS.find((order) => { + return encodeStrategyId(order.id, order.pairId) === id.toString(); + }); + if (!order) throw Error('No strategy found'); + + return buildEncodedStrategy(order); + }); + + patch(carbon.api.reader, 'tradingFeePPM', (): number => { + return DEFAULT_FEE; + }); + + patch( + carbon.api.reader, + 'pairsTradingFeePPM', + (pairs: TokenPair[]): [string, string, number][] => { + return pairs.map((pair) => { + const market = MARKETS.filter((market) => 'makerFee' in market).find( + (market) => { + return ( + (market.baseToken.address.toLowerCase() === + pair[0].toLowerCase() && + market.quoteToken.address.toLowerCase() === + pair[1].toLowerCase()) || + (market.baseToken.address.toLowerCase() === + pair[1].toLowerCase() && + market.quoteToken.address.toLowerCase() === + pair[0].toLowerCase()) + ); + } + ); + return [pair[0], pair[1], market?.makerFee || DEFAULT_FEE]; + }); + } + ); +}; + +const patchGetWallet = () => { + patch(ethereum, 'getWallet', () => { + return { + privateKey: + '83d8fae2444141a142079e9aa6dc1a49962af114d9ace8db9a34ecb8fa3e6cf8', // noqa: mock + address: '0x7e57780cf01209a1522b9dCeFa9ff191DDd1c70f', + }; + }); +}; + +const patchMsgBroadcaster = () => { + patch(EVMTxBroadcaster, 'getInstance', () => { + return { + broadcast() { + return { + hash: TX_HASH, + }; + }, + }; + }); +}; + +describe('verify Carbon constructor', () => { + it('Should return an Error with an unsupported chain', () => { + expect(async () => { + Carbonamm.getInstance('avalanche', 'avalanche'); + }).rejects.toThrow(Error); + }); +}); + +describe('verify Carbon estimateSellTrade', () => { + const inputAmount = 0.01; + const inputAmountWei = new Decimal(inputAmount) + .times(new Decimal(10).pow(ETH.decimals)) + .toString(); + + it('Should return an ExpectedTrade when available', async () => { + const expectedTrade = await carbon.estimateSellTrade( + ETH, + DAI, + BigNumber.from(inputAmountWei) + ); + expect(expectedTrade).toHaveProperty('trade'); + expect(expectedTrade).toHaveProperty('expectedAmount'); + }); + + it('Should throw an error if no trade actions are possible', async () => { + await expect(async () => { + await carbon.estimateSellTrade(ETH, USDC, BigNumber.from(1)); + }).rejects.toThrow(Error); + }); +}); + +describe('verify Carbon estimateBuyTrade', () => { + it('Should return an ExpectedTrade when available', async () => { + const inputAmount = 0.01; + const inputAmountWei = new Decimal(inputAmount) + .times(new Decimal(10).pow(ETH.decimals)) + .toString(); + + const expectedTrade = await carbon.estimateBuyTrade( + ETH, + DAI, + BigNumber.from(inputAmountWei) + ); + expect(expectedTrade).toHaveProperty('trade'); + expect(expectedTrade).toHaveProperty('expectedAmount'); + }); + + it('Should throw an error if no trade actions are possible', async () => { + await expect(async () => { + await carbon.estimateBuyTrade(ETH, USDC, BigNumber.from(1)); + }).rejects.toThrow(Error); + }); +}); + +describe('getAllowedSlippage', () => { + it('return number value when not null', () => { + const allowedSlippage = carbon.getAllowedSlippage('2/100'); + expect(allowedSlippage).toEqual(0.02); + }); + + it('return value from config when slippage is null', () => { + const allowedSlippage = carbon.getAllowedSlippage(); + expect(allowedSlippage).toEqual(0.01); + }); + + it('return value from config when input is malformed', () => { + const allowedSlippage = carbon.getAllowedSlippage('yo'); + expect(allowedSlippage).toEqual(0.01); + }); +}); + +describe('POST /amm/price SELL', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .post(`/amm/price`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'SELL', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(DAI.address)) + .expect((res) => expect(res.body.quote).toEqual(USDC.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => expect(Number(res.body.expectedAmount)).toBeLessThan(1)) + .expect((res) => expect(Number(res.body.price)).toBeLessThan(1)); + }); + + it('should return 200 with ETH request', async () => { + await request(gatewayApp) + .post(`/amm/price`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'ETH', + quote: 'DAI', + amount: '1', + side: 'SELL', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(ETH.address)) + .expect((res) => expect(res.body.quote).toEqual(DAI.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => + expect(Number(res.body.expectedAmount)).toBeGreaterThan(1) + ) + .expect((res) => expect(Number(res.body.price)).toBeGreaterThan(1)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('POST /amm/price BUY', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .post(`/amm/price`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'BUY', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(DAI.address)) + .expect((res) => expect(res.body.quote).toEqual(USDC.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => + expect(Number(res.body.expectedAmount)).toBeGreaterThan(1) + ) + .expect((res) => expect(Number(res.body.price)).toBeGreaterThan(1)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('POST /amm/trade SELL', () => { + it('should return 200 with proper request', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'SELL', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(DAI.address)) + .expect((res) => expect(res.body.quote).toEqual(USDC.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => expect(Number(res.body.expectedOut)).toBeLessThan(1)) + .expect((res) => expect(Number(res.body.price)).toBeLessThan(1)) + .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)); + }); + + it('should return 200 with ETH request', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'ETH', + quote: 'DAI', + amount: '1', + side: 'SELL', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(ETH.address)) + .expect((res) => expect(res.body.quote).toEqual(DAI.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => expect(Number(res.body.expectedOut)).toBeGreaterThan(1)) + .expect((res) => expect(Number(res.body.price)).toBeGreaterThan(1)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('POST /amm/trade BUY', () => { + it('should return 200 with proper request', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'BUY', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(DAI.address)) + .expect((res) => expect(res.body.quote).toEqual(USDC.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => expect(Number(res.body.expectedIn)).toBeGreaterThan(1)) + .expect((res) => expect(Number(res.body.price)).toBeGreaterThan(1)) + .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)); + }); + + it('should return 200 with proper request and maxFeePerGas set', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'BUY', + maxFeePerGas: '5000000000', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.base).toEqual(DAI.address)) + .expect((res) => expect(res.body.quote).toEqual(USDC.address)) + .expect((res) => expect(Number(res.body.amount)).toEqual(1)) + .expect((res) => expect(Number(res.body.expectedIn)).toBeGreaterThan(1)) + .expect((res) => expect(Number(res.body.price)).toBeGreaterThan(1)) + .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('Requests to the connector', () => { + it('should return 503 with unsupported chain', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + const avalanche = Avalanche.getInstance('avalanche'); + patchEVMNonceManager(avalanche.nonceManager); + avalanche.init(); + await request(gatewayApp) + .post(`/amm/price`) + .send({ + chain: 'avalanche', + network: 'avalanche', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'BUY', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(503); + await avalanche.close(); + }); + + it('should return 404 if there is a malformed percent slippage in the request', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'SELL', + allowedSlippage: '0.04', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(404); + }); + + it('should return 503 if there is a malformed percent slippage configured', async () => { + patchGetWallet(); + patchMsgBroadcaster(); + patchAllowedSlippage('0.5'); + + await request(gatewayApp) + .post(`/amm/trade`) + .send({ + chain: 'ethereum', + network: 'mainnet', + connector: 'carbonamm', + base: 'DAI', + quote: 'USDC', + amount: '1', + side: 'SELL', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(503); + }); +}); diff --git a/yarn.lock b/yarn.lock index ebf49279e2..f7a8456af1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -672,6 +672,20 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" +"@bancor/carbon-sdk@^0.0.93-DEV": + version "0.0.93-DEV" + resolved "https://registry.yarnpkg.com/@bancor/carbon-sdk/-/carbon-sdk-0.0.93-DEV.tgz#2071f1dc03c25c3897fd4cd9133f9345abdeb2db" + integrity sha512-qGu/twxhkYRsKKgrRt+2P9LOtJb5qjthR04QaYyDE2/+DFWVuzmvctXOAESFaUVrpHctZab0vB019KWS13upow== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/units" "^5.7.0" + decimal.js "^10.4.3" + ethers "^5.7.2" + events "^3.3.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1160,137 +1174,137 @@ "@ethersproject-xdc/abi@file:vendor/@ethersproject-xdc/abi": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:vendor/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-b7b4af72-b45f-4077-b151-8f0741d50a55-1707746220367/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/abstract-provider@file:vendor/@ethersproject-xdc/abstract-provider": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:vendor/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:vendor/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7ed4cfe0-b44c-4745-88b9-854ebe82e0bf-1707746220366/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:vendor/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-881f7628-fc63-4936-a4d8-c3dd78e2ea10-1707746220367/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-881f7628-fc63-4936-a4d8-c3dd78e2ea10-1707746220367/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-881f7628-fc63-4936-a4d8-c3dd78e2ea10-1707746220367/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-881f7628-fc63-4936-a4d8-c3dd78e2ea10-1707746220367/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-881f7628-fc63-4936-a4d8-c3dd78e2ea10-1707746220367/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/address@file:vendor/@ethersproject-xdc/address": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:vendor/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-fe34d301-d5ee-4904-8ac4-bbd60ce306c5-1707746220367/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-fe34d301-d5ee-4904-8ac4-bbd60ce306c5-1707746220367/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-fe34d301-d5ee-4904-8ac4-bbd60ce306c5-1707746220367/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-fe34d301-d5ee-4904-8ac4-bbd60ce306c5-1707746220367/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-fe34d301-d5ee-4904-8ac4-bbd60ce306c5-1707746220367/node_modules/@ethersproject-xdc/rlp" "@ethersproject-xdc/base64@file:vendor/@ethersproject-xdc/base64": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-85441adf-e89e-45ba-8b8e-fe505e45b4e3-1707746220368/node_modules/@ethersproject-xdc/bytes" "@ethersproject-xdc/basex@file:vendor/@ethersproject-xdc/basex": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-cffbf6ae-ebf3-40ac-8b29-03448e71bda2-1707746220368/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-cffbf6ae-ebf3-40ac-8b29-03448e71bda2-1707746220368/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/bignumber@file:vendor/@ethersproject-xdc/bignumber": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-b9234e3c-743c-41d0-afa8-98626be8151a-1707746220368/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-b9234e3c-743c-41d0-afa8-98626be8151a-1707746220368/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:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-54859421-d04c-49e3-af47-5b3796198683-1707746220368/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/constants@file:vendor/@ethersproject-xdc/constants": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-4cc25760-f72f-4028-aae8-3d9e690944ea-1707746220368/node_modules/@ethersproject-xdc/bignumber" "@ethersproject-xdc/contracts@file:vendor/@ethersproject-xdc/contracts": version "5.6.0" dependencies: - "@ethersproject-xdc/abi" "file:vendor/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:vendor/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-7cd30a41-9596-405e-8019-6d01651e414c-1707746220369/node_modules/@ethersproject-xdc/transactions" "@ethersproject-xdc/hash@file:vendor/@ethersproject-xdc/hash": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:vendor/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6ecadd7b-375d-40b7-bab4-4e06c441aa07-1707746220370/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/hdnode@file:vendor/@ethersproject-xdc/hdnode": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:vendor/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:vendor/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:vendor/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:vendor/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:vendor/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-0e95dde4-d63c-4291-a92d-e045705ed812-1707746220376/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:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:vendor/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:vendor/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:vendor/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-3ecef9c3-62c3-437f-912d-922b4d3b52fe-1707746220369/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:vendor/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-d933a273-2b5e-4549-80eb-b73ea608cfc2-1707746220374/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1299,67 +1313,67 @@ "@ethersproject-xdc/networks@file:vendor/@ethersproject-xdc/networks": version "5.7.1" dependencies: - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-b99d9e84-87b1-452f-9ba0-af541322b53f-1707746220369/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/pbkdf2@file:vendor/@ethersproject-xdc/pbkdf2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:vendor/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-10fb5c74-3e6a-4ab9-abd6-7d1b45bb193b-1707746220370/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-10fb5c74-3e6a-4ab9-abd6-7d1b45bb193b-1707746220370/node_modules/@ethersproject-xdc/sha2" "@ethersproject-xdc/properties@file:vendor/@ethersproject-xdc/properties": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-72c88612-fe94-4441-93a9-df7fe5582399-1707746220369/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/providers@file:vendor/@ethersproject-xdc/providers": version "5.6.2" dependencies: - "@ethersproject-xdc/abstract-provider" "file:vendor/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:vendor/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:vendor/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:vendor/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:vendor/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:vendor/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:vendor/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:vendor/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-720be74c-b4fe-4b1f-a23a-4a16ab69a557-1707746220372/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:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-30cabe5f-7588-453e-8a94-444f15e4c9d4-1707746220370/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-30cabe5f-7588-453e-8a94-444f15e4c9d4-1707746220370/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/rlp@file:vendor/@ethersproject-xdc/rlp": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-f9c07616-1cb8-4a4e-b317-4b4e407b78f3-1707746220370/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-f9c07616-1cb8-4a4e-b317-4b4e407b78f3-1707746220370/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/sha2@file:vendor/@ethersproject-xdc/sha2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9195cf3e-2f5e-4298-a931-ddcfd128d73c-1707746220371/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9195cf3e-2f5e-4298-a931-ddcfd128d73c-1707746220371/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:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-38058fe6-de4a-46aa-99d5-01e4e1f17325-1707746220371/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-38058fe6-de4a-46aa-99d5-01e4e1f17325-1707746220371/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-38058fe6-de4a-46aa-99d5-01e4e1f17325-1707746220371/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1367,76 +1381,76 @@ "@ethersproject-xdc/solidity@file:vendor/@ethersproject-xdc/solidity": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:vendor/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-f8bdd66a-813b-450f-8fdf-5001c4db924d-1707746220373/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/strings@file:vendor/@ethersproject-xdc/strings": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-6290db1a-50f2-4106-9d3b-ace409fab9d8-1707746220373/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-6290db1a-50f2-4106-9d3b-ace409fab9d8-1707746220373/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-6290db1a-50f2-4106-9d3b-ace409fab9d8-1707746220373/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/transactions@file:vendor/@ethersproject-xdc/transactions": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:vendor/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:vendor/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-dc7d6b77-752e-444d-ba26-6d7efb0a56f0-1707746220375/node_modules/@ethersproject-xdc/signing-key" "@ethersproject-xdc/units@file:vendor/@ethersproject-xdc/units": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-514c593c-0809-476b-a3b1-4237333d3639-1707746220374/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-514c593c-0809-476b-a3b1-4237333d3639-1707746220374/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-514c593c-0809-476b-a3b1-4237333d3639-1707746220374/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/wallet@file:vendor/@ethersproject-xdc/wallet": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:vendor/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:vendor/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:vendor/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:vendor/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:vendor/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:vendor/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:vendor/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-fc5769d5-fff3-4cc7-a16a-28f96f7ba315-1707746220374/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/web@file:vendor/@ethersproject-xdc/web": version "5.7.1" dependencies: - "@ethersproject-xdc/base64" "file:vendor/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-3861e2ee-bbca-4081-ae05-f6881a31c492-1707746220377/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-3861e2ee-bbca-4081-ae05-f6881a31c492-1707746220377/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-3861e2ee-bbca-4081-ae05-f6881a31c492-1707746220377/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-3861e2ee-bbca-4081-ae05-f6881a31c492-1707746220377/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-3861e2ee-bbca-4081-ae05-f6881a31c492-1707746220377/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/wordlists@file:vendor/@ethersproject-xdc/wordlists": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:vendor/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5a7df4e3-9685-48ee-a435-82e237b3b004-1707746220376/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5a7df4e3-9685-48ee-a435-82e237b3b004-1707746220376/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5a7df4e3-9685-48ee-a435-82e237b3b004-1707746220376/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5a7df4e3-9685-48ee-a435-82e237b3b004-1707746220376/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-5a7df4e3-9685-48ee-a435-82e237b3b004-1707746220376/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" @@ -1526,7 +1540,7 @@ dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.0.1", "@ethersproject/contracts@^5.4.0": +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.0.1", "@ethersproject/contracts@^5.4.0", "@ethersproject/contracts@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -1671,7 +1685,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.0.4", "@ethersproject/providers@^5.4.0": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.0.4", "@ethersproject/providers@^5.4.0", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -1770,7 +1784,7 @@ "@ethersproject/rlp" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" -"@ethersproject/units@5.7.0": +"@ethersproject/units@5.7.0", "@ethersproject/units@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== @@ -7862,36 +7876,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:vendor/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:vendor/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:vendor/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:vendor/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:vendor/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:vendor/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:vendor/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:vendor/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:vendor/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:vendor/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:vendor/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:vendor/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:vendor/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:vendor/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:vendor/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:vendor/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:vendor/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:vendor/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:vendor/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:vendor/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:vendor/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:vendor/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:vendor/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:vendor/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:vendor/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:vendor/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:vendor/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:vendor/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:vendor/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:vendor/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-116f9596-15f0-41b7-b3dc-b958163dbaf9-1707746220349/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" @@ -7996,6 +8010,11 @@ eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -8395,9 +8414,9 @@ fn.name@1.x.x: integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.14.9, follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== for-each@^0.3.3: version "0.3.3"