From 5041fc80577b380bc883737a1882cf1561567e64 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Fri, 5 Jul 2024 13:39:41 -0400 Subject: [PATCH 01/21] Scaffolding --- src/connectors/rubicon/rubicon.config.ts | 17 +++ src/connectors/rubicon/rubicon.constants.ts | 0 src/connectors/rubicon/rubicon.interfaces.ts | 38 +++++++ src/connectors/rubicon/rubicon.ts | 103 +++++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 src/connectors/rubicon/rubicon.config.ts create mode 100644 src/connectors/rubicon/rubicon.constants.ts create mode 100644 src/connectors/rubicon/rubicon.interfaces.ts create mode 100644 src/connectors/rubicon/rubicon.ts diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts new file mode 100644 index 0000000000..40f576ecb4 --- /dev/null +++ b/src/connectors/rubicon/rubicon.config.ts @@ -0,0 +1,17 @@ +import { AvailableNetworks } from '../../services/config-manager-types'; + +export namespace RubiconCLOBConfig { + export interface NetworkConfig { + allowedSlippage: string; + tradingTypes: Array; + chainType: string; + availableNetworks: Array; + } + + export const config: NetworkConfig = { + tradingTypes: ['CLOB_SPOT'], + chainType: 'EVM', + allowedSlippage: "2/100", + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'optimism', 'base'] } ], + }; +} diff --git a/src/connectors/rubicon/rubicon.constants.ts b/src/connectors/rubicon/rubicon.constants.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/connectors/rubicon/rubicon.interfaces.ts b/src/connectors/rubicon/rubicon.interfaces.ts new file mode 100644 index 0000000000..19965469c7 --- /dev/null +++ b/src/connectors/rubicon/rubicon.interfaces.ts @@ -0,0 +1,38 @@ +import { BigNumber, utils } from 'ethers'; + +export interface OrderInfoStruct { + id: string; + clientOrderId: string; + tradePairId: string; + price: BigNumber; + totalAmount: BigNumber; + quantity: BigNumber; + quantityFilled: BigNumber; + totalFee: BigNumber; + traderaddress: any; + side: number; + type1: number; + type2: number; + status: number; +} + +export interface MarketInfoStruct { + baseSymbol: utils.BytesLike; + quoteSymbol: utils.BytesLike; + buyBookId: utils.BytesLike; + sellBookId: utils.BytesLike; + minTradeAmount: BigNumber; + maxTradeAmount: BigNumber; + auctionPrice: BigNumber; + auctionMode: number; + makerRate: number; + takerRate: number; + baseDecimals: number; + baseDisplayDecimals: number; + quoteDecimals: number; + quoteDisplayDecimals: number; + allowedSlippagePercent: number; + addOrderPaused: boolean; + pairPaused: boolean; + postOnly: boolean; +} diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts new file mode 100644 index 0000000000..426f1443ee --- /dev/null +++ b/src/connectors/rubicon/rubicon.ts @@ -0,0 +1,103 @@ +import { Ethereum } from '../../chains/ethereum/ethereum'; +import { + ClobMarketsRequest, + ClobOrderbookRequest, + ClobTickerRequest, + ClobGetOrderRequest, + ClobPostOrderRequest, + ClobDeleteOrderRequest, + ClobGetOrderResponse, + ClobBatchUpdateRequest, + CreateOrderParam, + ClobDeleteOrderRequestExtract, +} from '../../clob/clob.requests'; +import { + CLOBish, + MarketInfo, + NetworkSelectionRequest, + Orderbook, +} from '../../services/common-interfaces'; + +export class RubiconCLOB implements CLOBish { + private _chain; + private _ready: boolean = false; + public parsedMarkets: MarketInfo = []; + public abiDecoder: any = require('abi-decoder'); + + private constructor(chain: string, network: string) { + if (chain === 'ethereum') { + this._chain = Ethereum.getInstance(network); + } else throw Error('Chain not supported.'); + } + + public async loadMarkets() { + + } + + public async init() { + if (!this._chain.ready() || Object.keys(this.parsedMarkets).length === 0) { + await this._chain.init(); + await this.loadMarkets(); + this._ready = true; + } + } + + public ready(): boolean { + return this._ready; + } + + public async markets( + req: ClobMarketsRequest + ): Promise<{ markets: MarketInfo }> { + if (req.market && req.market in this.parsedMarkets) + return { markets: this.parsedMarkets[req.market] }; + return { markets: Object.values(this.parsedMarkets) }; + } + + public async orderBook(req: ClobOrderbookRequest): Promise { + return { + buys: [], + sells: [] + } + } + + public async ticker( + req: ClobTickerRequest + ): Promise<{ markets: MarketInfo }> { + return await this.markets(req); + } + + public async orders( + req: ClobGetOrderRequest + ): Promise<{ orders: [] }> { + return { + orders: [] + } + } + + public async postOrder( + req: ClobPostOrderRequest + ): Promise<{ txHash: string; clientOrderID: string }> { + return { txHash: "", clientOrderID: "" }; + } + + public async deleteOrder( + req: ClobDeleteOrderRequest + ): Promise<{ txHash: string }> { + return { txHash: "" }; + } + + public estimateGas(_req: NetworkSelectionRequest): { + gasPrice: number; + gasPriceToken: string; + gasLimit: number; + gasCost: number; + } { + return { + gasPrice: 0, + gasPriceToken: "eth", + gasLimit: 0, + gasCost: 0, + }; + } +} From 2a48257e9ed03367bbde9374370a73df2fe18423 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Mon, 29 Jul 2024 18:40:43 +0900 Subject: [PATCH 02/21] Add rubicon configs --- src/connectors/connectors.routes.ts | 7 +++++++ src/connectors/rubicon/rubicon.ts | 9 ++++----- src/services/schema/rubicon-schema.json | 11 +++++++++++ src/templates/rubicon.yml | 10 ++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 src/services/schema/rubicon-schema.json create mode 100644 src/templates/rubicon.yml diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index e03e551f0f..430534810f 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -25,6 +25,7 @@ import { QuipuswapConfig } from './quipuswap/quipuswap.config'; import { OsmosisConfig } from '../chains/osmosis/osmosis.config'; import { CarbonConfig } from './carbon/carbon.config'; import { BalancerConfig } from './balancer/balancer.config'; +import { RubiconCLOBConfig } from './rubicon/rubicon.config'; export namespace ConnectorsRoutes { export const router = Router(); @@ -166,6 +167,12 @@ export namespace ConnectorsRoutes { 'Enter your kujira account number (input 0 if unsure) >>> ', }, }, + { + name: 'rubicon', + trading_type: RubiconCLOBConfig.config.tradingTypes, + chain_type: RubiconCLOBConfig.config.chainType, + available_networks: RubiconCLOBConfig.config.availableNetworks, + }, { name: 'quipuswap', trading_type: QuipuswapConfig.config.tradingTypes, diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 426f1443ee..1ee238b1f7 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -22,7 +22,6 @@ export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; public parsedMarkets: MarketInfo = []; - public abiDecoder: any = require('abi-decoder'); private constructor(chain: string, network: string) { if (chain === 'ethereum') { @@ -77,14 +76,14 @@ export class RubiconCLOB implements CLOBish { public async postOrder( req: ClobPostOrderRequest - ): Promise<{ txHash: string; clientOrderID: string }> { - return { txHash: "", clientOrderID: "" }; + ): Promise<{ txHash: string; id: string }> { + return { txHash: "", id: "" }; } public async deleteOrder( req: ClobDeleteOrderRequest - ): Promise<{ txHash: string }> { - return { txHash: "" }; + ): Promise<{ txHash: string, id: string }> { + return { txHash: "", id: "" }; } public estimateGas(_req: NetworkSelectionRequest): { diff --git a/src/services/schema/rubicon-schema.json b/src/services/schema/rubicon-schema.json new file mode 100644 index 0000000000..5821641f89 --- /dev/null +++ b/src/services/schema/rubicon-schema.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "allowedSlippage": { "type": "string" }, + "gasLimitEstimate": { "type": "integer" }, + "ttl": { "type": "integer" } + }, + "additionalProperties": false, + "required": ["allowedSlippage", "gasLimitEstimate", "ttl"] +} diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml new file mode 100644 index 0000000000..8f5b3b83d6 --- /dev/null +++ b/src/templates/rubicon.yml @@ -0,0 +1,10 @@ +# allowedSlippage: how much the execution price is allowed to move unfavorably +# from the trade execution price. It uses a rational number for precision. +allowedSlippage: '2/100' + +# the maximum gas used to estimate cost of a xsswap trade. +gasLimitEstimate: 300000 + +# ttl: how long a trade is valid in seconds. After this time passes +# xsswap will not perform the trade, but the gas will still be sent. +ttl: 600 From 6ce4bfc4319fbc8ad924dbb718484bdc70ead16a Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 31 Jul 2024 13:22:15 +0900 Subject: [PATCH 03/21] Add base and arb sepolia tokens --- Makefile | 2 +- src/chains/ethereum/ethereum.ts | 2 ++ src/connectors/rubicon/rubicon.config.ts | 2 +- src/connectors/rubicon/rubicon.ts | 12 ++++++--- src/services/schema/rubicon-schema.json | 25 ++++++++++++++++++- src/templates/ethereum.yml | 14 +++++++++++ .../lists/arbitrum_sepolia_tokens.json | 6 +++++ src/templates/lists/base_tokens.json | 6 +++++ src/templates/rubicon.yml | 12 +++++++++ 9 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 src/templates/lists/arbitrum_sepolia_tokens.json create mode 100644 src/templates/lists/base_tokens.json diff --git a/Makefile b/Makefile index 33572df13e..39f3838c52 100644 --- a/Makefile +++ b/Makefile @@ -18,5 +18,5 @@ build: yarn build docker: - git clean -xdf && docker build -t hummingbot/gateway${TAG} -f Dockerfile . + git clean -xdf && docker build -t hummingbot/gateway:${TAG} -f Dockerfile . diff --git a/src/chains/ethereum/ethereum.ts b/src/chains/ethereum/ethereum.ts index 6375c53e3f..10e5d4ca37 100644 --- a/src/chains/ethereum/ethereum.ts +++ b/src/chains/ethereum/ethereum.ts @@ -220,6 +220,8 @@ export class Ethereum extends EthereumBase implements Ethereumish { spender = curve.router; } else if (reqSpender === 'balancer') { spender = BalancerConfig.config.routerAddress(this._chain); + } else if (reqSpender === 'rubicon') { + spender = '0x000000000022d473030f116ddee9f6b43ac78ba3' } else { spender = reqSpender; } diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index 40f576ecb4..2236d81157 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -12,6 +12,6 @@ export namespace RubiconCLOBConfig { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', allowedSlippage: "2/100", - availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'optimism', 'base'] } ], + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrum_sepolia', 'optimism', 'base'] } ], }; } diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 1ee238b1f7..f0e529b835 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -6,10 +6,6 @@ import { ClobGetOrderRequest, ClobPostOrderRequest, ClobDeleteOrderRequest, - ClobGetOrderResponse, - ClobBatchUpdateRequest, - CreateOrderParam, - ClobDeleteOrderRequestExtract, } from '../../clob/clob.requests'; import { CLOBish, @@ -54,6 +50,7 @@ export class RubiconCLOB implements CLOBish { } public async orderBook(req: ClobOrderbookRequest): Promise { + console.log('orderbook', req) return { buys: [], sells: [] @@ -69,6 +66,9 @@ export class RubiconCLOB implements CLOBish { public async orders( req: ClobGetOrderRequest ): Promise<{ orders: [] }> { + + console.log('orders', req) + return { orders: [] } @@ -77,12 +77,16 @@ export class RubiconCLOB implements CLOBish { public async postOrder( req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { + console.log('post order', req) + return { txHash: "", id: "" }; } public async deleteOrder( req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { + console.log('delete order', req) + return { txHash: "", id: "" }; } diff --git a/src/services/schema/rubicon-schema.json b/src/services/schema/rubicon-schema.json index 5821641f89..a785d1e421 100644 --- a/src/services/schema/rubicon-schema.json +++ b/src/services/schema/rubicon-schema.json @@ -4,7 +4,30 @@ "properties": { "allowedSlippage": { "type": "string" }, "gasLimitEstimate": { "type": "integer" }, - "ttl": { "type": "integer" } + "ttl": { "type": "integer" }, + "networks": { + "type": "object", + "patternProperties": { + "^\\w+$": { + "type": "object", + "properties": { + "chainID": { "type": "integer" }, + "nodeURL": { "type": "string" }, + "tokenListType": { "type": "string" }, + "tokenListSource": { "type": "string" }, + "nativeCurrencySymbol": { "type": "string" }, + "gasPriceRefreshInterval": { "type": "number" } + }, + "required": [ + "chainID", + "nodeURL", + "nativeCurrencySymbol" + ], + "additionalProperties": false + } + }, + "additionalProperties": false + } }, "additionalProperties": false, "required": ["allowedSlippage", "gasLimitEstimate", "ttl"] diff --git a/src/templates/ethereum.yml b/src/templates/ethereum.yml index 03469ccbbc..c522244f21 100644 --- a/src/templates/ethereum.yml +++ b/src/templates/ethereum.yml @@ -39,6 +39,20 @@ networks: tokenListType: FILE tokenListSource: /home/gateway/conf/lists/erc20_tokens_goerli.json nativeCurrencySymbol: ETH + base: + chainID: 8453 + tokenListType: FILE + tokenListSource: /home/gateway/conf/lists/base_tokens.json + nodeURL: https://rpc.ankr.com/base + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 + arbitrum_sepolia: + chainID: 421614 + tokenListType: FILE + tokenListSource: /home/gateway/conf/lists/arbitrum_sepolia_tokens.json + nodeURL: https://rpc.ankr.com/arbitrum_sepolia + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 # if you use the gas assumptions below, your wallet needs >0.1 ETH balance for gas gasLimitTransaction: 3000000 diff --git a/src/templates/lists/arbitrum_sepolia_tokens.json b/src/templates/lists/arbitrum_sepolia_tokens.json new file mode 100644 index 0000000000..b2fcfee287 --- /dev/null +++ b/src/templates/lists/arbitrum_sepolia_tokens.json @@ -0,0 +1,6 @@ +{ + "name": "ArbSepolia", + "timestamp": "2022-03-01T22:29:12.223Z", + "tokens": [] + } + \ No newline at end of file diff --git a/src/templates/lists/base_tokens.json b/src/templates/lists/base_tokens.json new file mode 100644 index 0000000000..ebbb020320 --- /dev/null +++ b/src/templates/lists/base_tokens.json @@ -0,0 +1,6 @@ +{ + "name": "Base", + "timestamp": "2022-03-01T22:29:12.223Z", + "tokens": [] + } + \ No newline at end of file diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml index 8f5b3b83d6..988a08ecdf 100644 --- a/src/templates/rubicon.yml +++ b/src/templates/rubicon.yml @@ -8,3 +8,15 @@ gasLimitEstimate: 300000 # ttl: how long a trade is valid in seconds. After this time passes # xsswap will not perform the trade, but the gas will still be sent. ttl: 600 + +networks: + base: + chainID: 8453 + nodeURL: https://rpc.ankr.com/base + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 + arbitrum_sepolia: + chainID: 421614 + nodeURL: https://rpc.ankr.com/arbitrum_sepolia + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 From 7f8063b5ec8fc2ecc1c8a885ffc53eab5711846d Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 31 Jul 2024 17:20:34 +0900 Subject: [PATCH 04/21] sepolia tokens --- .../lists/arbitrum_sepolia_tokens.json | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/templates/lists/arbitrum_sepolia_tokens.json b/src/templates/lists/arbitrum_sepolia_tokens.json index b2fcfee287..3f2d006ffd 100644 --- a/src/templates/lists/arbitrum_sepolia_tokens.json +++ b/src/templates/lists/arbitrum_sepolia_tokens.json @@ -1,6 +1,31 @@ { "name": "ArbSepolia", "timestamp": "2022-03-01T22:29:12.223Z", - "tokens": [] + "tokens": [ + { + "name": "USDC Stablecoin", + "symbol": "USDC", + "chainId": 421614, + "address": "0xd28301B86800bBCF1f09a55642ee3E115Edb1f67", + "decimals": 18, + "extensions": { + "quote": true + } + }, + { + "name": "Test Token", + "symbol": "TEST", + "chainId": 421614, + "address": "0x2fc8011B01c988249ace25ec2c624079ac146e04", + "decimals": 18 + }, + { + "name": "Wrapped Ethereum", + "symbol": "WETH", + "chainId": 421614, + "address": "0xc556bAe1e86B2aE9c22eA5E036b07E55E7596074", + "decimals": 18 + } + ] } \ No newline at end of file From cd60d82a1c02e987d551f20ff38b01504e10bb38 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 31 Jul 2024 17:45:48 +0900 Subject: [PATCH 05/21] Add rubicon to connectors --- src/connectors/rubicon/rubicon.ts | 15 +++++++++++++++ src/services/connection-manager.ts | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index f0e529b835..9a8c5c449f 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -18,6 +18,7 @@ export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; public parsedMarkets: MarketInfo = []; + private static _instances: { [name: string]: RubiconCLOB }; private constructor(chain: string, network: string) { if (chain === 'ethereum') { @@ -29,6 +30,20 @@ export class RubiconCLOB implements CLOBish { } + public static getInstance(chain: string, network: string): RubiconCLOB { + if (RubiconCLOB._instances === undefined) { + RubiconCLOB._instances = {}; + } + + const key = `${chain}:${network}`; + + if (!(key in RubiconCLOB._instances)) { + RubiconCLOB._instances[key] = new RubiconCLOB(chain, network); + } + + return RubiconCLOB._instances[key]; + } + public async init() { if (!this._chain.ready() || Object.keys(this.parsedMarkets).length === 0) { await this._chain.init(); diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 456d1eeedf..aaa164ed66 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -46,6 +46,7 @@ import { XRPLCLOB } from '../connectors/xrpl/xrpl'; import { QuipuSwap } from '../connectors/quipuswap/quipuswap'; import { Carbonamm } from '../connectors/carbon/carbonAMM'; import { Balancer } from '../connectors/balancer/balancer'; +import { RubiconCLOB } from '../connectors/rubicon/rubicon'; export type ChainUnion = | Algorand @@ -255,6 +256,8 @@ export async function getConnector( connectorInstance = QuipuSwap.getInstance(network); } else if (chain === 'ethereum' && connector === 'carbonamm') { connectorInstance = Carbonamm.getInstance(chain, network); + } else if (chain === 'ethereum' && connector === 'rubicon') { + connectorInstance = RubiconCLOB.getInstance(chain, network); } else { throw new Error('unsupported chain or connector'); } From 1a5f685f474f6da86e41b1a268b2c27e4aa6556c Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 31 Jul 2024 18:49:33 +0900 Subject: [PATCH 06/21] Add rubicon to valid spender list --- src/chains/ethereum/ethereum.ts | 2 +- src/chains/ethereum/ethereum.validators.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chains/ethereum/ethereum.ts b/src/chains/ethereum/ethereum.ts index 10e5d4ca37..6afc264feb 100644 --- a/src/chains/ethereum/ethereum.ts +++ b/src/chains/ethereum/ethereum.ts @@ -220,7 +220,7 @@ export class Ethereum extends EthereumBase implements Ethereumish { spender = curve.router; } else if (reqSpender === 'balancer') { spender = BalancerConfig.config.routerAddress(this._chain); - } else if (reqSpender === 'rubicon') { + } else if (reqSpender === 'rubicon') { spender = '0x000000000022d473030f116ddee9f6b43ac78ba3' } else { spender = reqSpender; diff --git a/src/chains/ethereum/ethereum.validators.ts b/src/chains/ethereum/ethereum.validators.ts index 9a6e6aed7e..35832f9ed7 100644 --- a/src/chains/ethereum/ethereum.validators.ts +++ b/src/chains/ethereum/ethereum.validators.ts @@ -65,6 +65,7 @@ export const validateSpender: Validator = mkValidator( val === 'curve' || val === 'carbonamm' || val === 'balancer' || + val === 'rubicon' || isAddress(val)) ); From eb071e28308df13dffb4cc3bcd45a9413edcd7cd Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Sun, 4 Aug 2024 08:36:23 +0900 Subject: [PATCH 07/21] Working gateway --- package.json | 4 +- src/connectors/rubicon/rubicon.config.ts | 1189 ++++++++++++++++++++++ src/connectors/rubicon/rubicon.ts | 186 +++- yarn.lock | 414 ++++---- 4 files changed, 1597 insertions(+), 196 deletions(-) diff --git a/package.json b/package.json index 4dddc86472..2051645da7 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "test:scripts": "jest -i --verbose ./test-scripts/*.test.ts" }, "dependencies": { - "@cosmjs/amino": "^0.32.2", "@balancer-labs/sdk": "^1.1.5", "@bancor/carbon-sdk": "^0.0.93-DEV", + "@cosmjs/amino": "^0.32.2", "@cosmjs/proto-signing": "^0.31.1", "@cosmjs/stargate": "^0.31.1", "@cosmjs/tendermint-rpc": "^0.32.2", @@ -50,6 +50,7 @@ "@pancakeswap/v3-sdk": "^3.7.0", "@pangolindex/sdk": "^1.1.0", "@perp/sdk-curie": "^1.16.0", + "@rubicondefi/gladius-sdk": "^1.4.27", "@sushiswap/sdk": "^5.0.0-canary.116", "@taquito/rpc": "^17.0.0", "@taquito/signer": "^17.0.0", @@ -64,6 +65,7 @@ "@uniswap/sdk": "3.0.2", "@uniswap/sdk-core": "^3.0.0", "@uniswap/smart-order-router": "^2.5.26", + "@uniswap/token-lists": "^1.0.0-beta.34", "@uniswap/v3-core": "^1.0.0", "@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-sdk": "^3.7.0", diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index 2236d81157..5bbecd0bf7 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -1,3 +1,4 @@ +import { TokenList } from '@uniswap/token-lists'; import { AvailableNetworks } from '../../services/config-manager-types'; export namespace RubiconCLOBConfig { @@ -6,6 +7,8 @@ export namespace RubiconCLOBConfig { tradingTypes: Array; chainType: string; availableNetworks: Array; + url: string; + pk: string; } export const config: NetworkConfig = { @@ -13,5 +16,1191 @@ export namespace RubiconCLOBConfig { chainType: 'EVM', allowedSlippage: "2/100", availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrum_sepolia', 'optimism', 'base'] } ], + url: "https://gladius.rubicon.finance", + pk: // get config manager to work }; } + +export enum Network { + MAINNET = 1, + ROPSTEN = 3, + RINKEBY = 4, + GOERLI = 5, + KOVAN = 42, + OPTIMISM_KOVAN = 69, + OPTIMISM_MAINNET = 10, + OPTIMISM_SEPOLIA = 11155420, + POLYGON_MAINNET = 137, + POLYGON_MUMBAI = 80001, //MATIC + BSC_MAINNET = 56, + GNOSIS_CHAIN_MAINNET = 100, + FANTOM_OPERA_MAINNET = 250, + ARBITRUM_MAINNET = 42161, + ARBITRUM_SEPOLIA = 421614, + ARBITRUM_GOERLI = 421613, + BASE_MAINNET = 8453, + BASE_GOERLI = 84531, + BASE_SEPOLIA = 84532, + AVALANCHE_C_CHAIN_MAINNET = 43114, + AURORA_MAINNET = 1313161554, + OPTIMISM_GOERLI = 420, //OPG +} + +export const tokenList: TokenList = { + name: 'Rubicon Token List', + timestamp: new Date().toISOString(), + version: { + major: 1, + minor: 0, + patch: 0, + }, + tokens: [ + // Optimism Kovan v1 + // Note: all tokens need to have their associated underlyingAssetGeckoID so we can query Coin Gecko and get price info + // *NOTE THE FIRST COIN IN THE LIST WILL BE THE DEFAULT SELECTED TOKEN* + // ** ERC20s ** + // **** TODO ENFORCE TYPE CAST ON REQUIRED EXTENSIONS **** + { + name: 'Optimism', + symbol: 'OP', + chainId: Network.OPTIMISM_KOVAN, + address: '0x1891B8e7c129B99860f6D58CEFB41D00650F6249', + decimals: 18, //TODO: pools formatting + // + extensions: { + underlyingAssetGeckoID: 'optimism', + }, + }, + + { + symbol: 'WETH', + name: 'Wrapped Ethereum', + decimals: 18, + + address: '0x4200000000000000000000000000000000000006', + chainId: Network.OPTIMISM_KOVAN, + extensions: { + underlyingAssetGeckoID: 'ethereum', + }, + }, + { + symbol: 'ETH2', + name: 'Ethereum 2.0', + decimals: 18, + address: '0x79265ee50c18C6967A1F0db404DC1dFa2B28a8FA', + chainId: Network.OPTIMISM_KOVAN, + extensions: { + underlyingAssetGeckoID: 'ethereum', + }, + }, + { + symbol: 'WBTC', + name: 'Wrapped Bitcoin', + decimals: 8, + + address: '0xaBb0bd8f9BAFa670c8496AF9609BD42D3F75Bd15', + chainId: Network.OPTIMISM_KOVAN, + }, + { + symbol: 'WETH', + name: 'Wrapped Ethereum', + decimals: 18, + + address: '0x4200000000000000000000000000000000000006', + chainId: Network.OPTIMISM_KOVAN, + extensions: { + underlyingAssetGeckoID: 'ethereum', + }, + }, + { + symbol: 'SNX', + name: 'Synthetix', + decimals: 18, + + address: '0x4dd40a266588Fa152E14973aBb6531541972aE63', + chainId: Network.OPTIMISM_KOVAN, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + }, + }, + + // ** Quotes ** + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.OPTIMISM_KOVAN, + address: '0x940578F6D9f9ffD9621F69dbB5B24Fd380799772', + decimals: 6, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'usd-coin', + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.OPTIMISM_KOVAN, + address: '0xEb22F82de678852B8dff065768490B881DD0116a', + decimals: 18, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'dai', + }, + }, + { + name: 'USDT Stablecoin', + symbol: 'USDT', + chainId: Network.OPTIMISM_KOVAN, + address: '0x655cb52BE3131713638AC812d6cC52256F32a3A5', + decimals: 6, + + extensions: { + quote: true, + }, + }, + + // ** BathTokens ** TODO: pull dynamically? + { + name: 'BathToken v1', + symbol: 'bathUSDC', + chainId: Network.OPTIMISM_KOVAN, + address: '0x4853C571552F0AA43D528b7141Ebdfe17Cd1eAd8', + decimals: 6, //TODO: pools formatting???? + + extensions: { + underlyingTicker: 'USDC', + underlyingAssetGeckoID: 'usd-coin', + }, + }, + // TEST TOKENS + { + name: 'BathToken v1', + symbol: 'bathGR8', + chainId: Network.OPTIMISM_KOVAN, + address: '0xdb42b8D3863138AA1e40544Cfc5340aAaEFcd169', + decimals: 18, //TODO: pools formatting + // + extensions: { + underlyingTicker: 'GR8', + rewardsLive: true, + underlyingAssetGeckoID: 'ethereum', + }, + }, + { + name: 'Rubicon Magnus', + symbol: 'GR8', + chainId: Network.OPTIMISM_KOVAN, + address: '0xF234066d9C7e0B296517598098F1DE491656c7bc', + decimals: 18, //TODO: pools formatting + // + extensions: { + underlyingAssetGeckoID: 'ethereum', + }, + }, + // Kovan OP + { + name: 'BathToken v1', + symbol: 'bathOP', + chainId: Network.OPTIMISM_KOVAN, + address: '0x2deC1E6919413Ac863C834630EE9F68DF69D4d9B', + decimals: 18, //TODO: pools formatting + // + extensions: { + underlyingTicker: 'OP', + // rewardsLive: true, + underlyingAssetGeckoID: 'optimism', + }, + }, + { + name: 'BathToken v1', + symbol: 'bathETH', + chainId: Network.OPTIMISM_KOVAN, + address: '0x5790AedddfB25663f7dd58261De8E96274A82BAd', + decimals: 18, + + extensions: { + underlyingTicker: 'WETH', + underlyingAssetGeckoID: 'ethereum', + //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET + isNativeAssetWrapper: true, // IMPORTANT + }, + }, + // ** V1 MAINNET ** + + // ** QUOTES ** + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.OPTIMISM_MAINNET, + address: '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', + decimals: 6, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'usd-coin', + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.OPTIMISM_MAINNET, + address: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', + decimals: 18, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'dai', + }, + }, + { + name: 'USDT Stablecoin', + symbol: 'USDT', + chainId: Network.OPTIMISM_MAINNET, + address: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58', + decimals: 6, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'tether', + }, + }, + { + symbol: 'WETH', + name: 'Wrapped Ethereum', + decimals: 18, + + address: '0x4200000000000000000000000000000000000006', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + underlyingAssetGeckoID: 'ethereum', + //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET + isNativeAssetWrapper: true, + }, + }, + { + symbol: 'OP', + name: 'Optimism', + decimals: 18, + + address: '0x4200000000000000000000000000000000000042', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'optimism', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + symbol: 'WBTC', + name: 'Wrapped Bitcoin', + decimals: 8, + + address: '0x68f180fcCe6836688e9084f035309E29Bf0A2095', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'wrapped-bitcoin', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + symbol: 'SNX', + name: 'Synthetix', + decimals: 18, + + address: '0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'havven', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + + // ** V1 Mainnet Bath Tokens *** + + { + symbol: 'bathDAI', + name: 'bathDAI v1', + decimals: 18, + + address: '0x60daEC2Fc9d2e0de0577A5C708BcaDBA1458A833', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + underlyingTicker: 'DAI', + rewardsLive: true, + underlyingAssetGeckoID: 'dai', + bathBuddy: '0x5fafd12ead4234270db300352104632187ed763a', + }, + }, + + { + name: 'bathUSDC v1', + symbol: 'bathUSDC', + chainId: Network.OPTIMISM_MAINNET, + address: '0xe0e112e8f33d3f437D1F895cbb1A456836125952', + decimals: 6, + + extensions: { + underlyingTicker: 'USDC', + rewardsLive: true, + underlyingAssetGeckoID: 'usd-coin', + bathBuddy: '0xfd6fd41bea9fd489ffdf05cd8118a69bf98caa5d', + }, + }, + { + symbol: 'bathUSDT', + name: 'bathUSDT v1', + decimals: 6, + + chainId: Network.OPTIMISM_MAINNET, + address: '0xfFBD695bf246c514110f5DAe3Fa88B8c2f42c411', + extensions: { + underlyingTicker: 'USDT', + rewardsLive: true, + underlyingAssetGeckoID: 'tether', + bathBuddy: '0xdffdbb54b9968fee543a8d2bd3ce7a80d66cd49f', + }, + }, + { + address: '0xB0bE5d911E3BD4Ee2A8706cF1fAc8d767A550497', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathETH', + extensions: { + underlyingTicker: 'WETH', + rewardsLive: true, + underlyingAssetGeckoID: 'ethereum', + bathBuddy: '0xf882defd9d5d988d05c6bca9061fc6f817f491c0', + //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET + isNativeAssetWrapper: true, + }, + name: 'bathETH v1', + decimals: 18, + + }, + { + address: '0x7571CC9895D8E997853B1e0A1521eBd8481aa186', + symbol: 'bathWBTC', + extensions: { + underlyingTicker: 'WBTC', + rewardsLive: true, + underlyingAssetGeckoID: 'bitcoin', + bathBuddy: '0x30f5fe161da1cb92ac09e10b734de07d5c120fdd', + }, + name: 'bathWBTC v1', + decimals: 8, + + chainId: Network.OPTIMISM_MAINNET, + }, + { + address: '0xeb5F29AfaaA3f44eca8559c3e8173003060e919f', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathSNX', + extensions: { + underlyingTicker: 'SNX', + rewardsLive: true, + underlyingAssetGeckoID: 'havven', + bathBuddy: '0x505fb5d94c3cf68e13b5ba2ca1868f2b580007cc', + }, + name: 'bathSNX v1', + decimals: 18, + + }, + { + address: '0x574a21fE5ea9666DbCA804C9d69d8Caf21d5322b', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathOP', + extensions: { + underlyingTicker: 'OP', + underlyingAssetGeckoID: 'optimism', + rewardsLive: true, + bathBuddy: '0xd528e1c99b0bdf1caf14f968f31adab81c59dcc8', + }, + name: 'bathOP v1', + decimals: 18, + + }, + { + name: 'Worldcoin', + symbol: 'WLD', + chainId: Network.OPTIMISM_MAINNET, + address: '0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Wrapped Liquid Staked Ether', + symbol: 'wstETH', + chainId: Network.OPTIMISM_MAINNET, + address: '0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'Kwenta', + symbol: 'KWENTA', + chainId: Network.OPTIMISM_MAINNET, + address: '0x920Cf626a271321C151D027030D5d08aF699456b', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'PERP', + symbol: 'PERP', + chainId: Network.OPTIMISM_MAINNET, + address: '0x9e1028F5F1D5eDE59748FFceE5532509976840E0', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Synth sUSD', + symbol: 'sUSD', + chainId: Network.OPTIMISM_MAINNET, + address: '0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'USDC', + referenceVenueFeeTier: '100', + }, + }, + + /// *** ARBITRUM MAINNET *** + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_MAINNET, + address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_MAINNET, + address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Bridged USDC Stablecoin', + symbol: 'USDC.e', + chainId: Network.ARBITRUM_MAINNET, + address: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.ARBITRUM_MAINNET, + address: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.ARBITRUM_MAINNET, + address: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.ARBITRUM_MAINNET, + address: '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f', + decimals: 8, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Arbitrum', + symbol: 'ARB', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x912CE59144191C1204E64559FE8253a0e49E6548', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Pendle', + symbol: 'PENDLE', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Fluidity', + symbol: 'FLY', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x000F1720A263f96532D1ac2bb9CDC12b72C6f386', + decimals: 6, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'USDC', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'GMX', + symbol: 'GMX', + chainId: Network.ARBITRUM_MAINNET, + + address: '0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Graph Token', + symbol: 'GRT', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x9623063377AD1B27544C965cCd7342f7EA7e88C7', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Xai', + symbol: 'XAI', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'MAGIC', + symbol: 'MAGIC', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x539bdE0d7Dbd336b79148AA742883198BBF60342', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Gains Network', + symbol: 'GNS', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x18c11FD286C5EC11c3b683Caa813B77f5163A122', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'ChainLink Token', + symbol: 'LINK', + chainId: Network.ARBITRUM_MAINNET, + + address: '0xf97f4df75117a78c1A5a0DBb814Af92458539FB4', + decimals: 18, + }, + + // *** BASE MAINNET *** + { + name: 'Wrapped Ether', + symbol: 'WETH', + chainId: Network.BASE_MAINNET, + + address: '0x4200000000000000000000000000000000000006', + decimals: 18, + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USD Base Coin', + symbol: 'USDbC', + chainId: Network.BASE_MAINNET, + // TODO: update to USDbC logo + address: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', + decimals: 6, + extensions: { + quote: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.BASE_MAINNET, + // TODO: update to USDbC logo + address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + decimals: 6, + extensions: { + quote: true, + }, + }, + // { + // name: 'Coinbase Wrapped Staked ETH', + // symbol: 'cbETH', + // chainId: Network.BASE_MAINNET, + // + // address: '0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22', + // decimals: 18, + // }, + { + name: 'Dai Stablecoin', + symbol: 'DAI', + chainId: Network.BASE_MAINNET, + + address: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', + decimals: 18, + extensions: { + quote: true, + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '500', + }, + }, + + // // Add Base MemeCoins: BALD, DEGEN, ELONrwa, TOSHI, BRETT, MOCHI, NORMIE + // { + // name: 'Bald Coin', + // symbol: 'BALD', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xFe20C1B85ABa875EA8cecac8200bF86971968F3A', + // decimals: 18, + // }, + { + name: 'The Big Guy', + symbol: 'BGUY', + chainId: Network.BASE_MAINNET, + + address: '0x8931eE05EC111325c1700b68E5ef7B887e00661d', + decimals: 9, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '500', + }, + }, + + { + name: 'Degen Coin', + symbol: 'DEGEN', + chainId: Network.BASE_MAINNET, + + address: '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'higher', + symbol: 'HIGHER', + chainId: Network.BASE_MAINNET, + + address: '0x0578d8A44db98B23BF096A382e016e29a5Ce0ffe', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // { + // name: 'Elonrwa Coin', + // symbol: 'ELONrwa', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xAa6Cccdce193698D33deb9ffd4be74eAa74c4898', + // decimals: 18, + // }, + { + name: 'Aerodrome', + symbol: 'AERO', + chainId: Network.BASE_MAINNET, + + address: '0x940181a94A35A4569E4529A3CDfB74e38FD98631', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'BLERF', + symbol: 'BLERF', + chainId: Network.BASE_MAINNET, + + address: '0x347F500323D51E9350285Daf299ddB529009e6AE', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'Toshi Coin', + symbol: 'TOSHI', + chainId: Network.BASE_MAINNET, + + address: '0xAC1Bd2486aAf3B5C0fc3Fd868558b082a531B2B4', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Keyboard Cat', + symbol: 'KEYCAT', + chainId: Network.BASE_MAINNET, + + address: '0x9a26F5433671751C3276a065f57e5a02D2817973', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Internet Coin', + symbol: 'INT', + chainId: Network.BASE_MAINNET, + + address: '0x968D6A288d7B024D5012c0B25d67A889E4E3eC19', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Brett Coin', + symbol: 'BRETT', + chainId: Network.BASE_MAINNET, + + address: '0x532f27101965dd16442E59d40670FaF5eBB142E4', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // { + // name: 'Mochi Coin', + // symbol: 'MOCHI', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xF6e932Ca12afa26665dC4dDE7e27be02A7c02e50', + // decimals: 18, + // }, + { + name: 'Normie Coin', + symbol: 'NORMIE', + chainId: Network.BASE_MAINNET, + + address: '0x7F12d13B34F5F4f0a9449c16Bcd42f0da47AF200', + decimals: 9, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // *** Arbitrum Sepolia + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0xd28301B86800bBCF1f09a55642ee3E115Edb1f67', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Test Token', + symbol: 'TEST', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0x2fc8011B01c988249ace25ec2c624079ac146e04', + decimals: 18, + + }, + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0xc556bAe1e86B2aE9c22eA5E036b07E55E7596074', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + + // *** Arbitrum Goerli + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_GOERLI, + address: '0x175a6d830579cacf1086ecc718fab2a86b12e0d3', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_GOERLI, + address: '0x34cB584d2E4f3Cd37e93A46A4C754044085439b4', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.ARBITRUM_GOERLI, + address: '0xb37b4399880AfEF7025755d65C193363966b8b89', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.ARBITRUM_GOERLI, + address: '0x6ABc1231d85D422c9Fe25b5974B4C0D4AB85d9b5', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.ARBITRUM_GOERLI, + address: '0x710c1A969cbC8ab5644571697824c655ffBDE926', + decimals: 18, + + }, + { + name: 'Test Token', + symbol: 'TEST', + chainId: Network.ARBITRUM_GOERLI, + + address: '0x83250b2783554D4D401c45c39fF8A161dE44BC15', + decimals: 18, + }, + + // Mumbai testing + { + address: '0x6aeda41c98ab5399044fc36162B57d39c13b658a', + chainId: Network.POLYGON_MUMBAI, + + symbol: 'TEST', + decimals: 18, + name: 'Test Coin', + }, + { + address: '0xcC5f8571D858DAD7fA2238FB9df4Ad384493013C', + chainId: Network.POLYGON_MUMBAI, + symbol: 'USDC', + + decimals: 18, + name: 'USDC Stablecoin', + extensions: { + quote: true, + }, + }, + { + address: '0xE412a307764cCBE02E055e926516ebD74230cfE0', + chainId: Network.POLYGON_MUMBAI, + symbol: 'WMATIC', + + decimals: 18, + name: 'Wrapped Matic', + extensions: { + isNativeAssetWrapper: true, + }, + }, + { + address: '0xAb647DF8262580c1caB61Eb165B22616365d3C67', + chainId: Network.POLYGON_MUMBAI, + symbol: 'DAI', + + decimals: 18, + name: 'DAI Stablecoin', + extensions: { + quote: true, + }, + }, + + // *** Ethereum Mainnet + + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.MAINNET, + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.MAINNET, + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.MAINNET, + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.MAINNET, + address: '0xdac17f958d2ee523a2206206994597c13d831ec7', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.MAINNET, + address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', + decimals: 8, + + }, + // TODO: Plug in most liquid pair... + { + name: 'Synthetix Network Token', + symbol: 'SNX', + chainId: Network.MAINNET, + address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Uniswap', + symbol: 'UNI', + chainId: Network.MAINNET, + address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'ChainLink Token', + symbol: 'LINK', + chainId: Network.MAINNET, + address: '0x514910771af9ca656af840dff83e8264ecf986ca', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Aave Token', + symbol: 'AAVE', + chainId: Network.MAINNET, + address: '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Compound', + symbol: 'COMP', + chainId: Network.MAINNET, + address: '0xc00e94cb662c3520282e6f5717214004a7f26888', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Maker', + symbol: 'MKR', + chainId: Network.MAINNET, + address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'SHIBA INU', + symbol: 'SHIB', + chainId: Network.MAINNET, + address: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Ondo Finance', + symbol: 'ONDO', + chainId: Network.MAINNET, + address: '0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + ], +}; \ No newline at end of file diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 9a8c5c449f..625016dea1 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -1,3 +1,4 @@ +import { GladiusOrderBuilder, NonceManager, PERMIT2_MAPPING } from '@rubicondefi/gladius-sdk'; import { Ethereum } from '../../chains/ethereum/ethereum'; import { ClobMarketsRequest, @@ -6,6 +7,7 @@ import { ClobGetOrderRequest, ClobPostOrderRequest, ClobDeleteOrderRequest, + ClobGetOrderResponse, } from '../../clob/clob.requests'; import { CLOBish, @@ -13,21 +15,94 @@ import { NetworkSelectionRequest, Orderbook, } from '../../services/common-interfaces'; +import { RubiconCLOBConfig, tokenList } from './rubicon.config'; +import { BigNumber, providers, Wallet } from 'ethers'; +import { parseUnits } from 'ethers/lib/utils'; +import { StaticJsonRpcProvider } from '@ethersproject/providers'; +import axios from 'axios'; + +export enum ORDER_STATUS { + OPEN = 'open', + EXPIRED = 'expired', + ERROR = 'error', + CANCELLED = 'cancelled', + FILLED = 'filled', + INSUFFICIENT_FUNDS = 'insufficient-funds', +} + +export type OrderInput = { + token: string; + startAmount: string; + endAmount: string; +}; + +export type OrderOutput = { + token: string; + startAmount: string; + endAmount: string; + recipient?: string; +}; + +export type SettledAmount = { + tokenOut?: string; + amountOut?: string; + tokenIn?: string; + amountIn?: string; +}; + +export enum OrderType { + Dutch = "Dutch" +} + +export type OrderEntity = { + type: OrderType; + encodedOrder: string; + signature: string; + orderHash: string; + orderStatus: ORDER_STATUS; + chainId: number; + deadline: number; + input: OrderInput; + outputs: OrderOutput[]; + createdAt: number; + price: number; + // Filler field is defined when the order has been filled and the status tracking function has recorded the filler address. + filler?: string; + // QuoteId field is defined when the order has a quote associated with it. + quoteId?: string; + // TxHash field is defined when the order has been filled and there is a txHash associated with the fill. + txHash?: string; + // SettledAmount field is defined when the order has been filled and the fill amounts have been recorded. + settledAmounts?: SettledAmount[]; +}; export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; public parsedMarkets: MarketInfo = []; private static _instances: { [name: string]: RubiconCLOB }; + private wallet: Wallet; + private provider: StaticJsonRpcProvider; + private constructor(chain: string, network: string) { if (chain === 'ethereum') { this._chain = Ethereum.getInstance(network); } else throw Error('Chain not supported.'); + + this.provider = new providers.StaticJsonRpcProvider(this._chain.rpcUrl, this._chain.chainId); + this.wallet = new Wallet(RubiconCLOBConfig.config.pk).connect(this.provider) } public async loadMarkets() { + // TODO: get all tokens in the token list + const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); + const USDC = tokens.find(t => t.symbol.toUpperCase() === "USDC"); + const WETH = tokens.find(t => t.symbol.toUpperCase() === "WETH"); + const TEST = tokens.find(t => t.symbol.toUpperCase() === "TEST"); + this.parsedMarkets["WETH-USDC"] = { baseSymbol: "WETH", baseDecimals: WETH?.decimals, baseAddress: WETH?.address, quoteSymbol: "USDC", quoteDecimals: USDC?.decimals, quoteAddress: USDC?.address } + this.parsedMarkets["TEST-USDC"] = { baseSymbol: "TEST", baseDecimals: TEST?.decimals, baseAddress: TEST?.address, quoteSymbol: "USDC", quoteDecimals: USDC?.decimals, quoteAddress: USDC?.address } } public static getInstance(chain: string, network: string): RubiconCLOB { @@ -65,11 +140,25 @@ export class RubiconCLOB implements CLOBish { } public async orderBook(req: ClobOrderbookRequest): Promise { - console.log('orderbook', req) + const marketInfo = this.parsedMarkets[req.market]; + const asksUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.quoteAddress}&sellToken=${marketInfo.baseAddress}&limit=50`; + const bidsUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.baseAddress}&sellToken=${marketInfo.quoteAddress}&limit=50&desc=true&sortKey=price`; + + const [asksResp, bidsResp] = await Promise.all([fetch(asksUrl), fetch(bidsUrl)]); + + const { orders: asks } = (await asksResp.json()) as { cursor?: string; orders: OrderEntity[] }; + const { orders: bids } = (await bidsResp.json()) as { cursor?: string; orders: OrderEntity[] }; + return { - buys: [], - sells: [] + buys: bids.map(b => ({ price: b.price.toString(), quantity: b.outputs[0].startAmount, timestamp: b.createdAt })), + sells: asks.map(a => ({ price: a.price.toString(), quantity: a.input.startAmount, timestamp: a.createdAt })) } + + // return this if gladius order book is empty and hummingbot is using pmm strategy without external price feed + // return { + // buys: [{ price: "0.01", quantity: "5", timestamp: Math.floor(Date.now() / 1000) }], + // sells: [{ price: "0.01", quantity: "5", timestamp: Math.floor(Date.now() / 1000) }] + // } } public async ticker( @@ -80,29 +169,104 @@ export class RubiconCLOB implements CLOBish { public async orders( req: ClobGetOrderRequest - ): Promise<{ orders: [] }> { + ): Promise<{ orders: ClobGetOrderResponse['orders'] }> { - console.log('orders', req) + if (!req.orderId) return { orders: [] } - return { - orders: [] + const url = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?orderHash=${req.orderId}`; + const { orders } = (await (await fetch(url)).json()) as { cursor?: string; orders: OrderEntity[] }; + + return { + orders: orders.map(o => { + return { + status: o.orderStatus, + id: o.orderHash, + clientId: o.orderHash, + orderHash: o.orderHash, + } + }) as ClobGetOrderResponse['orders'] } } public async postOrder( req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { - console.log('post order', req) - return { txHash: "", id: "" }; + const marketInfo = this.parsedMarkets[req.market] + const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); + const quote = tokens.find(t => t.address === marketInfo.quoteAddress)!; + const token = tokens.find(t => t.address === marketInfo.baseAddress)!; + const isBuy = req.side === 'BUY' + + const [inputToken, outputToken] = isBuy ? [quote, token] : [token, quote]; + const _deadline = Math.floor(Date.now() / 1000) + 60; // orderDuration seconds in the future... + + const nonceMgr = new NonceManager(this.provider, this._chain.chainId, PERMIT2_MAPPING[this._chain.chainId]); + const nonce = await nonceMgr.useNonce(req.address); + + const inputAmount: BigNumber = isBuy + ? parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals) + : parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals); + const outputAmount: BigNumber = isBuy + ? parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals) + : parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals); + + const orderBuilder = new GladiusOrderBuilder(this._chain.chainId); + + const order = orderBuilder + .deadline(_deadline) + .nonce(nonce) + .swapper(req.address) + .decayEndTime(_deadline - 1) + .decayStartTime(Math.floor(Date.now() / 1000)) + .input({ + token: inputToken.address, + startAmount: inputAmount, + endAmount: inputAmount, + }) + .output({ + token: outputToken.address, + startAmount: outputAmount, + endAmount: outputAmount, + recipient: req.address, + }) + .fillThreshold(inputAmount) + .build() + + const { domain, types, values } = order.permitData(); + const signature = await this.wallet._signTypedData(domain, types, values); + const serializedOrder = order.serialize(); + + const payload = { + encodedOrder: serializedOrder, + signature, + chain: this._chain.chainId, + }; + + const postResponse = await axios({ + method: 'post', + url: `${RubiconCLOBConfig.config.url}dutch-auction/order`, + data: payload, + }) + + return { txHash: "", id: postResponse.data.hash }; } public async deleteOrder( req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { - console.log('delete order', req) - return { txHash: "", id: "" }; + axios({ + url: `${RubiconCLOBConfig.config.url}dutch-auction/cancel`, + method: 'post', + data: { + signature: await this.wallet.signMessage(req.orderId), + hash: req.orderId, + swapper: this.wallet.address + } + }) + + return { txHash: "", id: req.orderId }; } public estimateGas(_req: NetworkSelectionRequest): { diff --git a/yarn.lock b/yarn.lock index b1c88a054d..43437c7157 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,137 +1462,137 @@ "@ethersproject-xdc/abi@file:vendor/@ethersproject-xdc/abi": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/abstract-provider@file:vendor/@ethersproject-xdc/abstract-provider": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/web" "@ethersproject-xdc/abstract-signer@file:vendor/@ethersproject-xdc/abstract-signer": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/address@file:vendor/@ethersproject-xdc/address": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/rlp" "@ethersproject-xdc/base64@file:vendor/@ethersproject-xdc/base64": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-ac940ee8-f7d7-44f8-a8e6-a8a2aa43673b-1711378365615/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-cd2a10fb-83a6-4323-b53b-0d794bf0bc70-1722671754115/node_modules/@ethersproject-xdc/bytes" "@ethersproject-xdc/basex@file:vendor/@ethersproject-xdc/basex": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-b333f4ad-6a40-44df-bb6c-9865f5ae2841-1722671754114/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-b333f4ad-6a40-44df-bb6c-9865f5ae2841-1722671754114/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/bignumber@file:vendor/@ethersproject-xdc/bignumber": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-48281f71-3982-4e77-8f26-599cac126b7d-1722671754119/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-48281f71-3982-4e77-8f26-599cac126b7d-1722671754119/node_modules/@ethersproject-xdc/logger" bn.js "^5.2.1" "@ethersproject-xdc/bytes@file:vendor/@ethersproject-xdc/bytes": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-99ecb1f1-f3c4-4352-b857-7f806ce05f5d-1711378365616/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-c02043dd-db42-473a-9e8c-647bddc16fd7-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/constants@file:vendor/@ethersproject-xdc/constants": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-91a31af6-9be3-4e31-94b5-304ef35e3207-1711378365616/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-b24550a6-7468-46b6-ab20-078aa329f195-1722671754114/node_modules/@ethersproject-xdc/bignumber" "@ethersproject-xdc/contracts@file:vendor/@ethersproject-xdc/contracts": version "5.6.0" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/transactions" "@ethersproject-xdc/hash@file:vendor/@ethersproject-xdc/hash": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/hdnode@file:vendor/@ethersproject-xdc/hdnode": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/json-wallets@file:vendor/@ethersproject-xdc/json-wallets": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/transactions" aes-js "3.0.0" scrypt-js "3.0.1" "@ethersproject-xdc/keccak256@file:vendor/@ethersproject-xdc/keccak256": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-9cb7534e-f2d4-4bb8-8726-aa8d2ae70a68-1711378365617/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-86bbfd0b-3c89-4228-82bf-45408fcc2bcc-1722671754114/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1601,67 +1601,67 @@ "@ethersproject-xdc/networks@file:vendor/@ethersproject-xdc/networks": version "5.7.1" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-3318040d-6ee2-4fe1-8d35-2e90df014a04-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-f64fe2fd-8ce8-4879-a63c-7b20d449eeed-1722671754115/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/pbkdf2@file:vendor/@ethersproject-xdc/pbkdf2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-23e9b911-0f92-4ebc-8a19-77df2b0245ea-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-23e9b911-0f92-4ebc-8a19-77df2b0245ea-1722671754116/node_modules/@ethersproject-xdc/sha2" "@ethersproject-xdc/properties@file:vendor/@ethersproject-xdc/properties": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-d600654f-dc20-45bd-8730-5aea66cd419c-1711378365618/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-b89877d9-55f0-426a-a750-b520de688fe8-1722671754115/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/providers@file:vendor/@ethersproject-xdc/providers": version "5.6.2" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/web" bech32 "1.1.4" ws "7.4.6" "@ethersproject-xdc/random@file:vendor/@ethersproject-xdc/random": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-d430af73-ac72-4285-9efc-0cfecf0ebd42-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-d430af73-ac72-4285-9efc-0cfecf0ebd42-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/rlp@file:vendor/@ethersproject-xdc/rlp": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9092121f-d86e-4bb4-ae10-380ed98f6426-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9092121f-d86e-4bb4-ae10-380ed98f6426-1722671754118/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/sha2@file:vendor/@ethersproject-xdc/sha2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9f284ecd-2634-4efe-806c-ef6664f151c7-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9f284ecd-2634-4efe-806c-ef6664f151c7-1722671754117/node_modules/@ethersproject-xdc/logger" hash.js "1.1.7" "@ethersproject-xdc/signing-key@file:vendor/@ethersproject-xdc/signing-key": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1669,76 +1669,76 @@ "@ethersproject-xdc/solidity@file:vendor/@ethersproject-xdc/solidity": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/strings@file:vendor/@ethersproject-xdc/strings": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/transactions@file:vendor/@ethersproject-xdc/transactions": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/signing-key" "@ethersproject-xdc/units@file:vendor/@ethersproject-xdc/units": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/wallet@file:vendor/@ethersproject-xdc/wallet": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/web@file:vendor/@ethersproject-xdc/web": version "5.7.1" dependencies: - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/wordlists@file:vendor/@ethersproject-xdc/wordlists": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/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" @@ -1980,7 +1980,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.4.5", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.0.4", "@ethersproject/providers@^5.4.0", "@ethersproject/providers@^5.4.5", "@ethersproject/providers@^5.7.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== @@ -3559,6 +3559,18 @@ debug "^3.1.0" hosted-git-info "^2.6.0" +"@rubicondefi/gladius-sdk@^1.4.27": + version "1.4.27" + resolved "https://registry.yarnpkg.com/@rubicondefi/gladius-sdk/-/gladius-sdk-1.4.27.tgz#dc7474fdce3476c8d09ce7b5d84fa77aad63572d" + integrity sha512-2M64VisTB1OtZuh7dE2ndogM045vwSPBaGStbDxQcbH0Y8s6wXd5XXWR7yInlh7iZ3BKYYzFJUVoWJ002Hnp+A== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/providers" "^5.7.0" + "@uniswap/permit2-sdk" "^1.2.0" + "@uniswap/sdk-core" "^4.0.3" + axios "^1.6.1" + ethers "^5.7.0" + "@scure/base@~1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" @@ -4999,6 +5011,14 @@ resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-4.0.1-alpha.tgz#2881008e55f075344675b3bca93f020b028fbd02" integrity sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA== +"@uniswap/permit2-sdk@^1.2.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@uniswap/permit2-sdk/-/permit2-sdk-1.3.0.tgz#b54124e570f0adbaca9d39b2de3054fd7d3798a1" + integrity sha512-LstYQWP47dwpQrgqBJ+ysFstne9LgI5FGiKHc2ewjj91MTY8Mq1reocu6U/VDncdR5ef30TUOcZ7gPExRY8r6Q== + dependencies: + ethers "^5.7.0" + tiny-invariant "^1.1.0" + "@uniswap/router-sdk@^1.3.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@uniswap/router-sdk/-/router-sdk-1.4.0.tgz#0e8d49f37b36e74b6a70ec257ec0561bf1f249c3" @@ -5022,6 +5042,18 @@ tiny-invariant "^1.1.0" toformat "^2.0.0" +"@uniswap/sdk-core@^4.0.3": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-4.2.1.tgz#7b8c6fee48446bb67a4e6f2e9cb94c862034a6c3" + integrity sha512-hr7vwYrXScg+V8/rRc2UL/Ixc/p0P7yqe4D/OxzUdMRYr8RZd+8z5Iu9+WembjZT/DCdbTjde6lsph4Og0n1BQ== + dependencies: + "@ethersproject/address" "^5.0.2" + big.js "^5.2.2" + decimal.js-light "^2.5.0" + jsbi "^3.1.4" + tiny-invariant "^1.1.0" + toformat "^2.0.0" + "@uniswap/sdk@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@uniswap/sdk/-/sdk-3.0.2.tgz#c75da48a8d7c3e62556c2b29d6c0f75f133d6afa" @@ -5092,6 +5124,11 @@ resolved "https://registry.yarnpkg.com/@uniswap/token-lists/-/token-lists-1.0.0-beta.31.tgz#ff3852bd505ec7b4c276625c762ea79a93a919ec" integrity sha512-BQVoelKCRf64IToPEs1wxiXOnhr/ukwPOF78XG11PrTAOL4F8umjYKFb8ZPv1/dIJsPaC7GhLSriEqyp94SasQ== +"@uniswap/token-lists@^1.0.0-beta.34": + version "1.0.0-beta.34" + resolved "https://registry.yarnpkg.com/@uniswap/token-lists/-/token-lists-1.0.0-beta.34.tgz#879461f5d4009327a24259bbab797e0f22db58c8" + integrity sha512-Hc3TfrFaupg0M84e/Zv7BoF+fmMWDV15mZ5s8ZQt2qZxUcNw2GQW+L6L/2k74who31G+p1m3GRYbJpAo7d1pqA== + "@uniswap/v2-core@1.0.1", "@uniswap/v2-core@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.1.tgz#af8f508bf183204779938969e2e54043e147d425" @@ -5875,6 +5912,15 @@ axios@^1.6.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.6.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.3.tgz#a1125f2faf702bc8e8f2104ec3a76fab40257d85" + integrity sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -8235,36 +8281,36 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: "ethers-xdc@file:./vendor/ethers-xdc": version "5.7.2" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" @@ -8777,7 +8823,7 @@ follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== -follow-redirects@^1.14.4: +follow-redirects@^1.14.4, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== From dda05658cd09f7f59771feb4f2fe84c4b736ad86 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Mon, 5 Aug 2024 11:07:54 +0900 Subject: [PATCH 08/21] ensure pk is set to sign orders --- src/connectors/rubicon/rubicon.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index 5bbecd0bf7..726e31cda1 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -11,13 +11,18 @@ export namespace RubiconCLOBConfig { pk: string; } + if (!process.env.RUBICON_GATEWAY_WALLET_PK) { + console.log("env variable RUBICON_GATEWAY_WALLET_PK not set") + process.exit(1) + } + export const config: NetworkConfig = { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', allowedSlippage: "2/100", availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrum_sepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", - pk: // get config manager to work + pk: process.env.RUBICON_GATEWAY_WALLET_PK, }; } From e65b5a45db7b8b2ef320bd740790dacde2223d40 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Mon, 5 Aug 2024 12:48:03 +0900 Subject: [PATCH 09/21] url typo --- src/connectors/rubicon/rubicon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 625016dea1..4b808875e1 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -245,7 +245,7 @@ export class RubiconCLOB implements CLOBish { const postResponse = await axios({ method: 'post', - url: `${RubiconCLOBConfig.config.url}dutch-auction/order`, + url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, data: payload, }) @@ -257,7 +257,7 @@ export class RubiconCLOB implements CLOBish { ): Promise<{ txHash: string, id: string }> { axios({ - url: `${RubiconCLOBConfig.config.url}dutch-auction/cancel`, + url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, method: 'post', data: { signature: await this.wallet.signMessage(req.orderId), From 60f9943c202af733891de43d18c830a8ec079cd9 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Mon, 19 Aug 2024 16:18:38 -0400 Subject: [PATCH 10/21] calculate markets dynamically --- src/connectors/rubicon/rubicon.config.ts | 172 +------------ src/connectors/rubicon/rubicon.ts | 312 +++++++++++++++++++++-- src/templates/ethereum.yml | 2 +- src/templates/rubicon.yml | 12 - 4 files changed, 297 insertions(+), 201 deletions(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index 726e31cda1..d8cb44a755 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -20,7 +20,7 @@ export namespace RubiconCLOBConfig { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', allowedSlippage: "2/100", - availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrum_sepolia', 'optimism', 'base'] } ], + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", pk: process.env.RUBICON_GATEWAY_WALLET_PK, }; @@ -60,181 +60,11 @@ export const tokenList: TokenList = { patch: 0, }, tokens: [ - // Optimism Kovan v1 // Note: all tokens need to have their associated underlyingAssetGeckoID so we can query Coin Gecko and get price info // *NOTE THE FIRST COIN IN THE LIST WILL BE THE DEFAULT SELECTED TOKEN* // ** ERC20s ** // **** TODO ENFORCE TYPE CAST ON REQUIRED EXTENSIONS **** - { - name: 'Optimism', - symbol: 'OP', - chainId: Network.OPTIMISM_KOVAN, - address: '0x1891B8e7c129B99860f6D58CEFB41D00650F6249', - decimals: 18, //TODO: pools formatting - // - extensions: { - underlyingAssetGeckoID: 'optimism', - }, - }, - - { - symbol: 'WETH', - name: 'Wrapped Ethereum', - decimals: 18, - - address: '0x4200000000000000000000000000000000000006', - chainId: Network.OPTIMISM_KOVAN, - extensions: { - underlyingAssetGeckoID: 'ethereum', - }, - }, - { - symbol: 'ETH2', - name: 'Ethereum 2.0', - decimals: 18, - address: '0x79265ee50c18C6967A1F0db404DC1dFa2B28a8FA', - chainId: Network.OPTIMISM_KOVAN, - extensions: { - underlyingAssetGeckoID: 'ethereum', - }, - }, - { - symbol: 'WBTC', - name: 'Wrapped Bitcoin', - decimals: 8, - - address: '0xaBb0bd8f9BAFa670c8496AF9609BD42D3F75Bd15', - chainId: Network.OPTIMISM_KOVAN, - }, - { - symbol: 'WETH', - name: 'Wrapped Ethereum', - decimals: 18, - - address: '0x4200000000000000000000000000000000000006', - chainId: Network.OPTIMISM_KOVAN, - extensions: { - underlyingAssetGeckoID: 'ethereum', - }, - }, - { - symbol: 'SNX', - name: 'Synthetix', - decimals: 18, - - address: '0x4dd40a266588Fa152E14973aBb6531541972aE63', - chainId: Network.OPTIMISM_KOVAN, - extensions: { - unsupportedQuotes: { - USDT: true, - DAI: true, - }, - }, - }, - - // ** Quotes ** - { - name: 'USDC Stablecoin', - symbol: 'USDC', - chainId: Network.OPTIMISM_KOVAN, - address: '0x940578F6D9f9ffD9621F69dbB5B24Fd380799772', - decimals: 6, - - extensions: { - quote: true, - underlyingAssetGeckoID: 'usd-coin', - }, - }, - { - name: 'DAI Stablecoin', - symbol: 'DAI', - chainId: Network.OPTIMISM_KOVAN, - address: '0xEb22F82de678852B8dff065768490B881DD0116a', - decimals: 18, - - extensions: { - quote: true, - underlyingAssetGeckoID: 'dai', - }, - }, - { - name: 'USDT Stablecoin', - symbol: 'USDT', - chainId: Network.OPTIMISM_KOVAN, - address: '0x655cb52BE3131713638AC812d6cC52256F32a3A5', - decimals: 6, - - extensions: { - quote: true, - }, - }, - // ** BathTokens ** TODO: pull dynamically? - { - name: 'BathToken v1', - symbol: 'bathUSDC', - chainId: Network.OPTIMISM_KOVAN, - address: '0x4853C571552F0AA43D528b7141Ebdfe17Cd1eAd8', - decimals: 6, //TODO: pools formatting???? - - extensions: { - underlyingTicker: 'USDC', - underlyingAssetGeckoID: 'usd-coin', - }, - }, - // TEST TOKENS - { - name: 'BathToken v1', - symbol: 'bathGR8', - chainId: Network.OPTIMISM_KOVAN, - address: '0xdb42b8D3863138AA1e40544Cfc5340aAaEFcd169', - decimals: 18, //TODO: pools formatting - // - extensions: { - underlyingTicker: 'GR8', - rewardsLive: true, - underlyingAssetGeckoID: 'ethereum', - }, - }, - { - name: 'Rubicon Magnus', - symbol: 'GR8', - chainId: Network.OPTIMISM_KOVAN, - address: '0xF234066d9C7e0B296517598098F1DE491656c7bc', - decimals: 18, //TODO: pools formatting - // - extensions: { - underlyingAssetGeckoID: 'ethereum', - }, - }, - // Kovan OP - { - name: 'BathToken v1', - symbol: 'bathOP', - chainId: Network.OPTIMISM_KOVAN, - address: '0x2deC1E6919413Ac863C834630EE9F68DF69D4d9B', - decimals: 18, //TODO: pools formatting - // - extensions: { - underlyingTicker: 'OP', - // rewardsLive: true, - underlyingAssetGeckoID: 'optimism', - }, - }, - { - name: 'BathToken v1', - symbol: 'bathETH', - chainId: Network.OPTIMISM_KOVAN, - address: '0x5790AedddfB25663f7dd58261De8E96274A82BAd', - decimals: 18, - - extensions: { - underlyingTicker: 'WETH', - underlyingAssetGeckoID: 'ethereum', - //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET - isNativeAssetWrapper: true, // IMPORTANT - }, - }, // ** V1 MAINNET ** // ** QUOTES ** diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 4b808875e1..4816c38741 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -1,4 +1,4 @@ -import { GladiusOrderBuilder, NonceManager, PERMIT2_MAPPING } from '@rubicondefi/gladius-sdk'; +import { GladiusOrder, GladiusOrderBuilder, NonceManager, PERMIT2_MAPPING } from '@rubicondefi/gladius-sdk'; import { Ethereum } from '../../chains/ethereum/ethereum'; import { ClobMarketsRequest, @@ -14,10 +14,11 @@ import { MarketInfo, NetworkSelectionRequest, Orderbook, + PriceLevel, } from '../../services/common-interfaces'; -import { RubiconCLOBConfig, tokenList } from './rubicon.config'; +import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; import { BigNumber, providers, Wallet } from 'ethers'; -import { parseUnits } from 'ethers/lib/utils'; +import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import axios from 'axios'; @@ -54,6 +55,14 @@ export enum OrderType { Dutch = "Dutch" } +type Fill = { + outputToken: string; + inputToken: string; + outputAmount: string; + inputAmount: string; + timestamp: string; +} + export type OrderEntity = { type: OrderType; encodedOrder: string; @@ -76,6 +85,14 @@ export type OrderEntity = { settledAmounts?: SettledAmount[]; }; +const NETWORK_INFO: Record = { + [Network.OPTIMISM_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Optimism_V2', + [Network.ARBITRUM_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Arbitrum_V2', + [Network.MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Ethereum_V2', + //Base Mainnet + [Network.BASE_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Base_V2', +}; + export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; @@ -97,12 +114,22 @@ export class RubiconCLOB implements CLOBish { public async loadMarkets() { // TODO: get all tokens in the token list const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); - const USDC = tokens.find(t => t.symbol.toUpperCase() === "USDC"); - const WETH = tokens.find(t => t.symbol.toUpperCase() === "WETH"); - const TEST = tokens.find(t => t.symbol.toUpperCase() === "TEST"); - this.parsedMarkets["WETH-USDC"] = { baseSymbol: "WETH", baseDecimals: WETH?.decimals, baseAddress: WETH?.address, quoteSymbol: "USDC", quoteDecimals: USDC?.decimals, quoteAddress: USDC?.address } - this.parsedMarkets["TEST-USDC"] = { baseSymbol: "TEST", baseDecimals: TEST?.decimals, baseAddress: TEST?.address, quoteSymbol: "USDC", quoteDecimals: USDC?.decimals, quoteAddress: USDC?.address } + tokens.forEach(base => { + const quotes = tokens.filter(t => t.address !== base.address) + quotes.forEach(quote => { + this.parsedMarkets[`${base.symbol.toUpperCase()}-${quote.symbol.toUpperCase()}`] = { + baseSymbol: base.symbol.toUpperCase(), + baseDecimals: base.decimals, + baseAddress: base.address, + quoteSymbol: quote.symbol, + quoteDecimals: quote.decimals, + quoteAddress: quote.address + } + }) + }) + + console.log("Markets Loaded") } public static getInstance(chain: string, network: string): RubiconCLOB { @@ -149,22 +176,211 @@ export class RubiconCLOB implements CLOBish { const { orders: asks } = (await asksResp.json()) as { cursor?: string; orders: OrderEntity[] }; const { orders: bids } = (await bidsResp.json()) as { cursor?: string; orders: OrderEntity[] }; - return { - buys: bids.map(b => ({ price: b.price.toString(), quantity: b.outputs[0].startAmount, timestamp: b.createdAt })), - sells: asks.map(a => ({ price: a.price.toString(), quantity: a.input.startAmount, timestamp: a.createdAt })) + const data = { + buys: bids + .filter((o) => { + const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); + if (o.orderStatus !== ORDER_STATUS.OPEN) { + return true; + } + + const now = Math.floor(new Date().getTime() / 1000); + if (decodedOrder.info.deadline >= now) { + return true; + } + + return false; + }) + .map((element) => { + const pay = BigNumber.from(element.input.endAmount); + const buy = BigNumber.from(element.outputs[0].endAmount); + const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); + const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedPay) / parseFloat(formattedBuy); + + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + + const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); + const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startTime = parsedOrder.info.decayStartTime; + const endTime = parsedOrder.info.decayEndTime; + const rawInputAmount = pay; + + let out: PriceLevel = { price: price.toString(), quantity: formattedBuy, timestamp: element.createdAt }; + + if (startingOutputAmount && endingOutputAmount && startTime && endTime && rawInputAmount) { + out = { + ...out, + price: this.getOrderPrice( + price, + false, + rawInputAmount, + startTime, + endTime, + startingOutputAmount, + endingOutputAmount, + Date.now() / 1000, + marketInfo.quoteDecimals, + marketInfo.baseDecimals, + ).toString(), + }; + } + return out; + }) + .filter(o => !!o) as PriceLevel[], + sells: asks + .filter(o => { + const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); + if (o.orderStatus !== ORDER_STATUS.OPEN) { + return true; + } + + const now = Math.floor(new Date().getTime() / 1000); + if (decodedOrder.info.deadline >= now) { + return true; + } + + return false; + }) + .map((element) => { + const pay = BigNumber.from(element.input.endAmount); + const buy = BigNumber.from(element.outputs[0].endAmount); + const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); + const formattedPay = formatUnits(pay, marketInfo.baseDecimals); + const rawInputAmount = pay; + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + + const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); + const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startTime = parsedOrder.info.decayStartTime; + const endTime = parsedOrder.info.decayEndTime; + + const price = parseFloat(formattedBuy) / parseFloat(formattedPay); + let out: PriceLevel = { + // quantity: pay, + price: price.toString(), + quantity: formattedPay, + timestamp: element.createdAt + }; + + if (startingOutputAmount && endingOutputAmount && startTime && endTime && rawInputAmount) { + out = { + ...out, + price: this.getOrderPrice( + price, + true, + rawInputAmount, + startTime, + endTime, + startingOutputAmount, + endingOutputAmount, + Date.now() / 1000, + marketInfo.quoteDecimals, + marketInfo.baseDecimals, + ).toString(), + }; + } + return out; + }) + .filter(o => !!o) as PriceLevel[] } - // return this if gladius order book is empty and hummingbot is using pmm strategy without external price feed - // return { - // buys: [{ price: "0.01", quantity: "5", timestamp: Math.floor(Date.now() / 1000) }], - // sells: [{ price: "0.01", quantity: "5", timestamp: Math.floor(Date.now() / 1000) }] - // } + return { ...data, sells: data.buys } } public async ticker( req: ClobTickerRequest ): Promise<{ markets: MarketInfo }> { - return await this.markets(req); + + const marketInfo = this.parsedMarkets[req.market!] + + if (!marketInfo) return { markets: {} } + + const query = `{ + sells: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.baseAddress}", outputToken: "${marketInfo.quoteAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + buys: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.quoteAddress}", outputToken: "${marketInfo.baseAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + }` + + const response = await fetch(NETWORK_INFO[this._chain.chainId], { + method: 'POST', + + headers: { + "Content-Type": "application/json" + }, + + body: JSON.stringify({ query }) + }) + + const json: { data: { sells: Fill[], buys: Fill[] } } = await response.json(); + const trades = [ + json.data.sells.map(element => { + const pay = BigNumber.from(element.inputAmount); + const buy = BigNumber.from(element.outputAmount); + const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); + const formattedPay = formatUnits(pay, marketInfo.baseDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedBuy) / parseFloat(formattedPay); + return { price, timestamp: element.timestamp } + + })[0], + json.data.buys.map(element => { + const pay = BigNumber.from(element.inputAmount); + const buy = BigNumber.from(element.outputAmount); + const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); + const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedPay) / parseFloat(formattedBuy); + return { price, timestamp: element.timestamp } + })[0] + ]; + + const lastTrade = trades.sort((a,b) => { + if (!b) return -1; + if (!a) return 1; + return parseInt(a.timestamp) - parseInt(b.timestamp) + })[0] + + return { markets: { price: (lastTrade?.price || 0) + (Math.random() * 10) } }; } public async orders( @@ -282,4 +498,66 @@ export class RubiconCLOB implements CLOBish { gasCost: 0, }; } + + private getOrderPrice( + givenReferencePrice: number, + isAsk: boolean, + inputAmount: BigNumber | undefined, + startTime?: number, + endTime?: number, + startingOutputAmount?: BigNumber, + endingOutputAmount?: BigNumber, + currentTimestamp = Date.now() / 1000, + quoteDecimals?: number, + tokenDecimals?: number, + ): number { + if ( + !startTime || + !endTime || + !startingOutputAmount || + !endingOutputAmount || + !quoteDecimals || + !tokenDecimals || + !inputAmount + ) { + return givenReferencePrice; + } + + if (startingOutputAmount.eq(endingOutputAmount)) return givenReferencePrice; + + // TODO: handle case where currentTimestamp is before startTime + if (currentTimestamp <= startTime) { + return !isAsk + ? parseFloat(formatUnits(inputAmount, quoteDecimals)) / + parseFloat(formatUnits(startingOutputAmount, tokenDecimals)) + : parseFloat(formatUnits(startingOutputAmount, tokenDecimals)) / + parseFloat(formatUnits(inputAmount, quoteDecimals)); + } + if (currentTimestamp >= endTime) return givenReferencePrice; + + const totalDuration = endTime - startTime; + const elapsedTime = currentTimestamp - startTime; + + try { + const priceChange = endingOutputAmount.sub(startingOutputAmount); + const scaleFactor = BigNumber.from('1000000000000000000'); // 1e18 for ether scaling + const scaledPriceChange = priceChange.mul(scaleFactor); + const currentChange = scaledPriceChange + .mul(BigNumber.from(Math.floor(elapsedTime))) + .div(BigNumber.from(totalDuration)) + .div(scaleFactor); + + const currentOutputAmount = startingOutputAmount.add(currentChange); + // return parseFloat(formatUnits(currentPrice, tokenDecimals)); + + return !isAsk + ? parseFloat(formatUnits(inputAmount, quoteDecimals)) / + parseFloat(formatUnits(currentOutputAmount, tokenDecimals)) + : parseFloat(formatUnits(currentOutputAmount, quoteDecimals)) / + parseFloat(formatUnits(inputAmount, tokenDecimals)); + } catch (error) { + console.log('error in order book dutch math', error); + return givenReferencePrice; + } + } } diff --git a/src/templates/ethereum.yml b/src/templates/ethereum.yml index c522244f21..c49ee2a182 100644 --- a/src/templates/ethereum.yml +++ b/src/templates/ethereum.yml @@ -46,7 +46,7 @@ networks: nodeURL: https://rpc.ankr.com/base nativeCurrencySymbol: ETH gasPriceRefreshInterval: 60 - arbitrum_sepolia: + arbitrumSepolia: chainID: 421614 tokenListType: FILE tokenListSource: /home/gateway/conf/lists/arbitrum_sepolia_tokens.json diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml index 988a08ecdf..8f5b3b83d6 100644 --- a/src/templates/rubicon.yml +++ b/src/templates/rubicon.yml @@ -8,15 +8,3 @@ gasLimitEstimate: 300000 # ttl: how long a trade is valid in seconds. After this time passes # xsswap will not perform the trade, but the gas will still be sent. ttl: 600 - -networks: - base: - chainID: 8453 - nodeURL: https://rpc.ankr.com/base - nativeCurrencySymbol: ETH - gasPriceRefreshInterval: 60 - arbitrum_sepolia: - chainID: 421614 - nodeURL: https://rpc.ankr.com/arbitrum_sepolia - nativeCurrencySymbol: ETH - gasPriceRefreshInterval: 60 From 8201686188fb7f24e1fc8d2c2a105e6363a86e29 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Tue, 20 Aug 2024 18:00:07 -0400 Subject: [PATCH 11/21] Add keys to config --- src/connectors/rubicon/rubicon.config.ts | 12 +++++------- src/connectors/rubicon/rubicon.ts | 21 ++++++++++++++++----- src/services/schema/rubicon-schema.json | 22 +++------------------- src/templates/root.yml | 4 ++++ src/templates/rubicon.yml | 6 ++++++ 5 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index d8cb44a755..d77a66ae32 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -1,5 +1,8 @@ import { TokenList } from '@uniswap/token-lists'; import { AvailableNetworks } from '../../services/config-manager-types'; +import { ConfigManagerV2 } from '../../services/config-manager-v2'; + +const configManager = ConfigManagerV2.getInstance(); export namespace RubiconCLOBConfig { export interface NetworkConfig { @@ -8,12 +11,7 @@ export namespace RubiconCLOBConfig { chainType: string; availableNetworks: Array; url: string; - pk: string; - } - - if (!process.env.RUBICON_GATEWAY_WALLET_PK) { - console.log("env variable RUBICON_GATEWAY_WALLET_PK not set") - process.exit(1) + privateKeys: Record; } export const config: NetworkConfig = { @@ -22,7 +20,7 @@ export namespace RubiconCLOBConfig { allowedSlippage: "2/100", availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", - pk: process.env.RUBICON_GATEWAY_WALLET_PK, + privateKeys: configManager.get('rubicon.privateKeys') }; } diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 4816c38741..5d998d6d7e 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -93,13 +93,15 @@ const NETWORK_INFO: Record = { [Network.BASE_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Base_V2', }; +// const configManager = ConfigManagerV2.getInstance(); + export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; public parsedMarkets: MarketInfo = []; private static _instances: { [name: string]: RubiconCLOB }; - private wallet: Wallet; private provider: StaticJsonRpcProvider; + private privateKeys: Record; private constructor(chain: string, network: string) { @@ -108,7 +110,7 @@ export class RubiconCLOB implements CLOBish { } else throw Error('Chain not supported.'); this.provider = new providers.StaticJsonRpcProvider(this._chain.rpcUrl, this._chain.chainId); - this.wallet = new Wallet(RubiconCLOBConfig.config.pk).connect(this.provider) + this.privateKeys = RubiconCLOBConfig.config.privateKeys; } public async loadMarkets() { @@ -408,6 +410,10 @@ export class RubiconCLOB implements CLOBish { req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { + const pk = this.privateKeys[req.address] + if (!pk) throw new Error(`Key for ${req.address} not found`) + + const wallet = new Wallet(pk).connect(this.provider) const marketInfo = this.parsedMarkets[req.market] const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); const quote = tokens.find(t => t.address === marketInfo.quoteAddress)!; @@ -450,7 +456,7 @@ export class RubiconCLOB implements CLOBish { .build() const { domain, types, values } = order.permitData(); - const signature = await this.wallet._signTypedData(domain, types, values); + const signature = await wallet._signTypedData(domain, types, values); const serializedOrder = order.serialize(); const payload = { @@ -472,13 +478,18 @@ export class RubiconCLOB implements CLOBish { req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { + const pk = this.privateKeys[req.address] + if (!pk) throw new Error(`Key for ${req.address} not found`) + + const wallet = new Wallet(pk).connect(this.provider) + axios({ url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, method: 'post', data: { - signature: await this.wallet.signMessage(req.orderId), + signature: await wallet.signMessage(req.orderId), hash: req.orderId, - swapper: this.wallet.address + swapper: wallet.address } }) diff --git a/src/services/schema/rubicon-schema.json b/src/services/schema/rubicon-schema.json index a785d1e421..19226aba88 100644 --- a/src/services/schema/rubicon-schema.json +++ b/src/services/schema/rubicon-schema.json @@ -5,30 +5,14 @@ "allowedSlippage": { "type": "string" }, "gasLimitEstimate": { "type": "integer" }, "ttl": { "type": "integer" }, - "networks": { + "privateKeys": { "type": "object", "patternProperties": { - "^\\w+$": { - "type": "object", - "properties": { - "chainID": { "type": "integer" }, - "nodeURL": { "type": "string" }, - "tokenListType": { "type": "string" }, - "tokenListSource": { "type": "string" }, - "nativeCurrencySymbol": { "type": "string" }, - "gasPriceRefreshInterval": { "type": "number" } - }, - "required": [ - "chainID", - "nodeURL", - "nativeCurrencySymbol" - ], - "additionalProperties": false - } + "^0x\\w{0,40}$": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false, - "required": ["allowedSlippage", "gasLimitEstimate", "ttl"] + "required": ["allowedSlippage", "gasLimitEstimate", "ttl", "privateKeys"] } diff --git a/src/templates/root.yml b/src/templates/root.yml index d15d5b0028..a2823ad8ce 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -135,3 +135,7 @@ configurations: $namespace balancer: configurationPath: balancer.yml schemaPath: cronos-connector-schema.json + + $namespace rubicon: + configurationPath: rubicon.yml + schemaPath: rubicon-schema.json diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml index 8f5b3b83d6..82b5d3bbb4 100644 --- a/src/templates/rubicon.yml +++ b/src/templates/rubicon.yml @@ -8,3 +8,9 @@ gasLimitEstimate: 300000 # ttl: how long a trade is valid in seconds. After this time passes # xsswap will not perform the trade, but the gas will still be sent. ttl: 600 + +# privateKeys: a map of addresses used by hummingbot to private key in order to sign trades +# since there is no authentication required to post to the server +privateKeys: + #address: #key + #address2: #key2 From d51aee0d68b5779c65fa34fed87f746c600fbc8e Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Tue, 20 Aug 2024 20:24:37 -0400 Subject: [PATCH 12/21] Add fake private key --- src/templates/rubicon.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml index 82b5d3bbb4..c8800e881a 100644 --- a/src/templates/rubicon.yml +++ b/src/templates/rubicon.yml @@ -12,5 +12,4 @@ ttl: 600 # privateKeys: a map of addresses used by hummingbot to private key in order to sign trades # since there is no authentication required to post to the server privateKeys: - #address: #key - #address2: #key2 + '0x0000000000000000000000000000000000000000': 000000000000000000fakeprivatekey00000000000000000000000000000000 From 7617e3559de9df02e18dce5ded8704df115715ab Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 21 Aug 2024 10:43:47 -0400 Subject: [PATCH 13/21] Calculate slippage into output amount --- src/connectors/rubicon/rubicon.config.ts | 4 +-- src/connectors/rubicon/rubicon.ts | 41 ++++++++++++++++++++---- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index d77a66ae32..e8d0dfd0a4 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -11,16 +11,14 @@ export namespace RubiconCLOBConfig { chainType: string; availableNetworks: Array; url: string; - privateKeys: Record; } export const config: NetworkConfig = { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', - allowedSlippage: "2/100", + allowedSlippage: configManager.get('rubicon.allowedSlippage'), availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", - privateKeys: configManager.get('rubicon.privateKeys') }; } diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 5d998d6d7e..486ea05748 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -18,9 +18,11 @@ import { } from '../../services/common-interfaces'; import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; import { BigNumber, providers, Wallet } from 'ethers'; -import { formatUnits, parseUnits } from 'ethers/lib/utils'; +import { formatUnits, getAddress, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import axios from 'axios'; +import { isFractionString } from '../../services/validators'; +import { percentRegexp } from '../../services/config-manager-v2'; export enum ORDER_STATUS { OPEN = 'open', @@ -103,14 +105,18 @@ export class RubiconCLOB implements CLOBish { private provider: StaticJsonRpcProvider; private privateKeys: Record; - private constructor(chain: string, network: string) { if (chain === 'ethereum') { this._chain = Ethereum.getInstance(network); } else throw Error('Chain not supported.'); + if (!process.env.HUMMINGBOT_WALLET_ADDRESS) throw Error("Env variable HUMMINGBOT_WALLET_ADDRESS not set") + if (!process.env.HUMMINGBOT_WALLET_PK) throw Error("Env variable HUMMINGBOT_WALLET_PK not set") + this.provider = new providers.StaticJsonRpcProvider(this._chain.rpcUrl, this._chain.chainId); - this.privateKeys = RubiconCLOBConfig.config.privateKeys; + this.privateKeys = { + [getAddress(process.env.HUMMINGBOT_WALLET_ADDRESS)]: process.env.HUMMINGBOT_WALLET_PK + } } public async loadMarkets() { @@ -410,7 +416,7 @@ export class RubiconCLOB implements CLOBish { req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { - const pk = this.privateKeys[req.address] + const pk = this.privateKeys[getAddress(req.address)] if (!pk) throw new Error(`Key for ${req.address} not found`) const wallet = new Wallet(pk).connect(this.provider) @@ -433,6 +439,13 @@ export class RubiconCLOB implements CLOBish { ? parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals) : parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals); + let slippageTolerance = this.getAllowedSlippage() / 100; + + const startingOutputFactor = 1; + const startingOutputAmount = parseFloat(formatUnits(outputAmount, outputToken.decimals)) * startingOutputFactor; + const endingOutputFactor = 1 - slippageTolerance; + const endingOutputAmount = parseFloat(formatUnits(outputAmount, outputToken.decimals)) * endingOutputFactor; + const orderBuilder = new GladiusOrderBuilder(this._chain.chainId); const order = orderBuilder @@ -448,8 +461,8 @@ export class RubiconCLOB implements CLOBish { }) .output({ token: outputToken.address, - startAmount: outputAmount, - endAmount: outputAmount, + startAmount: parseUnits(startingOutputAmount.toFixed(outputToken.decimals), outputToken.decimals), + endAmount: parseUnits(endingOutputAmount.toFixed(outputToken.decimals), outputToken.decimals), recipient: req.address, }) .fillThreshold(inputAmount) @@ -478,7 +491,7 @@ export class RubiconCLOB implements CLOBish { req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { - const pk = this.privateKeys[req.address] + const pk = this.privateKeys[getAddress(req.address)] if (!pk) throw new Error(`Key for ${req.address} not found`) const wallet = new Wallet(pk).connect(this.provider) @@ -571,4 +584,18 @@ export class RubiconCLOB implements CLOBish { return givenReferencePrice; } } + + public getAllowedSlippage(allowedSlippageStr?: string): number { + if (allowedSlippageStr != null && isFractionString(allowedSlippageStr)) { + const fractionSplit = allowedSlippageStr.split('/'); + return Number((Number(fractionSplit[0]) / Number(fractionSplit[1]) * 100).toFixed(0)); + } + + const allowedSlippage = RubiconCLOBConfig.config.allowedSlippage; + const matches = allowedSlippage.match(percentRegexp); + if (matches) return Number((Number(matches[1]) / Number(matches[2]) * 100).toFixed(0)); + throw new Error( + 'Encountered a malformed percent string in the config for ALLOWED_SLIPPAGE.' + ); + } } From 1bf40b88eb81ff4c583b782bd52d39f01102742b Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 21 Aug 2024 12:51:00 -0400 Subject: [PATCH 14/21] Use gateway to get wallet --- src/connectors/rubicon/rubicon.ts | 21 ++++----------------- src/services/schema/rubicon-schema.json | 13 ++----------- src/templates/rubicon.yml | 12 ------------ 3 files changed, 6 insertions(+), 40 deletions(-) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 486ea05748..18bb4421bf 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -17,8 +17,8 @@ import { PriceLevel, } from '../../services/common-interfaces'; import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; -import { BigNumber, providers, Wallet } from 'ethers'; -import { formatUnits, getAddress, parseUnits } from 'ethers/lib/utils'; +import { BigNumber, providers } from 'ethers'; +import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import axios from 'axios'; import { isFractionString } from '../../services/validators'; @@ -103,20 +103,13 @@ export class RubiconCLOB implements CLOBish { public parsedMarkets: MarketInfo = []; private static _instances: { [name: string]: RubiconCLOB }; private provider: StaticJsonRpcProvider; - private privateKeys: Record; private constructor(chain: string, network: string) { if (chain === 'ethereum') { this._chain = Ethereum.getInstance(network); } else throw Error('Chain not supported.'); - if (!process.env.HUMMINGBOT_WALLET_ADDRESS) throw Error("Env variable HUMMINGBOT_WALLET_ADDRESS not set") - if (!process.env.HUMMINGBOT_WALLET_PK) throw Error("Env variable HUMMINGBOT_WALLET_PK not set") - this.provider = new providers.StaticJsonRpcProvider(this._chain.rpcUrl, this._chain.chainId); - this.privateKeys = { - [getAddress(process.env.HUMMINGBOT_WALLET_ADDRESS)]: process.env.HUMMINGBOT_WALLET_PK - } } public async loadMarkets() { @@ -416,10 +409,7 @@ export class RubiconCLOB implements CLOBish { req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { - const pk = this.privateKeys[getAddress(req.address)] - if (!pk) throw new Error(`Key for ${req.address} not found`) - - const wallet = new Wallet(pk).connect(this.provider) + const wallet = await this._chain.getWallet(req.address) const marketInfo = this.parsedMarkets[req.market] const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); const quote = tokens.find(t => t.address === marketInfo.quoteAddress)!; @@ -491,11 +481,8 @@ export class RubiconCLOB implements CLOBish { req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { - const pk = this.privateKeys[getAddress(req.address)] - if (!pk) throw new Error(`Key for ${req.address} not found`) + const wallet = await this._chain.getWallet(req.address) - const wallet = new Wallet(pk).connect(this.provider) - axios({ url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, method: 'post', diff --git a/src/services/schema/rubicon-schema.json b/src/services/schema/rubicon-schema.json index 19226aba88..ac1978f4ee 100644 --- a/src/services/schema/rubicon-schema.json +++ b/src/services/schema/rubicon-schema.json @@ -2,17 +2,8 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { - "allowedSlippage": { "type": "string" }, - "gasLimitEstimate": { "type": "integer" }, - "ttl": { "type": "integer" }, - "privateKeys": { - "type": "object", - "patternProperties": { - "^0x\\w{0,40}$": { "type": "string" } - }, - "additionalProperties": false - } + "allowedSlippage": { "type": "string" } }, "additionalProperties": false, - "required": ["allowedSlippage", "gasLimitEstimate", "ttl", "privateKeys"] + "required": ["allowedSlippage"] } diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml index c8800e881a..4d02117f25 100644 --- a/src/templates/rubicon.yml +++ b/src/templates/rubicon.yml @@ -1,15 +1,3 @@ # allowedSlippage: how much the execution price is allowed to move unfavorably # from the trade execution price. It uses a rational number for precision. allowedSlippage: '2/100' - -# the maximum gas used to estimate cost of a xsswap trade. -gasLimitEstimate: 300000 - -# ttl: how long a trade is valid in seconds. After this time passes -# xsswap will not perform the trade, but the gas will still be sent. -ttl: 600 - -# privateKeys: a map of addresses used by hummingbot to private key in order to sign trades -# since there is no authentication required to post to the server -privateKeys: - '0x0000000000000000000000000000000000000000': 000000000000000000fakeprivatekey00000000000000000000000000000000 From f36bf2778c54e3cd6ea3529374b06586c60c4bf0 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 21 Aug 2024 12:56:31 -0400 Subject: [PATCH 15/21] No decaying orders --- src/connectors/rubicon/rubicon.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 18bb4421bf..dbc29f886a 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -429,13 +429,6 @@ export class RubiconCLOB implements CLOBish { ? parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals) : parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals); - let slippageTolerance = this.getAllowedSlippage() / 100; - - const startingOutputFactor = 1; - const startingOutputAmount = parseFloat(formatUnits(outputAmount, outputToken.decimals)) * startingOutputFactor; - const endingOutputFactor = 1 - slippageTolerance; - const endingOutputAmount = parseFloat(formatUnits(outputAmount, outputToken.decimals)) * endingOutputFactor; - const orderBuilder = new GladiusOrderBuilder(this._chain.chainId); const order = orderBuilder @@ -451,8 +444,8 @@ export class RubiconCLOB implements CLOBish { }) .output({ token: outputToken.address, - startAmount: parseUnits(startingOutputAmount.toFixed(outputToken.decimals), outputToken.decimals), - endAmount: parseUnits(endingOutputAmount.toFixed(outputToken.decimals), outputToken.decimals), + startAmount: outputAmount, + endAmount: outputAmount, recipient: req.address, }) .fillThreshold(inputAmount) From d1b664aa9bfb5a206b2db12b6bda59cc858df335 Mon Sep 17 00:00:00 2001 From: Iska Date: Wed, 21 Aug 2024 13:02:04 -0400 Subject: [PATCH 16/21] Rubicon (#2) --- Makefile | 2 +- package.json | 4 +- src/chains/ethereum/ethereum.ts | 2 + src/chains/ethereum/ethereum.validators.ts | 1 + src/connectors/connectors.routes.ts | 7 + src/connectors/rubicon/rubicon.config.ts | 1037 +++++++++++++++++ src/connectors/rubicon/rubicon.constants.ts | 0 src/connectors/rubicon/rubicon.interfaces.ts | 38 + src/connectors/rubicon/rubicon.ts | 581 +++++++++ src/services/connection-manager.ts | 3 + src/services/schema/rubicon-schema.json | 9 + src/templates/ethereum.yml | 14 + .../lists/arbitrum_sepolia_tokens.json | 31 + src/templates/lists/base_tokens.json | 6 + src/templates/root.yml | 4 + src/templates/rubicon.yml | 3 + yarn.lock | 414 ++++--- 17 files changed, 1970 insertions(+), 186 deletions(-) create mode 100644 src/connectors/rubicon/rubicon.config.ts create mode 100644 src/connectors/rubicon/rubicon.constants.ts create mode 100644 src/connectors/rubicon/rubicon.interfaces.ts create mode 100644 src/connectors/rubicon/rubicon.ts create mode 100644 src/services/schema/rubicon-schema.json create mode 100644 src/templates/lists/arbitrum_sepolia_tokens.json create mode 100644 src/templates/lists/base_tokens.json create mode 100644 src/templates/rubicon.yml diff --git a/Makefile b/Makefile index 33572df13e..39f3838c52 100644 --- a/Makefile +++ b/Makefile @@ -18,5 +18,5 @@ build: yarn build docker: - git clean -xdf && docker build -t hummingbot/gateway${TAG} -f Dockerfile . + git clean -xdf && docker build -t hummingbot/gateway:${TAG} -f Dockerfile . diff --git a/package.json b/package.json index 4dddc86472..2051645da7 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "test:scripts": "jest -i --verbose ./test-scripts/*.test.ts" }, "dependencies": { - "@cosmjs/amino": "^0.32.2", "@balancer-labs/sdk": "^1.1.5", "@bancor/carbon-sdk": "^0.0.93-DEV", + "@cosmjs/amino": "^0.32.2", "@cosmjs/proto-signing": "^0.31.1", "@cosmjs/stargate": "^0.31.1", "@cosmjs/tendermint-rpc": "^0.32.2", @@ -50,6 +50,7 @@ "@pancakeswap/v3-sdk": "^3.7.0", "@pangolindex/sdk": "^1.1.0", "@perp/sdk-curie": "^1.16.0", + "@rubicondefi/gladius-sdk": "^1.4.27", "@sushiswap/sdk": "^5.0.0-canary.116", "@taquito/rpc": "^17.0.0", "@taquito/signer": "^17.0.0", @@ -64,6 +65,7 @@ "@uniswap/sdk": "3.0.2", "@uniswap/sdk-core": "^3.0.0", "@uniswap/smart-order-router": "^2.5.26", + "@uniswap/token-lists": "^1.0.0-beta.34", "@uniswap/v3-core": "^1.0.0", "@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-sdk": "^3.7.0", diff --git a/src/chains/ethereum/ethereum.ts b/src/chains/ethereum/ethereum.ts index 6375c53e3f..6afc264feb 100644 --- a/src/chains/ethereum/ethereum.ts +++ b/src/chains/ethereum/ethereum.ts @@ -220,6 +220,8 @@ export class Ethereum extends EthereumBase implements Ethereumish { spender = curve.router; } else if (reqSpender === 'balancer') { spender = BalancerConfig.config.routerAddress(this._chain); + } else if (reqSpender === 'rubicon') { + spender = '0x000000000022d473030f116ddee9f6b43ac78ba3' } else { spender = reqSpender; } diff --git a/src/chains/ethereum/ethereum.validators.ts b/src/chains/ethereum/ethereum.validators.ts index 9a6e6aed7e..35832f9ed7 100644 --- a/src/chains/ethereum/ethereum.validators.ts +++ b/src/chains/ethereum/ethereum.validators.ts @@ -65,6 +65,7 @@ export const validateSpender: Validator = mkValidator( val === 'curve' || val === 'carbonamm' || val === 'balancer' || + val === 'rubicon' || isAddress(val)) ); diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index e03e551f0f..430534810f 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -25,6 +25,7 @@ import { QuipuswapConfig } from './quipuswap/quipuswap.config'; import { OsmosisConfig } from '../chains/osmosis/osmosis.config'; import { CarbonConfig } from './carbon/carbon.config'; import { BalancerConfig } from './balancer/balancer.config'; +import { RubiconCLOBConfig } from './rubicon/rubicon.config'; export namespace ConnectorsRoutes { export const router = Router(); @@ -166,6 +167,12 @@ export namespace ConnectorsRoutes { 'Enter your kujira account number (input 0 if unsure) >>> ', }, }, + { + name: 'rubicon', + trading_type: RubiconCLOBConfig.config.tradingTypes, + chain_type: RubiconCLOBConfig.config.chainType, + available_networks: RubiconCLOBConfig.config.availableNetworks, + }, { name: 'quipuswap', trading_type: QuipuswapConfig.config.tradingTypes, diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts new file mode 100644 index 0000000000..e8d0dfd0a4 --- /dev/null +++ b/src/connectors/rubicon/rubicon.config.ts @@ -0,0 +1,1037 @@ +import { TokenList } from '@uniswap/token-lists'; +import { AvailableNetworks } from '../../services/config-manager-types'; +import { ConfigManagerV2 } from '../../services/config-manager-v2'; + +const configManager = ConfigManagerV2.getInstance(); + +export namespace RubiconCLOBConfig { + export interface NetworkConfig { + allowedSlippage: string; + tradingTypes: Array; + chainType: string; + availableNetworks: Array; + url: string; + } + + export const config: NetworkConfig = { + tradingTypes: ['CLOB_SPOT'], + chainType: 'EVM', + allowedSlippage: configManager.get('rubicon.allowedSlippage'), + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], + url: "https://gladius.rubicon.finance", + }; +} + +export enum Network { + MAINNET = 1, + ROPSTEN = 3, + RINKEBY = 4, + GOERLI = 5, + KOVAN = 42, + OPTIMISM_KOVAN = 69, + OPTIMISM_MAINNET = 10, + OPTIMISM_SEPOLIA = 11155420, + POLYGON_MAINNET = 137, + POLYGON_MUMBAI = 80001, //MATIC + BSC_MAINNET = 56, + GNOSIS_CHAIN_MAINNET = 100, + FANTOM_OPERA_MAINNET = 250, + ARBITRUM_MAINNET = 42161, + ARBITRUM_SEPOLIA = 421614, + ARBITRUM_GOERLI = 421613, + BASE_MAINNET = 8453, + BASE_GOERLI = 84531, + BASE_SEPOLIA = 84532, + AVALANCHE_C_CHAIN_MAINNET = 43114, + AURORA_MAINNET = 1313161554, + OPTIMISM_GOERLI = 420, //OPG +} + +export const tokenList: TokenList = { + name: 'Rubicon Token List', + timestamp: new Date().toISOString(), + version: { + major: 1, + minor: 0, + patch: 0, + }, + tokens: [ + // Note: all tokens need to have their associated underlyingAssetGeckoID so we can query Coin Gecko and get price info + // *NOTE THE FIRST COIN IN THE LIST WILL BE THE DEFAULT SELECTED TOKEN* + // ** ERC20s ** + // **** TODO ENFORCE TYPE CAST ON REQUIRED EXTENSIONS **** + + // ** V1 MAINNET ** + + // ** QUOTES ** + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.OPTIMISM_MAINNET, + address: '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', + decimals: 6, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'usd-coin', + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.OPTIMISM_MAINNET, + address: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', + decimals: 18, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'dai', + }, + }, + { + name: 'USDT Stablecoin', + symbol: 'USDT', + chainId: Network.OPTIMISM_MAINNET, + address: '0x94b008aA00579c1307B0EF2c499aD98a8ce58e58', + decimals: 6, + + extensions: { + quote: true, + underlyingAssetGeckoID: 'tether', + }, + }, + { + symbol: 'WETH', + name: 'Wrapped Ethereum', + decimals: 18, + + address: '0x4200000000000000000000000000000000000006', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + underlyingAssetGeckoID: 'ethereum', + //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET + isNativeAssetWrapper: true, + }, + }, + { + symbol: 'OP', + name: 'Optimism', + decimals: 18, + + address: '0x4200000000000000000000000000000000000042', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'optimism', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + symbol: 'WBTC', + name: 'Wrapped Bitcoin', + decimals: 8, + + address: '0x68f180fcCe6836688e9084f035309E29Bf0A2095', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'wrapped-bitcoin', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + symbol: 'SNX', + name: 'Synthetix', + decimals: 18, + + address: '0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + unsupportedQuotes: { + USDT: true, + DAI: true, + }, + underlyingAssetGeckoID: 'havven', + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + + // ** V1 Mainnet Bath Tokens *** + + { + symbol: 'bathDAI', + name: 'bathDAI v1', + decimals: 18, + + address: '0x60daEC2Fc9d2e0de0577A5C708BcaDBA1458A833', + chainId: Network.OPTIMISM_MAINNET, + extensions: { + underlyingTicker: 'DAI', + rewardsLive: true, + underlyingAssetGeckoID: 'dai', + bathBuddy: '0x5fafd12ead4234270db300352104632187ed763a', + }, + }, + + { + name: 'bathUSDC v1', + symbol: 'bathUSDC', + chainId: Network.OPTIMISM_MAINNET, + address: '0xe0e112e8f33d3f437D1F895cbb1A456836125952', + decimals: 6, + + extensions: { + underlyingTicker: 'USDC', + rewardsLive: true, + underlyingAssetGeckoID: 'usd-coin', + bathBuddy: '0xfd6fd41bea9fd489ffdf05cd8118a69bf98caa5d', + }, + }, + { + symbol: 'bathUSDT', + name: 'bathUSDT v1', + decimals: 6, + + chainId: Network.OPTIMISM_MAINNET, + address: '0xfFBD695bf246c514110f5DAe3Fa88B8c2f42c411', + extensions: { + underlyingTicker: 'USDT', + rewardsLive: true, + underlyingAssetGeckoID: 'tether', + bathBuddy: '0xdffdbb54b9968fee543a8d2bd3ce7a80d66cd49f', + }, + }, + { + address: '0xB0bE5d911E3BD4Ee2A8706cF1fAc8d767A550497', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathETH', + extensions: { + underlyingTicker: 'WETH', + rewardsLive: true, + underlyingAssetGeckoID: 'ethereum', + bathBuddy: '0xf882defd9d5d988d05c6bca9061fc6f817f491c0', + //NEEDED FOR ANY INTERACTION THAT IS WRAPPER FOR NATIVE ASSET + isNativeAssetWrapper: true, + }, + name: 'bathETH v1', + decimals: 18, + + }, + { + address: '0x7571CC9895D8E997853B1e0A1521eBd8481aa186', + symbol: 'bathWBTC', + extensions: { + underlyingTicker: 'WBTC', + rewardsLive: true, + underlyingAssetGeckoID: 'bitcoin', + bathBuddy: '0x30f5fe161da1cb92ac09e10b734de07d5c120fdd', + }, + name: 'bathWBTC v1', + decimals: 8, + + chainId: Network.OPTIMISM_MAINNET, + }, + { + address: '0xeb5F29AfaaA3f44eca8559c3e8173003060e919f', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathSNX', + extensions: { + underlyingTicker: 'SNX', + rewardsLive: true, + underlyingAssetGeckoID: 'havven', + bathBuddy: '0x505fb5d94c3cf68e13b5ba2ca1868f2b580007cc', + }, + name: 'bathSNX v1', + decimals: 18, + + }, + { + address: '0x574a21fE5ea9666DbCA804C9d69d8Caf21d5322b', + chainId: Network.OPTIMISM_MAINNET, + symbol: 'bathOP', + extensions: { + underlyingTicker: 'OP', + underlyingAssetGeckoID: 'optimism', + rewardsLive: true, + bathBuddy: '0xd528e1c99b0bdf1caf14f968f31adab81c59dcc8', + }, + name: 'bathOP v1', + decimals: 18, + + }, + { + name: 'Worldcoin', + symbol: 'WLD', + chainId: Network.OPTIMISM_MAINNET, + address: '0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Wrapped Liquid Staked Ether', + symbol: 'wstETH', + chainId: Network.OPTIMISM_MAINNET, + address: '0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'Kwenta', + symbol: 'KWENTA', + chainId: Network.OPTIMISM_MAINNET, + address: '0x920Cf626a271321C151D027030D5d08aF699456b', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'PERP', + symbol: 'PERP', + chainId: Network.OPTIMISM_MAINNET, + address: '0x9e1028F5F1D5eDE59748FFceE5532509976840E0', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Synth sUSD', + symbol: 'sUSD', + chainId: Network.OPTIMISM_MAINNET, + address: '0x8c6f28f2F1A3C87F0f938b96d27520d9751ec8d9', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'USDC', + referenceVenueFeeTier: '100', + }, + }, + + /// *** ARBITRUM MAINNET *** + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_MAINNET, + address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_MAINNET, + address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Bridged USDC Stablecoin', + symbol: 'USDC.e', + chainId: Network.ARBITRUM_MAINNET, + address: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.ARBITRUM_MAINNET, + address: '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.ARBITRUM_MAINNET, + address: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.ARBITRUM_MAINNET, + address: '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f', + decimals: 8, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Arbitrum', + symbol: 'ARB', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x912CE59144191C1204E64559FE8253a0e49E6548', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Pendle', + symbol: 'PENDLE', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Fluidity', + symbol: 'FLY', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x000F1720A263f96532D1ac2bb9CDC12b72C6f386', + decimals: 6, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'USDC', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'GMX', + symbol: 'GMX', + chainId: Network.ARBITRUM_MAINNET, + + address: '0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Graph Token', + symbol: 'GRT', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x9623063377AD1B27544C965cCd7342f7EA7e88C7', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Xai', + symbol: 'XAI', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'MAGIC', + symbol: 'MAGIC', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x539bdE0d7Dbd336b79148AA742883198BBF60342', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Gains Network', + symbol: 'GNS', + chainId: Network.ARBITRUM_MAINNET, + + address: '0x18c11FD286C5EC11c3b683Caa813B77f5163A122', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'ChainLink Token', + symbol: 'LINK', + chainId: Network.ARBITRUM_MAINNET, + + address: '0xf97f4df75117a78c1A5a0DBb814Af92458539FB4', + decimals: 18, + }, + + // *** BASE MAINNET *** + { + name: 'Wrapped Ether', + symbol: 'WETH', + chainId: Network.BASE_MAINNET, + + address: '0x4200000000000000000000000000000000000006', + decimals: 18, + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USD Base Coin', + symbol: 'USDbC', + chainId: Network.BASE_MAINNET, + // TODO: update to USDbC logo + address: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', + decimals: 6, + extensions: { + quote: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.BASE_MAINNET, + // TODO: update to USDbC logo + address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + decimals: 6, + extensions: { + quote: true, + }, + }, + // { + // name: 'Coinbase Wrapped Staked ETH', + // symbol: 'cbETH', + // chainId: Network.BASE_MAINNET, + // + // address: '0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22', + // decimals: 18, + // }, + { + name: 'Dai Stablecoin', + symbol: 'DAI', + chainId: Network.BASE_MAINNET, + + address: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', + decimals: 18, + extensions: { + quote: true, + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '500', + }, + }, + + // // Add Base MemeCoins: BALD, DEGEN, ELONrwa, TOSHI, BRETT, MOCHI, NORMIE + // { + // name: 'Bald Coin', + // symbol: 'BALD', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xFe20C1B85ABa875EA8cecac8200bF86971968F3A', + // decimals: 18, + // }, + { + name: 'The Big Guy', + symbol: 'BGUY', + chainId: Network.BASE_MAINNET, + + address: '0x8931eE05EC111325c1700b68E5ef7B887e00661d', + decimals: 9, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '500', + }, + }, + + { + name: 'Degen Coin', + symbol: 'DEGEN', + chainId: Network.BASE_MAINNET, + + address: '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'higher', + symbol: 'HIGHER', + chainId: Network.BASE_MAINNET, + + address: '0x0578d8A44db98B23BF096A382e016e29a5Ce0ffe', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // { + // name: 'Elonrwa Coin', + // symbol: 'ELONrwa', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xAa6Cccdce193698D33deb9ffd4be74eAa74c4898', + // decimals: 18, + // }, + { + name: 'Aerodrome', + symbol: 'AERO', + chainId: Network.BASE_MAINNET, + + address: '0x940181a94A35A4569E4529A3CDfB74e38FD98631', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'BLERF', + symbol: 'BLERF', + chainId: Network.BASE_MAINNET, + + address: '0x347F500323D51E9350285Daf299ddB529009e6AE', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '100', + }, + }, + { + name: 'Toshi Coin', + symbol: 'TOSHI', + chainId: Network.BASE_MAINNET, + + address: '0xAC1Bd2486aAf3B5C0fc3Fd868558b082a531B2B4', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Keyboard Cat', + symbol: 'KEYCAT', + chainId: Network.BASE_MAINNET, + + address: '0x9a26F5433671751C3276a065f57e5a02D2817973', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Internet Coin', + symbol: 'INT', + chainId: Network.BASE_MAINNET, + + address: '0x968D6A288d7B024D5012c0B25d67A889E4E3eC19', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + { + name: 'Brett Coin', + symbol: 'BRETT', + chainId: Network.BASE_MAINNET, + + address: '0x532f27101965dd16442E59d40670FaF5eBB142E4', + decimals: 18, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // { + // name: 'Mochi Coin', + // symbol: 'MOCHI', + // chainId: Network.BASE_MAINNET, + // // + // address: '0xF6e932Ca12afa26665dC4dDE7e27be02A7c02e50', + // decimals: 18, + // }, + { + name: 'Normie Coin', + symbol: 'NORMIE', + chainId: Network.BASE_MAINNET, + + address: '0x7F12d13B34F5F4f0a9449c16Bcd42f0da47AF200', + decimals: 9, + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '10000', + }, + }, + // *** Arbitrum Sepolia + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0xd28301B86800bBCF1f09a55642ee3E115Edb1f67', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Test Token', + symbol: 'TEST', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0x2fc8011B01c988249ace25ec2c624079ac146e04', + decimals: 18, + + }, + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_SEPOLIA, + address: '0xc556bAe1e86B2aE9c22eA5E036b07E55E7596074', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + + // *** Arbitrum Goerli + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.ARBITRUM_GOERLI, + address: '0x175a6d830579cacf1086ecc718fab2a86b12e0d3', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.ARBITRUM_GOERLI, + address: '0x34cB584d2E4f3Cd37e93A46A4C754044085439b4', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.ARBITRUM_GOERLI, + address: '0xb37b4399880AfEF7025755d65C193363966b8b89', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.ARBITRUM_GOERLI, + address: '0x6ABc1231d85D422c9Fe25b5974B4C0D4AB85d9b5', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.ARBITRUM_GOERLI, + address: '0x710c1A969cbC8ab5644571697824c655ffBDE926', + decimals: 18, + + }, + { + name: 'Test Token', + symbol: 'TEST', + chainId: Network.ARBITRUM_GOERLI, + + address: '0x83250b2783554D4D401c45c39fF8A161dE44BC15', + decimals: 18, + }, + + // Mumbai testing + { + address: '0x6aeda41c98ab5399044fc36162B57d39c13b658a', + chainId: Network.POLYGON_MUMBAI, + + symbol: 'TEST', + decimals: 18, + name: 'Test Coin', + }, + { + address: '0xcC5f8571D858DAD7fA2238FB9df4Ad384493013C', + chainId: Network.POLYGON_MUMBAI, + symbol: 'USDC', + + decimals: 18, + name: 'USDC Stablecoin', + extensions: { + quote: true, + }, + }, + { + address: '0xE412a307764cCBE02E055e926516ebD74230cfE0', + chainId: Network.POLYGON_MUMBAI, + symbol: 'WMATIC', + + decimals: 18, + name: 'Wrapped Matic', + extensions: { + isNativeAssetWrapper: true, + }, + }, + { + address: '0xAb647DF8262580c1caB61Eb165B22616365d3C67', + chainId: Network.POLYGON_MUMBAI, + symbol: 'DAI', + + decimals: 18, + name: 'DAI Stablecoin', + extensions: { + quote: true, + }, + }, + + // *** Ethereum Mainnet + + { + name: 'Wrapped Ethereum', + symbol: 'WETH', + chainId: Network.MAINNET, + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + decimals: 18, + + extensions: { + underlyingAssetGeckoID: 'ethereum', + isNativeAssetWrapper: true, + }, + }, + { + name: 'USDC Stablecoin', + symbol: 'USDC', + chainId: Network.MAINNET, + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'DAI Stablecoin', + symbol: 'DAI', + chainId: Network.MAINNET, + address: '0x6b175474e89094c44da98b954eedeac495271d0f', + decimals: 18, + + extensions: { + quote: true, + }, + }, + { + name: 'Tether', + symbol: 'USDT', + chainId: Network.MAINNET, + address: '0xdac17f958d2ee523a2206206994597c13d831ec7', + decimals: 6, + + extensions: { + quote: true, + }, + }, + { + name: 'Wrapped BTC', + symbol: 'WBTC', + chainId: Network.MAINNET, + address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', + decimals: 8, + + }, + // TODO: Plug in most liquid pair... + { + name: 'Synthetix Network Token', + symbol: 'SNX', + chainId: Network.MAINNET, + address: '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Uniswap', + symbol: 'UNI', + chainId: Network.MAINNET, + address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'ChainLink Token', + symbol: 'LINK', + chainId: Network.MAINNET, + address: '0x514910771af9ca656af840dff83e8264ecf986ca', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Aave Token', + symbol: 'AAVE', + chainId: Network.MAINNET, + address: '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Compound', + symbol: 'COMP', + chainId: Network.MAINNET, + address: '0xc00e94cb662c3520282e6f5717214004a7f26888', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Maker', + symbol: 'MKR', + chainId: Network.MAINNET, + address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'SHIBA INU', + symbol: 'SHIB', + chainId: Network.MAINNET, + address: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + { + name: 'Ondo Finance', + symbol: 'ONDO', + chainId: Network.MAINNET, + address: '0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3', + decimals: 18, + + extensions: { + referenceVenue: 'univ3', + referenceVenueQuote: 'WETH', + referenceVenueFeeTier: '3000', + }, + }, + ], +}; \ No newline at end of file diff --git a/src/connectors/rubicon/rubicon.constants.ts b/src/connectors/rubicon/rubicon.constants.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/connectors/rubicon/rubicon.interfaces.ts b/src/connectors/rubicon/rubicon.interfaces.ts new file mode 100644 index 0000000000..19965469c7 --- /dev/null +++ b/src/connectors/rubicon/rubicon.interfaces.ts @@ -0,0 +1,38 @@ +import { BigNumber, utils } from 'ethers'; + +export interface OrderInfoStruct { + id: string; + clientOrderId: string; + tradePairId: string; + price: BigNumber; + totalAmount: BigNumber; + quantity: BigNumber; + quantityFilled: BigNumber; + totalFee: BigNumber; + traderaddress: any; + side: number; + type1: number; + type2: number; + status: number; +} + +export interface MarketInfoStruct { + baseSymbol: utils.BytesLike; + quoteSymbol: utils.BytesLike; + buyBookId: utils.BytesLike; + sellBookId: utils.BytesLike; + minTradeAmount: BigNumber; + maxTradeAmount: BigNumber; + auctionPrice: BigNumber; + auctionMode: number; + makerRate: number; + takerRate: number; + baseDecimals: number; + baseDisplayDecimals: number; + quoteDecimals: number; + quoteDisplayDecimals: number; + allowedSlippagePercent: number; + addOrderPaused: boolean; + pairPaused: boolean; + postOnly: boolean; +} diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts new file mode 100644 index 0000000000..dbc29f886a --- /dev/null +++ b/src/connectors/rubicon/rubicon.ts @@ -0,0 +1,581 @@ +import { GladiusOrder, GladiusOrderBuilder, NonceManager, PERMIT2_MAPPING } from '@rubicondefi/gladius-sdk'; +import { Ethereum } from '../../chains/ethereum/ethereum'; +import { + ClobMarketsRequest, + ClobOrderbookRequest, + ClobTickerRequest, + ClobGetOrderRequest, + ClobPostOrderRequest, + ClobDeleteOrderRequest, + ClobGetOrderResponse, +} from '../../clob/clob.requests'; +import { + CLOBish, + MarketInfo, + NetworkSelectionRequest, + Orderbook, + PriceLevel, +} from '../../services/common-interfaces'; +import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; +import { BigNumber, providers } from 'ethers'; +import { formatUnits, parseUnits } from 'ethers/lib/utils'; +import { StaticJsonRpcProvider } from '@ethersproject/providers'; +import axios from 'axios'; +import { isFractionString } from '../../services/validators'; +import { percentRegexp } from '../../services/config-manager-v2'; + +export enum ORDER_STATUS { + OPEN = 'open', + EXPIRED = 'expired', + ERROR = 'error', + CANCELLED = 'cancelled', + FILLED = 'filled', + INSUFFICIENT_FUNDS = 'insufficient-funds', +} + +export type OrderInput = { + token: string; + startAmount: string; + endAmount: string; +}; + +export type OrderOutput = { + token: string; + startAmount: string; + endAmount: string; + recipient?: string; +}; + +export type SettledAmount = { + tokenOut?: string; + amountOut?: string; + tokenIn?: string; + amountIn?: string; +}; + +export enum OrderType { + Dutch = "Dutch" +} + +type Fill = { + outputToken: string; + inputToken: string; + outputAmount: string; + inputAmount: string; + timestamp: string; +} + +export type OrderEntity = { + type: OrderType; + encodedOrder: string; + signature: string; + orderHash: string; + orderStatus: ORDER_STATUS; + chainId: number; + deadline: number; + input: OrderInput; + outputs: OrderOutput[]; + createdAt: number; + price: number; + // Filler field is defined when the order has been filled and the status tracking function has recorded the filler address. + filler?: string; + // QuoteId field is defined when the order has a quote associated with it. + quoteId?: string; + // TxHash field is defined when the order has been filled and there is a txHash associated with the fill. + txHash?: string; + // SettledAmount field is defined when the order has been filled and the fill amounts have been recorded. + settledAmounts?: SettledAmount[]; +}; + +const NETWORK_INFO: Record = { + [Network.OPTIMISM_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Optimism_V2', + [Network.ARBITRUM_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Arbitrum_V2', + [Network.MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Ethereum_V2', + //Base Mainnet + [Network.BASE_MAINNET]: 'https://graph-v2.rubicon.finance/subgraphs/name/Gladius_Base_V2', +}; + +// const configManager = ConfigManagerV2.getInstance(); + +export class RubiconCLOB implements CLOBish { + private _chain; + private _ready: boolean = false; + public parsedMarkets: MarketInfo = []; + private static _instances: { [name: string]: RubiconCLOB }; + private provider: StaticJsonRpcProvider; + + private constructor(chain: string, network: string) { + if (chain === 'ethereum') { + this._chain = Ethereum.getInstance(network); + } else throw Error('Chain not supported.'); + + this.provider = new providers.StaticJsonRpcProvider(this._chain.rpcUrl, this._chain.chainId); + } + + public async loadMarkets() { + // TODO: get all tokens in the token list + const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); + + tokens.forEach(base => { + const quotes = tokens.filter(t => t.address !== base.address) + quotes.forEach(quote => { + this.parsedMarkets[`${base.symbol.toUpperCase()}-${quote.symbol.toUpperCase()}`] = { + baseSymbol: base.symbol.toUpperCase(), + baseDecimals: base.decimals, + baseAddress: base.address, + quoteSymbol: quote.symbol, + quoteDecimals: quote.decimals, + quoteAddress: quote.address + } + }) + }) + + console.log("Markets Loaded") + } + + public static getInstance(chain: string, network: string): RubiconCLOB { + if (RubiconCLOB._instances === undefined) { + RubiconCLOB._instances = {}; + } + + const key = `${chain}:${network}`; + + if (!(key in RubiconCLOB._instances)) { + RubiconCLOB._instances[key] = new RubiconCLOB(chain, network); + } + + return RubiconCLOB._instances[key]; + } + + public async init() { + if (!this._chain.ready() || Object.keys(this.parsedMarkets).length === 0) { + await this._chain.init(); + await this.loadMarkets(); + this._ready = true; + } + } + + public ready(): boolean { + return this._ready; + } + + public async markets( + req: ClobMarketsRequest + ): Promise<{ markets: MarketInfo }> { + if (req.market && req.market in this.parsedMarkets) + return { markets: this.parsedMarkets[req.market] }; + return { markets: Object.values(this.parsedMarkets) }; + } + + public async orderBook(req: ClobOrderbookRequest): Promise { + const marketInfo = this.parsedMarkets[req.market]; + const asksUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.quoteAddress}&sellToken=${marketInfo.baseAddress}&limit=50`; + const bidsUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.baseAddress}&sellToken=${marketInfo.quoteAddress}&limit=50&desc=true&sortKey=price`; + + const [asksResp, bidsResp] = await Promise.all([fetch(asksUrl), fetch(bidsUrl)]); + + const { orders: asks } = (await asksResp.json()) as { cursor?: string; orders: OrderEntity[] }; + const { orders: bids } = (await bidsResp.json()) as { cursor?: string; orders: OrderEntity[] }; + + const data = { + buys: bids + .filter((o) => { + const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); + if (o.orderStatus !== ORDER_STATUS.OPEN) { + return true; + } + + const now = Math.floor(new Date().getTime() / 1000); + if (decodedOrder.info.deadline >= now) { + return true; + } + + return false; + }) + .map((element) => { + const pay = BigNumber.from(element.input.endAmount); + const buy = BigNumber.from(element.outputs[0].endAmount); + const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); + const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedPay) / parseFloat(formattedBuy); + + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + + const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); + const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startTime = parsedOrder.info.decayStartTime; + const endTime = parsedOrder.info.decayEndTime; + const rawInputAmount = pay; + + let out: PriceLevel = { price: price.toString(), quantity: formattedBuy, timestamp: element.createdAt }; + + if (startingOutputAmount && endingOutputAmount && startTime && endTime && rawInputAmount) { + out = { + ...out, + price: this.getOrderPrice( + price, + false, + rawInputAmount, + startTime, + endTime, + startingOutputAmount, + endingOutputAmount, + Date.now() / 1000, + marketInfo.quoteDecimals, + marketInfo.baseDecimals, + ).toString(), + }; + } + return out; + }) + .filter(o => !!o) as PriceLevel[], + sells: asks + .filter(o => { + const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); + if (o.orderStatus !== ORDER_STATUS.OPEN) { + return true; + } + + const now = Math.floor(new Date().getTime() / 1000); + if (decodedOrder.info.deadline >= now) { + return true; + } + + return false; + }) + .map((element) => { + const pay = BigNumber.from(element.input.endAmount); + const buy = BigNumber.from(element.outputs[0].endAmount); + const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); + const formattedPay = formatUnits(pay, marketInfo.baseDecimals); + const rawInputAmount = pay; + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + + const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); + const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startTime = parsedOrder.info.decayStartTime; + const endTime = parsedOrder.info.decayEndTime; + + const price = parseFloat(formattedBuy) / parseFloat(formattedPay); + let out: PriceLevel = { + // quantity: pay, + price: price.toString(), + quantity: formattedPay, + timestamp: element.createdAt + }; + + if (startingOutputAmount && endingOutputAmount && startTime && endTime && rawInputAmount) { + out = { + ...out, + price: this.getOrderPrice( + price, + true, + rawInputAmount, + startTime, + endTime, + startingOutputAmount, + endingOutputAmount, + Date.now() / 1000, + marketInfo.quoteDecimals, + marketInfo.baseDecimals, + ).toString(), + }; + } + return out; + }) + .filter(o => !!o) as PriceLevel[] + } + + return { ...data, sells: data.buys } + } + + public async ticker( + req: ClobTickerRequest + ): Promise<{ markets: MarketInfo }> { + + const marketInfo = this.parsedMarkets[req.market!] + + if (!marketInfo) return { markets: {} } + + const query = `{ + sells: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.baseAddress}", outputToken: "${marketInfo.quoteAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + buys: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.quoteAddress}", outputToken: "${marketInfo.baseAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + }` + + const response = await fetch(NETWORK_INFO[this._chain.chainId], { + method: 'POST', + + headers: { + "Content-Type": "application/json" + }, + + body: JSON.stringify({ query }) + }) + + const json: { data: { sells: Fill[], buys: Fill[] } } = await response.json(); + const trades = [ + json.data.sells.map(element => { + const pay = BigNumber.from(element.inputAmount); + const buy = BigNumber.from(element.outputAmount); + const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); + const formattedPay = formatUnits(pay, marketInfo.baseDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedBuy) / parseFloat(formattedPay); + return { price, timestamp: element.timestamp } + + })[0], + json.data.buys.map(element => { + const pay = BigNumber.from(element.inputAmount); + const buy = BigNumber.from(element.outputAmount); + const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); + const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); + + if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { + return undefined; + } + + const price = parseFloat(formattedPay) / parseFloat(formattedBuy); + return { price, timestamp: element.timestamp } + })[0] + ]; + + const lastTrade = trades.sort((a,b) => { + if (!b) return -1; + if (!a) return 1; + return parseInt(a.timestamp) - parseInt(b.timestamp) + })[0] + + return { markets: { price: (lastTrade?.price || 0) + (Math.random() * 10) } }; + } + + public async orders( + req: ClobGetOrderRequest + ): Promise<{ orders: ClobGetOrderResponse['orders'] }> { + + if (!req.orderId) return { orders: [] } + + const url = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?orderHash=${req.orderId}`; + const { orders } = (await (await fetch(url)).json()) as { cursor?: string; orders: OrderEntity[] }; + + return { + orders: orders.map(o => { + return { + status: o.orderStatus, + id: o.orderHash, + clientId: o.orderHash, + orderHash: o.orderHash, + } + }) as ClobGetOrderResponse['orders'] + } + } + + public async postOrder( + req: ClobPostOrderRequest + ): Promise<{ txHash: string; id: string }> { + + const wallet = await this._chain.getWallet(req.address) + const marketInfo = this.parsedMarkets[req.market] + const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); + const quote = tokens.find(t => t.address === marketInfo.quoteAddress)!; + const token = tokens.find(t => t.address === marketInfo.baseAddress)!; + const isBuy = req.side === 'BUY' + + const [inputToken, outputToken] = isBuy ? [quote, token] : [token, quote]; + const _deadline = Math.floor(Date.now() / 1000) + 60; // orderDuration seconds in the future... + + const nonceMgr = new NonceManager(this.provider, this._chain.chainId, PERMIT2_MAPPING[this._chain.chainId]); + const nonce = await nonceMgr.useNonce(req.address); + + const inputAmount: BigNumber = isBuy + ? parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals) + : parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals); + const outputAmount: BigNumber = isBuy + ? parseUnits(parseFloat(req.amount).toFixed(token.decimals), token.decimals) + : parseUnits((parseFloat(req.amount) * parseFloat(req.price)).toFixed(quote.decimals), quote.decimals); + + const orderBuilder = new GladiusOrderBuilder(this._chain.chainId); + + const order = orderBuilder + .deadline(_deadline) + .nonce(nonce) + .swapper(req.address) + .decayEndTime(_deadline - 1) + .decayStartTime(Math.floor(Date.now() / 1000)) + .input({ + token: inputToken.address, + startAmount: inputAmount, + endAmount: inputAmount, + }) + .output({ + token: outputToken.address, + startAmount: outputAmount, + endAmount: outputAmount, + recipient: req.address, + }) + .fillThreshold(inputAmount) + .build() + + const { domain, types, values } = order.permitData(); + const signature = await wallet._signTypedData(domain, types, values); + const serializedOrder = order.serialize(); + + const payload = { + encodedOrder: serializedOrder, + signature, + chain: this._chain.chainId, + }; + + const postResponse = await axios({ + method: 'post', + url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, + data: payload, + }) + + return { txHash: "", id: postResponse.data.hash }; + } + + public async deleteOrder( + req: ClobDeleteOrderRequest + ): Promise<{ txHash: string, id: string }> { + + const wallet = await this._chain.getWallet(req.address) + + axios({ + url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, + method: 'post', + data: { + signature: await wallet.signMessage(req.orderId), + hash: req.orderId, + swapper: wallet.address + } + }) + + return { txHash: "", id: req.orderId }; + } + + public estimateGas(_req: NetworkSelectionRequest): { + gasPrice: number; + gasPriceToken: string; + gasLimit: number; + gasCost: number; + } { + return { + gasPrice: 0, + gasPriceToken: "eth", + gasLimit: 0, + gasCost: 0, + }; + } + + private getOrderPrice( + givenReferencePrice: number, + isAsk: boolean, + inputAmount: BigNumber | undefined, + startTime?: number, + endTime?: number, + startingOutputAmount?: BigNumber, + endingOutputAmount?: BigNumber, + currentTimestamp = Date.now() / 1000, + quoteDecimals?: number, + tokenDecimals?: number, + ): number { + if ( + !startTime || + !endTime || + !startingOutputAmount || + !endingOutputAmount || + !quoteDecimals || + !tokenDecimals || + !inputAmount + ) { + return givenReferencePrice; + } + + if (startingOutputAmount.eq(endingOutputAmount)) return givenReferencePrice; + + // TODO: handle case where currentTimestamp is before startTime + if (currentTimestamp <= startTime) { + return !isAsk + ? parseFloat(formatUnits(inputAmount, quoteDecimals)) / + parseFloat(formatUnits(startingOutputAmount, tokenDecimals)) + : parseFloat(formatUnits(startingOutputAmount, tokenDecimals)) / + parseFloat(formatUnits(inputAmount, quoteDecimals)); + } + if (currentTimestamp >= endTime) return givenReferencePrice; + + const totalDuration = endTime - startTime; + const elapsedTime = currentTimestamp - startTime; + + try { + const priceChange = endingOutputAmount.sub(startingOutputAmount); + const scaleFactor = BigNumber.from('1000000000000000000'); // 1e18 for ether scaling + const scaledPriceChange = priceChange.mul(scaleFactor); + const currentChange = scaledPriceChange + .mul(BigNumber.from(Math.floor(elapsedTime))) + .div(BigNumber.from(totalDuration)) + .div(scaleFactor); + + const currentOutputAmount = startingOutputAmount.add(currentChange); + // return parseFloat(formatUnits(currentPrice, tokenDecimals)); + + return !isAsk + ? parseFloat(formatUnits(inputAmount, quoteDecimals)) / + parseFloat(formatUnits(currentOutputAmount, tokenDecimals)) + : parseFloat(formatUnits(currentOutputAmount, quoteDecimals)) / + parseFloat(formatUnits(inputAmount, tokenDecimals)); + } catch (error) { + console.log('error in order book dutch math', error); + return givenReferencePrice; + } + } + + public getAllowedSlippage(allowedSlippageStr?: string): number { + if (allowedSlippageStr != null && isFractionString(allowedSlippageStr)) { + const fractionSplit = allowedSlippageStr.split('/'); + return Number((Number(fractionSplit[0]) / Number(fractionSplit[1]) * 100).toFixed(0)); + } + + const allowedSlippage = RubiconCLOBConfig.config.allowedSlippage; + const matches = allowedSlippage.match(percentRegexp); + if (matches) return Number((Number(matches[1]) / Number(matches[2]) * 100).toFixed(0)); + throw new Error( + 'Encountered a malformed percent string in the config for ALLOWED_SLIPPAGE.' + ); + } +} diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 456d1eeedf..aaa164ed66 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -46,6 +46,7 @@ import { XRPLCLOB } from '../connectors/xrpl/xrpl'; import { QuipuSwap } from '../connectors/quipuswap/quipuswap'; import { Carbonamm } from '../connectors/carbon/carbonAMM'; import { Balancer } from '../connectors/balancer/balancer'; +import { RubiconCLOB } from '../connectors/rubicon/rubicon'; export type ChainUnion = | Algorand @@ -255,6 +256,8 @@ export async function getConnector( connectorInstance = QuipuSwap.getInstance(network); } else if (chain === 'ethereum' && connector === 'carbonamm') { connectorInstance = Carbonamm.getInstance(chain, network); + } else if (chain === 'ethereum' && connector === 'rubicon') { + connectorInstance = RubiconCLOB.getInstance(chain, network); } else { throw new Error('unsupported chain or connector'); } diff --git a/src/services/schema/rubicon-schema.json b/src/services/schema/rubicon-schema.json new file mode 100644 index 0000000000..ac1978f4ee --- /dev/null +++ b/src/services/schema/rubicon-schema.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "allowedSlippage": { "type": "string" } + }, + "additionalProperties": false, + "required": ["allowedSlippage"] +} diff --git a/src/templates/ethereum.yml b/src/templates/ethereum.yml index 03469ccbbc..c49ee2a182 100644 --- a/src/templates/ethereum.yml +++ b/src/templates/ethereum.yml @@ -39,6 +39,20 @@ networks: tokenListType: FILE tokenListSource: /home/gateway/conf/lists/erc20_tokens_goerli.json nativeCurrencySymbol: ETH + base: + chainID: 8453 + tokenListType: FILE + tokenListSource: /home/gateway/conf/lists/base_tokens.json + nodeURL: https://rpc.ankr.com/base + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 + arbitrumSepolia: + chainID: 421614 + tokenListType: FILE + tokenListSource: /home/gateway/conf/lists/arbitrum_sepolia_tokens.json + nodeURL: https://rpc.ankr.com/arbitrum_sepolia + nativeCurrencySymbol: ETH + gasPriceRefreshInterval: 60 # if you use the gas assumptions below, your wallet needs >0.1 ETH balance for gas gasLimitTransaction: 3000000 diff --git a/src/templates/lists/arbitrum_sepolia_tokens.json b/src/templates/lists/arbitrum_sepolia_tokens.json new file mode 100644 index 0000000000..3f2d006ffd --- /dev/null +++ b/src/templates/lists/arbitrum_sepolia_tokens.json @@ -0,0 +1,31 @@ +{ + "name": "ArbSepolia", + "timestamp": "2022-03-01T22:29:12.223Z", + "tokens": [ + { + "name": "USDC Stablecoin", + "symbol": "USDC", + "chainId": 421614, + "address": "0xd28301B86800bBCF1f09a55642ee3E115Edb1f67", + "decimals": 18, + "extensions": { + "quote": true + } + }, + { + "name": "Test Token", + "symbol": "TEST", + "chainId": 421614, + "address": "0x2fc8011B01c988249ace25ec2c624079ac146e04", + "decimals": 18 + }, + { + "name": "Wrapped Ethereum", + "symbol": "WETH", + "chainId": 421614, + "address": "0xc556bAe1e86B2aE9c22eA5E036b07E55E7596074", + "decimals": 18 + } + ] + } + \ No newline at end of file diff --git a/src/templates/lists/base_tokens.json b/src/templates/lists/base_tokens.json new file mode 100644 index 0000000000..ebbb020320 --- /dev/null +++ b/src/templates/lists/base_tokens.json @@ -0,0 +1,6 @@ +{ + "name": "Base", + "timestamp": "2022-03-01T22:29:12.223Z", + "tokens": [] + } + \ No newline at end of file diff --git a/src/templates/root.yml b/src/templates/root.yml index d15d5b0028..a2823ad8ce 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -135,3 +135,7 @@ configurations: $namespace balancer: configurationPath: balancer.yml schemaPath: cronos-connector-schema.json + + $namespace rubicon: + configurationPath: rubicon.yml + schemaPath: rubicon-schema.json diff --git a/src/templates/rubicon.yml b/src/templates/rubicon.yml new file mode 100644 index 0000000000..4d02117f25 --- /dev/null +++ b/src/templates/rubicon.yml @@ -0,0 +1,3 @@ +# allowedSlippage: how much the execution price is allowed to move unfavorably +# from the trade execution price. It uses a rational number for precision. +allowedSlippage: '2/100' diff --git a/yarn.lock b/yarn.lock index b1c88a054d..43437c7157 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,137 +1462,137 @@ "@ethersproject-xdc/abi@file:vendor/@ethersproject-xdc/abi": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-dc6cad0a-b42e-41c0-add1-31aa9f73da8c-1711378365614/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ee1b3d21-6963-4c54-a67f-edd65ef1b578-1722671754113/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/abstract-provider@file:vendor/@ethersproject-xdc/abstract-provider": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-7563efea-d843-42b7-b285-fbeff4443c61-1711378365615/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-25164083-2149-4b27-8e2f-a7850c936158-1722671754113/node_modules/@ethersproject-xdc/web" "@ethersproject-xdc/abstract-signer@file:vendor/@ethersproject-xdc/abstract-signer": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-e30fa525-50b0-4a94-a2fc-4b012803d33e-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-aba4dcfa-c239-420d-80a3-ecf7b25a9e8f-1722671754115/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/address@file:vendor/@ethersproject-xdc/address": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-ebb15099-34b3-4975-9cf8-7f3cae8cb2cf-1711378365616/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-5937cb35-30c6-4e5f-ba08-3dfe2d9d4ded-1722671754116/node_modules/@ethersproject-xdc/rlp" "@ethersproject-xdc/base64@file:vendor/@ethersproject-xdc/base64": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-ac940ee8-f7d7-44f8-a8e6-a8a2aa43673b-1711378365615/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-cd2a10fb-83a6-4323-b53b-0d794bf0bc70-1722671754115/node_modules/@ethersproject-xdc/bytes" "@ethersproject-xdc/basex@file:vendor/@ethersproject-xdc/basex": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-a3964cd6-3388-4e1e-8827-ccb5f8cddbea-1711378365615/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-b333f4ad-6a40-44df-bb6c-9865f5ae2841-1722671754114/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-b333f4ad-6a40-44df-bb6c-9865f5ae2841-1722671754114/node_modules/@ethersproject-xdc/properties" "@ethersproject-xdc/bignumber@file:vendor/@ethersproject-xdc/bignumber": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-bc93acda-27ae-4704-88d0-8826555c062b-1711378365615/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-48281f71-3982-4e77-8f26-599cac126b7d-1722671754119/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-48281f71-3982-4e77-8f26-599cac126b7d-1722671754119/node_modules/@ethersproject-xdc/logger" bn.js "^5.2.1" "@ethersproject-xdc/bytes@file:vendor/@ethersproject-xdc/bytes": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-99ecb1f1-f3c4-4352-b857-7f806ce05f5d-1711378365616/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-c02043dd-db42-473a-9e8c-647bddc16fd7-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/constants@file:vendor/@ethersproject-xdc/constants": version "5.7.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-91a31af6-9be3-4e31-94b5-304ef35e3207-1711378365616/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-b24550a6-7468-46b6-ab20-078aa329f195-1722671754114/node_modules/@ethersproject-xdc/bignumber" "@ethersproject-xdc/contracts@file:vendor/@ethersproject-xdc/contracts": version "5.6.0" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-3a1d2199-b3e9-4cf8-a8e5-111bb620bb2f-1711378365616/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d4fb9e06-c88f-4cc6-a5c9-a0b8ee137a44-1722671754118/node_modules/@ethersproject-xdc/transactions" "@ethersproject-xdc/hash@file:vendor/@ethersproject-xdc/hash": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-e59c6ed5-6f74-42e7-b132-f4bea3ddfad0-1711378365617/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-2e029e8f-b923-4018-a770-faf37de31591-1722671754114/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/hdnode@file:vendor/@ethersproject-xdc/hdnode": version "5.7.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-7df6d3a0-85a2-4dd8-84f0-7defb4301c82-1711378365618/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-4f18168f-01c4-4c94-9a26-32589e14c5ff-1722671754116/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/json-wallets@file:vendor/@ethersproject-xdc/json-wallets": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b09d5477-70d2-455d-95b9-95327c90a434-1711378365617/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-1a310701-d1e8-4e91-bb7b-5b88d91769d6-1722671754118/node_modules/@ethersproject-xdc/transactions" aes-js "3.0.0" scrypt-js "3.0.1" "@ethersproject-xdc/keccak256@file:vendor/@ethersproject-xdc/keccak256": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-9cb7534e-f2d4-4bb8-8726-aa8d2ae70a68-1711378365617/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-86bbfd0b-3c89-4228-82bf-45408fcc2bcc-1722671754114/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1601,67 +1601,67 @@ "@ethersproject-xdc/networks@file:vendor/@ethersproject-xdc/networks": version "5.7.1" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-3318040d-6ee2-4fe1-8d35-2e90df014a04-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-f64fe2fd-8ce8-4879-a63c-7b20d449eeed-1722671754115/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/pbkdf2@file:vendor/@ethersproject-xdc/pbkdf2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-1db75448-b10f-4529-b48f-66f22c09a20a-1711378365617/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-23e9b911-0f92-4ebc-8a19-77df2b0245ea-1722671754116/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-23e9b911-0f92-4ebc-8a19-77df2b0245ea-1722671754116/node_modules/@ethersproject-xdc/sha2" "@ethersproject-xdc/properties@file:vendor/@ethersproject-xdc/properties": version "5.7.0" dependencies: - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-d600654f-dc20-45bd-8730-5aea66cd419c-1711378365618/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-b89877d9-55f0-426a-a750-b520de688fe8-1722671754115/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/providers@file:vendor/@ethersproject-xdc/providers": version "5.6.2" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-0e620e87-104e-4693-b0d6-cc54eba98645-1711378365618/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7e71eba-0b54-4d31-804e-8abe8d85888b-1722671754115/node_modules/@ethersproject-xdc/web" bech32 "1.1.4" ws "7.4.6" "@ethersproject-xdc/random@file:vendor/@ethersproject-xdc/random": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-98a7dd46-79c6-4335-9d15-21617d7f16a5-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-d430af73-ac72-4285-9efc-0cfecf0ebd42-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-d430af73-ac72-4285-9efc-0cfecf0ebd42-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/rlp@file:vendor/@ethersproject-xdc/rlp": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-7790503f-a04f-459f-8b5c-cf61ffd4ff12-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9092121f-d86e-4bb4-ae10-380ed98f6426-1722671754118/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9092121f-d86e-4bb4-ae10-380ed98f6426-1722671754118/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/sha2@file:vendor/@ethersproject-xdc/sha2": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-c765449d-476b-4741-9e2e-dbccb8aa1809-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9f284ecd-2634-4efe-806c-ef6664f151c7-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-9f284ecd-2634-4efe-806c-ef6664f151c7-1722671754117/node_modules/@ethersproject-xdc/logger" hash.js "1.1.7" "@ethersproject-xdc/signing-key@file:vendor/@ethersproject-xdc/signing-key": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-21971b50-7b39-465c-bb5a-2f8689e48cc2-1711378365620/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-ba0365ef-8a0b-49a7-9cbc-9fa40a619922-1722671754119/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1669,76 +1669,76 @@ "@ethersproject-xdc/solidity@file:vendor/@ethersproject-xdc/solidity": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-e3924149-bd04-4548-98cf-44195b92192d-1711378365619/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-9e749ca5-91d2-4d8c-b834-eb498d440203-1722671754121/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/strings@file:vendor/@ethersproject-xdc/strings": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-42e9cb08-71fd-4932-bd36-6f05e0f1b34b-1711378365620/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-fb173fa9-c19c-4774-8226-4dbd5ca8690b-1722671754117/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/transactions@file:vendor/@ethersproject-xdc/transactions": version "5.7.0" dependencies: - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-bb480f26-2b90-41a5-bfff-057ac9b6e8e9-1711378365622/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-7a212e1d-b81e-43f3-aa0b-560ed34719fc-1722671754124/node_modules/@ethersproject-xdc/signing-key" "@ethersproject-xdc/units@file:vendor/@ethersproject-xdc/units": version "5.6.0" dependencies: - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-5f41db51-35b1-4973-a795-080ed99a99b4-1711378365619/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-44f8730e-e3d5-4b72-bcbf-43c2d6b53635-1722671754118/node_modules/@ethersproject-xdc/logger" "@ethersproject-xdc/wallet@file:vendor/@ethersproject-xdc/wallet": version "5.6.0" dependencies: - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-bc949dc4-090d-4ab9-b6c6-709a17fc75ad-1711378365622/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-1d0604e5-2823-4c56-afb4-46728ef82038-1722671754117/node_modules/@ethersproject-xdc/wordlists" "@ethersproject-xdc/web@file:vendor/@ethersproject-xdc/web": version "5.7.1" dependencies: - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-9ac39370-4d32-4c38-96c7-4498ea524885-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-404a681d-d120-4256-a5c0-e1778edf0fe0-1722671754117/node_modules/@ethersproject-xdc/strings" "@ethersproject-xdc/wordlists@file:vendor/@ethersproject-xdc/wordlists": version "5.7.0" dependencies: - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-eafc2a13-cd67-4bf6-9256-aec79a731277-1711378365623/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-3ea9b945-c782-4a53-987f-30d049ce585d-1722671754124/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" @@ -1980,7 +1980,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.4.5", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.0.4", "@ethersproject/providers@^5.4.0", "@ethersproject/providers@^5.4.5", "@ethersproject/providers@^5.7.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== @@ -3559,6 +3559,18 @@ debug "^3.1.0" hosted-git-info "^2.6.0" +"@rubicondefi/gladius-sdk@^1.4.27": + version "1.4.27" + resolved "https://registry.yarnpkg.com/@rubicondefi/gladius-sdk/-/gladius-sdk-1.4.27.tgz#dc7474fdce3476c8d09ce7b5d84fa77aad63572d" + integrity sha512-2M64VisTB1OtZuh7dE2ndogM045vwSPBaGStbDxQcbH0Y8s6wXd5XXWR7yInlh7iZ3BKYYzFJUVoWJ002Hnp+A== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/providers" "^5.7.0" + "@uniswap/permit2-sdk" "^1.2.0" + "@uniswap/sdk-core" "^4.0.3" + axios "^1.6.1" + ethers "^5.7.0" + "@scure/base@~1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" @@ -4999,6 +5011,14 @@ resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-4.0.1-alpha.tgz#2881008e55f075344675b3bca93f020b028fbd02" integrity sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA== +"@uniswap/permit2-sdk@^1.2.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@uniswap/permit2-sdk/-/permit2-sdk-1.3.0.tgz#b54124e570f0adbaca9d39b2de3054fd7d3798a1" + integrity sha512-LstYQWP47dwpQrgqBJ+ysFstne9LgI5FGiKHc2ewjj91MTY8Mq1reocu6U/VDncdR5ef30TUOcZ7gPExRY8r6Q== + dependencies: + ethers "^5.7.0" + tiny-invariant "^1.1.0" + "@uniswap/router-sdk@^1.3.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@uniswap/router-sdk/-/router-sdk-1.4.0.tgz#0e8d49f37b36e74b6a70ec257ec0561bf1f249c3" @@ -5022,6 +5042,18 @@ tiny-invariant "^1.1.0" toformat "^2.0.0" +"@uniswap/sdk-core@^4.0.3": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-4.2.1.tgz#7b8c6fee48446bb67a4e6f2e9cb94c862034a6c3" + integrity sha512-hr7vwYrXScg+V8/rRc2UL/Ixc/p0P7yqe4D/OxzUdMRYr8RZd+8z5Iu9+WembjZT/DCdbTjde6lsph4Og0n1BQ== + dependencies: + "@ethersproject/address" "^5.0.2" + big.js "^5.2.2" + decimal.js-light "^2.5.0" + jsbi "^3.1.4" + tiny-invariant "^1.1.0" + toformat "^2.0.0" + "@uniswap/sdk@3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@uniswap/sdk/-/sdk-3.0.2.tgz#c75da48a8d7c3e62556c2b29d6c0f75f133d6afa" @@ -5092,6 +5124,11 @@ resolved "https://registry.yarnpkg.com/@uniswap/token-lists/-/token-lists-1.0.0-beta.31.tgz#ff3852bd505ec7b4c276625c762ea79a93a919ec" integrity sha512-BQVoelKCRf64IToPEs1wxiXOnhr/ukwPOF78XG11PrTAOL4F8umjYKFb8ZPv1/dIJsPaC7GhLSriEqyp94SasQ== +"@uniswap/token-lists@^1.0.0-beta.34": + version "1.0.0-beta.34" + resolved "https://registry.yarnpkg.com/@uniswap/token-lists/-/token-lists-1.0.0-beta.34.tgz#879461f5d4009327a24259bbab797e0f22db58c8" + integrity sha512-Hc3TfrFaupg0M84e/Zv7BoF+fmMWDV15mZ5s8ZQt2qZxUcNw2GQW+L6L/2k74who31G+p1m3GRYbJpAo7d1pqA== + "@uniswap/v2-core@1.0.1", "@uniswap/v2-core@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.1.tgz#af8f508bf183204779938969e2e54043e147d425" @@ -5875,6 +5912,15 @@ axios@^1.6.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.6.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.3.tgz#a1125f2faf702bc8e8f2104ec3a76fab40257d85" + integrity sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -8235,36 +8281,36 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: "ethers-xdc@file:./vendor/ethers-xdc": version "5.7.2" dependencies: - "@ethersproject-xdc/abi" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-ba402b8c-f1be-43c1-a0b9-2b2aeab75ab2-1711378365608/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-d46104fe-2f69-4d40-b6b2-61e4e54fb303-1722671754104/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" @@ -8777,7 +8823,7 @@ follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== -follow-redirects@^1.14.4: +follow-redirects@^1.14.4, follow-redirects@^1.15.6: version "1.15.6" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== From 50f935308526621810a9148c369d4389eec4aa08 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 21 Aug 2024 17:13:36 -0400 Subject: [PATCH 17/21] Networks must be lowercased --- src/connectors/rubicon/rubicon.config.ts | 2 +- src/connectors/rubicon/rubicon.ts | 52 ++++++++++++++++-------- src/templates/ethereum.yml | 2 +- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index e8d0dfd0a4..7fd0b7ea34 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -17,7 +17,7 @@ export namespace RubiconCLOBConfig { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', allowedSlippage: configManager.get('rubicon.allowedSlippage'), - availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumsepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", }; } diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index dbc29f886a..e1d6e5f5b7 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -20,7 +20,7 @@ import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; import { BigNumber, providers } from 'ethers'; import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; -import axios from 'axios'; +import axios, { AxiosError } from 'axios'; import { isFractionString } from '../../services/validators'; import { percentRegexp } from '../../services/config-manager-v2'; @@ -458,16 +458,25 @@ export class RubiconCLOB implements CLOBish { const payload = { encodedOrder: serializedOrder, signature, - chain: this._chain.chainId, + chainId: this._chain.chainId, }; - const postResponse = await axios({ - method: 'post', - url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, - data: payload, - }) + try { + const postResponse = await axios({ + method: 'post', + url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, + data: payload, + }) + + return { txHash: "", id: postResponse.data.hash }; - return { txHash: "", id: postResponse.data.hash }; + } catch (error) { + if (error instanceof AxiosError) { + throw new Error(error.response?.data ? error.response.data.detail : 'Trade failed: Unknown error'); + } else { + throw error; + } + } } public async deleteOrder( @@ -476,17 +485,24 @@ export class RubiconCLOB implements CLOBish { const wallet = await this._chain.getWallet(req.address) - axios({ - url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, - method: 'post', - data: { - signature: await wallet.signMessage(req.orderId), - hash: req.orderId, - swapper: wallet.address + try { + await axios({ + url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, + method: 'post', + data: { + signature: await wallet.signMessage(req.orderId), + hash: req.orderId, + swapper: wallet.address + } + }) + return { txHash: "", id: req.orderId }; + } catch(error) { + if (error instanceof AxiosError) { + throw new Error(error.response?.data ? error.response.data.detail : 'Trade failed: Unknown error'); + } else { + throw error; } - }) - - return { txHash: "", id: req.orderId }; + } } public estimateGas(_req: NetworkSelectionRequest): { diff --git a/src/templates/ethereum.yml b/src/templates/ethereum.yml index c49ee2a182..230ca5d9ef 100644 --- a/src/templates/ethereum.yml +++ b/src/templates/ethereum.yml @@ -46,7 +46,7 @@ networks: nodeURL: https://rpc.ankr.com/base nativeCurrencySymbol: ETH gasPriceRefreshInterval: 60 - arbitrumSepolia: + arbitrumsepolia: chainID: 421614 tokenListType: FILE tokenListSource: /home/gateway/conf/lists/arbitrum_sepolia_tokens.json From 2f69a640ff4beb9381cb54c17e5b4f6f32c81b0d Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Wed, 21 Aug 2024 19:35:14 -0400 Subject: [PATCH 18/21] Return empty ticker if there is no subgraph for trades --- src/connectors/rubicon/rubicon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index e1d6e5f5b7..ff8ecf3871 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -305,7 +305,7 @@ export class RubiconCLOB implements CLOBish { const marketInfo = this.parsedMarkets[req.market!] - if (!marketInfo) return { markets: {} } + if (!marketInfo || !NETWORK_INFO[this._chain.chainId]) return { markets: {} } const query = `{ sells: fills( From 2444a098ef053423f8aafc79760d6393568c1ee8 Mon Sep 17 00:00:00 2001 From: Iska Date: Wed, 21 Aug 2024 19:49:25 -0400 Subject: [PATCH 19/21] Rubicon (#3) --- src/connectors/rubicon/rubicon.config.ts | 2 +- src/connectors/rubicon/rubicon.ts | 56 ++++++++++++++++-------- src/templates/ethereum.yml | 2 +- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/connectors/rubicon/rubicon.config.ts b/src/connectors/rubicon/rubicon.config.ts index e8d0dfd0a4..7fd0b7ea34 100644 --- a/src/connectors/rubicon/rubicon.config.ts +++ b/src/connectors/rubicon/rubicon.config.ts @@ -17,7 +17,7 @@ export namespace RubiconCLOBConfig { tradingTypes: ['CLOB_SPOT'], chainType: 'EVM', allowedSlippage: configManager.get('rubicon.allowedSlippage'), - availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumSepolia', 'optimism', 'base'] } ], + availableNetworks: [ { chain: 'ethereum', networks: ['mainnet', 'arbitrum', 'arbitrumsepolia', 'optimism', 'base'] } ], url: "https://gladius.rubicon.finance", }; } diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index dbc29f886a..99960ef235 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -20,7 +20,11 @@ import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; import { BigNumber, providers } from 'ethers'; import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; +<<<<<<< HEAD +import axios, { AxiosError } from 'axios'; +======= import axios from 'axios'; +>>>>>>> main import { isFractionString } from '../../services/validators'; import { percentRegexp } from '../../services/config-manager-v2'; @@ -305,7 +309,7 @@ export class RubiconCLOB implements CLOBish { const marketInfo = this.parsedMarkets[req.market!] - if (!marketInfo) return { markets: {} } + if (!marketInfo || !NETWORK_INFO[this._chain.chainId]) return { markets: {} } const query = `{ sells: fills( @@ -458,16 +462,25 @@ export class RubiconCLOB implements CLOBish { const payload = { encodedOrder: serializedOrder, signature, - chain: this._chain.chainId, + chainId: this._chain.chainId, }; - const postResponse = await axios({ - method: 'post', - url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, - data: payload, - }) + try { + const postResponse = await axios({ + method: 'post', + url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, + data: payload, + }) + + return { txHash: "", id: postResponse.data.hash }; - return { txHash: "", id: postResponse.data.hash }; + } catch (error) { + if (error instanceof AxiosError) { + throw new Error(error.response?.data ? error.response.data.detail : 'Trade failed: Unknown error'); + } else { + throw error; + } + } } public async deleteOrder( @@ -476,17 +489,24 @@ export class RubiconCLOB implements CLOBish { const wallet = await this._chain.getWallet(req.address) - axios({ - url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, - method: 'post', - data: { - signature: await wallet.signMessage(req.orderId), - hash: req.orderId, - swapper: wallet.address + try { + await axios({ + url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, + method: 'post', + data: { + signature: await wallet.signMessage(req.orderId), + hash: req.orderId, + swapper: wallet.address + } + }) + return { txHash: "", id: req.orderId }; + } catch(error) { + if (error instanceof AxiosError) { + throw new Error(error.response?.data ? error.response.data.detail : 'Trade failed: Unknown error'); + } else { + throw error; } - }) - - return { txHash: "", id: req.orderId }; + } } public estimateGas(_req: NetworkSelectionRequest): { diff --git a/src/templates/ethereum.yml b/src/templates/ethereum.yml index c49ee2a182..230ca5d9ef 100644 --- a/src/templates/ethereum.yml +++ b/src/templates/ethereum.yml @@ -46,7 +46,7 @@ networks: nodeURL: https://rpc.ankr.com/base nativeCurrencySymbol: ETH gasPriceRefreshInterval: 60 - arbitrumSepolia: + arbitrumsepolia: chainID: 421614 tokenListType: FILE tokenListSource: /home/gateway/conf/lists/arbitrum_sepolia_tokens.json From b603bc40cd85e54184db6c217b3746f67201fd2a Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Tue, 27 Aug 2024 21:34:03 -0400 Subject: [PATCH 20/21] Tests --- src/connectors/rubicon/rubicon.ts | 166 ++++++----- test/connectors/rubicon/rubicon.test.ts | 365 ++++++++++++++++++++++++ 2 files changed, 456 insertions(+), 75 deletions(-) create mode 100644 test/connectors/rubicon/rubicon.test.ts diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 99960ef235..4a16ea89a7 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -17,14 +17,10 @@ import { PriceLevel, } from '../../services/common-interfaces'; import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; -import { BigNumber, providers } from 'ethers'; +import { BigNumber, providers, Wallet } from 'ethers'; import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; -<<<<<<< HEAD import axios, { AxiosError } from 'axios'; -======= -import axios from 'axios'; ->>>>>>> main import { isFractionString } from '../../services/validators'; import { percentRegexp } from '../../services/config-manager-v2'; @@ -61,7 +57,7 @@ export enum OrderType { Dutch = "Dutch" } -type Fill = { +export type Fill = { outputToken: string; inputToken: string; outputAmount: string; @@ -127,7 +123,7 @@ export class RubiconCLOB implements CLOBish { baseSymbol: base.symbol.toUpperCase(), baseDecimals: base.decimals, baseAddress: base.address, - quoteSymbol: quote.symbol, + quoteSymbol: quote.symbol.toUpperCase(), quoteDecimals: quote.decimals, quoteAddress: quote.address } @@ -173,13 +169,8 @@ export class RubiconCLOB implements CLOBish { public async orderBook(req: ClobOrderbookRequest): Promise { const marketInfo = this.parsedMarkets[req.market]; - const asksUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.quoteAddress}&sellToken=${marketInfo.baseAddress}&limit=50`; - const bidsUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${this._chain.chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.baseAddress}&sellToken=${marketInfo.quoteAddress}&limit=50&desc=true&sortKey=price`; - const [asksResp, bidsResp] = await Promise.all([fetch(asksUrl), fetch(bidsUrl)]); - - const { orders: asks } = (await asksResp.json()) as { cursor?: string; orders: OrderEntity[] }; - const { orders: bids } = (await bidsResp.json()) as { cursor?: string; orders: OrderEntity[] }; + const [bids, asks] = await this.getOrderBook(this._chain.chainId, marketInfo); const data = { buys: bids @@ -300,7 +291,7 @@ export class RubiconCLOB implements CLOBish { .filter(o => !!o) as PriceLevel[] } - return { ...data, sells: data.buys } + return { ...data } } public async ticker( @@ -311,50 +302,14 @@ export class RubiconCLOB implements CLOBish { if (!marketInfo || !NETWORK_INFO[this._chain.chainId]) return { markets: {} } - const query = `{ - sells: fills( - first: 1, - orderBy: timestamp, - orderDirection: desc, - where: { inputToken: "${marketInfo.baseAddress}", outputToken: "${marketInfo.quoteAddress}"} - ){ - inputToken - inputAmount - outputToken - outputAmount - timestamp - } - buys: fills( - first: 1, - orderBy: timestamp, - orderDirection: desc, - where: { inputToken: "${marketInfo.quoteAddress}", outputToken: "${marketInfo.baseAddress}"} - ){ - inputToken - inputAmount - outputToken - outputAmount - timestamp - } - }` - - const response = await fetch(NETWORK_INFO[this._chain.chainId], { - method: 'POST', - - headers: { - "Content-Type": "application/json" - }, - - body: JSON.stringify({ query }) - }) + const json = await this.getTrades(marketInfo); - const json: { data: { sells: Fill[], buys: Fill[] } } = await response.json(); const trades = [ json.data.sells.map(element => { const pay = BigNumber.from(element.inputAmount); const buy = BigNumber.from(element.outputAmount); - const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); const formattedPay = formatUnits(pay, marketInfo.baseDecimals); + const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { return undefined; @@ -367,8 +322,8 @@ export class RubiconCLOB implements CLOBish { json.data.buys.map(element => { const pay = BigNumber.from(element.inputAmount); const buy = BigNumber.from(element.outputAmount); - const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); + const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); if (pay == undefined || formattedPay == '0.0' || formattedBuy == '0.0') { return undefined; @@ -413,7 +368,6 @@ export class RubiconCLOB implements CLOBish { req: ClobPostOrderRequest ): Promise<{ txHash: string; id: string }> { - const wallet = await this._chain.getWallet(req.address) const marketInfo = this.parsedMarkets[req.market] const tokens = tokenList.tokens.filter(t => t.chainId === this._chain.chainId); const quote = tokens.find(t => t.address === marketInfo.quoteAddress)!; @@ -455,9 +409,8 @@ export class RubiconCLOB implements CLOBish { .fillThreshold(inputAmount) .build() - const { domain, types, values } = order.permitData(); - const signature = await wallet._signTypedData(domain, types, values); const serializedOrder = order.serialize(); + const signature = this.signOrder(order, req.address) const payload = { encodedOrder: serializedOrder, @@ -466,14 +419,8 @@ export class RubiconCLOB implements CLOBish { }; try { - const postResponse = await axios({ - method: 'post', - url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, - data: payload, - }) - + const postResponse = await this.post(payload); return { txHash: "", id: postResponse.data.hash }; - } catch (error) { if (error instanceof AxiosError) { throw new Error(error.response?.data ? error.response.data.detail : 'Trade failed: Unknown error'); @@ -486,19 +433,8 @@ export class RubiconCLOB implements CLOBish { public async deleteOrder( req: ClobDeleteOrderRequest ): Promise<{ txHash: string, id: string }> { - - const wallet = await this._chain.getWallet(req.address) - try { - await axios({ - url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, - method: 'post', - data: { - signature: await wallet.signMessage(req.orderId), - hash: req.orderId, - swapper: wallet.address - } - }) + await this.delete(req.address, req.orderId) return { txHash: "", id: req.orderId }; } catch(error) { if (error instanceof AxiosError) { @@ -598,4 +534,84 @@ export class RubiconCLOB implements CLOBish { 'Encountered a malformed percent string in the config for ALLOWED_SLIPPAGE.' ); } + + private async getTrades(marketInfo: any) { + const query = `{ + sells: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.baseAddress}", outputToken: "${marketInfo.quoteAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + buys: fills( + first: 1, + orderBy: timestamp, + orderDirection: desc, + where: { inputToken: "${marketInfo.quoteAddress}", outputToken: "${marketInfo.baseAddress}"} + ){ + inputToken + inputAmount + outputToken + outputAmount + timestamp + } + }` + + const response = await fetch(NETWORK_INFO[this._chain.chainId], { + method: 'POST', + + headers: { + "Content-Type": "application/json" + }, + + body: JSON.stringify({ query }) + }) + + return await response.json() as { data: { sells: Fill[], buys: Fill[] } }; + } + + private async getOrderBook(chainId: number, marketInfo: any) { + const asksUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.quoteAddress}&sellToken=${marketInfo.baseAddress}&limit=50`; + const bidsUrl = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?chainId=${chainId}&orderStatus=${ORDER_STATUS.OPEN}&buyToken=${marketInfo.baseAddress}&sellToken=${marketInfo.quoteAddress}&limit=50&desc=true&sortKey=price`; + + const [asksResp, bidsResp] = await Promise.all([fetch(asksUrl), fetch(bidsUrl)]); + + const { orders: asks } = (await asksResp.json()) as { cursor?: string; orders: OrderEntity[] }; + const { orders: bids } = (await bidsResp.json()) as { cursor?: string; orders: OrderEntity[] }; + + return [bids, asks]; + } + + private async signOrder(order: GladiusOrder, address: string) { + const wallet = await this._chain.getWallet(address) + const { domain, types, values } = order.permitData(); + return await wallet._signTypedData(domain, types, values); + } + + private async post(payload: any) { + return await axios({ + method: 'post', + url: `${RubiconCLOBConfig.config.url}/dutch-auction/order`, + data: payload, + }) + } + + private async delete(address: string, orderId: string) { + const wallet = await this._chain.getWallet(address) + return await axios({ + url: `${RubiconCLOBConfig.config.url}/dutch-auction/cancel`, + method: 'post', + data: { + signature: await wallet.signMessage(orderId), + hash: orderId, + swapper: wallet.address + } + }) + } } diff --git a/test/connectors/rubicon/rubicon.test.ts b/test/connectors/rubicon/rubicon.test.ts new file mode 100644 index 0000000000..6eb0c2d8a8 --- /dev/null +++ b/test/connectors/rubicon/rubicon.test.ts @@ -0,0 +1,365 @@ + +import request from 'supertest'; +import { gatewayApp } from '../../../src/app'; +import { Ethereum } from '../../../src/chains/ethereum/ethereum'; +import { Fill, ORDER_STATUS, RubiconCLOB } from '../../../src/connectors/rubicon/rubicon'; +import { patch, unpatch } from '../../../test/services/patch'; +import { arbitrum } from 'viem/chains'; +import { GladiusOrderBuilder } from '@rubicondefi/gladius-sdk'; +import { BigNumber } from 'ethers'; + +let ethereum: Ethereum; +let rubicon: RubiconCLOB; + +const chainId = arbitrum.id + +const TX_HASH = ''; // noqa: mock +const MARKET = 'WETH-USDC'; + +const GAS_PRICES = { + gasPrice: 0, + gasPriceToken: "eth", + gasLimit: 0, + gasCost: 0, +}; + +const INVALID_REQUEST = { + chain: 'ethereum', + network: 'arbitrum', +}; + +const MOCK_DATA = { + chainId, + filler: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', + nonce: '40', + orderHash: '0x0000000000000000000000000000000000000000000000000000000000000006', + orderStatus: ORDER_STATUS.OPEN, + offerer: '0x0000000000000000000000000000000000000001', + reactor: '0x0000000000000000000000000000000000000001', + deadline: Math.floor(Date.now() / 1000) + 100, + input: { + endAmount: '30', + startAmount: '30', + token: '0x0000000000000000000000000000000000000003', + }, + output: + { + endAmount: '50', + startAmount: '60', + token: '0x0000000000000000000000000000000000000005', + }, + recipient: '0x0000000000000000000000000000000000000001' +} + +beforeAll(async () => { + ethereum = Ethereum.getInstance('rubicon'); + patchCurrentBlockNumber(); + ethereum.init(); + rubicon = RubiconCLOB.getInstance('rubicon', 'arbitrum'); + await rubicon.init(); +}); + +const patchCurrentBlockNumber = (withError: boolean = false) => { + patch(ethereum, 'getCurrentBlockNumber', () => { + return withError ? -1 : 100; + }); +}; + +const patchOrderBook = () => { + const builder = new GladiusOrderBuilder(chainId) + + const buy = builder + .deadline(MOCK_DATA.deadline) + .nonce(BigNumber.from(MOCK_DATA.nonce)) + .swapper(MOCK_DATA.offerer) + .input({ + token: MOCK_DATA.input.token, + startAmount: BigNumber.from(MOCK_DATA.input.startAmount), + endAmount: BigNumber.from(MOCK_DATA.input.endAmount), + }) + .output({ + token: MOCK_DATA.output.token, + startAmount: BigNumber.from(MOCK_DATA.output.startAmount), + endAmount: BigNumber.from(MOCK_DATA.output.endAmount), + recipient: MOCK_DATA.offerer, + }) + .fillThreshold(BigNumber.from(MOCK_DATA.input.startAmount)) + .build(); + + const sell = builder + .deadline(MOCK_DATA.deadline) + .nonce(BigNumber.from(MOCK_DATA.nonce)) + .swapper(MOCK_DATA.offerer) + .input({ + token: MOCK_DATA.input.token, + startAmount: BigNumber.from(MOCK_DATA.input.startAmount), + endAmount: BigNumber.from(MOCK_DATA.input.endAmount), + }) + .output({ + token: MOCK_DATA.output.token, + startAmount: BigNumber.from(MOCK_DATA.output.startAmount), + endAmount: BigNumber.from(MOCK_DATA.output.endAmount), + recipient: MOCK_DATA.offerer, + }) + .fillThreshold(BigNumber.from(MOCK_DATA.input.startAmount)) + .build(); + + patch(rubicon, 'getOrderBook', () => { + return [[buy], [sell]] + }); +}; + +const patchMarkets = () => { + patch(rubicon, 'parsedMarkets', () => { + return { + 'WETH-USDC': { + baseSymbol: 'WETH', + baseDecimals: 18, + baseAddress: '0x1', + quoteSymbol: 'USDC', + quoteDecimals: 6, + quoteAddress: '0x2' + } + } + }) +} + +const patchGetTrades = () => { + patch(rubicon, 'getTrades', () => { + return { + data: { + buys: [{ inputToken: '0x2', outputToken: '0x1', inputAmount: "500000", outputAmount: "1", timestamp: Math.floor(Date.now() / 1000).toString() }] as Fill[], + sells: [{ inputToken: '0x1', outputToken: '0x2', inputAmount: "2", outputAmount: "100000", timestamp: Math.floor(Date.now() / 1000).toString() }] as Fill[] + } + }; + }); +}; + +const patchGasPrices = () => { + patch(rubicon, 'estimateGas', () => { + return GAS_PRICES; + }); +}; + +const patchPost = () => { + patch(rubicon, 'post', () => { + return { data: { hash: "0x3920392039203920392093209329300293"} } // mock + }) +} + +const patchDelete = () => { + patch(rubicon, 'delete', () => { + return; + }) +} + +const patchSignOrder = () => { + patch(rubicon, 'signOrder', () => { + return "0x2042940294029420492049204920492094" + }) +} + +beforeAll(() => { + patchGetTrades(); + patchMarkets(); + patchPost(); + patchDelete(); + patchSignOrder(); +}) + +// eslint-disable-next-line @typescript-eslint/no-empty-function +beforeEach(() => { + patchCurrentBlockNumber(); +}); + +afterEach(() => { + unpatch(); +}); + +afterAll(async () => { + await ethereum.close(); +}); + +describe('GET /clob/markets', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .query({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => { + expect(res.body.markets.length).toEqual(1); + }); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/markets`) + .query(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('GET /clob/orderBook', () => { + it('should return 200 with proper request', async () => { + patchOrderBook(); + await request(gatewayApp) + .get(`/clob/orderBook`) + .query({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + market: MARKET, + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.buys[0].price).toEqual('5.0')) + .expect((res) => expect(res.body.sells[0].price).toEqual('5.0')); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/orderBook`) + .query(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('GET /clob/ticker', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .get(`/clob/ticker`) + .query({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + market: MARKET, + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.markets.price).toEqual('WETH')) + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/ticker`) + .query(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('GET /clob/orders', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .get(`/clob/orders`) + .query({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + address: + '0x261362dBC1D83705AB03e99792355689A4589b8E000000000000000000000000', // noqa: mock + market: MARKET, + orderId: '0x...', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.orders.length).toEqual(1)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/orders`) + .query(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('POST /clob/orders', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .post(`/clob/orders`) + .send({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + address: '0x261362dBC1D83705AB03e99792355689A4589b8E', // noqa: mock + market: MARKET, + price: '10000.12', + amount: '0.12', + side: 'BUY', + orderType: 'LIMIT', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)) + .expect((res) => expect(res.body.id).toEqual("0x3920392039203920392093209329300293")); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .post(`/clob/orders`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('DELETE /clob/orders', () => { + it('should return 200 with proper request', async () => { + await request(gatewayApp) + .delete(`/clob/orders`) + .send({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + address: '0x261362dBC1D83705AB03e99792355689A4589b8E', // noqa: mock + market: MARKET, + orderId: + '0x8ce222ca5da95aaffd87b3d38a307f25d6e2c09e70a0cb8599bc6c8a0851fda3', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)) + .expect((res) => expect(res.body.id).toEqual('0x8ce222ca5da95aaffd87b3d38a307f25d6e2c09e70a0cb8599bc6c8a0851fda3')); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .delete(`/clob/orders`) + .send(INVALID_REQUEST) + .expect(404); + }); +}); + +describe('GET /clob/estimateGas', () => { + it('should return 200 with proper request', async () => { + patchGasPrices(); + await request(gatewayApp) + .get(`/clob/estimateGas`) + .query({ + chain: 'ethereum', + network: 'arbitrum', + connector: 'rubicon', + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((res) => expect(res.body.gasPrice).toEqual(GAS_PRICES.gasPrice)); + }); + + it('should return 404 when parameters are invalid', async () => { + await request(gatewayApp) + .get(`/clob/estimateGas`) + .query(INVALID_REQUEST) + .expect(404); + }); +}); From 0fe5fd7906fbf4711ea04601d795a5dac329b776 Mon Sep 17 00:00:00 2001 From: Ethereal Iska Date: Thu, 5 Sep 2024 18:31:47 -0400 Subject: [PATCH 21/21] Fixed unit tests --- src/connectors/rubicon/rubicon.ts | 79 ++++++------ test/connectors/rubicon/rubicon.test.ts | 159 ++++++++++++++++-------- 2 files changed, 141 insertions(+), 97 deletions(-) diff --git a/src/connectors/rubicon/rubicon.ts b/src/connectors/rubicon/rubicon.ts index 4a16ea89a7..ede190654f 100644 --- a/src/connectors/rubicon/rubicon.ts +++ b/src/connectors/rubicon/rubicon.ts @@ -17,7 +17,7 @@ import { PriceLevel, } from '../../services/common-interfaces'; import { Network, RubiconCLOBConfig, tokenList } from './rubicon.config'; -import { BigNumber, providers, Wallet } from 'ethers'; +import { BigNumber, providers } from 'ethers'; import { formatUnits, parseUnits } from 'ethers/lib/utils'; import { StaticJsonRpcProvider } from '@ethersproject/providers'; import axios, { AxiosError } from 'axios'; @@ -100,7 +100,7 @@ const NETWORK_INFO: Record = { export class RubiconCLOB implements CLOBish { private _chain; private _ready: boolean = false; - public parsedMarkets: MarketInfo = []; + public parsedMarkets: MarketInfo = {}; private static _instances: { [name: string]: RubiconCLOB }; private provider: StaticJsonRpcProvider; @@ -129,8 +129,6 @@ export class RubiconCLOB implements CLOBish { } }) }) - - console.log("Markets Loaded") } public static getInstance(chain: string, network: string): RubiconCLOB { @@ -174,22 +172,16 @@ export class RubiconCLOB implements CLOBish { const data = { buys: bids - .filter((o) => { - const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); - if (o.orderStatus !== ORDER_STATUS.OPEN) { - return true; - } - + .map((element) => { + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + const now = Math.floor(new Date().getTime() / 1000); - if (decodedOrder.info.deadline >= now) { - return true; + if (parsedOrder.info.deadline <= now) { + return; } - - return false; - }) - .map((element) => { - const pay = BigNumber.from(element.input.endAmount); - const buy = BigNumber.from(element.outputs[0].endAmount); + + const pay = parsedOrder.info.input.endAmount; + const buy = parsedOrder.info.outputs[0].endAmount; const formattedBuy = formatUnits(buy, marketInfo.baseDecimals); const formattedPay = formatUnits(pay, marketInfo.quoteDecimals); @@ -199,15 +191,17 @@ export class RubiconCLOB implements CLOBish { const price = parseFloat(formattedPay) / parseFloat(formattedBuy); - const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); - - const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); - const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startingOutputAmount = parsedOrder.info.outputs[0].startAmount; + const endingOutputAmount = parsedOrder.info.outputs[0].endAmount; const startTime = parsedOrder.info.decayStartTime; const endTime = parsedOrder.info.decayEndTime; const rawInputAmount = pay; - let out: PriceLevel = { price: price.toString(), quantity: formattedBuy, timestamp: element.createdAt }; + let out: PriceLevel = { + price: price.toString(), + quantity: formattedBuy, + timestamp: element.createdAt + }; if (startingOutputAmount && endingOutputAmount && startTime && endTime && rawInputAmount) { out = { @@ -230,22 +224,17 @@ export class RubiconCLOB implements CLOBish { }) .filter(o => !!o) as PriceLevel[], sells: asks - .filter(o => { - const decodedOrder = GladiusOrder.parse(o.encodedOrder, this._chain.chainId); - if (o.orderStatus !== ORDER_STATUS.OPEN) { - return true; - } - + .map((element) => { + + const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); + const now = Math.floor(new Date().getTime() / 1000); - if (decodedOrder.info.deadline >= now) { - return true; + if (parsedOrder.info.deadline <= now) { + return; } - - return false; - }) - .map((element) => { - const pay = BigNumber.from(element.input.endAmount); - const buy = BigNumber.from(element.outputs[0].endAmount); + + const pay = parsedOrder.info.input.endAmount; + const buy = parsedOrder.info.outputs[0].endAmount; const formattedBuy = formatUnits(buy, marketInfo.quoteDecimals); const formattedPay = formatUnits(pay, marketInfo.baseDecimals); const rawInputAmount = pay; @@ -254,10 +243,8 @@ export class RubiconCLOB implements CLOBish { return undefined; } - const parsedOrder = GladiusOrder.parse(element.encodedOrder, this._chain.chainId); - - const startingOutputAmount = BigNumber.from(element.outputs[0].startAmount); - const endingOutputAmount = BigNumber.from(element.outputs[0].endAmount); + const startingOutputAmount = parsedOrder.info.outputs[0].startAmount; + const endingOutputAmount = parsedOrder.info.outputs[0].endAmount; const startTime = parsedOrder.info.decayStartTime; const endTime = parsedOrder.info.decayEndTime; @@ -340,7 +327,7 @@ export class RubiconCLOB implements CLOBish { return parseInt(a.timestamp) - parseInt(b.timestamp) })[0] - return { markets: { price: (lastTrade?.price || 0) + (Math.random() * 10) } }; + return { markets: { price: lastTrade?.price || 0 } }; } public async orders( @@ -349,8 +336,7 @@ export class RubiconCLOB implements CLOBish { if (!req.orderId) return { orders: [] } - const url = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?orderHash=${req.orderId}`; - const { orders } = (await (await fetch(url)).json()) as { cursor?: string; orders: OrderEntity[] }; + const { orders } = await this.getOrders(req.orderId) return { orders: orders.map(o => { @@ -614,4 +600,9 @@ export class RubiconCLOB implements CLOBish { } }) } + + private async getOrders(orderId: string) { + const url = `${RubiconCLOBConfig.config.url}/dutch-auction/orders?orderHash=${orderId}`; + return (await (await fetch(url)).json()) as { cursor?: string; orders: OrderEntity[] }; + } } diff --git a/test/connectors/rubicon/rubicon.test.ts b/test/connectors/rubicon/rubicon.test.ts index 6eb0c2d8a8..4709824ee6 100644 --- a/test/connectors/rubicon/rubicon.test.ts +++ b/test/connectors/rubicon/rubicon.test.ts @@ -2,8 +2,8 @@ import request from 'supertest'; import { gatewayApp } from '../../../src/app'; import { Ethereum } from '../../../src/chains/ethereum/ethereum'; -import { Fill, ORDER_STATUS, RubiconCLOB } from '../../../src/connectors/rubicon/rubicon'; -import { patch, unpatch } from '../../../test/services/patch'; +import { Fill, ORDER_STATUS, OrderEntity, RubiconCLOB } from '../../../src/connectors/rubicon/rubicon'; +import { patch } from '../../../test/services/patch'; import { arbitrum } from 'viem/chains'; import { GladiusOrderBuilder } from '@rubicondefi/gladius-sdk'; import { BigNumber } from 'ethers'; @@ -38,38 +38,42 @@ const MOCK_DATA = { reactor: '0x0000000000000000000000000000000000000001', deadline: Math.floor(Date.now() / 1000) + 100, input: { - endAmount: '30', - startAmount: '30', - token: '0x0000000000000000000000000000000000000003', + endAmount: '30000000000', + startAmount: '30000000000', + token: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', }, output: { - endAmount: '50', - startAmount: '60', - token: '0x0000000000000000000000000000000000000005', + endAmount: '6000000000000000000', + startAmount: '6000000000000000000', + token: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', }, recipient: '0x0000000000000000000000000000000000000001' } -beforeAll(async () => { - ethereum = Ethereum.getInstance('rubicon'); - patchCurrentBlockNumber(); - ethereum.init(); - rubicon = RubiconCLOB.getInstance('rubicon', 'arbitrum'); - await rubicon.init(); -}); - const patchCurrentBlockNumber = (withError: boolean = false) => { patch(ethereum, 'getCurrentBlockNumber', () => { return withError ? -1 : 100; }); }; +const patchGetWallet = () => { + patch(ethereum, 'getWallet', () => { + return { + privateKey: + '83d8fae2444141a142079e9aa6dc1a49962af114d9ace8db9a34ecb8fa3e6cf8', // noqa: mock + address: '0x7e57780cf01209a1522b9dCeFa9ff191DDd1c70f', + }; + }); +}; + const patchOrderBook = () => { - const builder = new GladiusOrderBuilder(chainId) + const buyBuilder = new GladiusOrderBuilder(chainId) - const buy = builder + const buy = buyBuilder .deadline(MOCK_DATA.deadline) + .decayStartTime(MOCK_DATA.deadline) + .decayEndTime(MOCK_DATA.deadline) .nonce(BigNumber.from(MOCK_DATA.nonce)) .swapper(MOCK_DATA.offerer) .input({ @@ -86,40 +90,62 @@ const patchOrderBook = () => { .fillThreshold(BigNumber.from(MOCK_DATA.input.startAmount)) .build(); - const sell = builder + const sellBuilder = new GladiusOrderBuilder(chainId) + + const sell = sellBuilder .deadline(MOCK_DATA.deadline) + .decayStartTime(MOCK_DATA.deadline) + .decayEndTime(MOCK_DATA.deadline) .nonce(BigNumber.from(MOCK_DATA.nonce)) .swapper(MOCK_DATA.offerer) .input({ - token: MOCK_DATA.input.token, - startAmount: BigNumber.from(MOCK_DATA.input.startAmount), - endAmount: BigNumber.from(MOCK_DATA.input.endAmount), + token: MOCK_DATA.output.token, + startAmount: BigNumber.from("1000000000000000000"), + endAmount: BigNumber.from("1000000000000000000"), }) .output({ - token: MOCK_DATA.output.token, - startAmount: BigNumber.from(MOCK_DATA.output.startAmount), - endAmount: BigNumber.from(MOCK_DATA.output.endAmount), + token: MOCK_DATA.input.token, + startAmount: BigNumber.from("7000000000"), + endAmount: BigNumber.from("7000000000"), recipient: MOCK_DATA.offerer, }) - .fillThreshold(BigNumber.from(MOCK_DATA.input.startAmount)) + .fillThreshold(BigNumber.from("1000000000000000000")) .build(); patch(rubicon, 'getOrderBook', () => { - return [[buy], [sell]] + return [ + [ + { + encodedOrder: buy.serialize(), + createdAt: Date.now(), + input: { + + token: "USDC" + } + } as OrderEntity + ], + [ + { + encodedOrder: sell.serialize(), + createdAt: Date.now(), + input: { + token: "WETH" + } + } as OrderEntity + ] + ] }); }; const patchMarkets = () => { - patch(rubicon, 'parsedMarkets', () => { - return { - 'WETH-USDC': { - baseSymbol: 'WETH', - baseDecimals: 18, - baseAddress: '0x1', - quoteSymbol: 'USDC', - quoteDecimals: 6, - quoteAddress: '0x2' - } + patch(rubicon, 'parsedMarkets', { + 'WETH-USDC': { + baseSymbol: 'WETH', + baseDecimals: 18, + baseAddress: MOCK_DATA.input.token, + quoteSymbol: 'USDC', + quoteDecimals: 6, + quoteAddress: MOCK_DATA.output.token } }) } @@ -128,13 +154,33 @@ const patchGetTrades = () => { patch(rubicon, 'getTrades', () => { return { data: { - buys: [{ inputToken: '0x2', outputToken: '0x1', inputAmount: "500000", outputAmount: "1", timestamp: Math.floor(Date.now() / 1000).toString() }] as Fill[], - sells: [{ inputToken: '0x1', outputToken: '0x2', inputAmount: "2", outputAmount: "100000", timestamp: Math.floor(Date.now() / 1000).toString() }] as Fill[] + buys: [{ + inputToken: MOCK_DATA.input.token, + outputToken: MOCK_DATA.output.token, + inputAmount: "30000000000", + outputAmount: "3000000000000000000", + timestamp: "1725574055" + }] as Fill[], + sells: [{ + inputToken: MOCK_DATA.output.token, + outputToken: MOCK_DATA.input.token, + inputAmount: "1000000000000000000", + outputAmount: "5000000000", + timestamp: "1725574056" + }] as Fill[] } }; }); }; +const patchGetOrders = () => { + patch(rubicon, 'getOrders', () => { + return { + orders: [{ orderStatus: ORDER_STATUS.OPEN, orderHash: MOCK_DATA.orderHash } as OrderEntity] + } + }) +} + const patchGasPrices = () => { patch(rubicon, 'estimateGas', () => { return GAS_PRICES; @@ -143,7 +189,7 @@ const patchGasPrices = () => { const patchPost = () => { patch(rubicon, 'post', () => { - return { data: { hash: "0x3920392039203920392093209329300293"} } // mock + return { data: { hash: MOCK_DATA.orderHash } } // mock }) } @@ -159,12 +205,19 @@ const patchSignOrder = () => { }) } -beforeAll(() => { +beforeAll(async () => { + ethereum = Ethereum.getInstance('arbitrum'); + patchCurrentBlockNumber(); + ethereum.init(); + rubicon = RubiconCLOB.getInstance('ethereum', 'arbitrum'); + await rubicon.init(); patchGetTrades(); patchMarkets(); patchPost(); patchDelete(); patchSignOrder(); + patchGetWallet(); + patchGetOrders(); }) // eslint-disable-next-line @typescript-eslint/no-empty-function @@ -172,10 +225,6 @@ beforeEach(() => { patchCurrentBlockNumber(); }); -afterEach(() => { - unpatch(); -}); - afterAll(async () => { await ethereum.close(); }); @@ -219,8 +268,8 @@ describe('GET /clob/orderBook', () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) - .expect((res) => expect(res.body.buys[0].price).toEqual('5.0')) - .expect((res) => expect(res.body.sells[0].price).toEqual('5.0')); + .expect((res) => expect(res.body.buys[0].price).toEqual('5000')) + .expect((res) => expect(res.body.sells[0].price).toEqual('7000')); }); it('should return 404 when parameters are invalid', async () => { @@ -244,7 +293,7 @@ describe('GET /clob/ticker', () => { .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) - .expect((res) => expect(res.body.markets.price).toEqual('WETH')) + .expect((res) => expect(res.body.markets.price).toEqual(10000)) }); it('should return 404 when parameters are invalid', async () => { @@ -266,12 +315,16 @@ describe('GET /clob/orders', () => { address: '0x261362dBC1D83705AB03e99792355689A4589b8E000000000000000000000000', // noqa: mock market: MARKET, - orderId: '0x...', + orderId: MOCK_DATA.orderHash, }) .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) - .expect((res) => expect(res.body.orders.length).toEqual(1)); + .expect((res) => expect(res.body.orders.length).toEqual(1)) + .expect((res) => expect(res.body.orders[0].id).toEqual(MOCK_DATA.orderHash)) + .expect((res) => expect(res.body.orders[0].status).toEqual(ORDER_STATUS.OPEN)) + .expect((res) => expect(res.body.orders[0].orderHash).toEqual(MOCK_DATA.orderHash)) + .expect((res) => expect(res.body.orders[0].clientId).toEqual(MOCK_DATA.orderHash)); }); it('should return 404 when parameters are invalid', async () => { @@ -301,7 +354,7 @@ describe('POST /clob/orders', () => { .expect('Content-Type', /json/) .expect(200) .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)) - .expect((res) => expect(res.body.id).toEqual("0x3920392039203920392093209329300293")); + .expect((res) => expect(res.body.id).toEqual(MOCK_DATA.orderHash)); }); it('should return 404 when parameters are invalid', async () => { @@ -323,13 +376,13 @@ describe('DELETE /clob/orders', () => { address: '0x261362dBC1D83705AB03e99792355689A4589b8E', // noqa: mock market: MARKET, orderId: - '0x8ce222ca5da95aaffd87b3d38a307f25d6e2c09e70a0cb8599bc6c8a0851fda3', + MOCK_DATA.orderHash, }) .set('Accept', 'application/json') .expect('Content-Type', /json/) .expect(200) .expect((res) => expect(res.body.txHash).toEqual(TX_HASH)) - .expect((res) => expect(res.body.id).toEqual('0x8ce222ca5da95aaffd87b3d38a307f25d6e2c09e70a0cb8599bc6c8a0851fda3')); + .expect((res) => expect(res.body.id).toEqual(MOCK_DATA.orderHash)); }); it('should return 404 when parameters are invalid', async () => {