From f73f9386296d787c34f156d5b68dcae712999103 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 13 Apr 2023 13:27:06 +0700 Subject: [PATCH 01/23] (feat) Algorand status and poll implementations - This commit also includes odd fixes for Injective's RLU cache handling - Also includes some formatting changes --- package.json | 5 +- src/app.ts | 2 + src/chains/algorand/algorand.config.ts | 31 ++ src/chains/algorand/algorand.controller.ts | 9 + src/chains/algorand/algorand.requests.ts | 11 + src/chains/algorand/algorand.routes.ts | 27 ++ src/chains/algorand/algorand.ts | 127 ++++++ src/chains/algorand/algorand.validators.ts | 11 + src/chains/injective/injective.ts | 11 +- src/network/network.controllers.ts | 13 +- src/network/network.requests.ts | 1 + src/services/connection-manager.ts | 6 +- src/services/schema/algorand-schema.json | 42 ++ src/templates/algorand.yml | 16 + src/templates/root.yml | 20 +- test-helpers/curl/curl.sh | 7 + test-helpers/curl/requests/algorand_poll.json | 4 + test/chains/algorand/algorand.routes.test.ts | 255 +++++++++++ yarn.lock | 409 ++++++++++-------- 19 files changed, 807 insertions(+), 200 deletions(-) create mode 100644 src/chains/algorand/algorand.config.ts create mode 100644 src/chains/algorand/algorand.controller.ts create mode 100644 src/chains/algorand/algorand.requests.ts create mode 100644 src/chains/algorand/algorand.routes.ts create mode 100644 src/chains/algorand/algorand.ts create mode 100644 src/chains/algorand/algorand.validators.ts create mode 100644 src/services/schema/algorand-schema.json create mode 100644 src/templates/algorand.yml create mode 100644 test-helpers/curl/requests/algorand_poll.json create mode 100644 test/chains/algorand/algorand.routes.test.ts diff --git a/package.json b/package.json index 443a6b8419..ed85f4f2af 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@injectivelabs/wallet-ts": "^1.0.300", "@pancakeswap/sdk": "^2.4.5", "@pangolindex/sdk": "^1.1.0", - "@perp/sdk-curie": "^1.16.0", + "@perp/sdk-curie": "^1.18.0", "@sushiswap/sdk": "^5.0.0-canary.116", "@switchboard-xyz/defikingdoms-sdk": "^1.0.7", "@traderjoe-xyz/sdk": "^1.6.1", @@ -58,6 +58,7 @@ "@zuzu-cat/defira-sdk": "^1.0.0", "abi-decoder": "^2.4.0", "ajv": "^8.6.3", + "algosdk": "^2.2.0", "app-root-path": "^3.0.0", "axios": "^0.21.1", "big.js": "6.1.1", @@ -129,10 +130,10 @@ "eslint-plugin-promise": "^5.1.0", "eslint-plugin-standard": "^4.0.1", "google-protobuf": "^3.2.0", - "jsbi": "^3.2.0", "hardhat": "^2.13.0", "jest": "^27.3.1", "jest-extended": "^0.11.5", + "jsbi": "^3.2.0", "mock-ethers-provider": "^1.0.2", "node-cache": "5.1.2", "nodemon": "^2.0.16", diff --git a/src/app.ts b/src/app.ts index 870ea27293..460e1757e5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -18,6 +18,7 @@ import { NetworkRoutes } from './network/network.routes'; import { ConnectorsRoutes } from './connectors/connectors.routes'; import { EVMRoutes } from './evm/evm.routes'; import { AmmRoutes, AmmLiquidityRoutes, PerpAmmRoutes } from './amm/amm.routes'; +import { AlgorandRoutes } from './chains/algorand/algorand.routes'; import { InjectiveRoutes } from './chains/injective/injective.routes'; import { NearRoutes } from './chains/near/near.routes'; import { CLOBRoutes } from './clob/clob.routes'; @@ -49,6 +50,7 @@ gatewayApp.use( gatewayApp.use('/config', ConfigRoutes.router); gatewayApp.use('/network', NetworkRoutes.router); gatewayApp.use('/evm', EVMRoutes.router); +gatewayApp.use('/algorand', AlgorandRoutes.router); gatewayApp.use('/injective', InjectiveRoutes.router); gatewayApp.use('/connectors', ConnectorsRoutes.router); diff --git a/src/chains/algorand/algorand.config.ts b/src/chains/algorand/algorand.config.ts new file mode 100644 index 0000000000..ef77e5e813 --- /dev/null +++ b/src/chains/algorand/algorand.config.ts @@ -0,0 +1,31 @@ +import { ConfigManagerV2 } from '../../services/config-manager-v2'; + +export interface NetworkConfig { + name: string; + nodeURL: string; + indexerURL: string; + maxLRUCacheInstances: number; +} + +export interface Config { + network: NetworkConfig; + nativeCurrencySymbol: string; +} + +export function getAlgorandConfig(network: string): Config { + return { + network: { + name: network, + nodeURL: ConfigManagerV2.getInstance().get( + 'algorand.networks.' + network + '.nodeURL' + ), + indexerURL: ConfigManagerV2.getInstance().get( + 'algorand.networks.' + network + '.indexerURL' + ), + maxLRUCacheInstances: 10, + }, + nativeCurrencySymbol: ConfigManagerV2.getInstance().get( + 'algorand.nativeCurrencySymbol' + ), + }; +} diff --git a/src/chains/algorand/algorand.controller.ts b/src/chains/algorand/algorand.controller.ts new file mode 100644 index 0000000000..d93da2ee66 --- /dev/null +++ b/src/chains/algorand/algorand.controller.ts @@ -0,0 +1,9 @@ +import { PollRequest, PollResponse } from '../algorand/algorand.requests'; +import { Algorand } from './algorand'; + +export async function poll( + algorand: Algorand, + req: PollRequest +): Promise { + return await algorand.getTransaction(req.txHash); +} diff --git a/src/chains/algorand/algorand.requests.ts b/src/chains/algorand/algorand.requests.ts new file mode 100644 index 0000000000..bdb1ad019c --- /dev/null +++ b/src/chains/algorand/algorand.requests.ts @@ -0,0 +1,11 @@ +export interface PollRequest { + network: string; + txHash: string; +} + +export type PollResponse = { + currentBlock: number; + txBlock: number | null; + txHash: string; + fee: string; +}; diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts new file mode 100644 index 0000000000..bf69c3c03c --- /dev/null +++ b/src/chains/algorand/algorand.routes.ts @@ -0,0 +1,27 @@ +/* eslint-disable no-inner-declarations */ +/* eslint-disable @typescript-eslint/ban-types */ +import { Response, Router, Request } from 'express'; +import { asyncHandler } from '../../services/error-handler'; +import { PollRequest, PollResponse } from './algorand.requests'; +import { validatePollRequest } from './algorand.validators'; +import { getChain } from '../../services/connection-manager'; +import { Algorand } from './algorand'; +import { poll } from './algorand.controller'; + +export namespace AlgorandRoutes { + export const router = Router(); + + router.post( + '/poll', + asyncHandler( + async ( + req: Request<{}, {}, PollRequest>, + res: Response + ) => { + validatePollRequest(req.body); + const algorand = await getChain('algorand', req.body.network); + res.status(200).json(await poll(algorand, req.body)); + } + ) + ); +} diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts new file mode 100644 index 0000000000..a661610594 --- /dev/null +++ b/src/chains/algorand/algorand.ts @@ -0,0 +1,127 @@ +import LRUCache from 'lru-cache'; +import { getAlgorandConfig } from './algorand.config'; +import { Algodv2, Indexer } from 'algosdk'; +import { Token } from '../cosmos/cosmos-base'; +import { PollResponse } from './algorand.requests'; + +export class Algorand { + public nativeTokenSymbol; + protected tokenList: Token[] = []; + private static _instances: LRUCache; + private _network: string; + private _algod: Algodv2; + private _indexer: Indexer; + private _ready: boolean = false; + + constructor(network: string, nodeUrl: string, indexerUrl: string) { + this._network = network; + const config = getAlgorandConfig(network); + this.nativeTokenSymbol = config.nativeCurrencySymbol; + this._algod = new Algodv2('', nodeUrl); + this._indexer = new Indexer('', indexerUrl, 'undefined'); + } + + public get algod(): Algodv2 { + return this._algod; + } + + public get indexer(): Indexer { + return this._indexer; + } + + public get network(): string { + return this._network; + } + + public ready(): boolean { + return this._ready; + } + + public async init(): Promise { + this._ready = true; + return; + } + + async close() { + return; + } + + public static getInstance(network: string): Algorand { + const config = getAlgorandConfig(network); + if (Algorand._instances === undefined) { + Algorand._instances = new LRUCache({ + max: config.network.maxLRUCacheInstances, + }); + } + + if (!Algorand._instances.has(config.network.name)) { + if (network !== null) { + const nodeUrl = config.network.nodeURL; + const indexerUrl = config.network.indexerURL; + Algorand._instances.set( + config.network.name, + new Algorand(network, nodeUrl, indexerUrl) + ); + } else { + throw new Error( + `Algorand.getInstance received an unexpected network: ${network}.` + ); + } + } + + return Algorand._instances.get(config.network.name) as Algorand; + } + + public static getConnectedInstances(): { [name: string]: Algorand } { + const connectedInstances: { [name: string]: Algorand } = {}; + if (this._instances !== undefined) { + const keys = Array.from(this._instances.keys()); + for (const instance of keys) { + if (instance !== undefined) { + connectedInstances[instance] = this._instances.get( + instance + ) as Algorand; + } + } + } + return connectedInstances; + } + + async getCurrentBlockNumber(): Promise { + const status = await this._algod.status().do(); + return status['next-version-round']; + } + + public async getTransaction(txHash: string): Promise { + const transactionId = txHash.startsWith('0x') ? txHash.slice(2) : txHash; + let currentBlock; + let transactionData; + let transactionBlock; + let fee; + try { + transactionData = await this._algod + .pendingTransactionInformation(transactionId) + .do(); + transactionBlock = transactionData['confirmed-round']; // will be undefined if not confirmed + transactionBlock = transactionBlock ? transactionBlock : null; + fee = transactionData.txn.fee; + currentBlock = await this.getCurrentBlockNumber(); + } catch (error: any) { + if (error.status != 404) { + throw error; + } + transactionData = await this._indexer + .lookupTransactionByID(transactionId) + .do(); + currentBlock = transactionData['current-round']; + transactionBlock = transactionData.transaction['confirmed-round']; + fee = transactionData.transaction.fee; + } + return { + currentBlock, + txBlock: transactionBlock, + txHash: '0x' + transactionId, + fee, + }; + } +} diff --git a/src/chains/algorand/algorand.validators.ts b/src/chains/algorand/algorand.validators.ts new file mode 100644 index 0000000000..9362818701 --- /dev/null +++ b/src/chains/algorand/algorand.validators.ts @@ -0,0 +1,11 @@ +import { + mkRequestValidator, + RequestValidator, +} from '../../services/validators'; +import { validateNetwork } from '../ethereum/ethereum.validators'; +import { validateTxHash } from '../injective/injective.validators'; + +export const validatePollRequest: RequestValidator = mkRequestValidator([ + validateNetwork, + validateTxHash, +]); diff --git a/src/chains/injective/injective.ts b/src/chains/injective/injective.ts index 79669ce925..bcdc9d6653 100644 --- a/src/chains/injective/injective.ts +++ b/src/chains/injective/injective.ts @@ -234,10 +234,13 @@ export class Injective { public static getConnectedInstances(): { [name: string]: Injective } { const connectedInstances: { [name: string]: Injective } = {}; if (this._instances !== undefined) { - for (const instance of this._instances.keys()) { - connectedInstances[instance] = this._instances.get( - instance - ) as Injective; + const keys = Array.from(this._instances.keys()); + for (const instance of keys) { + if (instance !== undefined) { + connectedInstances[instance] = this._instances.get( + instance + ) as Injective; + } } } return connectedInstances; diff --git a/src/network/network.controllers.ts b/src/network/network.controllers.ts index 5a89028ff6..e6fb81614a 100644 --- a/src/network/network.controllers.ts +++ b/src/network/network.controllers.ts @@ -20,6 +20,7 @@ import { EthereumBase, TokenInfo } from '../chains/ethereum/ethereum-base'; import { Cronos } from '../chains/cronos/cronos'; import { Near } from '../chains/near/near'; import { Nearish, Xdcish } from '../services/common-interfaces'; +import { Algorand } from '../chains/algorand/algorand'; export async function getStatus( req: StatusRequest @@ -28,12 +29,15 @@ export async function getStatus( let connections: any[] = []; let chain: string; let chainId: number; + let network: string; let rpcUrl: string; let currentBlockNumber: number | undefined; let nativeCurrency: string; if (req.chain) { - if (req.chain === 'avalanche') { + if (req.chain == 'algorand') { + connections.push(await Algorand.getInstance(req.network as string)); + } else if (req.chain === 'avalanche') { connections.push(Avalanche.getInstance(req.network as string)); } else if (req.chain === 'binance-smart-chain') { connections.push(BinanceSmartChain.getInstance(req.network as string)); @@ -59,6 +63,11 @@ export async function getStatus( ); } } else { + const algorandConnections = Algorand.getConnectedInstances(); + connections = connections.concat( + algorandConnections ? Object.values(algorandConnections) : [] + ); + const avalancheConnections = Avalanche.getConnectedInstances(); connections = connections.concat( avalancheConnections ? Object.values(avalancheConnections) : [] @@ -109,6 +118,7 @@ export async function getStatus( } chain = connection.chain; chainId = connection.chainId; + network = connection.network; rpcUrl = connection.rpcUrl; nativeCurrency = connection.nativeTokenSymbol; @@ -120,6 +130,7 @@ export async function getStatus( statuses.push({ chain, chainId, + network, rpcUrl, currentBlockNumber, nativeCurrency, diff --git a/src/network/network.requests.ts b/src/network/network.requests.ts index 43a0628a04..e8ce46a299 100644 --- a/src/network/network.requests.ts +++ b/src/network/network.requests.ts @@ -41,6 +41,7 @@ export interface StatusRequest { export interface StatusResponse { chain: string; chainId: number; + network: string; rpcUrl: string; nativeCurrency: string; currentBlockNumber?: number; // only reachable if connected diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 4313aa6cea..51a83f3fb8 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -34,8 +34,9 @@ import { Near } from '../chains/near/near'; import { Ref } from '../connectors/ref/ref'; import { Xsswap } from '../connectors/xsswap/xsswap'; import { DexalotCLOB } from '../connectors/dexalot/dexalot'; +import { Algorand } from '../chains/algorand/algorand'; -export type ChainUnion = Ethereumish | Nearish | Injective | Xdcish; +export type ChainUnion = Algorand | Ethereumish | Nearish | Injective | Xdcish; export type Chain = T extends Ethereumish ? Ethereumish @@ -53,7 +54,8 @@ export async function getChain( ): Promise> { let chainInstance: ChainUnion; - if (chain === 'ethereum') chainInstance = Ethereum.getInstance(network); + if (chain === 'algorand') chainInstance = Algorand.getInstance(network); + else if (chain === 'ethereum') chainInstance = Ethereum.getInstance(network); else if (chain === 'avalanche') chainInstance = Avalanche.getInstance(network); else if (chain === 'polygon') chainInstance = Polygon.getInstance(network); diff --git a/src/services/schema/algorand-schema.json b/src/services/schema/algorand-schema.json new file mode 100644 index 0000000000..308e389739 --- /dev/null +++ b/src/services/schema/algorand-schema.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "networks": { + "type": "object", + "patternProperties": { + "^\\w+$": { + "type": "object", + "properties": { + "chainId": { + "type": "string" + }, + "nodeURL": { + "type": "string" + }, + "indexerURL": { + "type": "string" + } + }, + "required": [ + "chainId", + "nodeURL", + "indexerURL" + ], + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "nativeCurrencySymbol": { + "type": "string" + }, + "gasLimitEstimate": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "nativeCurrencySymbol" + ] +} diff --git a/src/templates/algorand.yml b/src/templates/algorand.yml new file mode 100644 index 0000000000..9dbc87b087 --- /dev/null +++ b/src/templates/algorand.yml @@ -0,0 +1,16 @@ +networks: + mainnet: + chainId: mainnet + nodeURL: https://xna-mainnet-api.algonode.cloud + indexerURL: https://mainnet-idx.algonode.cloud + testnet: + chainId: testnet + nodeURL: https://testnet-api.algonode.network + indexerURL: https://testnet-idx.algonode.cloud + betanet: + chainId: betanet + nodeURL: https://betanet-api.algonode.network + indexerURL: https://betanet-idx.algonode.cloud + +nativeCurrencySymbol: ALGO +gasLimitEstimate: 500000 diff --git a/src/templates/root.yml b/src/templates/root.yml index a7f9d0d803..25dc256e6a 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -4,6 +4,10 @@ configurations: configurationPath: server.yml schemaPath: server-schema.json + $namespace algorand: + configurationPath: algorand.yml + schemaPath: algorand-schema.json + $namespace ethereum: configurationPath: ethereum.yml schemaPath: ethereum-schema.json @@ -18,12 +22,12 @@ configurations: $namespace dexalot: configurationPath: dexalot.yml - schemaPath: dexalot-schema.json + schemaPath: dexalot-schema.json $namespace polygon: configurationPath: polygon.yml schemaPath: ethereum-schema.json - + $namespace defira: configurationPath: defira.yml schemaPath: defira-schema.json @@ -39,7 +43,7 @@ configurations: $namespace quickswap: configurationPath: quickswap.yml schemaPath: quickswap-schema.json - + $namespace perp: configurationPath: perp.yml schemaPath: perp-schema.json @@ -51,7 +55,7 @@ configurations: $namespace traderjoe: configurationPath: traderjoe.yml schemaPath: traderjoe-schema.json - + $namespace uniswap: configurationPath: uniswap.yml schemaPath: uniswap-schema.json @@ -77,12 +81,12 @@ configurations: schemaPath: ethereum-schema.json $namespace mad_meerkat: - configurationPath: mad_meerkat.yml - schemaPath: cronos-connector-schema.json + configurationPath: mad_meerkat.yml + schemaPath: cronos-connector-schema.json $namespace vvs: - configurationPath: vvs.yml - schemaPath: cronos-connector-schema.json + configurationPath: vvs.yml + schemaPath: cronos-connector-schema.json $namespace binance-smart-chain: configurationPath: binance-smart-chain.yml diff --git a/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index 40531d85ca..72d70a3f64 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -32,6 +32,8 @@ curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:158 curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/network/status?chain=cronos&network=mainnet" | jq +curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/network/status?chain=algorand&network=mainnet" | jq + curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT https://localhost:15888/network/config | jq curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/network_poll.json)" https://localhost:15888/network/poll | jq @@ -225,6 +227,11 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/xdc_approve.json)" https://localhost:15888/evm/approve | jq +# Algorand + +## post poll +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_poll.json)" https://localhost:15888/algorand/poll | jq + # NEAR ## get balances diff --git a/test-helpers/curl/requests/algorand_poll.json b/test-helpers/curl/requests/algorand_poll.json new file mode 100644 index 0000000000..2470220241 --- /dev/null +++ b/test-helpers/curl/requests/algorand_poll.json @@ -0,0 +1,4 @@ +{ + "network": "mainnet", + "txHash": "0xT3ZUYEJ5Y7KEDKITIXO4B5OWU4SBVGOFCPOYGZQHF2XZGENZUBQA" +} \ No newline at end of file diff --git a/test/chains/algorand/algorand.routes.test.ts b/test/chains/algorand/algorand.routes.test.ts new file mode 100644 index 0000000000..a1dbf2366f --- /dev/null +++ b/test/chains/algorand/algorand.routes.test.ts @@ -0,0 +1,255 @@ +import request from 'supertest'; +import { gatewayApp } from '../../../src/app'; +import { Algorand } from '../../../src/chains/algorand/algorand'; +import { patch, unpatch } from '../../services/patch'; +import { getAlgorandConfig } from '../../../src/chains/algorand/algorand.config'; +import { + NETWORK_ERROR_CODE, + NETWORK_ERROR_MESSAGE, + UNKNOWN_ERROR_ERROR_CODE, +} from '../../../src/services/error-handler'; + +let algorand: Algorand; +const EXPECTED_CURRENT_BLOCK_NUMBER = 100; +const CHAIN_NAME = 'algorand'; +const NETWORK = 'mainnet'; +const CONFIG = getAlgorandConfig(NETWORK); +const NATIVE_CURRENCY = CONFIG.nativeCurrencySymbol; + +beforeAll(async () => { + algorand = Algorand.getInstance(NETWORK); + patchCurrentBlockNumber(); + await algorand.init(); +}); + +beforeEach(() => { + patchCurrentBlockNumber(); +}); + +afterEach(() => { + unpatch(); +}); + +const patchCurrentBlockNumber = ( + withError: boolean = false, + instance: Algorand | undefined = undefined, + expectedCurrentBlockNumber: number = EXPECTED_CURRENT_BLOCK_NUMBER +) => { + instance = instance !== undefined ? instance : algorand; + patch(instance.algod, 'status', () => { + return withError + ? {} + : { + do: async () => { + return { 'next-version-round': expectedCurrentBlockNumber }; + }, + }; + }); +}; + +describe('GET /network/config', () => { + it('should return 200 and the result dictionary should include the algorand config', async () => { + await request(gatewayApp) + .get(`/network/config`) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + resp.body.alogrand === CONFIG; + }); + }); +}); + +describe('GET /network/status', () => { + it('should return 200 with network info when chain provided', async () => { + await request(gatewayApp) + .get(`/network/status`) + .query({ chain: CHAIN_NAME, network: NETWORK }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect({ + network: NETWORK, + currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, + nativeCurrency: NATIVE_CURRENCY, + }); + }); + it('should return 200 with a status list, if an instance is already instantiated', async () => { + await request(gatewayApp) + .get(`/network/status`) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect([ + { + network: NETWORK, + currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, + nativeCurrency: NATIVE_CURRENCY, + }, + ]); + + const testnetAlgorandChain = Algorand.getInstance('testnet'); + const testnetBlockNumber = EXPECTED_CURRENT_BLOCK_NUMBER + 1; + patchCurrentBlockNumber(false, testnetAlgorandChain, testnetBlockNumber); + + await request(gatewayApp) + .get(`/network/status`) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect([ + { + network: 'testnet', + currentBlockNumber: testnetBlockNumber, + nativeCurrency: NATIVE_CURRENCY, + }, + { + network: NETWORK, + currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, + nativeCurrency: NATIVE_CURRENCY, + }, + ]); + }); +}); + +describe('POST /algorand/poll', () => { + const expectedTransactionHash = + '0x2faeb1aa55f96c1db55f643a8cf19b0f76bf091d0b7d1b068d2e829414576362'; // noqa: mock + const expectedTransactionFee = 1000; + const expectedTransactionBlock = 99; + + it('should get a NETWORK_ERROR_CODE when the network is unavailable', async () => { + patch(algorand.algod, 'pendingTransactionInformation', () => { + const error: any = new Error('something went wrong'); + error.code = 'NETWORK_ERROR'; + throw error; + }); + + await request(gatewayApp) + .post('/algorand/poll') + .send({ + network: NETWORK, + txHash: expectedTransactionHash, + }) + .expect(503) + .expect((res) => { + expect(res.body.errorCode).toEqual(NETWORK_ERROR_CODE); + expect(res.body.message).toEqual(NETWORK_ERROR_MESSAGE); + }); + }); + + it('should get a UNKNOWN_ERROR_ERROR_CODE when an unknown error is thrown', async () => { + patch(algorand.algod, 'pendingTransactionInformation', () => { + throw new Error(); + }); + + await request(gatewayApp) + .post('/algorand/poll') + .send({ + network: NETWORK, + txHash: expectedTransactionHash, + }) + .expect(503) + .expect((res) => { + expect(res.body.errorCode).toEqual(UNKNOWN_ERROR_ERROR_CODE); + }); + }); + + it('should return a null txBlock if transaction is still in mempool', async () => { + patch(algorand.algod, 'pendingTransactionInformation', (_: any) => { + return { + do: async () => { + return { + // partial response + txn: { + fee: expectedTransactionFee, + }, + }; + }, + }; + }); + + await request(gatewayApp) + .post('/algorand/poll') + .send({ + network: NETWORK, + txHash: expectedTransactionHash, + }) + .expect(200) + .expect({ + currentBlock: EXPECTED_CURRENT_BLOCK_NUMBER, + txBlock: null, + txHash: expectedTransactionHash, + fee: expectedTransactionFee, + }); + }); + + it('should return a txBlock if transaction is in a block and still on the algod node', async () => { + patch(algorand.algod, 'pendingTransactionInformation', (_: any) => { + return { + do: async () => { + return { + // partial response + 'confirmed-round': expectedTransactionBlock, + txn: { + fee: expectedTransactionFee, + }, + }; + }, + }; + }); + + await request(gatewayApp) + .post('/algorand/poll') + .send({ + network: NETWORK, + txHash: expectedTransactionHash, + }) + .expect(200) + .expect({ + currentBlock: EXPECTED_CURRENT_BLOCK_NUMBER, + txBlock: expectedTransactionBlock, + txHash: expectedTransactionHash, + fee: expectedTransactionFee, + }); + }); + + it('should return a txBlock if transaction is in a block and no longer on the algod node', async () => { + patch(algorand.algod, 'pendingTransactionInformation', (_: any) => { + const error: any = new Error('something went wrong'); + error.message = + 'could not find the transaction in the transaction pool or in the last 1000 confirmed rounds'; + error.status = 404; + throw error; + }); + + patch(algorand.indexer, 'lookupTransactionByID', (_: any) => { + return { + do: async () => { + return { + // partial response + 'current-round': EXPECTED_CURRENT_BLOCK_NUMBER, + transaction: { + 'confirmed-round': expectedTransactionBlock, + fee: expectedTransactionFee, + }, + }; + }, + }; + }); + + await request(gatewayApp) + .post('/algorand/poll') + .send({ + network: NETWORK, + txHash: expectedTransactionHash, + }) + .expect(200) + .expect({ + currentBlock: EXPECTED_CURRENT_BLOCK_NUMBER, + txBlock: expectedTransactionBlock, + txHash: expectedTransactionHash, + fee: expectedTransactionFee, + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index a34ad199d9..e065936cfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -956,137 +956,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-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-aeae9205-e1d0-469d-b60e-9a17ad7dda3f-1679012789560/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/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-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-a22ecced-d4b5-4a01-8cfe-e37f961dc0cc-1679012789542/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/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-2e150510-3e27-4c30-8977-967f0ab818ac-1679012789543/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-2e150510-3e27-4c30-8977-967f0ab818ac-1679012789543/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-2e150510-3e27-4c30-8977-967f0ab818ac-1679012789543/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-2e150510-3e27-4c30-8977-967f0ab818ac-1679012789543/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-2e150510-3e27-4c30-8977-967f0ab818ac-1679012789543/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/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-b3aa672b-d3c4-43fb-8f22-4cce630dd3a8-1679012789542/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-b3aa672b-d3c4-43fb-8f22-4cce630dd3a8-1679012789542/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-b3aa672b-d3c4-43fb-8f22-4cce630dd3a8-1679012789542/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-b3aa672b-d3c4-43fb-8f22-4cce630dd3a8-1679012789542/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-b3aa672b-d3c4-43fb-8f22-4cce630dd3a8-1679012789542/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/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-ff0fcbb7-514d-407e-8de9-cbd793b3ce01-1679012789544/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-34d68a64-4dde-4224-9058-3bf49e4b74e8-1681216759834/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-aae53dc8-865a-4f42-9d12-f39233069c92-1679012789545/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-aae53dc8-865a-4f42-9d12-f39233069c92-1679012789545/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-76693192-fb5a-469e-8d5b-3d1dc3a604b5-1681216759840/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-76693192-fb5a-469e-8d5b-3d1dc3a604b5-1681216759840/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-56c45d75-ea6a-4998-8d92-3a5f2e2796b3-1679012789544/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-56c45d75-ea6a-4998-8d92-3a5f2e2796b3-1679012789544/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-4e4b1710-9319-469e-8e2c-ab9065e30437-1681216759836/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-4e4b1710-9319-469e-8e2c-ab9065e30437-1681216759836/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-3f87313e-d58b-4297-aeeb-9c580b38b64c-1679012789544/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-eceee310-a0ae-4e53-b265-7506c4692c18-1681216759836/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-81668bea-a325-4ebb-bcd1-feb97aaa3a74-1679012789545/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-34588a40-09ba-46a0-b922-f41a40502830-1681216759836/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-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-dae9a4dd-62a9-4c1d-be2c-ce23dcede5c3-1679012789546/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/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-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-6e712551-9660-472e-888a-fc6aac253ad4-1679012789547/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/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-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-c4bbe846-ad0c-4d98-9daa-ac4f02a63f10-1679012789548/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/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-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-b722235f-70fc-4111-ada4-a9b100e49baf-1679012789548/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/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-9a6136af-6c69-4009-89b1-49f46d8ce366-1679012789547/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-d775c637-8563-48c8-a422-029949c3eb5f-1681216759841/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1095,67 +1095,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-80109af4-d92b-4ed7-a14e-8584241e53c2-1679012789549/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-e6b8d434-69b6-41d6-b833-b546ca73a954-1681216759841/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-cd7b586b-fa4e-4729-96be-379319dae609-1679012789550/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-cd7b586b-fa4e-4729-96be-379319dae609-1679012789550/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-83accdf9-8054-43f5-9f9d-97e311f1abcc-1681216759841/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-83accdf9-8054-43f5-9f9d-97e311f1abcc-1681216759841/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-e846dd35-5e4f-46e1-b025-e5bb21cb3489-1679012789550/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-ea77eab0-5e27-4f98-8439-4c1fa0e3c833-1681216759844/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-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f491f8c5-d764-45b9-b627-eddba09bbee1-1679012789550/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/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-092261de-0e77-474b-b64d-306fd643d4e3-1679012789552/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-092261de-0e77-474b-b64d-306fd643d4e3-1679012789552/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-ba7ec4ec-9ee2-4ee7-880e-0ac8c6bd7ecd-1681216759846/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-ba7ec4ec-9ee2-4ee7-880e-0ac8c6bd7ecd-1681216759846/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-87ab3cfa-5356-449d-8445-799e00091a56-1679012789553/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-87ab3cfa-5356-449d-8445-799e00091a56-1679012789553/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9114d202-bfc1-4a55-b9ff-afa57d2842d2-1681216759842/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9114d202-bfc1-4a55-b9ff-afa57d2842d2-1681216759842/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-28f21dec-762c-47f5-b28e-4d8089d5c004-1679012789551/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-28f21dec-762c-47f5-b28e-4d8089d5c004-1679012789551/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-7c121a2e-8fdd-48a6-acfe-4c40bb9fda6d-1681216759844/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-7c121a2e-8fdd-48a6-acfe-4c40bb9fda6d-1681216759844/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-9919dd63-41c5-4593-89a3-ee9cf075af22-1679012789553/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-9919dd63-41c5-4593-89a3-ee9cf075af22-1679012789553/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-9919dd63-41c5-4593-89a3-ee9cf075af22-1679012789553/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1163,76 +1163,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-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0c390a04-c01c-4ffa-8910-0708fe437644-1679012789562/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/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-d03db7e6-8646-4efb-b683-33d614ac8665-1679012789554/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-d03db7e6-8646-4efb-b683-33d614ac8665-1679012789554/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-d03db7e6-8646-4efb-b683-33d614ac8665-1679012789554/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/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-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-07fed986-63b8-424e-982f-36724dd65337-1679012789555/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/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-46ab05bf-e418-4448-a7e2-d0d65e924a1a-1679012789554/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-46ab05bf-e418-4448-a7e2-d0d65e924a1a-1679012789554/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-46ab05bf-e418-4448-a7e2-d0d65e924a1a-1679012789554/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/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-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-6bd7c84f-1e99-4fa1-a270-49a8c014fade-1679012789554/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/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-982dafbf-b838-4696-8b35-7ee500fcae26-1679012789559/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-982dafbf-b838-4696-8b35-7ee500fcae26-1679012789559/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-982dafbf-b838-4696-8b35-7ee500fcae26-1679012789559/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-982dafbf-b838-4696-8b35-7ee500fcae26-1679012789559/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-982dafbf-b838-4696-8b35-7ee500fcae26-1679012789559/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/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-4e3c9083-1efd-4eeb-bab0-552e8e55001a-1679012789557/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-4e3c9083-1efd-4eeb-bab0-552e8e55001a-1679012789557/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-4e3c9083-1efd-4eeb-bab0-552e8e55001a-1679012789557/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-4e3c9083-1efd-4eeb-bab0-552e8e55001a-1679012789557/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-4e3c9083-1efd-4eeb-bab0-552e8e55001a-1679012789557/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/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" @@ -3330,7 +3330,7 @@ resolved "https://registry.yarnpkg.com/@perp/curie-deployments/-/curie-deployments-2022.12.20-1671509278203.tgz#16c716936741df41cd91171d3d75575eb49971d8" integrity sha512-zEHFTzg7S/4V2uRmFQZVrQDghWE8uyMYedp/tMdgKdNCiUaGbsm7c0dBAdO1HxFA49JrshhefJ9rjoaCMLvGTQ== -"@perp/sdk-curie@^1.16.0": +"@perp/sdk-curie@^1.18.0": version "1.18.0" resolved "https://registry.yarnpkg.com/@perp/sdk-curie/-/sdk-curie-1.18.0.tgz#8b1400390b066ed6109140d7c2ae7f42462e932e" integrity sha512-im2uk0xq42PzLw2OHcDmp/I9Nie1eSBD0D+xFd4N6MlJ1ilVSzex88jdZfxJJG9aKts9DLxNNzz6hFh0poDxGA== @@ -6195,6 +6195,27 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.6.3: require-from-string "^2.0.2" uri-js "^4.2.2" +algo-msgpack-with-bigint@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz#38bb717220525b3ff42232eefdcd9efb9ad405d6" + integrity sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ== + +algosdk@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/algosdk/-/algosdk-2.2.0.tgz#12f80b5f68c955b338aa5b9d5fc6cbd64ce6ea7a" + integrity sha512-FG3u/60DzjMK9Cffy9itst7WcfsTgZKfsD1r8pT33PfsA7r8NoXiUSL7cf0fNWFus6S3E14BpE2CY64VJ8KV1A== + dependencies: + algo-msgpack-with-bigint "^2.1.1" + buffer "^6.0.3" + cross-fetch "^3.1.5" + hi-base32 "^0.5.1" + js-sha256 "^0.9.0" + js-sha3 "^0.8.0" + js-sha512 "^0.8.0" + json-bigint "^1.0.0" + tweetnacl "^1.0.3" + vlq "^2.0.4" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -9556,36 +9577,36 @@ ethereumjs-vm@^2.3.4: "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-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5711428f-e992-4536-a490-8b8fb02e426c-1679012789513/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" @@ -10969,6 +10990,11 @@ hexoid@^1.0.0: resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== +hi-base32@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/hi-base32/-/hi-base32-0.5.1.tgz#1279f2ddae2673219ea5870c2121d2a33132857e" + integrity sha512-EmBBpvdYh/4XxsnUybsPag6VikPYnN30td+vQk+GI3qpahVEG9+gTkG0aXVxTjBqQ5T6ijbWIu77O+C5WFWsnA== + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -12256,6 +12282,11 @@ js-sha3@0.8.0, js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== +js-sha512@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha512/-/js-sha512-0.8.0.tgz#dd22db8d02756faccf19f218e3ed61ec8249f7d4" + integrity sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -12334,6 +12365,13 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== + dependencies: + bignumber.js "^9.0.0" + json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -17595,6 +17633,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vlq@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/vlq/-/vlq-2.0.4.tgz#6057b85729245b9829e3cc7755f95b228d4fe041" + integrity sha512-aodjPa2wPQFkra1G8CzJBTHXhgk3EVSwxSWXNPr1fgdFLUb8kvLV1iEb6rFgasIsjP82HWI6dsb5Io26DDnasA== + vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" From 117742c37afa3b28179d827ada3636d1369d86fc Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 13 Apr 2023 13:43:40 +0700 Subject: [PATCH 02/23] (feat) Adds algorand swagger docs --- docs/swagger/algorand-routes.yml | 20 +++ docs/swagger/definitions.yml | 164 ++++++++++++++--------- docs/swagger/swagger.yml | 4 +- src/app.ts | 1 + src/chains/algorand/algorand.requests.ts | 2 +- src/chains/algorand/algorand.ts | 2 + 6 files changed, 126 insertions(+), 67 deletions(-) create mode 100644 docs/swagger/algorand-routes.yml diff --git a/docs/swagger/algorand-routes.yml b/docs/swagger/algorand-routes.yml new file mode 100644 index 0000000000..da79544e3e --- /dev/null +++ b/docs/swagger/algorand-routes.yml @@ -0,0 +1,20 @@ +paths: + /algorand/poll: + post: + tags: + - 'algorand' + summary: 'Poll the status of a transaction' + consumes: + - 'application/json' + produces: + - 'application/json' + parameters: + - in: 'body' + name: 'body' + required: true + schema: + $ref: '#/definitions/AlgorandPollRequest' + responses: + '200': + schema: + $ref: '#/definitions/AlgorandPollResponse' \ No newline at end of file diff --git a/docs/swagger/definitions.yml b/docs/swagger/definitions.yml index 9908ba2c22..576662ecc5 100644 --- a/docs/swagger/definitions.yml +++ b/docs/swagger/definitions.yml @@ -64,7 +64,7 @@ definitions: tokenSymbols: type: 'array' items: 'string' - example: ['WETH', 'DAI'] + example: [ 'WETH', 'DAI' ] chain: type: 'string' example: 'ethereum' @@ -117,7 +117,7 @@ definitions: tokenSymbols: type: 'array' items: 'string' - example: ['WETH', 'DAI'] + example: [ 'WETH', 'DAI' ] chain: type: 'string' example: 'ethereum' @@ -293,34 +293,34 @@ definitions: example: '{"type": 2,"chainId": 42,"nonce": 129,"maxPriorityFeePerGas": "94000000000","maxFeePerGas": "94000000000","gasPrice": null,"gasLimit": "100000","to": "0xd0A1E359811322d97991E03f863a0C30C2cF029C","value": "0","data": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","accessList": [],"hash": "0xa321bbe8888c3bc88ecb1ad4f03f22a71e6f5715dfcb19e0a2dca9036c981b6d","v": 1,"r": "0x47c517271885b7041d81bcd65cd050a5d6be3fbd67a8f1660ac8d7e68fc8221f","s": "0x7c62e114b2cb0eae6236b597fb4aacb01c51e56afd7f734e6039d83aa400ba82","from": "0xFaA12FD102FE8623C9299c72B03E45107F2772B5","confirmations": 0}' # noqa: documentation InjectivePollResponse: - type: 'object' - required: - - 'blockNumber' - - 'hash' - - 'gasWanted' - - 'gasLimit' - - 'gasUsed' - - 'sequences' - properties: - blockNumber: - type: 'number' - example: 123456 - hash: - type: 'string' - example: '0xaaaaaaaaaabbbb' - gasWanted: - type: 'number' - example: 1000000 - gasLimit: - type: 'number' - example: 2000000 - gasUsed: - type: 'number' - example: 1000000 - sequences: - type: 'array' - items: 'number' - example: [1,2] + type: 'object' + required: + - 'blockNumber' + - 'hash' + - 'gasWanted' + - 'gasLimit' + - 'gasUsed' + - 'sequences' + properties: + blockNumber: + type: 'number' + example: 123456 + hash: + type: 'string' + example: '0xaaaaaaaaaabbbb' + gasWanted: + type: 'number' + example: 1000000 + gasLimit: + type: 'number' + example: 2000000 + gasUsed: + type: 'number' + example: 1000000 + sequences: + type: 'array' + items: 'number' + example: [ 1,2 ] InjectivePollRequest: type: 'object' @@ -666,7 +666,7 @@ definitions: walletAddresses: type: 'array' items: 'string' - example: ['0xd0A1E359811322d97991E03f863a0C30C2cF029C', '0xd0A1E359811322d97991E03f863a0C30C2XXXXXX'] + example: [ '0xd0A1E359811322d97991E03f863a0C30C2cF029C', '0xd0A1E359811322d97991E03f863a0C30C2XXXXXX' ] GetWalletSignRequest: type: 'object' @@ -744,7 +744,7 @@ definitions: tokenSymbols: type: 'array' items: 'string' - example: ['ATOM', 'NETA'] + example: [ 'ATOM', 'NETA' ] CosmosPollRequest: type: 'object' @@ -1214,7 +1214,7 @@ definitions: example: 5 prices: type: 'object' - example: ['1', '2', '3'] + example: [ '1', '2', '3' ] PerpPairsRequest: @@ -1254,7 +1254,7 @@ definitions: pairs: type: 'array' items: 'string' - example: ['AAVEUSD', 'PERPUSD', 'BTCUSD'] + example: [ 'AAVEUSD', 'PERPUSD', 'BTCUSD' ] PerpPriceRequest: type: 'object' @@ -1625,24 +1625,24 @@ definitions: type: 'string' ClobMarketsRequest: - type: 'object' - required: - - 'chain' - - 'network' - - 'connector' - properties: - market: - type: 'string' - example: 'AAVE-USDT' - chain: - type: 'string' - example: 'injective' - network: - type: 'string' - example: 'mainnet' - connector: - type: 'string' - example: 'injective' + type: 'object' + required: + - 'chain' + - 'network' + - 'connector' + properties: + market: + type: 'string' + example: 'AAVE-USDT' + chain: + type: 'string' + example: 'injective' + network: + type: 'string' + example: 'mainnet' + connector: + type: 'string' + example: 'injective' ClobMarketResponse: type: 'object' @@ -1934,24 +1934,24 @@ definitions: createOrderParams: type: 'array' items: 'object' - example: [{ - market: 'AAVE-USDT', - price: '2', - amount: '0.10', - side: 'SELL', - orderType: 'LIMIT', - }, + example: [ { + market: 'AAVE-USDT', + price: '2', + amount: '0.10', + side: 'SELL', + orderType: 'LIMIT', + }, { price: '3', amount: '0.10', side: 'SELL', - }] + } ] cancelOrderParams: type: 'array' items: 'object' example: [ - {market: 'AAVE-USDT', orderId: '0x...'}, - {market: 'AAVE-USDT', orderId: '0x...'}, + { market: 'AAVE-USDT', orderId: '0x...' }, + { market: 'AAVE-USDT', orderId: '0x...' }, ] ClobBatchOrdersResponse: @@ -1974,7 +1974,7 @@ definitions: txHash: type: 'string' example: '0x...' - + TransferToSubAccountRequest: type: 'object' required: @@ -1990,7 +1990,7 @@ definitions: example: 'injective' network: type: 'string' - example: 'mainnet' + example: 'mainnet' address: type: 'string' example: '0x...' @@ -2015,7 +2015,7 @@ definitions: tokenSymbols: type: 'array' items: 'string' - example: ["NEAR", "ETH", "AURORA"] + example: [ "NEAR", "ETH", "AURORA" ] chain: type: 'string' example: 'near' @@ -2098,3 +2098,37 @@ definitions: txReceipt: type: 'object' + AlgorandPollRequest: + type: 'object' + required: + - 'network' + - 'txHash' + properties: + network: + type: 'string' + example: 'testnet' + txHash: + type: 'string' + example: 'T3ZUYEJ5Y7KEDKITIXO4B5OWU4SBVGOFCPOYGZQHF2XZGENZUBQA' + + AlgorandPollResponse: + type: 'object' + required: + - 'currentBlock' + - 'txBlock' + - 'txHash' + - 'fee' + properties: + currentBlock: + type: 'integer' + example: 28243911 + txBlock: + type: 'integer' + example: 28243910 + txHash: + type: 'string' + example: 'T3ZUYEJ5Y7KEDKITIXO4B5OWU4SBVGOFCPOYGZQHF2XZGENZUBQA' + fee: + type: 'integer' + example: 1000 + diff --git a/docs/swagger/swagger.yml b/docs/swagger/swagger.yml index c87aa2c44a..91bddc7f74 100644 --- a/docs/swagger/swagger.yml +++ b/docs/swagger/swagger.yml @@ -14,7 +14,7 @@ host: 'localhost:15888' tags: - name: 'system' - description: 'Get information about the currently running Gateway program' + description: 'Get information about the currently running Gateway program' - name: 'network' description: 'Get information about specific networks' - name: 'wallet' @@ -27,6 +27,8 @@ tags: description: 'Interact with AMM LP contracts' - name: 'evm' description: 'Interact with EVM based blockchains' + - name: 'algorand' + description: 'Interact with the Algorand blockchain' - name: 'cosmos' description: 'Interact with the Cosmos blockchain' - name: 'near' diff --git a/src/app.ts b/src/app.ts index 460e1757e5..7e34909478 100644 --- a/src/app.ts +++ b/src/app.ts @@ -103,6 +103,7 @@ export const swaggerDocument = SwaggerManager.generateSwaggerJson( './docs/swagger/amm-liquidity-routes.yml', './docs/swagger/evm-routes.yml', './docs/swagger/network-routes.yml', + './docs/swagger/algorand-routes.yml', './docs/swagger/near-routes.yml', './docs/swagger/cosmos-routes.yml', './docs/swagger/injective-routes.yml', diff --git a/src/chains/algorand/algorand.requests.ts b/src/chains/algorand/algorand.requests.ts index bdb1ad019c..3eb6829962 100644 --- a/src/chains/algorand/algorand.requests.ts +++ b/src/chains/algorand/algorand.requests.ts @@ -7,5 +7,5 @@ export type PollResponse = { currentBlock: number; txBlock: number | null; txHash: string; - fee: string; + fee: number; }; diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index a661610594..e52c2f63dc 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -38,6 +38,7 @@ export class Algorand { } public async init(): Promise { + // todo: common EVM-like interface this._ready = true; return; } @@ -88,6 +89,7 @@ export class Algorand { } async getCurrentBlockNumber(): Promise { + // todo: common EVM-like interface const status = await this._algod.status().do(); return status['next-version-round']; } From ce50c49aa9a9b9b8d294f4e2e000cf359d6a00f1 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Sun, 16 Apr 2023 13:42:12 +0700 Subject: [PATCH 03/23] (feat) Implements Algorand wallet and balance endpoints --- docs/swagger/algorand-routes.yml | 21 +- src/chains/algorand/algorand.config.ts | 8 + src/chains/algorand/algorand.controller.ts | 31 ++ src/chains/algorand/algorand.routes.ts | 34 +- src/chains/algorand/algorand.ts | 160 +++++++- src/chains/algorand/algorand.validators.ts | 36 +- src/services/schema/algorand-schema.json | 10 +- src/services/wallet/wallet.controllers.ts | 13 +- src/services/wallet/wallet.validators.ts | 17 +- src/templates/algorand.yml | 8 +- test-helpers/curl/curl.sh | 7 + .../curl/requests/add_algorand_key.json | 5 + .../curl/requests/algorand_balances.json | 8 + .../curl/requests/network_balances.json | 4 +- .../curl/requests/remove_algorand_key.json | 4 + test/chains/algorand/algorand.routes.test.ts | 278 ++++++++++++- test/services/patch.ts | 26 ++ yarn.lock | 364 +++++++++--------- 18 files changed, 820 insertions(+), 214 deletions(-) create mode 100644 test-helpers/curl/requests/add_algorand_key.json create mode 100644 test-helpers/curl/requests/algorand_balances.json create mode 100644 test-helpers/curl/requests/remove_algorand_key.json diff --git a/docs/swagger/algorand-routes.yml b/docs/swagger/algorand-routes.yml index da79544e3e..fc4248a793 100644 --- a/docs/swagger/algorand-routes.yml +++ b/docs/swagger/algorand-routes.yml @@ -17,4 +17,23 @@ paths: responses: '200': schema: - $ref: '#/definitions/AlgorandPollResponse' \ No newline at end of file + $ref: '#/definitions/AlgorandPollResponse' + /algorand/balances: + post: + tags: + - 'algorand' + summary: 'Get the balances of an account' + consumes: + - 'application/json' + produces: + - 'application/json' + parameters: + - in: 'body' + name: 'body' + required: true + schema: + $ref: '#/definitions/BalancesRequest' + responses: + '200': + schema: + $ref: '#/definitions/BalancesResponse' \ No newline at end of file diff --git a/src/chains/algorand/algorand.config.ts b/src/chains/algorand/algorand.config.ts index ef77e5e813..e79ab83cd8 100644 --- a/src/chains/algorand/algorand.config.ts +++ b/src/chains/algorand/algorand.config.ts @@ -4,6 +4,8 @@ export interface NetworkConfig { name: string; nodeURL: string; indexerURL: string; + assetListType: string; + assetListSource: string; maxLRUCacheInstances: number; } @@ -22,6 +24,12 @@ export function getAlgorandConfig(network: string): Config { indexerURL: ConfigManagerV2.getInstance().get( 'algorand.networks.' + network + '.indexerURL' ), + assetListType: ConfigManagerV2.getInstance().get( + 'algorand.networks.' + network + '.assetListType' + ), + assetListSource: ConfigManagerV2.getInstance().get( + 'algorand.networks.' + network + '.assetListSource' + ), maxLRUCacheInstances: 10, }, nativeCurrencySymbol: ConfigManagerV2.getInstance().get( diff --git a/src/chains/algorand/algorand.controller.ts b/src/chains/algorand/algorand.controller.ts index d93da2ee66..def95002ed 100644 --- a/src/chains/algorand/algorand.controller.ts +++ b/src/chains/algorand/algorand.controller.ts @@ -1,5 +1,10 @@ import { PollRequest, PollResponse } from '../algorand/algorand.requests'; import { Algorand } from './algorand'; +import { + BalanceRequest, + BalanceResponse, +} from '../../network/network.requests'; +import { latency } from '../../services/base'; export async function poll( algorand: Algorand, @@ -7,3 +12,29 @@ export async function poll( ): Promise { return await algorand.getTransaction(req.txHash); } + +export async function balances( + chain: Algorand, + request: BalanceRequest +): Promise { + const initTime = Date.now(); + const balances: Record = {}; + + const account = await chain.getAccountFromAddress(request.address); + + if (request.tokenSymbols.includes(chain.nativeTokenSymbol)) { + balances[chain.nativeTokenSymbol] = await chain.getNativeBalance(account); + } + + for (const token of request.tokenSymbols) { + if (token === chain.nativeTokenSymbol) continue; + balances[token] = await chain.getAssetBalance(account, token); + } + + return { + network: request.network, + timestamp: initTime, + latency: latency(initTime, Date.now()), + balances: balances, + }; +} diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts index bf69c3c03c..50c6ec37b1 100644 --- a/src/chains/algorand/algorand.routes.ts +++ b/src/chains/algorand/algorand.routes.ts @@ -1,12 +1,19 @@ /* eslint-disable no-inner-declarations */ /* eslint-disable @typescript-eslint/ban-types */ -import { Response, Router, Request } from 'express'; +import { Response, Router, Request, NextFunction } from 'express'; import { asyncHandler } from '../../services/error-handler'; import { PollRequest, PollResponse } from './algorand.requests'; -import { validatePollRequest } from './algorand.validators'; +import { + validateAlgorandBalanceRequest, + validateAlgorandPollRequest, +} from './algorand.validators'; import { getChain } from '../../services/connection-manager'; import { Algorand } from './algorand'; -import { poll } from './algorand.controller'; +import { balances, poll } from './algorand.controller'; +import { + BalanceRequest, + BalanceResponse, +} from '../../network/network.requests'; export namespace AlgorandRoutes { export const router = Router(); @@ -18,10 +25,29 @@ export namespace AlgorandRoutes { req: Request<{}, {}, PollRequest>, res: Response ) => { - validatePollRequest(req.body); + validateAlgorandPollRequest(req.body); const algorand = await getChain('algorand', req.body.network); res.status(200).json(await poll(algorand, req.body)); } ) ); + + router.post( + '/balances', + asyncHandler( + async ( + req: Request<{}, {}, BalanceRequest>, + res: Response, + _next: NextFunction + ) => { + validateAlgorandBalanceRequest(req.body); + const chain = await getChain( + req.body.chain, + req.body.network + ); + + res.status(200).json(await balances(chain, req.body)); + } + ) + ); } diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index e52c2f63dc..35a0ef8c2b 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -1,24 +1,53 @@ import LRUCache from 'lru-cache'; import { getAlgorandConfig } from './algorand.config'; -import { Algodv2, Indexer } from 'algosdk'; -import { Token } from '../cosmos/cosmos-base'; +import { Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; import { PollResponse } from './algorand.requests'; +import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; +import { TokenListType, walletPath } from '../../services/base'; +import fse from 'fs-extra'; +import { ConfigManagerCertPassphrase } from '../../services/config-manager-cert-passphrase'; +import axios from 'axios'; +import { promises as fs } from 'fs'; + +type AssetListType = TokenListType; + +export interface AlgorandAccount { + address: string; + mnemonic: string; +} + +export interface AlgorandAsset { + symbol: string; + assetId: number; + decimals: number; +} export class Algorand { public nativeTokenSymbol; - protected tokenList: Token[] = []; + private _assetMap: Record = {}; private static _instances: LRUCache; + private _chain: string = 'algorand'; private _network: string; private _algod: Algodv2; private _indexer: Indexer; private _ready: boolean = false; + private _assetListType: AssetListType; + private _assetListSource: string; - constructor(network: string, nodeUrl: string, indexerUrl: string) { + constructor( + network: string, + nodeUrl: string, + indexerUrl: string, + assetListType: AssetListType, + assetListSource: string + ) { this._network = network; const config = getAlgorandConfig(network); this.nativeTokenSymbol = config.nativeCurrencySymbol; this._algod = new Algodv2('', nodeUrl); this._indexer = new Indexer('', indexerUrl, 'undefined'); + this._assetListType = assetListType; + this._assetListSource = assetListSource; } public get algod(): Algodv2 { @@ -39,6 +68,7 @@ export class Algorand { public async init(): Promise { // todo: common EVM-like interface + await this.loadAssets(); this._ready = true; return; } @@ -59,9 +89,17 @@ export class Algorand { if (network !== null) { const nodeUrl = config.network.nodeURL; const indexerUrl = config.network.indexerURL; + const assetListType = config.network.assetListType as TokenListType; + const assetListSource = config.network.assetListSource; Algorand._instances.set( config.network.name, - new Algorand(network, nodeUrl, indexerUrl) + new Algorand( + network, + nodeUrl, + indexerUrl, + assetListType, + assetListSource + ) ); } else { throw new Error( @@ -126,4 +164,116 @@ export class Algorand { fee, }; } + + public getAccountFromPrivateKey(mnemonic: string): AlgorandAccount { + const account = mnemonicToSecretKey(mnemonic); + const address = account.addr; + + return { + address, + mnemonic, + }; + } + + async getAccountFromAddress(address: string): Promise { + const path = `${walletPath}/${this._chain}`; + const encryptedMnemonic: string = await fse.readFile( + `${path}/${address}.json`, + 'utf8' + ); + const passphrase = ConfigManagerCertPassphrase.readPassphrase(); + if (!passphrase) { + throw new Error('missing passphrase'); + } + const mnemonic = this.decrypt(encryptedMnemonic, passphrase); + + return this.getAccountFromPrivateKey(mnemonic); + } + + public encrypt(mnemonic: string, password: string): string { + const iv = randomBytes(16); + const key = Buffer.alloc(32); + key.write(password); + + const cipher = createCipheriv('aes-256-cbc', key, iv); + + const encrypted = Buffer.concat([cipher.update(mnemonic), cipher.final()]); + + return `${iv.toString('hex')}:${encrypted.toString('hex')}`; + } + + public decrypt(encryptedMnemonic: string, password: string): string { + const [iv, encryptedKey] = encryptedMnemonic.split(':'); + const key = Buffer.alloc(32); + key.write(password); + + const decipher = createDecipheriv( + 'aes-256-cbc', + key, + Buffer.from(iv, 'hex') + ); + + const decrpyted = Buffer.concat([ + decipher.update(Buffer.from(encryptedKey, 'hex')), + decipher.final(), + ]); + + return decrpyted.toString(); + } + + public async getAssetBalance( + account: AlgorandAccount, + assetName: string + ): Promise { + const algorandAsset = this._assetMap[assetName]; + let balance; + + try { + const response = await this._algod + .accountAssetInformation(account.address, algorandAsset.assetId) + .do(); + balance = response['asset-holding'].amount; + } catch (error: any) { + if (!error.message.includes('account asset info not found')) { + throw error; + } + balance = 0; + } + + const amount = balance * parseFloat(`1e-${algorandAsset.decimals}`); + return amount.toString(); + } + + public async getNativeBalance(account: AlgorandAccount): Promise { + const accountInfo = await this._algod + .accountInformation(account.address) + .do(); + const algoAsset = this._assetMap[this.nativeTokenSymbol]; + return ( + accountInfo.amount * parseFloat(`1e-${algoAsset.decimals}`) + ).toString(); + } + + private async loadAssets(): Promise { + const assetData = await this.getAssetData(); + for (const result of assetData) { + this._assetMap[result.unit_name] = { + symbol: result.unit_name, + assetId: +result.id, + decimals: result.decimals, + }; + } + } + + private async getAssetData(): Promise { + let assetData; + if (this._assetListType === 'URL') { + const response = await axios.get(this._assetListSource); + assetData = response.data.results; + } else { + const data = JSON.parse(await fs.readFile(this._assetListSource, 'utf8')); + assetData = data.results; + } + return assetData; + } } diff --git a/src/chains/algorand/algorand.validators.ts b/src/chains/algorand/algorand.validators.ts index 9362818701..2e4d8751b0 100644 --- a/src/chains/algorand/algorand.validators.ts +++ b/src/chains/algorand/algorand.validators.ts @@ -1,11 +1,37 @@ import { mkRequestValidator, + mkValidator, RequestValidator, + validateTokenSymbols, + Validator, } from '../../services/validators'; -import { validateNetwork } from '../ethereum/ethereum.validators'; +import { + invalidAddressError, + validateNetwork, +} from '../ethereum/ethereum.validators'; import { validateTxHash } from '../injective/injective.validators'; +import { invalidChainError } from '../near/near.validators'; -export const validatePollRequest: RequestValidator = mkRequestValidator([ - validateNetwork, - validateTxHash, -]); +const validateAlgorandChain: Validator = mkValidator( + 'chain', + invalidChainError, + (val) => typeof val === 'string' && val === 'algorand' +); + +const validateAlgorandAddress: Validator = mkValidator( + 'address', + invalidAddressError, + (val) => typeof val === 'string' && /[A-Z0-9]{58}/.test(val) +); + +export const validateAlgorandPollRequest: RequestValidator = mkRequestValidator( + [validateNetwork, validateTxHash] +); + +export const validateAlgorandBalanceRequest: RequestValidator = + mkRequestValidator([ + validateAlgorandChain, + validateNetwork, + validateAlgorandAddress, + validateTokenSymbols, + ]); diff --git a/src/services/schema/algorand-schema.json b/src/services/schema/algorand-schema.json index 308e389739..c45ea9f9ab 100644 --- a/src/services/schema/algorand-schema.json +++ b/src/services/schema/algorand-schema.json @@ -16,12 +16,20 @@ }, "indexerURL": { "type": "string" + }, + "assetListType": { + "type": "string" + }, + "assetListSource": { + "type": "string" } }, "required": [ "chainId", "nodeURL", - "indexerURL" + "indexerURL", + "assetListType", + "assetListSource" ], "additionalProperties": false } diff --git a/src/services/wallet/wallet.controllers.ts b/src/services/wallet/wallet.controllers.ts index 35d4047019..026300f049 100644 --- a/src/services/wallet/wallet.controllers.ts +++ b/src/services/wallet/wallet.controllers.ts @@ -33,6 +33,7 @@ import { EthereumBase } from '../../chains/ethereum/ethereum-base'; import { Near } from '../../chains/near/near'; import { getChain } from '../connection-manager'; import { Ethereumish } from '../common-interfaces'; +import { Algorand } from '../../chains/algorand/algorand'; export function convertXdcAddressToEthAddress(publicKey: string): string { return publicKey.length === 43 && publicKey.slice(0, 3) === 'xdc' @@ -41,6 +42,7 @@ export function convertXdcAddressToEthAddress(publicKey: string): string { } const walletPath = './conf/wallets'; + export async function mkdirIfDoesNotExist(path: string): Promise { const exists = await fse.pathExists(path); if (!exists) { @@ -55,11 +57,13 @@ export async function addWallet( if (!passphrase) { throw new Error('There is no passphrase'); } - let connection: EthereumBase | Near | Cosmos | Injective | Xdc; + let connection: Algorand | EthereumBase | Near | Cosmos | Injective | Xdc; let address: string | undefined; let encryptedPrivateKey: string | undefined; - if (req.chain === 'ethereum') { + if (req.chain === 'algorand') { + connection = Algorand.getInstance(req.network); + } else if (req.chain === 'ethereum') { connection = Ethereum.getInstance(req.network); } else if (req.chain === 'avalanche') { connection = Avalanche.getInstance(req.network); @@ -98,7 +102,10 @@ export async function addWallet( } try { - if (connection instanceof EthereumBase) { + if (connection instanceof Algorand) { + address = connection.getAccountFromPrivateKey(req.privateKey).address; + encryptedPrivateKey = connection.encrypt(req.privateKey, passphrase); + } else if (connection instanceof EthereumBase) { address = connection.getWalletFromPrivateKey(req.privateKey).address; encryptedPrivateKey = await connection.encrypt( req.privateKey, diff --git a/src/services/wallet/wallet.validators.ts b/src/services/wallet/wallet.validators.ts index e262982fc2..65da5f34fe 100644 --- a/src/services/wallet/wallet.validators.ts +++ b/src/services/wallet/wallet.validators.ts @@ -5,8 +5,12 @@ import { Validator, mkSelectingValidator, } from '../validators'; + const { fromBase64 } = require('@cosmjs/encoding'); +export const invalidAlgorandPrivateKeyOrMnemonicError: string = + 'The privateKey param is not a valid Algorand private key or mnemonic.'; + export const invalidEthPrivateKeyError: string = 'The privateKey param is not a valid Ethereum private key (64 hexadecimal characters).'; @@ -16,6 +20,11 @@ export const invalidNearPrivateKeyError: string = export const invalidCosmosPrivateKeyError: string = 'The privateKey param is not a valid Cosmos private key.'; +export const isAlgorandPrivateKeyOrMnemonic = (str: string): boolean => { + const parts = str.split(' '); + return parts.length === 25; +}; + // test if a string matches the shape of an Ethereum private key export const isEthPrivateKey = (str: string): boolean => { return /^(0x|xdc)?[a-fA-F0-9]{64}$/.test(str); @@ -42,6 +51,11 @@ export const validatePrivateKey: Validator = mkSelectingValidator( 'chain', (req, key) => req[key], { + algorand: mkValidator( + 'privateKey', + invalidAlgorandPrivateKeyOrMnemonicError, + (val) => typeof val === 'string' && isAlgorandPrivateKeyOrMnemonic(val) + ), ethereum: mkValidator( 'privateKey', invalidEthPrivateKeyError, @@ -114,7 +128,8 @@ export const validateChain: Validator = mkValidator( invalidChainError, (val) => typeof val === 'string' && - (val === 'ethereum' || + (val === 'algorand' || + val === 'ethereum' || val === 'avalanche' || val === 'polygon' || val === 'xdc' || diff --git a/src/templates/algorand.yml b/src/templates/algorand.yml index 9dbc87b087..f675a41ae1 100644 --- a/src/templates/algorand.yml +++ b/src/templates/algorand.yml @@ -3,14 +3,14 @@ networks: chainId: mainnet nodeURL: https://xna-mainnet-api.algonode.cloud indexerURL: https://mainnet-idx.algonode.cloud + assetListType: URL + assetListSource: 'https://mainnet.analytics.tinyman.org/api/v1/assets/?limit=1000&is_pool_member=true&with_statistics=false&verified_only=true' testnet: chainId: testnet nodeURL: https://testnet-api.algonode.network indexerURL: https://testnet-idx.algonode.cloud - betanet: - chainId: betanet - nodeURL: https://betanet-api.algonode.network - indexerURL: https://betanet-idx.algonode.cloud + assetListType: URL + assetListSource: 'https://testnet.analytics.tinyman.org/api/v1/assets/?limit=1000&is_pool_member=true&with_statistics=false&verified_only=true' nativeCurrencySymbol: ALGO gasLimitEstimate: 500000 diff --git a/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index 72d70a3f64..4d09202afb 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -57,6 +57,8 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app # Wallet ## add private keys +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/add_algorand_key.json)" https://localhost:15888/wallet/add | jq + curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/add_ethereum_key.json)" https://localhost:15888/wallet/add | jq curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/add_avalanche_key.json)" https://localhost:15888/wallet/add | jq @@ -82,6 +84,8 @@ curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT https://localhost:1588 curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/wallet/sign?chain=ethereum&network=mainnet&address=$ETH_ADDRESS&message=messageToBeSigned" | jq ## remove keys +curl -s -X DELETE -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/remove_algorand_key.json)" https://localhost:15888/wallet/remove | jq + curl -s -X DELETE -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/remove_ethereum_key.json)" https://localhost:15888/wallet/remove | jq curl -s -X DELETE -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/remove_avalanche_key.json)" https://localhost:15888/wallet/remove | jq @@ -232,6 +236,9 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app ## post poll curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_poll.json)" https://localhost:15888/algorand/poll | jq +## get balances +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_balances.json)" https://localhost:15888/algorand/balances | jq + # NEAR ## get balances diff --git a/test-helpers/curl/requests/add_algorand_key.json b/test-helpers/curl/requests/add_algorand_key.json new file mode 100644 index 0000000000..ffa8aec259 --- /dev/null +++ b/test-helpers/curl/requests/add_algorand_key.json @@ -0,0 +1,5 @@ +{ + "privateKey": "$ALGORAND_MNEMONIC", + "chain": "algorand", + "network": "mainnet" +} diff --git a/test-helpers/curl/requests/algorand_balances.json b/test-helpers/curl/requests/algorand_balances.json new file mode 100644 index 0000000000..691b7376c8 --- /dev/null +++ b/test-helpers/curl/requests/algorand_balances.json @@ -0,0 +1,8 @@ +{ + "chain": "algorand", + "network": "mainnet", + "address": "FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA", + "tokenSymbols": [ + "ALGO" + ] +} \ No newline at end of file diff --git a/test-helpers/curl/requests/network_balances.json b/test-helpers/curl/requests/network_balances.json index 7298b9fb75..8c6c198643 100644 --- a/test-helpers/curl/requests/network_balances.json +++ b/test-helpers/curl/requests/network_balances.json @@ -2,5 +2,7 @@ "chain": "avalanche", "network": "avalanche", "address": "$AVALANCHE_ADDRESS", - "tokenSymbols": ["WAVAX"] + "tokenSymbols": [ + "USDC" + ] } diff --git a/test-helpers/curl/requests/remove_algorand_key.json b/test-helpers/curl/requests/remove_algorand_key.json new file mode 100644 index 0000000000..b1aeef7e04 --- /dev/null +++ b/test-helpers/curl/requests/remove_algorand_key.json @@ -0,0 +1,4 @@ +{ + "address": "FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA", + "chain": "algorand" +} diff --git a/test/chains/algorand/algorand.routes.test.ts b/test/chains/algorand/algorand.routes.test.ts index a1dbf2366f..9268056e42 100644 --- a/test/chains/algorand/algorand.routes.test.ts +++ b/test/chains/algorand/algorand.routes.test.ts @@ -1,32 +1,71 @@ import request from 'supertest'; import { gatewayApp } from '../../../src/app'; import { Algorand } from '../../../src/chains/algorand/algorand'; -import { patch, unpatch } from '../../services/patch'; +import { + patch, + setUpTempDir, + tearDownTempDir, + unpatch, +} from '../../services/patch'; import { getAlgorandConfig } from '../../../src/chains/algorand/algorand.config'; import { NETWORK_ERROR_CODE, NETWORK_ERROR_MESSAGE, UNKNOWN_ERROR_ERROR_CODE, } from '../../../src/services/error-handler'; +import { ConfigManagerCertPassphrase } from '../../../src/services/config-manager-cert-passphrase'; let algorand: Algorand; const EXPECTED_CURRENT_BLOCK_NUMBER = 100; const CHAIN_NAME = 'algorand'; -const NETWORK = 'mainnet'; +const NETWORK = 'testnet'; const CONFIG = getAlgorandConfig(NETWORK); const NATIVE_CURRENCY = CONFIG.nativeCurrencySymbol; +const ACCOUNT_ADDRESS = + 'FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA'; // noqa: mock +const MNEUMONIC = + 'share' + + ' general' + + ' gasp' + + ' trial' + + ' until' + + ' jelly' + + ' mobile' + + ' category' + + ' viable' + + ' meadow' + + ' civil' + + ' pigeon' + + ' dream' + + ' vehicle' + + ' process' + + ' crack' + + ' devote' + + ' outside' + + ' ankle' + + ' mobile' + + ' analyst' + + ' stomach' + + ' dignity' + + ' above' + + ' vast'; // mock +const ALGO_DECIMALS = 6; +const USDC_DECIMALS = 6; beforeAll(async () => { algorand = Algorand.getInstance(NETWORK); + patchGetAssetData(); patchCurrentBlockNumber(); await algorand.init(); }); beforeEach(() => { + setUpTempDir('algorand-tests'); patchCurrentBlockNumber(); }); afterEach(() => { + tearDownTempDir(); unpatch(); }); @@ -47,6 +86,48 @@ const patchCurrentBlockNumber = ( }); }; +const patchGetAssetData = () => { + patch(algorand, 'getAssetData', async () => { + return [ + { + id: '0', + is_liquidity_token: false, + name: 'Algorand', + unit_name: 'ALGO', + decimals: ALGO_DECIMALS, + total_amount: null, + url: 'https://algorand.org', + is_verified: true, + clawback_address: '', + liquidity_in_usd: '744662.849801994861', + last_day_volume_in_usd: '58.407348762305', + last_week_volume_in_usd: '2261.387003578427', + last_day_price_change: '-0.156310', + is_stable: false, + is_wrapped: false, + }, + { + id: '10458941', + is_liquidity_token: false, + name: 'USDC', + unit_name: 'USDC', + decimals: USDC_DECIMALS, + total_amount: '18446744073709551615', + url: 'https://centre.io', + is_verified: true, + clawback_address: + 'XM2W7VZODABS6RAL3FENBRKCOF6XLOQZZWIVVZTBYCVH2ADRYKN53CQLXM', + liquidity_in_usd: '210464.272543000000', + last_day_volume_in_usd: '8.000000000000', + last_week_volume_in_usd: '6198.073873000000', + last_day_price_change: '0.000000', + is_stable: false, + is_wrapped: false, + }, + ]; + }); +}; + describe('GET /network/config', () => { it('should return 200 and the result dictionary should include the algorand config', async () => { await request(gatewayApp) @@ -74,6 +155,7 @@ describe('GET /network/status', () => { nativeCurrency: NATIVE_CURRENCY, }); }); + it('should return 200 with a status list, if an instance is already instantiated', async () => { await request(gatewayApp) .get(`/network/status`) @@ -88,9 +170,9 @@ describe('GET /network/status', () => { }, ]); - const testnetAlgorandChain = Algorand.getInstance('testnet'); - const testnetBlockNumber = EXPECTED_CURRENT_BLOCK_NUMBER + 1; - patchCurrentBlockNumber(false, testnetAlgorandChain, testnetBlockNumber); + const mainnetAlgorandChain = Algorand.getInstance('mainnet'); + const mainnetBlockNumber = EXPECTED_CURRENT_BLOCK_NUMBER + 1; + patchCurrentBlockNumber(false, mainnetAlgorandChain, mainnetBlockNumber); await request(gatewayApp) .get(`/network/status`) @@ -99,8 +181,8 @@ describe('GET /network/status', () => { .expect(200) .expect([ { - network: 'testnet', - currentBlockNumber: testnetBlockNumber, + network: 'mainnet', + currentBlockNumber: mainnetBlockNumber, nativeCurrency: NATIVE_CURRENCY, }, { @@ -253,3 +335,185 @@ describe('POST /algorand/poll', () => { }); }); }); + +describe('test managing Algorand wallets', () => { + patch(ConfigManagerCertPassphrase, 'readPassphrase', () => 'a'); + + test('adding and removing a wallet', async () => { + await request(gatewayApp) + .get('/wallet') + .expect('Content-Type', /json/) + .expect(200) + .expect([]); + + await request(gatewayApp) + .post('/wallet/add') + .send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }) + .expect(200) + .expect({ + address: ACCOUNT_ADDRESS, + }); + + await request(gatewayApp) + .get('/wallet') + .expect('Content-Type', /json/) + .expect(200) + .expect([ + { + chain: CHAIN_NAME, + walletAddresses: [ACCOUNT_ADDRESS], + }, + ]); + + await request(gatewayApp) + .delete('/wallet/remove') + .send({ + chain: CHAIN_NAME, + address: ACCOUNT_ADDRESS, + }) + .expect(200); + + await request(gatewayApp) + .get('/wallet') + .expect('Content-Type', /json/) + .expect(200) + .expect([ + { + chain: CHAIN_NAME, + walletAddresses: [], + }, + ]); + }); +}); + +describe('POST /algorand/balances', () => { + patch(ConfigManagerCertPassphrase, 'readPassphrase', () => 'a'); + const nativeToken = 'ALGO'; + const otherToken = 'USDC'; + const expectedBalance = '9'; + + it('should return 200 with correct balance for native token', async () => { + patch(algorand.algod, 'accountInformation', (_: any) => { + return { + do: async () => { + return { + amount: + parseFloat(expectedBalance) * parseFloat(`1e${ALGO_DECIMALS}`), + }; + }, + }; + }); + + await request(gatewayApp).post('/wallet/add').send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }); + + await request(gatewayApp) + .post(`/algorand/balances`) + .send({ + chain: CHAIN_NAME, + network: NETWORK, + address: ACCOUNT_ADDRESS, + tokenSymbols: [nativeToken], + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body).toHaveProperty('timestamp'); + expect(resp.body).toHaveProperty('latency'); + expect(resp.body.network).toEqual(NETWORK); + expect(resp.body.balances[nativeToken]).toEqual(expectedBalance); + }); + }); + + it('should return 200 with correct balance for non-native token', async () => { + patch(algorand.algod, 'accountAssetInformation', (_: any, __: any) => { + return { + do: async () => { + return { + 'asset-holding': { + amount: Math.round( + parseFloat(expectedBalance) * parseFloat(`1e${USDC_DECIMALS}`) + ), + }, + }; + }, + }; + }); + + await request(gatewayApp).post('/wallet/add').send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }); + + await request(gatewayApp) + .post(`/algorand/balances`) + .send({ + chain: CHAIN_NAME, + network: NETWORK, + address: ACCOUNT_ADDRESS, + tokenSymbols: [otherToken], + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body).toHaveProperty('timestamp'); + expect(resp.body).toHaveProperty('latency'); + expect(resp.body.network).toEqual(NETWORK); + expect(resp.body.balances).toEqual({ USDC: expectedBalance }); + }); + }); + + it('should return 200 with zero balance', async () => { + patch(algorand.algod, 'accountAssetInformation', (_: any, __: any) => { + const error: any = new Error('account asset info not found'); + error.code = 404; + throw error; + }); + + await request(gatewayApp).post('/wallet/add').send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }); + + await request(gatewayApp) + .post(`/algorand/balances`) + .send({ + chain: CHAIN_NAME, + network: NETWORK, + address: ACCOUNT_ADDRESS, + tokenSymbols: [otherToken], + }) + .set('Accept', 'application/json') + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body).toHaveProperty('timestamp'); + expect(resp.body).toHaveProperty('latency'); + expect(resp.body.network).toEqual(NETWORK); + expect(resp.body.balances).toEqual({ USDC: '0' }); + }); + }); + + it('should return 404 when parameters are invalid/incomplete', async () => { + await request(gatewayApp) + .post(`/algorand/balances`) + .send({ + chain: CHAIN_NAME, + network: NETWORK, + }) + .expect(404); + }); +}); + +// todo: test opt-in diff --git a/test/services/patch.ts b/test/services/patch.ts index c338779f2f..0d96a6aaa7 100644 --- a/test/services/patch.ts +++ b/test/services/patch.ts @@ -1,3 +1,7 @@ +import path from 'path'; +import fs from 'fs'; +import os from 'os'; + let patchedObjects: Set = new Set(); export const classHasGetter = (obj: any, prop: string): boolean => { @@ -78,3 +82,25 @@ export const unpatch = (): void => { }); patchedObjects = new Set(); }; + +let currDir: string | null = null; +let tempDir: string; + +export function setUpTempDir(dirPrefix: string = ''): string { + if (currDir !== null) { + throw new Error('Temp dir already set up'); + } + currDir = process.cwd(); + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), dirPrefix)); + process.chdir(tempDir); + return tempDir; +} + +export function tearDownTempDir(): void { + if (currDir === null) { + throw new Error('Temp dir not set up'); + } + process.chdir(currDir as string); + fs.rmSync(tempDir, { recursive: true }); + currDir = null; +} diff --git a/yarn.lock b/yarn.lock index e065936cfe..7cf2d6fcd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -956,137 +956,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-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-19fef549-e81b-4929-a4a6-9ac526f46264-1681216759835/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/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-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-250b738c-b5fa-4f1a-add9-3d30542f221f-1681216759835/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/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-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-79271d6f-9aee-4517-ab47-4d2e3edba23a-1681216759837/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/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-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-05832424-5a55-40e3-acd3-e79a0ec0b777-1681216759834/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/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-34d68a64-4dde-4224-9058-3bf49e4b74e8-1681216759834/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-8aba8262-e654-4c2f-8a3c-22a5756d3e61-1681372012627/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-76693192-fb5a-469e-8d5b-3d1dc3a604b5-1681216759840/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-76693192-fb5a-469e-8d5b-3d1dc3a604b5-1681216759840/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-48aba797-2e1d-4635-9a0a-119b1e3a68cc-1681372012627/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-48aba797-2e1d-4635-9a0a-119b1e3a68cc-1681372012627/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-4e4b1710-9319-469e-8e2c-ab9065e30437-1681216759836/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-4e4b1710-9319-469e-8e2c-ab9065e30437-1681216759836/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-082ed137-24f8-497c-951a-423eea461627-1681372012629/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-082ed137-24f8-497c-951a-423eea461627-1681372012629/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-eceee310-a0ae-4e53-b265-7506c4692c18-1681216759836/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-5ccf371c-b667-425c-b2b9-a316a17b0ee1-1681372012627/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-34588a40-09ba-46a0-b922-f41a40502830-1681216759836/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-52bcc68b-e8a6-47c5-8d00-98d0900eec63-1681372012628/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-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-6c75fff3-f05e-4f41-b5ce-9f79b8349ab6-1681216759837/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/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-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-cb08935c-4d96-40b6-addd-32df0c626d7e-1681216759838/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/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-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-832bd8d8-5386-4401-8dbf-ca8df8aaf29a-1681216759839/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/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-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-85473782-13b6-4322-aacc-70e46508c332-1681216759840/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/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-d775c637-8563-48c8-a422-029949c3eb5f-1681216759841/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-c09f2464-1b7d-497a-adf0-071a629f5af1-1681372012632/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1095,67 +1095,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-e6b8d434-69b6-41d6-b833-b546ca73a954-1681216759841/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-36a8a355-219a-435e-9bbb-a2a820447ee9-1681372012631/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-83accdf9-8054-43f5-9f9d-97e311f1abcc-1681216759841/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-83accdf9-8054-43f5-9f9d-97e311f1abcc-1681216759841/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-8f6930a1-09a8-470e-8e61-6b4adf3350c6-1681372012633/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-8f6930a1-09a8-470e-8e61-6b4adf3350c6-1681372012633/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-ea77eab0-5e27-4f98-8439-4c1fa0e3c833-1681216759844/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-a5043766-d158-4b1b-a4f6-fe4625d1aa8e-1681372012632/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-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-d3741b25-6254-44b6-aeaf-91d5d0a3b784-1681216759843/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/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-ba7ec4ec-9ee2-4ee7-880e-0ac8c6bd7ecd-1681216759846/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-ba7ec4ec-9ee2-4ee7-880e-0ac8c6bd7ecd-1681216759846/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-1c2bb84f-d8ed-44fa-9fc1-6c97cf2a552e-1681372012633/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-1c2bb84f-d8ed-44fa-9fc1-6c97cf2a552e-1681372012633/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-9114d202-bfc1-4a55-b9ff-afa57d2842d2-1681216759842/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-9114d202-bfc1-4a55-b9ff-afa57d2842d2-1681216759842/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-e23ad530-66f2-4b9b-a2fd-ffbcc461f728-1681372012634/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-e23ad530-66f2-4b9b-a2fd-ffbcc461f728-1681372012634/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-7c121a2e-8fdd-48a6-acfe-4c40bb9fda6d-1681216759844/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-7c121a2e-8fdd-48a6-acfe-4c40bb9fda6d-1681216759844/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-6d27441b-ecbe-44e2-aa1f-0bf3ba575f55-1681372012633/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-6d27441b-ecbe-44e2-aa1f-0bf3ba575f55-1681372012633/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-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-718fef09-dcdb-4536-8324-9eed54623c89-1681216759842/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1163,76 +1163,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-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-5c01d58b-4f28-4cf2-b837-cfa8613f4f25-1681216759846/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/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-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-cc766814-5399-48b9-9201-d2f9bc16ccd4-1681216759856/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/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-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-656187fe-5922-4b8c-a5c6-74bc9b760b90-1681216759857/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/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-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-7ea6a847-0df5-4789-bd4b-5c7f2b6cdd2e-1681216759844/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/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-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-66d81fca-6ad4-40ae-ba03-6e6e89467154-1681216759855/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/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-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-35cae782-34c6-4f4a-92e3-62ba47b74899-1681216759858/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/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-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-630336a1-7f4b-486d-a8f2-af172ed037f3-1681216759858/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/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" @@ -9577,36 +9577,36 @@ ethereumjs-vm@^2.3.4: "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-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-f96d0147-50fc-47ac-aa31-2f8e8728075c-1681216759818/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" From aa6a9284eb865fc5f72c1ac718928878f16c665f Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Sun, 16 Apr 2023 15:30:50 +0700 Subject: [PATCH 04/23] (feat) Implements Algorand assets endpoints --- docs/swagger/algorand-routes.yml | 17 +++++- docs/swagger/definitions.yml | 20 +++++++ src/chains/algorand/algorand.controller.ts | 49 ++++++++++++++++- src/chains/algorand/algorand.requests.ts | 15 +++++ src/chains/algorand/algorand.routes.ts | 23 +++++++- src/chains/algorand/algorand.ts | 16 +++--- src/chains/algorand/algorand.validators.ts | 22 ++++++++ test-helpers/curl/curl.sh | 3 + test/chains/algorand/algorand.routes.test.ts | 58 +++++++++++++++++++- 9 files changed, 209 insertions(+), 14 deletions(-) diff --git a/docs/swagger/algorand-routes.yml b/docs/swagger/algorand-routes.yml index fc4248a793..f91717e651 100644 --- a/docs/swagger/algorand-routes.yml +++ b/docs/swagger/algorand-routes.yml @@ -36,4 +36,19 @@ paths: responses: '200': schema: - $ref: '#/definitions/BalancesResponse' \ No newline at end of file + $ref: '#/definitions/BalancesResponse' + /algorand/assets: + get: + tags: + - 'algorand' + summary: 'Get assets info' + consumes: + - 'application/json' + produces: + - 'application/json' + parameters: + - in: 'query' + name: 'query' + required: true + schema: + $ref: '#/definitions/AlgorandAssetsRequest' \ No newline at end of file diff --git a/docs/swagger/definitions.yml b/docs/swagger/definitions.yml index 576662ecc5..da5c7eb739 100644 --- a/docs/swagger/definitions.yml +++ b/docs/swagger/definitions.yml @@ -2132,3 +2132,23 @@ definitions: type: 'integer' example: 1000 + AlgorandAssetsRequest: + type: 'object' + properties: + network: + type: 'string' + example: 'testnet' + assetSymbols: + type: 'array' + items: 'string' + example: [ 'ALGO', 'USDC' ] + + AlgorandAssetsResponse: + type: 'object' + required: + - 'assets' + properties: + assets: + type: 'array' + items: 'object' + example: [ { symbol: 'ALGO', assetId: 0, decimal: 6 } ] \ No newline at end of file diff --git a/src/chains/algorand/algorand.controller.ts b/src/chains/algorand/algorand.controller.ts index def95002ed..54f364b6a7 100644 --- a/src/chains/algorand/algorand.controller.ts +++ b/src/chains/algorand/algorand.controller.ts @@ -1,10 +1,20 @@ -import { PollRequest, PollResponse } from '../algorand/algorand.requests'; +import { + AlgorandAsset, + AssetsRequest, + AssetsResponse, + PollRequest, + PollResponse, +} from '../algorand/algorand.requests'; import { Algorand } from './algorand'; import { BalanceRequest, BalanceResponse, } from '../../network/network.requests'; import { latency } from '../../services/base'; +import { + HttpException, + NETWORK_ERROR_CODE, +} from '../../services/error-handler'; export async function poll( algorand: Algorand, @@ -38,3 +48,40 @@ export async function balances( balances: balances, }; } + +export async function getAssets( + request: AssetsRequest +): Promise { + if (request.network === undefined) { + throw new HttpException( + 500, + 'Missing network parameter', + NETWORK_ERROR_CODE + ); + } + + let assets: AlgorandAsset[] = []; + const algorand = Algorand.getInstance(request.network); + + if (!algorand.ready()) { + await algorand.init(); + } + + if (!request.assetSymbols) { + assets = algorand.storedAssetList; + } else { + let assetSymbols; + if (typeof request.assetSymbols === 'string') { + assetSymbols = [request.assetSymbols]; + } else { + assetSymbols = request.assetSymbols; + } + for (const a of assetSymbols as []) { + assets.push(algorand.getAssetForSymbol(a) as AlgorandAsset); + } + } + + return { + assets: assets, + }; +} diff --git a/src/chains/algorand/algorand.requests.ts b/src/chains/algorand/algorand.requests.ts index 3eb6829962..bfac6d4581 100644 --- a/src/chains/algorand/algorand.requests.ts +++ b/src/chains/algorand/algorand.requests.ts @@ -9,3 +9,18 @@ export type PollResponse = { txHash: string; fee: number; }; + +export type AssetsRequest = { + network?: string; + assetSymbols?: string[]; +}; + +export interface AlgorandAsset { + symbol: string; + assetId: number; + decimals: number; +} + +export type AssetsResponse = { + assets: AlgorandAsset[]; +}; diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts index 50c6ec37b1..6b61cf6e63 100644 --- a/src/chains/algorand/algorand.routes.ts +++ b/src/chains/algorand/algorand.routes.ts @@ -2,14 +2,20 @@ /* eslint-disable @typescript-eslint/ban-types */ import { Response, Router, Request, NextFunction } from 'express'; import { asyncHandler } from '../../services/error-handler'; -import { PollRequest, PollResponse } from './algorand.requests'; +import { + AssetsRequest, + AssetsResponse, + PollRequest, + PollResponse, +} from './algorand.requests'; import { validateAlgorandBalanceRequest, validateAlgorandPollRequest, + validateAssetsRequest, } from './algorand.validators'; import { getChain } from '../../services/connection-manager'; import { Algorand } from './algorand'; -import { balances, poll } from './algorand.controller'; +import { balances, getAssets, poll } from './algorand.controller'; import { BalanceRequest, BalanceResponse, @@ -50,4 +56,17 @@ export namespace AlgorandRoutes { } ) ); + + router.get( + '/assets', + asyncHandler( + async ( + req: Request<{}, {}, {}, AssetsRequest>, + res: Response + ) => { + validateAssetsRequest(req.query); + res.status(200).json(await getAssets(req.query)); + } + ) + ); } diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index 35a0ef8c2b..ce2719ed1b 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -1,7 +1,7 @@ import LRUCache from 'lru-cache'; import { getAlgorandConfig } from './algorand.config'; import { Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; -import { PollResponse } from './algorand.requests'; +import { AlgorandAsset, PollResponse } from './algorand.requests'; import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; import { TokenListType, walletPath } from '../../services/base'; import fse from 'fs-extra'; @@ -16,12 +16,6 @@ export interface AlgorandAccount { mnemonic: string; } -export interface AlgorandAsset { - symbol: string; - assetId: number; - decimals: number; -} - export class Algorand { public nativeTokenSymbol; private _assetMap: Record = {}; @@ -62,6 +56,10 @@ export class Algorand { return this._network; } + public get storedAssetList(): AlgorandAsset[] { + return Object.values(this._assetMap); + } + public ready(): boolean { return this._ready; } @@ -254,6 +252,10 @@ export class Algorand { ).toString(); } + public getAssetForSymbol(symbol: string): AlgorandAsset | null { + return this._assetMap[symbol] ? this._assetMap[symbol] : null; + } + private async loadAssets(): Promise { const assetData = await this.getAssetData(); for (const result of assetData) { diff --git a/src/chains/algorand/algorand.validators.ts b/src/chains/algorand/algorand.validators.ts index 2e4d8751b0..4c6e5c44c8 100644 --- a/src/chains/algorand/algorand.validators.ts +++ b/src/chains/algorand/algorand.validators.ts @@ -1,4 +1,5 @@ import { + invalidTokenSymbolsError, mkRequestValidator, mkValidator, RequestValidator, @@ -35,3 +36,24 @@ export const validateAlgorandBalanceRequest: RequestValidator = validateAlgorandAddress, validateTokenSymbols, ]); + +export const validateAssetSymbols: Validator = (req: any) => { + const errors: Array = []; + if (req.assetSymbols) { + if (Array.isArray(req.assetSymbols)) { + req.tokenSymbols.forEach((symbol: any) => { + if (typeof symbol !== 'string') { + errors.push(invalidTokenSymbolsError); + } + }); + } else if (typeof req.assetSymbols !== 'string') { + errors.push(invalidTokenSymbolsError); + } + } + return errors; +}; + +export const validateAssetsRequest: RequestValidator = mkRequestValidator([ + validateNetwork, + validateAssetSymbols, +]); diff --git a/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index 4d09202afb..c4628f82e0 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -239,6 +239,9 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app ## get balances curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_balances.json)" https://localhost:15888/algorand/balances | jq +## get assets +curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/algorand/assets?network=mainnet" | jq + # NEAR ## get balances diff --git a/test/chains/algorand/algorand.routes.test.ts b/test/chains/algorand/algorand.routes.test.ts index 9268056e42..2656cb207c 100644 --- a/test/chains/algorand/algorand.routes.test.ts +++ b/test/chains/algorand/algorand.routes.test.ts @@ -62,6 +62,7 @@ beforeAll(async () => { beforeEach(() => { setUpTempDir('algorand-tests'); patchCurrentBlockNumber(); + patchCertPassphrase(); }); afterEach(() => { @@ -69,6 +70,10 @@ afterEach(() => { unpatch(); }); +const patchCertPassphrase = () => { + patch(ConfigManagerCertPassphrase, 'readPassphrase', () => 'a'); +}; + const patchCurrentBlockNumber = ( withError: boolean = false, instance: Algorand | undefined = undefined, @@ -337,8 +342,6 @@ describe('POST /algorand/poll', () => { }); describe('test managing Algorand wallets', () => { - patch(ConfigManagerCertPassphrase, 'readPassphrase', () => 'a'); - test('adding and removing a wallet', async () => { await request(gatewayApp) .get('/wallet') @@ -391,7 +394,6 @@ describe('test managing Algorand wallets', () => { }); describe('POST /algorand/balances', () => { - patch(ConfigManagerCertPassphrase, 'readPassphrase', () => 'a'); const nativeToken = 'ALGO'; const otherToken = 'USDC'; const expectedBalance = '9'; @@ -516,4 +518,54 @@ describe('POST /algorand/balances', () => { }); }); +describe('GET /algorand/assets', () => { + it('should return 200 with all assets if assetSymbols not provided', async () => { + await request(gatewayApp) + .get(`/algorand/assets`) + .query({ + network: NETWORK, + }) + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body).toEqual({ + assets: [ + { + symbol: 'ALGO', + assetId: 0, + decimals: ALGO_DECIMALS, + }, + { + symbol: 'USDC', + assetId: 10458941, + decimals: USDC_DECIMALS, + }, + ], + }); + }); + }); + + it('should return 200 with the requested asset', async () => { + await request(gatewayApp) + .get(`/algorand/assets`) + .query({ + network: NETWORK, + assetSymbols: ['USDC'], + }) + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body).toEqual({ + assets: [ + { + symbol: 'USDC', + assetId: 10458941, + decimals: USDC_DECIMALS, + }, + ], + }); + }); + }); +}); + // todo: test opt-in From 586cbd980797190ed24f6067730f34590ff1fa47 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Mon, 17 Apr 2023 16:22:25 +0700 Subject: [PATCH 05/23] (cleanup) Centralizes the places where chains are built and need to be maintained --- src/amm/amm.controllers.ts | 44 +++++++---- src/chains/algorand/algorand.routes.ts | 9 ++- src/chains/injective/injective.routes.ts | 12 +-- src/chains/near/near.routes.ts | 12 ++- src/clob/clob.controllers.ts | 21 +++--- src/evm/evm.routes.ts | 12 +-- src/network/network.controllers.ts | 89 ++++++++--------------- src/network/network.routes.ts | 6 +- src/services/connection-manager.ts | 85 +++++++++++++++++----- src/services/wallet/wallet.controllers.ts | 74 ++++++++----------- 10 files changed, 198 insertions(+), 166 deletions(-) diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index dd9ab9b52b..3aa0791628 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -48,7 +48,10 @@ import { checkMarketStatus, getAccountValue, } from '../connectors/perp/perp.controllers'; -import { getChain, getConnector } from '../services/connection-manager'; +import { + getInitializedChain, + getConnector, +} from '../services/connection-manager'; import { Ethereumish, Nearish, @@ -60,7 +63,10 @@ import { } from '../services/common-interfaces'; export async function price(req: PriceRequest): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain( + req.chain, + req.network + ); const connector: Uniswapish | RefAMMish = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); @@ -74,7 +80,10 @@ export async function price(req: PriceRequest): Promise { } export async function trade(req: TradeRequest): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain( + req.chain, + req.network + ); const connector: Uniswapish | RefAMMish = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); @@ -90,7 +99,7 @@ export async function trade(req: TradeRequest): Promise { export async function addLiquidity( req: AddLiquidityRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: UniswapLPish = await getConnector( req.chain, req.network, @@ -103,7 +112,7 @@ export async function addLiquidity( export async function reduceLiquidity( req: RemoveLiquidityRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: UniswapLPish = await getConnector( req.chain, req.network, @@ -116,7 +125,7 @@ export async function reduceLiquidity( export async function collectFees( req: CollectEarnedFeesRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: UniswapLPish = await getConnector( req.chain, req.network, @@ -128,7 +137,7 @@ export async function collectFees( export async function positionInfo( req: PositionRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: UniswapLPish = await getConnector( req.chain, req.network, @@ -140,7 +149,7 @@ export async function positionInfo( export async function poolPrice( req: PoolPriceRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: UniswapLPish = await getConnector( req.chain, req.network, @@ -152,7 +161,10 @@ export async function poolPrice( export async function estimateGas( req: NetworkSelectionRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain( + req.chain, + req.network + ); const connector: Uniswapish | RefAMMish = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); @@ -169,7 +181,7 @@ export async function estimateGas( export async function perpMarketPrices( req: PriceRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, @@ -182,7 +194,7 @@ export async function perpOrder( req: PerpCreateTakerRequest, isOpen: boolean ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, @@ -195,7 +207,7 @@ export async function perpOrder( export async function perpPosition( req: PerpPositionRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, @@ -208,7 +220,7 @@ export async function perpPosition( export async function perpBalance( req: PerpBalanceRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = ( await getConnector(req.chain, req.network, req.connector, req.address) ); @@ -218,7 +230,7 @@ export async function perpBalance( export async function perpPairs( req: NetworkSelectionRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, @@ -230,7 +242,7 @@ export async function perpPairs( export async function getMarketStatus( req: PerpMarketRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, @@ -242,7 +254,7 @@ export async function getMarketStatus( export async function estimatePerpGas( req: NetworkSelectionRequest ): Promise { - const chain = await getChain(req.chain, req.network); + const chain = await getInitializedChain(req.chain, req.network); const connector: Perpish = await getConnector( req.chain, req.network, diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts index 6b61cf6e63..7af0a1bde3 100644 --- a/src/chains/algorand/algorand.routes.ts +++ b/src/chains/algorand/algorand.routes.ts @@ -13,7 +13,7 @@ import { validateAlgorandPollRequest, validateAssetsRequest, } from './algorand.validators'; -import { getChain } from '../../services/connection-manager'; +import { getInitializedChain } from '../../services/connection-manager'; import { Algorand } from './algorand'; import { balances, getAssets, poll } from './algorand.controller'; import { @@ -32,7 +32,10 @@ export namespace AlgorandRoutes { res: Response ) => { validateAlgorandPollRequest(req.body); - const algorand = await getChain('algorand', req.body.network); + const algorand = await getInitializedChain( + 'algorand', + req.body.network + ); res.status(200).json(await poll(algorand, req.body)); } ) @@ -47,7 +50,7 @@ export namespace AlgorandRoutes { _next: NextFunction ) => { validateAlgorandBalanceRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); diff --git a/src/chains/injective/injective.routes.ts b/src/chains/injective/injective.routes.ts index fe0f8be742..0894b03957 100644 --- a/src/chains/injective/injective.routes.ts +++ b/src/chains/injective/injective.routes.ts @@ -26,7 +26,7 @@ import { validateTransferToBankAccountRequest, validateTransferToSubAccountRequest, } from './injective.validators'; -import { getChain } from '../../services/connection-manager'; +import { getInitializedChain } from '../../services/connection-manager'; import { NetworkSelectionRequest } from '../../services/common-interfaces'; export namespace InjectiveRoutes { @@ -39,7 +39,7 @@ export namespace InjectiveRoutes { req: Request<{}, {}, NetworkSelectionRequest>, res: Response ) => { - const injective = await getChain( + const injective = await getInitializedChain( req.query.chain, req.query.network ); @@ -56,7 +56,7 @@ export namespace InjectiveRoutes { res: Response ) => { validateTransferToBankAccountRequest(req.body); - const injective = await getChain( + const injective = await getInitializedChain( req.body.chain, req.body.network ); @@ -75,7 +75,7 @@ export namespace InjectiveRoutes { res: Response ) => { validateTransferToSubAccountRequest(req.body); - const injective = await getChain( + const injective = await getInitializedChain( req.body.chain, req.body.network ); @@ -94,7 +94,7 @@ export namespace InjectiveRoutes { res: Response ) => { validateBalanceRequest(req.body); - const injective = await getChain( + const injective = await getInitializedChain( req.body.chain, req.body.network ); @@ -111,7 +111,7 @@ export namespace InjectiveRoutes { res: Response ) => { validatePollRequest(req.body); - const injective = await getChain( + const injective = await getInitializedChain( req.body.chain, req.body.network ); diff --git a/src/chains/near/near.routes.ts b/src/chains/near/near.routes.ts index 6480defa88..28e345cef5 100644 --- a/src/chains/near/near.routes.ts +++ b/src/chains/near/near.routes.ts @@ -3,7 +3,7 @@ import { Router, Request, Response, NextFunction } from 'express'; import { Nearish } from '../../services/common-interfaces'; import { asyncHandler } from '../../services/error-handler'; -import { getChain } from '../../services/connection-manager'; +import { getInitializedChain } from '../../services/connection-manager'; import { BalanceResponse, PollRequest, PollResponse } from './near.requests'; import { validateBalanceRequest } from './near.validators'; import * as nearControllers from './near.controllers'; @@ -31,7 +31,10 @@ export namespace NearRoutes { ) => { validateBalanceRequest(req.body); - const chain = await getChain('near', req.body.network); + const chain = await getInitializedChain( + 'near', + req.body.network + ); res .status(200) @@ -51,7 +54,10 @@ export namespace NearRoutes { ) => { validatePollRequest(req.body); - const chain = await getChain('near', req.body.network); + const chain = await getInitializedChain( + 'near', + req.body.network + ); res .status(200) diff --git a/src/clob/clob.controllers.ts b/src/clob/clob.controllers.ts index cccaa4423f..3b22741921 100644 --- a/src/clob/clob.controllers.ts +++ b/src/clob/clob.controllers.ts @@ -1,7 +1,10 @@ /* eslint-disable prettier/prettier */ import { EstimateGasResponse } from '../amm/amm.requests'; import { NetworkSelectionRequest } from '../services/common-interfaces'; -import { getChain, getConnector } from '../services/connection-manager'; +import { + getInitializedChain, + getConnector, +} from '../services/connection-manager'; import { ClobBatchUpdateRequest, ClobDeleteOrderRequest, @@ -28,7 +31,7 @@ export async function getMarkets( request: ClobMarketsRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -52,7 +55,7 @@ export async function getOrderBooks( request: ClobOrderbookRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -76,7 +79,7 @@ export async function getTickers( request: ClobTickerRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -100,7 +103,7 @@ export async function getOrders( request: ClobGetOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -124,7 +127,7 @@ export async function postOrder( request: ClobPostOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -148,7 +151,7 @@ export async function deleteOrder( request: ClobDeleteOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -173,7 +176,7 @@ export async function batchOrders( request: ClobBatchUpdateRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -199,7 +202,7 @@ export async function estimateGas( request: NetworkSelectionRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, diff --git a/src/evm/evm.routes.ts b/src/evm/evm.routes.ts index 55fec975fd..d064a0c0ac 100644 --- a/src/evm/evm.routes.ts +++ b/src/evm/evm.routes.ts @@ -22,7 +22,7 @@ import { validateXdcAllowancesRequest, } from '../chains/xdc/xdc.validators'; -import { getChain } from '../services/connection-manager'; +import { getInitializedChain } from '../services/connection-manager'; import { AllowancesRequest, AllowancesResponse, @@ -45,7 +45,7 @@ export namespace EVMRoutes { res: Response ) => { validateNonceRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); @@ -62,7 +62,7 @@ export namespace EVMRoutes { res: Response ) => { validateNonceRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); @@ -83,7 +83,7 @@ export namespace EVMRoutes { } else { validateAllowancesRequest(req.body); } - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); @@ -105,7 +105,7 @@ export namespace EVMRoutes { validateApproveRequest(req.body); } - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); @@ -122,7 +122,7 @@ export namespace EVMRoutes { res: Response ) => { validateCancelRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); diff --git a/src/network/network.controllers.ts b/src/network/network.controllers.ts index e6fb81614a..9a5a7af320 100644 --- a/src/network/network.controllers.ts +++ b/src/network/network.controllers.ts @@ -21,6 +21,10 @@ import { Cronos } from '../chains/cronos/cronos'; import { Near } from '../chains/near/near'; import { Nearish, Xdcish } from '../services/common-interfaces'; import { Algorand } from '../chains/algorand/algorand'; +import { + getInitializedChain, + UnsupportedChainException, +} from '../services/connection-manager'; export async function getStatus( req: StatusRequest @@ -35,32 +39,19 @@ export async function getStatus( let nativeCurrency: string; if (req.chain) { - if (req.chain == 'algorand') { - connections.push(await Algorand.getInstance(req.network as string)); - } else if (req.chain === 'avalanche') { - connections.push(Avalanche.getInstance(req.network as string)); - } else if (req.chain === 'binance-smart-chain') { - connections.push(BinanceSmartChain.getInstance(req.network as string)); - } else if (req.chain === 'harmony') { - connections.push(Harmony.getInstance(req.network as string)); - } else if (req.chain === 'ethereum') { - connections.push(Ethereum.getInstance(req.network as string)); - } else if (req.chain === 'polygon') { - connections.push(Polygon.getInstance(req.network as string)); - } else if (req.chain === 'xdc') { - connections.push(Xdc.getInstance(req.network as string)); - } else if (req.chain === 'near') { - connections.push(Near.getInstance(req.network as string)); - } else if (req.chain === 'cronos') { - connections.push(await Cronos.getInstance(req.network as string)); - } else if (req.chain === 'injective') { - connections.push(Injective.getInstance(req.network as string)); - } else { - throw new HttpException( - 500, - UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), - UNKNOWN_CHAIN_ERROR_CODE + try { + connections.push( + await getInitializedChain(req.chain, req.network as string) ); + } catch (e) { + if (e instanceof UnsupportedChainException) { + throw new HttpException( + 500, + UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), + UNKNOWN_CHAIN_ERROR_CODE + ); + } + throw e; } } else { const algorandConnections = Algorand.getConnectedInstances(); @@ -113,9 +104,6 @@ export async function getStatus( } for (const connection of connections) { - if (!connection.ready()) { - await connection.init(); - } chain = connection.chain; chainId = connection.chainId; network = connection.network; @@ -141,34 +129,25 @@ export async function getStatus( } export async function getTokens(req: TokensRequest): Promise { - let connection: EthereumBase | Nearish | Injective | Xdcish; + type connectionType = EthereumBase | Nearish | Injective | Xdcish; + let connection: connectionType; let tokens: TokenInfo[] = []; if (req.chain && req.network) { - if (req.chain === 'avalanche') { - connection = Avalanche.getInstance(req.network); - } else if (req.chain === 'binance-smart-chain') { - connection = BinanceSmartChain.getInstance(req.network); - } else if (req.chain === 'harmony') { - connection = Harmony.getInstance(req.network); - } else if (req.chain === 'ethereum') { - connection = Ethereum.getInstance(req.network); - } else if (req.chain === 'polygon') { - connection = Polygon.getInstance(req.network); - } else if (req.chain === 'xdc') { - connection = Xdc.getInstance(req.network); - } else if (req.chain === 'near') { - connection = Near.getInstance(req.network); - } else if (req.chain === 'cronos') { - connection = await Cronos.getInstance(req.network); - } else if (req.chain === 'injective') { - connection = Injective.getInstance(req.network); - } else { - throw new HttpException( - 500, - UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), - UNKNOWN_CHAIN_ERROR_CODE - ); + try { + connection = (await getInitializedChain( + req.chain as string, + req.network as string + )) as connectionType; + } catch (e) { + if (e instanceof UnsupportedChainException) { + throw new HttpException( + 500, + UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), + UNKNOWN_CHAIN_ERROR_CODE + ); + } + throw e; } } else { throw new HttpException( @@ -178,10 +157,6 @@ export async function getTokens(req: TokensRequest): Promise { ); } - if (!connection.ready()) { - await connection.init(); - } - if (!req.tokenSymbols) { tokens = connection.storedTokenList; } else { diff --git a/src/network/network.routes.ts b/src/network/network.routes.ts index 67dd9a79ac..8abefae8d7 100644 --- a/src/network/network.routes.ts +++ b/src/network/network.routes.ts @@ -3,7 +3,7 @@ import { NextFunction, Request, Response, Router } from 'express'; import * as ethereumControllers from '../chains/ethereum/ethereum.controllers'; import { Ethereumish } from '../services/common-interfaces'; import { ConfigManagerV2 } from '../services/config-manager-v2'; -import { getChain } from '../services/connection-manager'; +import { getInitializedChain } from '../services/connection-manager'; import { asyncHandler } from '../services/error-handler'; import { mkRequestValidator, @@ -64,7 +64,7 @@ export namespace NetworkRoutes { _next: NextFunction ) => { validateEthereumBalanceRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); @@ -85,7 +85,7 @@ export namespace NetworkRoutes { ) => { validatePollRequest(req.body); - const chain = await getChain( + const chain = await getInitializedChain( req.body.chain, req.body.network ); diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 51a83f3fb8..8e8e9a996c 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -35,10 +35,21 @@ import { Ref } from '../connectors/ref/ref'; import { Xsswap } from '../connectors/xsswap/xsswap'; import { DexalotCLOB } from '../connectors/dexalot/dexalot'; import { Algorand } from '../chains/algorand/algorand'; +import { Cosmos } from '../chains/cosmos/cosmos'; -export type ChainUnion = Algorand | Ethereumish | Nearish | Injective | Xdcish; +export type ChainUnion = + | Algorand + | Cosmos + | Ethereumish + | Nearish + | Injective + | Xdcish; -export type Chain = T extends Ethereumish +export type Chain = T extends Algorand + ? Algorand + : T extends Cosmos + ? Cosmos + : T extends Ethereumish ? Ethereumish : T extends Nearish ? Nearish @@ -48,26 +59,27 @@ export type Chain = T extends Ethereumish ? Injective : never; -export async function getChain( +export class UnsupportedChainException extends Error { + constructor(message?: string) { + message = + message !== undefined + ? message + : 'Please provide a supported chain name.'; + super(message); + this.name = 'UnsupportedChainError'; + this.stack = (new Error()).stack; + } +} + +export async function getInitializedChain( chain: string, network: string ): Promise> { - let chainInstance: ChainUnion; - - if (chain === 'algorand') chainInstance = Algorand.getInstance(network); - else if (chain === 'ethereum') chainInstance = Ethereum.getInstance(network); - else if (chain === 'avalanche') - chainInstance = Avalanche.getInstance(network); - else if (chain === 'polygon') chainInstance = Polygon.getInstance(network); - else if (chain === 'xdc') chainInstance = Xdc.getInstance(network); - else if (chain === 'harmony') chainInstance = Harmony.getInstance(network); - else if (chain === 'near') chainInstance = Near.getInstance(network); - else if (chain === 'binance-smart-chain') - chainInstance = BinanceSmartChain.getInstance(network); - else if (chain === 'cronos') chainInstance = Cronos.getInstance(network); - else if (chain === 'injective') - chainInstance = Injective.getInstance(network); - else throw new Error('unsupported chain'); + const chainInstance = getChainInstance(chain, network); + + if (chainInstance === undefined) { + throw new UnsupportedChainException(`unsupported chain ${chain}`); + } if (!chainInstance.ready()) { await chainInstance.init(); @@ -76,6 +88,41 @@ export async function getChain( return chainInstance as Chain; } +export function getChainInstance( + chain: string, + network: string +): ChainUnion | undefined { + let connection: ChainUnion | undefined; + + if (chain === 'algorand') { + connection = Algorand.getInstance(network); + } else if (chain === 'ethereum') { + connection = Ethereum.getInstance(network); + } else if (chain === 'avalanche') { + connection = Avalanche.getInstance(network); + } else if (chain === 'harmony') { + connection = Harmony.getInstance(network); + } else if (chain === 'polygon') { + connection = Polygon.getInstance(network); + } else if (chain === 'cronos') { + connection = Cronos.getInstance(network); + } else if (chain === 'cosmos') { + connection = Cosmos.getInstance(network); + } else if (chain === 'near') { + connection = Near.getInstance(network); + } else if (chain === 'binance-smart-chain') { + connection = BinanceSmartChain.getInstance(network); + } else if (chain === 'xdc') { + connection = Xdc.getInstance(network); + } else if (chain === 'injective') { + connection = Injective.getInstance(network); + } else { + connection = undefined; + } + + return connection; +} + export type ConnectorUnion = | Uniswapish | UniswapLPish diff --git a/src/services/wallet/wallet.controllers.ts b/src/services/wallet/wallet.controllers.ts index 026300f049..88b83bf031 100644 --- a/src/services/wallet/wallet.controllers.ts +++ b/src/services/wallet/wallet.controllers.ts @@ -1,12 +1,6 @@ import fse from 'fs-extra'; -import { Avalanche } from '../../chains/avalanche/avalanche'; -import { BinanceSmartChain } from '../../chains/binance-smart-chain/binance-smart-chain'; -import { Cronos } from '../../chains/cronos/cronos'; -import { Ethereum } from '../../chains/ethereum/ethereum'; -import { Polygon } from '../../chains/polygon/polygon'; import { Xdc } from '../../chains/xdc/xdc'; import { Cosmos } from '../../chains/cosmos/cosmos'; -import { Harmony } from '../../chains/harmony/harmony'; import { Injective } from '../../chains/injective/injective'; import { @@ -31,7 +25,11 @@ import { } from '../error-handler'; import { EthereumBase } from '../../chains/ethereum/ethereum-base'; import { Near } from '../../chains/near/near'; -import { getChain } from '../connection-manager'; +import { + ChainUnion, + getInitializedChain, + UnsupportedChainException, +} from '../connection-manager'; import { Ethereumish } from '../common-interfaces'; import { Algorand } from '../../chains/algorand/algorand'; @@ -57,54 +55,42 @@ export async function addWallet( if (!passphrase) { throw new Error('There is no passphrase'); } - let connection: Algorand | EthereumBase | Near | Cosmos | Injective | Xdc; + let connection: ChainUnion; let address: string | undefined; let encryptedPrivateKey: string | undefined; - if (req.chain === 'algorand') { - connection = Algorand.getInstance(req.network); - } else if (req.chain === 'ethereum') { - connection = Ethereum.getInstance(req.network); - } else if (req.chain === 'avalanche') { - connection = Avalanche.getInstance(req.network); - } else if (req.chain === 'harmony') { - connection = Harmony.getInstance(req.network); - } else if (req.chain === 'polygon') { - connection = Polygon.getInstance(req.network); - } else if (req.chain === 'cronos') { - connection = Cronos.getInstance(req.network); - } else if (req.chain === 'cosmos') { - connection = Cosmos.getInstance(req.network); - } else if (req.chain === 'near') { - if (!('address' in req)) + if (req.chain === 'near') { + if (!('address' in req)) { throw new HttpException( 500, ACCOUNT_NOT_SPECIFIED_ERROR_MESSAGE(), ACCOUNT_NOT_SPECIFIED_CODE ); - connection = Near.getInstance(req.network); - } else if (req.chain === 'binance-smart-chain') { - connection = BinanceSmartChain.getInstance(req.network); - } else if (req.chain === 'xdc') { - connection = Xdc.getInstance(req.network); - } else if (req.chain === 'injective') { - connection = Injective.getInstance(req.network); - } else { - throw new HttpException( - 500, - UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), - UNKNOWN_CHAIN_ERROR_CODE - ); + } } - if (!connection.ready()) { - await connection.init(); + try { + connection = await getInitializedChain(req.chain, req.network); + } catch (e) { + if (e instanceof UnsupportedChainException) { + throw new HttpException( + 500, + UNKNOWN_KNOWN_CHAIN_ERROR_MESSAGE(req.chain), + UNKNOWN_CHAIN_ERROR_CODE + ); + } + throw e; } try { if (connection instanceof Algorand) { - address = connection.getAccountFromPrivateKey(req.privateKey).address; - encryptedPrivateKey = connection.encrypt(req.privateKey, passphrase); + address = (connection as Algorand).getAccountFromPrivateKey( + req.privateKey + ).address; + encryptedPrivateKey = (connection as Algorand).encrypt( + req.privateKey, + passphrase + ); } else if (connection instanceof EthereumBase) { address = connection.getWalletFromPrivateKey(req.privateKey).address; encryptedPrivateKey = await connection.encrypt( @@ -120,12 +106,12 @@ export async function addWallet( passphrase ); } else if (connection instanceof Cosmos) { - const wallet = await connection.getAccountsfromPrivateKey( + const wallet = await (connection as Cosmos).getAccountsfromPrivateKey( req.privateKey, 'cosmos' ); address = wallet.address; - encryptedPrivateKey = await connection.encrypt( + encryptedPrivateKey = await (connection as Cosmos).encrypt( req.privateKey, passphrase ); @@ -178,7 +164,7 @@ export async function removeWallet(req: RemoveWalletRequest): Promise { export async function signMessage( req: WalletSignRequest ): Promise { - const chain: Ethereumish = await getChain(req.chain, req.network); + const chain: Ethereumish = await getInitializedChain(req.chain, req.network); const wallet = await chain.getWallet(req.address); return { signature: await wallet.signMessage(req.message) }; } From cfc777cf50a68110ac5d6b991ec80140b7466b43 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Tue, 18 Apr 2023 14:23:21 +0700 Subject: [PATCH 06/23] (feat) Adds Algorand opt-in route --- docs/swagger/algorand-routes.yml | 21 +++- docs/swagger/definitions.yml | 43 +++++++- src/chains/algorand/algorand.controller.ts | 48 ++++++++- src/chains/algorand/algorand.requests.ts | 14 +++ src/chains/algorand/algorand.routes.ts | 18 +++- src/chains/algorand/algorand.ts | 43 ++++++-- src/chains/algorand/algorand.validators.ts | 12 +++ src/services/wallet/wallet.controllers.ts | 2 +- test-helpers/curl/curl.sh | 3 + .../curl/requests/algorand_opt_in.json | 5 + test/chains/algorand/algorand.routes.test.ts | 100 ++++++++++++++---- 11 files changed, 268 insertions(+), 41 deletions(-) create mode 100644 test-helpers/curl/requests/algorand_opt_in.json diff --git a/docs/swagger/algorand-routes.yml b/docs/swagger/algorand-routes.yml index f91717e651..3bd24e87f7 100644 --- a/docs/swagger/algorand-routes.yml +++ b/docs/swagger/algorand-routes.yml @@ -51,4 +51,23 @@ paths: name: 'query' required: true schema: - $ref: '#/definitions/AlgorandAssetsRequest' \ No newline at end of file + $ref: '#/definitions/AlgorandAssetsRequest' + /algorand/opt-in: + post: + tags: + - 'algorand' + summary: 'Opt into an asset' + consumes: + - 'application/json' + produces: + - 'application/json' + parameters: + - in: 'body' + name: 'body' + required: true + schema: + $ref: '#/definitions/AlgorandOptInRequest' + responses: + '200': + schema: + $ref: '#/definitions/AlgorandOptInResponse' \ No newline at end of file diff --git a/docs/swagger/definitions.yml b/docs/swagger/definitions.yml index da5c7eb739..74737eecbf 100644 --- a/docs/swagger/definitions.yml +++ b/docs/swagger/definitions.yml @@ -2151,4 +2151,45 @@ definitions: assets: type: 'array' items: 'object' - example: [ { symbol: 'ALGO', assetId: 0, decimal: 6 } ] \ No newline at end of file + example: [ { symbol: 'ALGO', assetId: 0, decimal: 6 } ] + + AlgorandOptInRequest: + type: 'object' + required: + - 'network' + - 'address' + - 'assetSymbol' + properties: + network: + type: 'string' + example: 'testnet' + address: + type: 'string' + example: 'T3ZUYEJ5Y7KEDKITIXO4B5OWU4SBVGOFCPOYGZQHF2XZGENZUBQA' + assetSymbol: + type: 'string' + example: 'USDC' + + AlgorandOptInResponse: + type: 'object' + required: + - 'network' + - 'timestamp' + - 'latency' + - 'assetId' + - 'transactionResponse' + properties: + network: + type: 'string' + example: 'testnet' + timestamp: + type: 'integer' + example: 163636808574 + latency: + type: 'number' + example: 0.5 + assetId: + type: 'string' + example: 'USDC' + transactionResponse: + type: 'object' \ No newline at end of file diff --git a/src/chains/algorand/algorand.controller.ts b/src/chains/algorand/algorand.controller.ts index 54f364b6a7..8e60686c7f 100644 --- a/src/chains/algorand/algorand.controller.ts +++ b/src/chains/algorand/algorand.controller.ts @@ -2,6 +2,8 @@ import { AlgorandAsset, AssetsRequest, AssetsResponse, + OptInRequest, + OptInResponse, PollRequest, PollResponse, } from '../algorand/algorand.requests'; @@ -14,8 +16,20 @@ import { latency } from '../../services/base'; import { HttpException, NETWORK_ERROR_CODE, + TOKEN_NOT_SUPPORTED_ERROR_CODE, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, } from '../../services/error-handler'; +async function getInitializedAlgorand(network: string): Promise { + const algorand = Algorand.getInstance(network); + + if (!algorand.ready()) { + await algorand.init(); + } + + return algorand; +} + export async function poll( algorand: Algorand, req: PollRequest @@ -61,11 +75,7 @@ export async function getAssets( } let assets: AlgorandAsset[] = []; - const algorand = Algorand.getInstance(request.network); - - if (!algorand.ready()) { - await algorand.init(); - } + const algorand = await getInitializedAlgorand(request.network); if (!request.assetSymbols) { assets = algorand.storedAssetList; @@ -85,3 +95,31 @@ export async function getAssets( assets: assets, }; } + +export async function optIn(request: OptInRequest): Promise { + const initTime = Date.now(); + + const algorand = await getInitializedAlgorand(request.network); + const asset = algorand.getAssetForSymbol(request.assetSymbol); + + if (asset === undefined) { + throw new HttpException( + 500, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE + request.assetSymbol, + TOKEN_NOT_SUPPORTED_ERROR_CODE + ); + } + + const transactionResponse = await algorand.optIn( + request.address, + request.assetSymbol + ); + + return { + network: request.network, + timestamp: initTime, + latency: latency(initTime, Date.now()), + assetId: (asset as AlgorandAsset).assetId, + transactionResponse: transactionResponse, + }; +} diff --git a/src/chains/algorand/algorand.requests.ts b/src/chains/algorand/algorand.requests.ts index bfac6d4581..3142f6089c 100644 --- a/src/chains/algorand/algorand.requests.ts +++ b/src/chains/algorand/algorand.requests.ts @@ -24,3 +24,17 @@ export interface AlgorandAsset { export type AssetsResponse = { assets: AlgorandAsset[]; }; + +export interface OptInRequest { + network: string; + address: string; + assetSymbol: string; +} + +export interface OptInResponse { + network: string; + timestamp: number; + latency: number; + assetId: number; + transactionResponse: any; +} diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts index 6b61cf6e63..b75933bf32 100644 --- a/src/chains/algorand/algorand.routes.ts +++ b/src/chains/algorand/algorand.routes.ts @@ -7,15 +7,18 @@ import { AssetsResponse, PollRequest, PollResponse, + OptInRequest, + OptInResponse, } from './algorand.requests'; import { validateAlgorandBalanceRequest, validateAlgorandPollRequest, validateAssetsRequest, + validateOptInRequest, } from './algorand.validators'; import { getChain } from '../../services/connection-manager'; import { Algorand } from './algorand'; -import { balances, getAssets, poll } from './algorand.controller'; +import { balances, getAssets, optIn, poll } from './algorand.controller'; import { BalanceRequest, BalanceResponse, @@ -69,4 +72,17 @@ export namespace AlgorandRoutes { } ) ); + + router.post( + '/opt-in', + asyncHandler( + async ( + req: Request<{}, {}, OptInRequest>, + res: Response + ) => { + validateOptInRequest(req.body); + res.status(200).json(await optIn(req.body)); + } + ) + ); } diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index ce2719ed1b..2de224854a 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -1,6 +1,11 @@ import LRUCache from 'lru-cache'; import { getAlgorandConfig } from './algorand.config'; -import { Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; +import { + Algodv2, + Indexer, + mnemonicToSecretKey, + makeAssetTransferTxnWithSuggestedParamsFromObject, +} from 'algosdk'; import { AlgorandAsset, PollResponse } from './algorand.requests'; import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; import { TokenListType, walletPath } from '../../services/base'; @@ -163,7 +168,7 @@ export class Algorand { }; } - public getAccountFromPrivateKey(mnemonic: string): AlgorandAccount { + public getAccountFromMnemonic(mnemonic: string): AlgorandAccount { const account = mnemonicToSecretKey(mnemonic); const address = account.addr; @@ -174,18 +179,18 @@ export class Algorand { } async getAccountFromAddress(address: string): Promise { - const path = `${walletPath}/${this._chain}`; - const encryptedMnemonic: string = await fse.readFile( - `${path}/${address}.json`, - 'utf8' - ); + const path = `${walletPath}/${this._chain}/${address}.json`; + if (!(await fse.pathExists(path))) { + throw new Error(`account ${address} not found`); + } + const encryptedMnemonic: string = await fse.readFile(path, 'utf8'); const passphrase = ConfigManagerCertPassphrase.readPassphrase(); if (!passphrase) { throw new Error('missing passphrase'); } const mnemonic = this.decrypt(encryptedMnemonic, passphrase); - return this.getAccountFromPrivateKey(mnemonic); + return this.getAccountFromMnemonic(mnemonic); } public encrypt(mnemonic: string, password: string): string { @@ -256,10 +261,26 @@ export class Algorand { return this._assetMap[symbol] ? this._assetMap[symbol] : null; } + public async optIn(address: string, symbol: string) { + const account = await this.getAccountFromAddress(address); + const assetIndex = this._assetMap[symbol].assetId; + const suggestedParams = await this._algod.getTransactionParams().do(); + const optInTxn = makeAssetTransferTxnWithSuggestedParamsFromObject({ + from: account.address, + to: address, + suggestedParams, + assetIndex, + amount: 0, + }); + const signedOptInTxn = optInTxn.signTxn(this.getSk(account.mnemonic)); + const resp = await this._algod.sendRawTransaction(signedOptInTxn).do(); + return resp; + } + private async loadAssets(): Promise { const assetData = await this.getAssetData(); for (const result of assetData) { - this._assetMap[result.unit_name] = { + this._assetMap[result.unit_name.toUpperCase()] = { symbol: result.unit_name, assetId: +result.id, decimals: result.decimals, @@ -278,4 +299,8 @@ export class Algorand { } return assetData; } + + private getSk(mnemonic: string) { + return mnemonicToSecretKey(mnemonic).sk; + } } diff --git a/src/chains/algorand/algorand.validators.ts b/src/chains/algorand/algorand.validators.ts index 4c6e5c44c8..cdd353314b 100644 --- a/src/chains/algorand/algorand.validators.ts +++ b/src/chains/algorand/algorand.validators.ts @@ -53,7 +53,19 @@ export const validateAssetSymbols: Validator = (req: any) => { return errors; }; +export const validateAssetSymbol: Validator = mkValidator( + 'assetSymbol', + invalidTokenSymbolsError, + (val) => typeof val === 'string' +); + export const validateAssetsRequest: RequestValidator = mkRequestValidator([ validateNetwork, validateAssetSymbols, ]); + +export const validateOptInRequest: RequestValidator = mkRequestValidator([ + validateNetwork, + validateAlgorandAddress, + validateAssetSymbol, +]); diff --git a/src/services/wallet/wallet.controllers.ts b/src/services/wallet/wallet.controllers.ts index 026300f049..558ec9d8ba 100644 --- a/src/services/wallet/wallet.controllers.ts +++ b/src/services/wallet/wallet.controllers.ts @@ -103,7 +103,7 @@ export async function addWallet( try { if (connection instanceof Algorand) { - address = connection.getAccountFromPrivateKey(req.privateKey).address; + address = connection.getAccountFromMnemonic(req.privateKey).address; encryptedPrivateKey = connection.encrypt(req.privateKey, passphrase); } else if (connection instanceof EthereumBase) { address = connection.getWalletFromPrivateKey(req.privateKey).address; diff --git a/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index c4628f82e0..9209ddefbd 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -242,6 +242,9 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app ## get assets curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/algorand/assets?network=mainnet" | jq +## post opt-in +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_opt_in.json)" https://localhost:15888/algorand/opt-in | jq + # NEAR ## get balances diff --git a/test-helpers/curl/requests/algorand_opt_in.json b/test-helpers/curl/requests/algorand_opt_in.json new file mode 100644 index 0000000000..f8cf3b4c19 --- /dev/null +++ b/test-helpers/curl/requests/algorand_opt_in.json @@ -0,0 +1,5 @@ +{ + "network": "testnet", + "address": "Y6E7QWFTAI4KWJ4DNSJOLDZ74VU454X5XZLBEPEWMFI7V4GSJ72X3O27HQ", + "assetSymbol": "USDC" +} \ No newline at end of file diff --git a/test/chains/algorand/algorand.routes.test.ts b/test/chains/algorand/algorand.routes.test.ts index 2656cb207c..0b8aef5152 100644 --- a/test/chains/algorand/algorand.routes.test.ts +++ b/test/chains/algorand/algorand.routes.test.ts @@ -20,7 +20,10 @@ const EXPECTED_CURRENT_BLOCK_NUMBER = 100; const CHAIN_NAME = 'algorand'; const NETWORK = 'testnet'; const CONFIG = getAlgorandConfig(NETWORK); -const NATIVE_CURRENCY = CONFIG.nativeCurrencySymbol; +const NATIVE_TOKEN = CONFIG.nativeCurrencySymbol; +const NATIVE_TOKEN_ID = 0; +const USDC_TOKEN = 'USDC'; +const USDC_TOKEN_ID = 10458941; const ACCOUNT_ADDRESS = 'FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA'; // noqa: mock const MNEUMONIC = @@ -95,10 +98,10 @@ const patchGetAssetData = () => { patch(algorand, 'getAssetData', async () => { return [ { - id: '0', + id: NATIVE_TOKEN_ID.toString(), is_liquidity_token: false, name: 'Algorand', - unit_name: 'ALGO', + unit_name: NATIVE_TOKEN, decimals: ALGO_DECIMALS, total_amount: null, url: 'https://algorand.org', @@ -112,10 +115,10 @@ const patchGetAssetData = () => { is_wrapped: false, }, { - id: '10458941', + id: USDC_TOKEN_ID.toString(), is_liquidity_token: false, name: 'USDC', - unit_name: 'USDC', + unit_name: USDC_TOKEN, decimals: USDC_DECIMALS, total_amount: '18446744073709551615', url: 'https://centre.io', @@ -157,7 +160,7 @@ describe('GET /network/status', () => { .expect({ network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }); }); @@ -171,7 +174,7 @@ describe('GET /network/status', () => { { network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, ]); @@ -188,12 +191,12 @@ describe('GET /network/status', () => { { network: 'mainnet', currentBlockNumber: mainnetBlockNumber, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, { network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, ]); }); @@ -394,8 +397,6 @@ describe('test managing Algorand wallets', () => { }); describe('POST /algorand/balances', () => { - const nativeToken = 'ALGO'; - const otherToken = 'USDC'; const expectedBalance = '9'; it('should return 200 with correct balance for native token', async () => { @@ -422,7 +423,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [nativeToken], + tokenSymbols: [NATIVE_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -431,7 +432,7 @@ describe('POST /algorand/balances', () => { expect(resp.body).toHaveProperty('timestamp'); expect(resp.body).toHaveProperty('latency'); expect(resp.body.network).toEqual(NETWORK); - expect(resp.body.balances[nativeToken]).toEqual(expectedBalance); + expect(resp.body.balances[NATIVE_TOKEN]).toEqual(expectedBalance); }); }); @@ -462,7 +463,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [otherToken], + tokenSymbols: [USDC_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -494,7 +495,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [otherToken], + tokenSymbols: [USDC_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -531,13 +532,13 @@ describe('GET /algorand/assets', () => { expect(resp.body).toEqual({ assets: [ { - symbol: 'ALGO', - assetId: 0, + symbol: NATIVE_TOKEN, + assetId: NATIVE_TOKEN_ID, decimals: ALGO_DECIMALS, }, { - symbol: 'USDC', - assetId: 10458941, + symbol: USDC_TOKEN, + assetId: USDC_TOKEN_ID, decimals: USDC_DECIMALS, }, ], @@ -550,7 +551,7 @@ describe('GET /algorand/assets', () => { .get(`/algorand/assets`) .query({ network: NETWORK, - assetSymbols: ['USDC'], + assetSymbols: [USDC_TOKEN], }) .expect('Content-Type', /json/) .expect(200) @@ -558,8 +559,8 @@ describe('GET /algorand/assets', () => { expect(resp.body).toEqual({ assets: [ { - symbol: 'USDC', - assetId: 10458941, + symbol: USDC_TOKEN, + assetId: USDC_TOKEN_ID, decimals: USDC_DECIMALS, }, ], @@ -568,4 +569,57 @@ describe('GET /algorand/assets', () => { }); }); -// todo: test opt-in +describe('POST /algorand/opt-in', () => { + it('should return 200 with the opt-in response', async () => { + const expectedTransactionId = + 'RVZ24ML6UE3OFXFN5ID3L65EHSRAYYX3FCCTKQP3P3P5K73Y65CQ'; + + patch(algorand.algod, 'getTransactionParams', () => { + return { + do: async () => { + return { + fee: 0, + firstRound: 29228608, + flatFee: false, + genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', + genesisID: 'testnet-v1.0', + lastRound: 29229608, + }; + }, + }; + }); + + patch(algorand.algod, 'sendRawTransaction', (_: Uint8Array) => { + return { + do: async () => { + return { + txId: expectedTransactionId, + }; + }, + }; + }); + + await request(gatewayApp).post('/wallet/add').send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }); + + await request(gatewayApp) + .post('/algorand/opt-in') + .send({ + network: NETWORK, + address: ACCOUNT_ADDRESS, + assetSymbol: USDC_TOKEN, + }) + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body.network).toEqual(NETWORK); + expect(resp.body.assetId).toEqual(USDC_TOKEN_ID); + expect(resp.body.transactionResponse).toEqual({ + txId: expectedTransactionId, + }); + }); + }); +}); From 30893948c3ea86dc9d1aa56d35b9255764de8619 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Tue, 18 Apr 2023 14:23:21 +0700 Subject: [PATCH 07/23] (feat) Adds Algorand opt-in route --- docs/swagger/algorand-routes.yml | 21 +++- docs/swagger/definitions.yml | 43 +++++++- src/chains/algorand/algorand.controller.ts | 48 ++++++++- src/chains/algorand/algorand.requests.ts | 14 +++ src/chains/algorand/algorand.routes.ts | 18 +++- src/chains/algorand/algorand.ts | 43 ++++++-- src/chains/algorand/algorand.validators.ts | 12 +++ src/services/wallet/wallet.controllers.ts | 2 +- test-helpers/curl/curl.sh | 3 + .../curl/requests/algorand_opt_in.json | 5 + test/chains/algorand/algorand.routes.test.ts | 100 ++++++++++++++---- 11 files changed, 268 insertions(+), 41 deletions(-) create mode 100644 test-helpers/curl/requests/algorand_opt_in.json diff --git a/docs/swagger/algorand-routes.yml b/docs/swagger/algorand-routes.yml index f91717e651..3bd24e87f7 100644 --- a/docs/swagger/algorand-routes.yml +++ b/docs/swagger/algorand-routes.yml @@ -51,4 +51,23 @@ paths: name: 'query' required: true schema: - $ref: '#/definitions/AlgorandAssetsRequest' \ No newline at end of file + $ref: '#/definitions/AlgorandAssetsRequest' + /algorand/opt-in: + post: + tags: + - 'algorand' + summary: 'Opt into an asset' + consumes: + - 'application/json' + produces: + - 'application/json' + parameters: + - in: 'body' + name: 'body' + required: true + schema: + $ref: '#/definitions/AlgorandOptInRequest' + responses: + '200': + schema: + $ref: '#/definitions/AlgorandOptInResponse' \ No newline at end of file diff --git a/docs/swagger/definitions.yml b/docs/swagger/definitions.yml index da5c7eb739..74737eecbf 100644 --- a/docs/swagger/definitions.yml +++ b/docs/swagger/definitions.yml @@ -2151,4 +2151,45 @@ definitions: assets: type: 'array' items: 'object' - example: [ { symbol: 'ALGO', assetId: 0, decimal: 6 } ] \ No newline at end of file + example: [ { symbol: 'ALGO', assetId: 0, decimal: 6 } ] + + AlgorandOptInRequest: + type: 'object' + required: + - 'network' + - 'address' + - 'assetSymbol' + properties: + network: + type: 'string' + example: 'testnet' + address: + type: 'string' + example: 'T3ZUYEJ5Y7KEDKITIXO4B5OWU4SBVGOFCPOYGZQHF2XZGENZUBQA' + assetSymbol: + type: 'string' + example: 'USDC' + + AlgorandOptInResponse: + type: 'object' + required: + - 'network' + - 'timestamp' + - 'latency' + - 'assetId' + - 'transactionResponse' + properties: + network: + type: 'string' + example: 'testnet' + timestamp: + type: 'integer' + example: 163636808574 + latency: + type: 'number' + example: 0.5 + assetId: + type: 'string' + example: 'USDC' + transactionResponse: + type: 'object' \ No newline at end of file diff --git a/src/chains/algorand/algorand.controller.ts b/src/chains/algorand/algorand.controller.ts index 54f364b6a7..8e60686c7f 100644 --- a/src/chains/algorand/algorand.controller.ts +++ b/src/chains/algorand/algorand.controller.ts @@ -2,6 +2,8 @@ import { AlgorandAsset, AssetsRequest, AssetsResponse, + OptInRequest, + OptInResponse, PollRequest, PollResponse, } from '../algorand/algorand.requests'; @@ -14,8 +16,20 @@ import { latency } from '../../services/base'; import { HttpException, NETWORK_ERROR_CODE, + TOKEN_NOT_SUPPORTED_ERROR_CODE, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, } from '../../services/error-handler'; +async function getInitializedAlgorand(network: string): Promise { + const algorand = Algorand.getInstance(network); + + if (!algorand.ready()) { + await algorand.init(); + } + + return algorand; +} + export async function poll( algorand: Algorand, req: PollRequest @@ -61,11 +75,7 @@ export async function getAssets( } let assets: AlgorandAsset[] = []; - const algorand = Algorand.getInstance(request.network); - - if (!algorand.ready()) { - await algorand.init(); - } + const algorand = await getInitializedAlgorand(request.network); if (!request.assetSymbols) { assets = algorand.storedAssetList; @@ -85,3 +95,31 @@ export async function getAssets( assets: assets, }; } + +export async function optIn(request: OptInRequest): Promise { + const initTime = Date.now(); + + const algorand = await getInitializedAlgorand(request.network); + const asset = algorand.getAssetForSymbol(request.assetSymbol); + + if (asset === undefined) { + throw new HttpException( + 500, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE + request.assetSymbol, + TOKEN_NOT_SUPPORTED_ERROR_CODE + ); + } + + const transactionResponse = await algorand.optIn( + request.address, + request.assetSymbol + ); + + return { + network: request.network, + timestamp: initTime, + latency: latency(initTime, Date.now()), + assetId: (asset as AlgorandAsset).assetId, + transactionResponse: transactionResponse, + }; +} diff --git a/src/chains/algorand/algorand.requests.ts b/src/chains/algorand/algorand.requests.ts index bfac6d4581..3142f6089c 100644 --- a/src/chains/algorand/algorand.requests.ts +++ b/src/chains/algorand/algorand.requests.ts @@ -24,3 +24,17 @@ export interface AlgorandAsset { export type AssetsResponse = { assets: AlgorandAsset[]; }; + +export interface OptInRequest { + network: string; + address: string; + assetSymbol: string; +} + +export interface OptInResponse { + network: string; + timestamp: number; + latency: number; + assetId: number; + transactionResponse: any; +} diff --git a/src/chains/algorand/algorand.routes.ts b/src/chains/algorand/algorand.routes.ts index 7af0a1bde3..365d3c831d 100644 --- a/src/chains/algorand/algorand.routes.ts +++ b/src/chains/algorand/algorand.routes.ts @@ -7,15 +7,18 @@ import { AssetsResponse, PollRequest, PollResponse, + OptInRequest, + OptInResponse, } from './algorand.requests'; import { validateAlgorandBalanceRequest, validateAlgorandPollRequest, validateAssetsRequest, + validateOptInRequest, } from './algorand.validators'; import { getInitializedChain } from '../../services/connection-manager'; import { Algorand } from './algorand'; -import { balances, getAssets, poll } from './algorand.controller'; +import { balances, getAssets, optIn, poll } from './algorand.controller'; import { BalanceRequest, BalanceResponse, @@ -72,4 +75,17 @@ export namespace AlgorandRoutes { } ) ); + + router.post( + '/opt-in', + asyncHandler( + async ( + req: Request<{}, {}, OptInRequest>, + res: Response + ) => { + validateOptInRequest(req.body); + res.status(200).json(await optIn(req.body)); + } + ) + ); } diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index ce2719ed1b..2de224854a 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -1,6 +1,11 @@ import LRUCache from 'lru-cache'; import { getAlgorandConfig } from './algorand.config'; -import { Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; +import { + Algodv2, + Indexer, + mnemonicToSecretKey, + makeAssetTransferTxnWithSuggestedParamsFromObject, +} from 'algosdk'; import { AlgorandAsset, PollResponse } from './algorand.requests'; import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; import { TokenListType, walletPath } from '../../services/base'; @@ -163,7 +168,7 @@ export class Algorand { }; } - public getAccountFromPrivateKey(mnemonic: string): AlgorandAccount { + public getAccountFromMnemonic(mnemonic: string): AlgorandAccount { const account = mnemonicToSecretKey(mnemonic); const address = account.addr; @@ -174,18 +179,18 @@ export class Algorand { } async getAccountFromAddress(address: string): Promise { - const path = `${walletPath}/${this._chain}`; - const encryptedMnemonic: string = await fse.readFile( - `${path}/${address}.json`, - 'utf8' - ); + const path = `${walletPath}/${this._chain}/${address}.json`; + if (!(await fse.pathExists(path))) { + throw new Error(`account ${address} not found`); + } + const encryptedMnemonic: string = await fse.readFile(path, 'utf8'); const passphrase = ConfigManagerCertPassphrase.readPassphrase(); if (!passphrase) { throw new Error('missing passphrase'); } const mnemonic = this.decrypt(encryptedMnemonic, passphrase); - return this.getAccountFromPrivateKey(mnemonic); + return this.getAccountFromMnemonic(mnemonic); } public encrypt(mnemonic: string, password: string): string { @@ -256,10 +261,26 @@ export class Algorand { return this._assetMap[symbol] ? this._assetMap[symbol] : null; } + public async optIn(address: string, symbol: string) { + const account = await this.getAccountFromAddress(address); + const assetIndex = this._assetMap[symbol].assetId; + const suggestedParams = await this._algod.getTransactionParams().do(); + const optInTxn = makeAssetTransferTxnWithSuggestedParamsFromObject({ + from: account.address, + to: address, + suggestedParams, + assetIndex, + amount: 0, + }); + const signedOptInTxn = optInTxn.signTxn(this.getSk(account.mnemonic)); + const resp = await this._algod.sendRawTransaction(signedOptInTxn).do(); + return resp; + } + private async loadAssets(): Promise { const assetData = await this.getAssetData(); for (const result of assetData) { - this._assetMap[result.unit_name] = { + this._assetMap[result.unit_name.toUpperCase()] = { symbol: result.unit_name, assetId: +result.id, decimals: result.decimals, @@ -278,4 +299,8 @@ export class Algorand { } return assetData; } + + private getSk(mnemonic: string) { + return mnemonicToSecretKey(mnemonic).sk; + } } diff --git a/src/chains/algorand/algorand.validators.ts b/src/chains/algorand/algorand.validators.ts index 4c6e5c44c8..cdd353314b 100644 --- a/src/chains/algorand/algorand.validators.ts +++ b/src/chains/algorand/algorand.validators.ts @@ -53,7 +53,19 @@ export const validateAssetSymbols: Validator = (req: any) => { return errors; }; +export const validateAssetSymbol: Validator = mkValidator( + 'assetSymbol', + invalidTokenSymbolsError, + (val) => typeof val === 'string' +); + export const validateAssetsRequest: RequestValidator = mkRequestValidator([ validateNetwork, validateAssetSymbols, ]); + +export const validateOptInRequest: RequestValidator = mkRequestValidator([ + validateNetwork, + validateAlgorandAddress, + validateAssetSymbol, +]); diff --git a/src/services/wallet/wallet.controllers.ts b/src/services/wallet/wallet.controllers.ts index 88b83bf031..ce148de194 100644 --- a/src/services/wallet/wallet.controllers.ts +++ b/src/services/wallet/wallet.controllers.ts @@ -84,7 +84,7 @@ export async function addWallet( try { if (connection instanceof Algorand) { - address = (connection as Algorand).getAccountFromPrivateKey( + address = (connection as Algorand).getAccountFromMnemonic( req.privateKey ).address; encryptedPrivateKey = (connection as Algorand).encrypt( diff --git a/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index c4628f82e0..9209ddefbd 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -242,6 +242,9 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app ## get assets curl -s -X GET -k --key $GATEWAY_KEY --cert $GATEWAY_CERT "https://localhost:15888/algorand/assets?network=mainnet" | jq +## post opt-in +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_opt_in.json)" https://localhost:15888/algorand/opt-in | jq + # NEAR ## get balances diff --git a/test-helpers/curl/requests/algorand_opt_in.json b/test-helpers/curl/requests/algorand_opt_in.json new file mode 100644 index 0000000000..f8cf3b4c19 --- /dev/null +++ b/test-helpers/curl/requests/algorand_opt_in.json @@ -0,0 +1,5 @@ +{ + "network": "testnet", + "address": "Y6E7QWFTAI4KWJ4DNSJOLDZ74VU454X5XZLBEPEWMFI7V4GSJ72X3O27HQ", + "assetSymbol": "USDC" +} \ No newline at end of file diff --git a/test/chains/algorand/algorand.routes.test.ts b/test/chains/algorand/algorand.routes.test.ts index 2656cb207c..0b8aef5152 100644 --- a/test/chains/algorand/algorand.routes.test.ts +++ b/test/chains/algorand/algorand.routes.test.ts @@ -20,7 +20,10 @@ const EXPECTED_CURRENT_BLOCK_NUMBER = 100; const CHAIN_NAME = 'algorand'; const NETWORK = 'testnet'; const CONFIG = getAlgorandConfig(NETWORK); -const NATIVE_CURRENCY = CONFIG.nativeCurrencySymbol; +const NATIVE_TOKEN = CONFIG.nativeCurrencySymbol; +const NATIVE_TOKEN_ID = 0; +const USDC_TOKEN = 'USDC'; +const USDC_TOKEN_ID = 10458941; const ACCOUNT_ADDRESS = 'FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA'; // noqa: mock const MNEUMONIC = @@ -95,10 +98,10 @@ const patchGetAssetData = () => { patch(algorand, 'getAssetData', async () => { return [ { - id: '0', + id: NATIVE_TOKEN_ID.toString(), is_liquidity_token: false, name: 'Algorand', - unit_name: 'ALGO', + unit_name: NATIVE_TOKEN, decimals: ALGO_DECIMALS, total_amount: null, url: 'https://algorand.org', @@ -112,10 +115,10 @@ const patchGetAssetData = () => { is_wrapped: false, }, { - id: '10458941', + id: USDC_TOKEN_ID.toString(), is_liquidity_token: false, name: 'USDC', - unit_name: 'USDC', + unit_name: USDC_TOKEN, decimals: USDC_DECIMALS, total_amount: '18446744073709551615', url: 'https://centre.io', @@ -157,7 +160,7 @@ describe('GET /network/status', () => { .expect({ network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }); }); @@ -171,7 +174,7 @@ describe('GET /network/status', () => { { network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, ]); @@ -188,12 +191,12 @@ describe('GET /network/status', () => { { network: 'mainnet', currentBlockNumber: mainnetBlockNumber, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, { network: NETWORK, currentBlockNumber: EXPECTED_CURRENT_BLOCK_NUMBER, - nativeCurrency: NATIVE_CURRENCY, + nativeCurrency: NATIVE_TOKEN, }, ]); }); @@ -394,8 +397,6 @@ describe('test managing Algorand wallets', () => { }); describe('POST /algorand/balances', () => { - const nativeToken = 'ALGO'; - const otherToken = 'USDC'; const expectedBalance = '9'; it('should return 200 with correct balance for native token', async () => { @@ -422,7 +423,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [nativeToken], + tokenSymbols: [NATIVE_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -431,7 +432,7 @@ describe('POST /algorand/balances', () => { expect(resp.body).toHaveProperty('timestamp'); expect(resp.body).toHaveProperty('latency'); expect(resp.body.network).toEqual(NETWORK); - expect(resp.body.balances[nativeToken]).toEqual(expectedBalance); + expect(resp.body.balances[NATIVE_TOKEN]).toEqual(expectedBalance); }); }); @@ -462,7 +463,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [otherToken], + tokenSymbols: [USDC_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -494,7 +495,7 @@ describe('POST /algorand/balances', () => { chain: CHAIN_NAME, network: NETWORK, address: ACCOUNT_ADDRESS, - tokenSymbols: [otherToken], + tokenSymbols: [USDC_TOKEN], }) .set('Accept', 'application/json') .expect('Content-Type', /json/) @@ -531,13 +532,13 @@ describe('GET /algorand/assets', () => { expect(resp.body).toEqual({ assets: [ { - symbol: 'ALGO', - assetId: 0, + symbol: NATIVE_TOKEN, + assetId: NATIVE_TOKEN_ID, decimals: ALGO_DECIMALS, }, { - symbol: 'USDC', - assetId: 10458941, + symbol: USDC_TOKEN, + assetId: USDC_TOKEN_ID, decimals: USDC_DECIMALS, }, ], @@ -550,7 +551,7 @@ describe('GET /algorand/assets', () => { .get(`/algorand/assets`) .query({ network: NETWORK, - assetSymbols: ['USDC'], + assetSymbols: [USDC_TOKEN], }) .expect('Content-Type', /json/) .expect(200) @@ -558,8 +559,8 @@ describe('GET /algorand/assets', () => { expect(resp.body).toEqual({ assets: [ { - symbol: 'USDC', - assetId: 10458941, + symbol: USDC_TOKEN, + assetId: USDC_TOKEN_ID, decimals: USDC_DECIMALS, }, ], @@ -568,4 +569,57 @@ describe('GET /algorand/assets', () => { }); }); -// todo: test opt-in +describe('POST /algorand/opt-in', () => { + it('should return 200 with the opt-in response', async () => { + const expectedTransactionId = + 'RVZ24ML6UE3OFXFN5ID3L65EHSRAYYX3FCCTKQP3P3P5K73Y65CQ'; + + patch(algorand.algod, 'getTransactionParams', () => { + return { + do: async () => { + return { + fee: 0, + firstRound: 29228608, + flatFee: false, + genesisHash: 'SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=', + genesisID: 'testnet-v1.0', + lastRound: 29229608, + }; + }, + }; + }); + + patch(algorand.algod, 'sendRawTransaction', (_: Uint8Array) => { + return { + do: async () => { + return { + txId: expectedTransactionId, + }; + }, + }; + }); + + await request(gatewayApp).post('/wallet/add').send({ + chain: CHAIN_NAME, + network: NETWORK, + privateKey: MNEUMONIC, + }); + + await request(gatewayApp) + .post('/algorand/opt-in') + .send({ + network: NETWORK, + address: ACCOUNT_ADDRESS, + assetSymbol: USDC_TOKEN, + }) + .expect('Content-Type', /json/) + .expect(200) + .expect((resp) => { + expect(resp.body.network).toEqual(NETWORK); + expect(resp.body.assetId).toEqual(USDC_TOKEN_ID); + expect(resp.body.transactionResponse).toEqual({ + txId: expectedTransactionId, + }); + }); + }); +}); From 46444cdc0075600fdc771b2ff040bc608bd1c430 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Wed, 19 Apr 2023 07:24:55 -0500 Subject: [PATCH 08/23] init commit --- package.json | 1 + src/connectors/connectors.routes.ts | 6 + src/connectors/tinyman/tinyman.config.ts | 27 ++ src/connectors/tinyman/tinyman.ts | 208 +++++++++++++ src/services/connection-manager.ts | 8 +- yarn.lock | 376 ++++++++++++----------- 6 files changed, 441 insertions(+), 185 deletions(-) create mode 100644 src/connectors/tinyman/tinyman.config.ts create mode 100644 src/connectors/tinyman/tinyman.ts diff --git a/package.json b/package.json index ed85f4f2af..94bd3f5ee6 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@perp/sdk-curie": "^1.18.0", "@sushiswap/sdk": "^5.0.0-canary.116", "@switchboard-xyz/defikingdoms-sdk": "^1.0.7", + "@tinymanorg/tinyman-js-sdk": "^3.0.0", "@traderjoe-xyz/sdk": "^1.6.1", "@types/fs-extra": "^9.0.13", "@types/lodash": "^4.14.178", diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index 919b839a90..030dffc603 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -19,6 +19,7 @@ import { InjectiveCLOBConfig } from './injective/injective.clob.config'; import { XsswapConfig } from './xsswap/xsswap.config'; import { ConnectorsResponse } from './connectors.request'; import { DexalotCLOBConfig } from './dexalot/dexalot.clob.config'; +import { TinymanConfig } from './tinyman/tinyman.config'; export namespace ConnectorsRoutes { export const router = Router(); @@ -124,6 +125,11 @@ export namespace ConnectorsRoutes { 'Enter your Dexalot API Key (you can request one from the Dexalot team) >>> ', }, }, + { + name: 'tinyman', + trading_type: TinymanConfig.config.tradingTypes, + available_networks: DexalotCLOBConfig.config.availableNetworks, + }, ], }); }) diff --git a/src/connectors/tinyman/tinyman.config.ts b/src/connectors/tinyman/tinyman.config.ts new file mode 100644 index 0000000000..7db6b0c62d --- /dev/null +++ b/src/connectors/tinyman/tinyman.config.ts @@ -0,0 +1,27 @@ +import { ConfigManagerV2 } from '../../services/config-manager-v2'; +import { AvailableNetworks } from '../../services/config-manager-types'; + +/** + * To-do: Update. + */ +export namespace TinymanConfig { + export interface NetworkConfig { + allowedSlippage: string; + gasLimitEstimate: number; + ttl: number; + tradingTypes: Array; + availableNetworks: Array; + } + + export const config: NetworkConfig = { + allowedSlippage: ConfigManagerV2.getInstance().get( + 'tinyman.allowedSlippage' + ), + gasLimitEstimate: ConfigManagerV2.getInstance().get( + 'tinyman.gasLimitEstimate' + ), + ttl: ConfigManagerV2.getInstance().get('tinyman.ttl'), + tradingTypes: ['EVM_AMM'], + availableNetworks: [{ chain: 'algorand', networks: ['mainnet'] }], + }; +} diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts new file mode 100644 index 0000000000..4c5e7ce768 --- /dev/null +++ b/src/connectors/tinyman/tinyman.ts @@ -0,0 +1,208 @@ +import { + poolUtils, + SignerTransaction, + SupportedNetwork, + Swap, + SwapQuote, + SwapQuoteType, + SwapType, + V2PoolInfo, +} from '@tinymanorg/tinyman-js-sdk'; +import { V2SwapExecution } from '@tinymanorg/tinyman-js-sdk/dist/swap/types'; +import { Account } from 'algosdk'; +import { Algorand } from '../../chains/algorand/algorand'; +import { AlgorandAsset } from '../../chains/algorand/algorand.requests'; +import { percentRegexp } from '../../services/config-manager-v2'; +import { logger } from '../../services/logger'; +import { TinymanConfig } from './tinyman.config'; + +export class Tinyman { + private static _instances: { [name: string]: Tinyman }; + private chain: Algorand; + private _gasLimitEstimate: number; + private _ttl: number; + private _ready: boolean = false; + private _config: TinymanConfig.NetworkConfig; + + private constructor(network: string) { + this._config = TinymanConfig.config; + this.chain = Algorand.getInstance(network); + this._ttl = this._config.ttl; + this._gasLimitEstimate = this._config.gasLimitEstimate; + } + + public static getInstance(network: string): Tinyman { + if (Tinyman._instances === undefined) { + Tinyman._instances = {}; + } + if (!(network in Tinyman._instances)) { + Tinyman._instances[network] = new Tinyman(network); + } + + return Tinyman._instances[network]; + } + + public async init() { + if (!this.chain.ready()) { + await this.chain.init(); + } + this._ready = true; + } + + public ready(): boolean { + return this._ready; + } + + /** + * Default gas limit for swap transactions. + */ + public get gasLimitEstimate(): number { + return this._gasLimitEstimate; + } + + /** + * Default time-to-live for swap transactions, in seconds. + */ + public get ttl(): number { + return this._ttl; + } + + /** + * Gets the allowed slippage percent from configuration. + */ + getSlippagePercentage(): number { + const allowedSlippage = this._config.allowedSlippage; + const nd = allowedSlippage.match(percentRegexp); + let slippage = 0.0; + if (nd) slippage = Number(nd[1]) / Number(nd[2]); + return slippage; + } + + /** + * Fetches information about a pair and constructs a pair from the given two tokens. + * This is to replace the Fetcher Class + * @param baseToken first token + * @param quoteToken second token + */ + + async fetchData( + baseToken: AlgorandAsset, + quoteToken: AlgorandAsset + ): Promise { + logger.info( + `Fetching pair data for ${baseToken.symbol}-${quoteToken.symbol}.` + ); + return await poolUtils.v2.getPoolInfo({ + network: this.chain.network as SupportedNetwork, + client: this.chain.algod, + asset1ID: baseToken.assetId, + asset2ID: quoteToken.assetId, + }); + } + + /** + * Given the amount of `baseToken` to put into a transaction, calculate the + * amount of `quoteToken` that can be expected from the transaction. + * + * This is typically used for calculating token sell prices. + * + * @param baseToken Token input for the transaction + * @param quoteToken Output from the transaction + * @param amount Amount of `baseToken` to put into the transaction + * @param isBuy Indicate if it's a swapin or swapout + */ + + async estimateSellTrade( + baseToken: AlgorandAsset, + quoteToken: AlgorandAsset, + amount: number, + isBuy: boolean + ) { + const pool: V2PoolInfo = await this.fetchData(baseToken, quoteToken); + + const quote = await Swap.v2.getQuote({ + type: isBuy ? SwapType.FixedOutput : SwapType.FixedInput, + amount: Number(amount.toString()), + assetIn: { id: baseToken.assetId, decimals: baseToken.decimals }, + assetOut: { id: quoteToken.assetId, decimals: quoteToken.decimals }, + pool, + network: this.chain.network as SupportedNetwork, + isSwapRouterEnabled: false, + }); + const price = + quote.type === SwapQuoteType.Direct + ? quote.data.quote.rate + : quote.data.price_impact; + logger.info( + `Best quote for ${baseToken.symbol}-${quoteToken.symbol}: ` + + `${price}` + + `${baseToken.symbol}.` + ); + const expectedAmount = Number(price) * amount; + + return { trade: quote, expectedAmount }; + } + + /** + * Given a wallet and a Uniswap trade, try to execute it on blockchain. + * + * @param wallet Wallet + * @param trade Expected trade + * @param gasPrice Base gas price, for pre-EIP1559 transactions + * @param gasLimit Gas limit + * @param nonce (Optional) EVM transaction nonce + * @param maxFeePerGas (Optional) Maximum total fee per gas you want to pay + * @param maxPriorityFeePerGas (Optional) Maximum tip per gas you want to pay + */ + + async executeTrade( + account: Account, + trade: SwapQuote, + isBuy: boolean + ): Promise { + const network = this.chain.network as SupportedNetwork; + const fixedSwapTxns = await Swap.v2.generateTxns({ + client: this.chain.algod, + network, + swapType: isBuy ? SwapType.FixedOutput : SwapType.FixedInput, + quote: trade, + slippage: 0.05, + initiatorAddr: account.addr, + }); + const signedTxns = await Swap.v2.signTxns({ + txGroup: fixedSwapTxns, + initiatorSigner: this.signerWithSecretKey(account), + }); + const tx = await Swap.v2.execute({ + client: this.chain.algod, + quote: trade, + txGroup: fixedSwapTxns, + signedTxns, + }); + + logger.info(JSON.stringify(tx)); + return tx; + } + + /** + * @param account account data that will sign the transactions + * @returns a function that will sign the transactions, can be used as `initiatorSigner` + */ + signerWithSecretKey(account: Account) { + return function (txGroups: SignerTransaction[][]): Promise { + // Filter out transactions that don't need to be signed by the account + const txnsToBeSigned = txGroups.flatMap((txGroup) => + txGroup.filter((item) => item.signers?.includes(account.addr)) + ); + // Sign all transactions that need to be signed by the account + const signedTxns: Uint8Array[] = txnsToBeSigned.map(({ txn }) => + txn.signTxn(account.sk) + ); + + // We wrap this with a Promise since SDK's initiatorSigner expects a Promise + return new Promise((resolve) => { + resolve(signedTxns); + }); + }; + } +} diff --git a/src/services/connection-manager.ts b/src/services/connection-manager.ts index 51a83f3fb8..8ba0b44357 100644 --- a/src/services/connection-manager.ts +++ b/src/services/connection-manager.ts @@ -35,6 +35,7 @@ import { Ref } from '../connectors/ref/ref'; import { Xsswap } from '../connectors/xsswap/xsswap'; import { DexalotCLOB } from '../connectors/dexalot/dexalot'; import { Algorand } from '../chains/algorand/algorand'; +import { Tinyman } from '../connectors/tinyman/tinyman'; export type ChainUnion = Algorand | Ethereumish | Nearish | Injective | Xdcish; @@ -81,7 +82,8 @@ export type ConnectorUnion = | UniswapLPish | Perpish | RefAMMish - | CLOBish; + | CLOBish + | Tinyman; export type Connector = T extends Uniswapish ? Uniswapish @@ -93,6 +95,8 @@ export type Connector = T extends Uniswapish ? RefAMMish : T extends CLOBish ? CLOBish + : T extends Tinyman + ? Tinyman : never; export async function getConnector( @@ -143,6 +147,8 @@ export async function getConnector( connectorInstance = InjectiveCLOB.getInstance(chain, network); } else if (chain === 'avalanche' && connector === 'dexalot') { connectorInstance = DexalotCLOB.getInstance(network); + } else if (chain == 'algorand' && connector == 'tinyman') { + connectorInstance = Tinyman.getInstance(network); } else { throw new Error('unsupported chain or connector'); } diff --git a/yarn.lock b/yarn.lock index 7cf2d6fcd4..6ac8147df7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -956,137 +956,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-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-279fc941-4c02-4299-985f-7833f71fab8a-1681372012624/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/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-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-dc26ffaf-3a89-4f4b-9b7f-987b254e7478-1681372012625/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/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-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f3bbcddd-348f-41fa-9cae-63901ca4f539-1681372012626/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/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-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-93559bbd-24f5-45e7-bd82-6eae40c13559-1681372012628/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/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-8aba8262-e654-4c2f-8a3c-22a5756d3e61-1681372012627/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-2d489829-70c0-4c95-9c41-9aeec8a6348e-1681770717084/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-48aba797-2e1d-4635-9a0a-119b1e3a68cc-1681372012627/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-48aba797-2e1d-4635-9a0a-119b1e3a68cc-1681372012627/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-0ada18f8-3906-42bd-a118-1418aa972f5d-1681770717084/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-0ada18f8-3906-42bd-a118-1418aa972f5d-1681770717084/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-082ed137-24f8-497c-951a-423eea461627-1681372012629/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-082ed137-24f8-497c-951a-423eea461627-1681372012629/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-2a3cb939-d17f-4eb4-878f-37795c3ae053-1681770717085/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-2a3cb939-d17f-4eb4-878f-37795c3ae053-1681770717085/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-5ccf371c-b667-425c-b2b9-a316a17b0ee1-1681372012627/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-b839ebd7-bccc-4cb6-9018-703835f1b91c-1681770717085/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-52bcc68b-e8a6-47c5-8d00-98d0900eec63-1681372012628/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-2f640ea4-dc4a-4905-a321-711f3f48ec07-1681770717087/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-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-d2f11d55-b2a7-43b9-89f6-93b91fa797ce-1681372012628/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/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-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-4e430d82-69e6-4fda-be5f-225dd44f2260-1681372012632/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/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-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-5d38e51c-5176-4f30-ac51-45e6336ecf9b-1681372012630/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/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-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-9d176f3d-7732-4fb2-9ba5-1f57d4541883-1681372012631/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/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-c09f2464-1b7d-497a-adf0-071a629f5af1-1681372012632/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-ae6fbf76-d550-422e-ad1d-d897fbc7cc99-1681770717089/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1095,67 +1095,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-36a8a355-219a-435e-9bbb-a2a820447ee9-1681372012631/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-331beffa-a28f-4566-8747-6773f8caa428-1681770717087/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-8f6930a1-09a8-470e-8e61-6b4adf3350c6-1681372012633/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-8f6930a1-09a8-470e-8e61-6b4adf3350c6-1681372012633/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-b8ed91bc-992d-4bdc-9c47-274eb0b49ca2-1681770717088/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-b8ed91bc-992d-4bdc-9c47-274eb0b49ca2-1681770717088/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-a5043766-d158-4b1b-a4f6-fe4625d1aa8e-1681372012632/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-8eb81fc0-68d6-4b5f-a9b1-4e5de5fd35f9-1681770717090/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-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-a7124957-aa9a-4296-a106-9b95e615b600-1681372012634/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/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-1c2bb84f-d8ed-44fa-9fc1-6c97cf2a552e-1681372012633/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-1c2bb84f-d8ed-44fa-9fc1-6c97cf2a552e-1681372012633/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-640275d9-8358-4cc3-b92c-ff3edbd03fa1-1681770717089/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-640275d9-8358-4cc3-b92c-ff3edbd03fa1-1681770717089/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-e23ad530-66f2-4b9b-a2fd-ffbcc461f728-1681372012634/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-e23ad530-66f2-4b9b-a2fd-ffbcc461f728-1681372012634/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-d886d5c5-bea7-4455-90e7-7a11ccea7112-1681770717093/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-d886d5c5-bea7-4455-90e7-7a11ccea7112-1681770717093/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-6d27441b-ecbe-44e2-aa1f-0bf3ba575f55-1681372012633/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-6d27441b-ecbe-44e2-aa1f-0bf3ba575f55-1681372012633/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-df40d5b6-7557-493e-bd86-a2879e27d4a5-1681770717093/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-df40d5b6-7557-493e-bd86-a2879e27d4a5-1681770717093/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-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-b7215002-a8c7-4c81-a754-d4ee8ab0ce44-1681372012635/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1163,76 +1163,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-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-0376eb8a-a161-4f4a-92a2-f1d91d13dcca-1681372012636/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/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-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-0a5a95eb-6f2d-4e3b-b69c-4ee015d3e944-1681372012637/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/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-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-cd327489-4e49-44e6-a180-1fa6a65486e6-1681372012641/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/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-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-ab95b0c1-2ea0-487d-a2fb-0a76c5726b10-1681372012648/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/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-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-863b8c2c-a497-4414-bae3-11a7294d2838-1681372012636/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/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-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-ca96645b-f1e3-4425-a193-b0139929b214-1681372012649/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/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-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-7fa46e5e-d8a3-44ab-a3e2-e5940411691e-1681372012648/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/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" @@ -4270,6 +4270,14 @@ dependencies: defer-to-connect "^2.0.1" +"@tinymanorg/tinyman-js-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@tinymanorg/tinyman-js-sdk/-/tinyman-js-sdk-3.0.0.tgz#878f6e07641dfe1fda086cfefc292bc74507e529" + integrity sha512-i/rly864c1rTD1kqyFhJa87VXW6b2xkDJeBPhR1pSsXn0+IzZr0PKktc5rCfpHnS5zR23NNwtHY3yNOPGBNy2g== + dependencies: + algosdk "^2.1.0" + base64-js "^1.5.1" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -6200,7 +6208,7 @@ algo-msgpack-with-bigint@^2.1.1: resolved "https://registry.yarnpkg.com/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz#38bb717220525b3ff42232eefdcd9efb9ad405d6" integrity sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ== -algosdk@^2.2.0: +algosdk@^2.1.0, algosdk@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/algosdk/-/algosdk-2.2.0.tgz#12f80b5f68c955b338aa5b9d5fc6cbd64ce6ea7a" integrity sha512-FG3u/60DzjMK9Cffy9itst7WcfsTgZKfsD1r8pT33PfsA7r8NoXiUSL7cf0fNWFus6S3E14BpE2CY64VJ8KV1A== @@ -6802,7 +6810,7 @@ base-x@^4.0.0: resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== -base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -9577,36 +9585,36 @@ ethereumjs-vm@^2.3.4: "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-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-5c0a12c2-62b3-4528-99ec-1504bf011884-1681372012611/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" From ca397163285a9ebe56b25e2b2686d2cdeb24bb7c Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:35:22 -0500 Subject: [PATCH 09/23] update with working routes --- src/amm/amm.controllers.ts | 34 +++- src/chains/algorand/algorand.ts | 32 +--- src/connectors/tinyman/tinyman.config.ts | 10 +- src/connectors/tinyman/tinyman.controllers.ts | 160 ++++++++++++++++++ src/connectors/tinyman/tinyman.ts | 63 ++++--- src/services/schema/tinyman-schema.json | 11 ++ src/services/wallet/wallet.controllers.ts | 2 +- src/templates/root.yml | 4 + src/templates/tinyman.yml | 3 + test-helpers/curl/curl.sh | 4 + .../curl/requests/algorand_tinyman_trade.json | 10 ++ test-helpers/curl/requests/price_tinyman.json | 9 + 12 files changed, 272 insertions(+), 70 deletions(-) create mode 100644 src/connectors/tinyman/tinyman.controllers.ts create mode 100644 src/services/schema/tinyman-schema.json create mode 100644 src/templates/tinyman.yml create mode 100644 test-helpers/curl/requests/algorand_tinyman_trade.json create mode 100644 test-helpers/curl/requests/price_tinyman.json diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index dd9ab9b52b..ef7766d058 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -39,6 +39,11 @@ import { trade as refTrade, estimateGas as refEstimateGas, } from '../connectors/ref/ref.controllers'; +import { + price as tinymanPrice, + trade as tinymanTrade, + estimateGas as tinymanEstimateGas, +} from '../connectors/tinyman/tinyman.controllers'; import { getPriceData as perpPriceData, createTakerOrder, @@ -58,30 +63,42 @@ import { Uniswapish, UniswapLPish, } from '../services/common-interfaces'; +import { Algorand } from '../chains/algorand/algorand'; +import { Tinyman } from '../connectors/tinyman/tinyman'; export async function price(req: PriceRequest): Promise { - const chain = await getChain(req.chain, req.network); - const connector: Uniswapish | RefAMMish = await getConnector< + const chain = await getChain( + req.chain, + req.network + ); + const connector: Uniswapish | RefAMMish | Tinyman = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish if ('routerAbi' in connector) { return uniswapPrice(chain, connector, req); + } else if (connector instanceof Tinyman) { + return tinymanPrice(chain as unknown as Algorand, connector, req); } else { return refPrice(chain, connector, req); } } export async function trade(req: TradeRequest): Promise { - const chain = await getChain(req.chain, req.network); - const connector: Uniswapish | RefAMMish = await getConnector< + const chain = await getChain( + req.chain, + req.network + ); + const connector: Uniswapish | RefAMMish | Tinyman = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish if ('routerAbi' in connector) { return uniswapTrade(chain, connector, req); + } else if (connector instanceof Tinyman) { + return tinymanTrade(chain as unknown as Algorand, connector, req); } else { return refTrade(chain, connector, req); } @@ -152,14 +169,19 @@ export async function poolPrice( export async function estimateGas( req: NetworkSelectionRequest ): Promise { - const chain = await getChain(req.chain, req.network); - const connector: Uniswapish | RefAMMish = await getConnector< + const chain = await getChain( + req.chain, + req.network + ); + const connector: Uniswapish | RefAMMish | Tinyman = await getConnector< Uniswapish | RefAMMish >(req.chain, req.network, req.connector); // we currently use the presence of routerAbi to distinguish Uniswapish from RefAMMish if ('routerAbi' in connector) { return uniswapEstimateGas(chain, connector); + } else if (connector instanceof Tinyman) { + return tinymanEstimateGas(chain as unknown as Algorand, connector); } else { return refEstimateGas(chain, connector); } diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index ce2719ed1b..33dec7290a 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -1,6 +1,6 @@ import LRUCache from 'lru-cache'; import { getAlgorandConfig } from './algorand.config'; -import { Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; +import { Account, Algodv2, Indexer, mnemonicToSecretKey } from 'algosdk'; import { AlgorandAsset, PollResponse } from './algorand.requests'; import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; import { TokenListType, walletPath } from '../../services/base'; @@ -11,11 +11,6 @@ import { promises as fs } from 'fs'; type AssetListType = TokenListType; -export interface AlgorandAccount { - address: string; - mnemonic: string; -} - export class Algorand { public nativeTokenSymbol; private _assetMap: Record = {}; @@ -163,17 +158,10 @@ export class Algorand { }; } - public getAccountFromPrivateKey(mnemonic: string): AlgorandAccount { - const account = mnemonicToSecretKey(mnemonic); - const address = account.addr; - - return { - address, - mnemonic, - }; + public getAccountFromPrivateKey(mnemonic: string): Account { + return mnemonicToSecretKey(mnemonic); } - - async getAccountFromAddress(address: string): Promise { + async getAccountFromAddress(address: string): Promise { const path = `${walletPath}/${this._chain}`; const encryptedMnemonic: string = await fse.readFile( `${path}/${address}.json`, @@ -185,7 +173,7 @@ export class Algorand { } const mnemonic = this.decrypt(encryptedMnemonic, passphrase); - return this.getAccountFromPrivateKey(mnemonic); + return mnemonicToSecretKey(mnemonic); } public encrypt(mnemonic: string, password: string): string { @@ -220,7 +208,7 @@ export class Algorand { } public async getAssetBalance( - account: AlgorandAccount, + account: Account, assetName: string ): Promise { const algorandAsset = this._assetMap[assetName]; @@ -228,7 +216,7 @@ export class Algorand { try { const response = await this._algod - .accountAssetInformation(account.address, algorandAsset.assetId) + .accountAssetInformation(account.addr, algorandAsset.assetId) .do(); balance = response['asset-holding'].amount; } catch (error: any) { @@ -242,10 +230,8 @@ export class Algorand { return amount.toString(); } - public async getNativeBalance(account: AlgorandAccount): Promise { - const accountInfo = await this._algod - .accountInformation(account.address) - .do(); + public async getNativeBalance(account: Account): Promise { + const accountInfo = await this._algod.accountInformation(account.addr).do(); const algoAsset = this._assetMap[this.nativeTokenSymbol]; return ( accountInfo.amount * parseFloat(`1e-${algoAsset.decimals}`) diff --git a/src/connectors/tinyman/tinyman.config.ts b/src/connectors/tinyman/tinyman.config.ts index 7db6b0c62d..b49f9f9796 100644 --- a/src/connectors/tinyman/tinyman.config.ts +++ b/src/connectors/tinyman/tinyman.config.ts @@ -7,8 +7,6 @@ import { AvailableNetworks } from '../../services/config-manager-types'; export namespace TinymanConfig { export interface NetworkConfig { allowedSlippage: string; - gasLimitEstimate: number; - ttl: number; tradingTypes: Array; availableNetworks: Array; } @@ -17,11 +15,9 @@ export namespace TinymanConfig { allowedSlippage: ConfigManagerV2.getInstance().get( 'tinyman.allowedSlippage' ), - gasLimitEstimate: ConfigManagerV2.getInstance().get( - 'tinyman.gasLimitEstimate' - ), - ttl: ConfigManagerV2.getInstance().get('tinyman.ttl'), tradingTypes: ['EVM_AMM'], - availableNetworks: [{ chain: 'algorand', networks: ['mainnet'] }], + availableNetworks: [ + { chain: 'algorand', networks: ['mainnet', 'testnet'] }, + ], }; } diff --git a/src/connectors/tinyman/tinyman.controllers.ts b/src/connectors/tinyman/tinyman.controllers.ts new file mode 100644 index 0000000000..cb8e25edcf --- /dev/null +++ b/src/connectors/tinyman/tinyman.controllers.ts @@ -0,0 +1,160 @@ +import Decimal from 'decimal.js-light'; +import { + HttpException, + PRICE_FAILED_ERROR_CODE, + PRICE_FAILED_ERROR_MESSAGE, + TRADE_FAILED_ERROR_CODE, + TRADE_FAILED_ERROR_MESSAGE, + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_CODE, + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_MESSAGE, + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_CODE, + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_MESSAGE, + UNKNOWN_ERROR_ERROR_CODE, + UNKNOWN_ERROR_MESSAGE, +} from '../../services/error-handler'; +import { latency } from '../../services/base'; +import { logger } from '../../services/logger'; +import { + EstimateGasResponse, + PriceRequest, + PriceResponse, + TradeRequest, + TradeResponse, +} from '../../amm/amm.requests'; +import { Tinyman } from './tinyman'; +import { Account } from 'algosdk'; +import { Algorand } from '../../chains/algorand/algorand'; + +export async function price( + algorand: Algorand, + tinyman: Tinyman, + req: PriceRequest +): Promise { + const startTimestamp: number = Date.now(); + let trade; + try { + trade = await tinyman.estimateTrade(req); + } catch (e) { + if (e instanceof Error) { + throw new HttpException( + 500, + PRICE_FAILED_ERROR_MESSAGE + e.message, + PRICE_FAILED_ERROR_CODE + ); + } else { + throw new HttpException( + 500, + UNKNOWN_ERROR_MESSAGE, + UNKNOWN_ERROR_ERROR_CODE + ); + } + } + + return { + network: algorand.network, + timestamp: startTimestamp, + latency: latency(startTimestamp, Date.now()), + base: req.base, + quote: req.quote, + amount: req.amount, + rawAmount: req.amount, + expectedAmount: String(trade.expectedAmount), + price: String(trade.expectedPrice), + gasPrice: 0, + gasPriceToken: algorand.nativeTokenSymbol, + gasLimit: 0, + gasCost: '0.001', + }; +} + +export async function trade( + algorand: Algorand, + tinyman: Tinyman, + req: TradeRequest +): Promise { + const startTimestamp: number = Date.now(); + + const limitPrice = req.limitPrice; + const account: Account = await algorand.getAccountFromAddress(req.address); + + let trade; + try { + trade = await tinyman.estimateTrade(req); + } catch (e) { + throw new HttpException( + 500, + TRADE_FAILED_ERROR_MESSAGE, + TRADE_FAILED_ERROR_CODE + ); + } + + const estimatedPrice = trade.expectedPrice; + logger.info( + `Expected execution price is ${estimatedPrice}, ` + + `limit price is ${limitPrice}.` + ); + + if (req.side === 'BUY') { + if (limitPrice && new Decimal(estimatedPrice).gt(new Decimal(limitPrice))) { + logger.error('Swap price exceeded limit price.'); + throw new HttpException( + 500, + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_MESSAGE( + estimatedPrice, + limitPrice + ), + SWAP_PRICE_EXCEEDS_LIMIT_PRICE_ERROR_CODE + ); + } + } else { + if (limitPrice && new Decimal(estimatedPrice).lt(new Decimal(limitPrice))) { + logger.error('Swap price lower than limit price.'); + throw new HttpException( + 500, + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_MESSAGE( + estimatedPrice, + limitPrice + ), + SWAP_PRICE_LOWER_THAN_LIMIT_PRICE_ERROR_CODE + ); + } + } + const tx = await tinyman.executeTrade( + account, + trade.trade, + req.side === 'BUY' + ); + + logger.info(`${req.side} swap has been executed.`); + + return { + network: algorand.network, + timestamp: startTimestamp, + latency: latency(startTimestamp, Date.now()), + base: req.base, + quote: req.quote, + amount: req.amount, + rawAmount: req.amount, + expectedIn: String(trade.expectedAmount), + price: String(estimatedPrice), + gasPrice: 0, + gasPriceToken: algorand.nativeTokenSymbol, + gasLimit: 0, + gasCost: '0.001', + txHash: tx, + }; +} + +export async function estimateGas( + algorand: Algorand, + _tinyman: Tinyman +): Promise { + return { + network: algorand.network, + timestamp: Date.now(), + gasPrice: 0, + gasPriceToken: algorand.nativeTokenSymbol, + gasLimit: 0, + gasCost: '0.001', + }; +} diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts index 4c5e7ce768..1c0eb0f331 100644 --- a/src/connectors/tinyman/tinyman.ts +++ b/src/connectors/tinyman/tinyman.ts @@ -10,25 +10,28 @@ import { } from '@tinymanorg/tinyman-js-sdk'; import { V2SwapExecution } from '@tinymanorg/tinyman-js-sdk/dist/swap/types'; import { Account } from 'algosdk'; +import { pow } from 'mathjs'; +import { PriceRequest } from '../../amm/amm.requests'; import { Algorand } from '../../chains/algorand/algorand'; import { AlgorandAsset } from '../../chains/algorand/algorand.requests'; import { percentRegexp } from '../../services/config-manager-v2'; +import { + HttpException, + TOKEN_NOT_SUPPORTED_ERROR_CODE, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, +} from '../../services/error-handler'; import { logger } from '../../services/logger'; import { TinymanConfig } from './tinyman.config'; export class Tinyman { private static _instances: { [name: string]: Tinyman }; private chain: Algorand; - private _gasLimitEstimate: number; - private _ttl: number; private _ready: boolean = false; private _config: TinymanConfig.NetworkConfig; private constructor(network: string) { this._config = TinymanConfig.config; this.chain = Algorand.getInstance(network); - this._ttl = this._config.ttl; - this._gasLimitEstimate = this._config.gasLimitEstimate; } public static getInstance(network: string): Tinyman { @@ -53,20 +56,6 @@ export class Tinyman { return this._ready; } - /** - * Default gas limit for swap transactions. - */ - public get gasLimitEstimate(): number { - return this._gasLimitEstimate; - } - - /** - * Default time-to-live for swap transactions, in seconds. - */ - public get ttl(): number { - return this._ttl; - } - /** * Gets the allowed slippage percent from configuration. */ @@ -112,12 +101,21 @@ export class Tinyman { * @param isBuy Indicate if it's a swapin or swapout */ - async estimateSellTrade( - baseToken: AlgorandAsset, - quoteToken: AlgorandAsset, - amount: number, - isBuy: boolean - ) { + async estimateTrade(req: PriceRequest) { + const baseToken: AlgorandAsset | null = this.chain.getAssetForSymbol( + req.base + ); + const quoteToken: AlgorandAsset | null = this.chain.getAssetForSymbol( + req.quote + ); + if (baseToken === null || quoteToken === null) + throw new HttpException( + 500, + TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, + TOKEN_NOT_SUPPORTED_ERROR_CODE + ); + const amount = Number(req.amount) * pow(10, baseToken.decimals); + const isBuy: boolean = req.side === 'BUY'; const pool: V2PoolInfo = await this.fetchData(baseToken, quoteToken); const quote = await Swap.v2.getQuote({ @@ -138,21 +136,20 @@ export class Tinyman { `${price}` + `${baseToken.symbol}.` ); - const expectedAmount = Number(price) * amount; + const expectedAmount = + req.side === 'BUY' + ? Number(req.amount) + : Number(price) * Number(req.amount); - return { trade: quote, expectedAmount }; + return { trade: quote, expectedAmount, expectedPrice: price }; } /** - * Given a wallet and a Uniswap trade, try to execute it on blockchain. + * Given an account and a tinyman trade, try to execute it on blockchain. * - * @param wallet Wallet + * @param account Algorand account * @param trade Expected trade - * @param gasPrice Base gas price, for pre-EIP1559 transactions - * @param gasLimit Gas limit - * @param nonce (Optional) EVM transaction nonce - * @param maxFeePerGas (Optional) Maximum total fee per gas you want to pay - * @param maxPriorityFeePerGas (Optional) Maximum tip per gas you want to pay + * @param isBuy Used to indicate buy or sell swap */ async executeTrade( diff --git a/src/services/schema/tinyman-schema.json b/src/services/schema/tinyman-schema.json new file mode 100644 index 0000000000..16bee50e7f --- /dev/null +++ b/src/services/schema/tinyman-schema.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "allowedSlippage": { "type": "string" } + }, + "additionalProperties": false, + "required": [ + "allowedSlippage" + ] +} diff --git a/src/services/wallet/wallet.controllers.ts b/src/services/wallet/wallet.controllers.ts index 026300f049..8a7ba86cf9 100644 --- a/src/services/wallet/wallet.controllers.ts +++ b/src/services/wallet/wallet.controllers.ts @@ -103,7 +103,7 @@ export async function addWallet( try { if (connection instanceof Algorand) { - address = connection.getAccountFromPrivateKey(req.privateKey).address; + address = connection.getAccountFromPrivateKey(req.privateKey).addr; encryptedPrivateKey = connection.encrypt(req.privateKey, passphrase); } else if (connection instanceof EthereumBase) { address = connection.getWalletFromPrivateKey(req.privateKey).address; diff --git a/src/templates/root.yml b/src/templates/root.yml index 25dc256e6a..a21004e1d2 100644 --- a/src/templates/root.yml +++ b/src/templates/root.yml @@ -52,6 +52,10 @@ configurations: configurationPath: sushiswap.yml schemaPath: sushiswap-schema.json + $namespace tinyman: + configurationPath: tinyman.yml + schemaPath: tinyman-schema.json + $namespace traderjoe: configurationPath: traderjoe.yml schemaPath: traderjoe-schema.json diff --git a/src/templates/tinyman.yml b/src/templates/tinyman.yml new file mode 100644 index 0000000000..4d02117f25 --- /dev/null +++ b/src/templates/tinyman.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/test-helpers/curl/curl.sh b/test-helpers/curl/curl.sh index c4628f82e0..b02e1385f4 100644 --- a/test-helpers/curl/curl.sh +++ b/test-helpers/curl/curl.sh @@ -128,6 +128,8 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/price_xdc_xsswap.json)" https://localhost:15888/amm/price | jq +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/price_tinyman.json)" https://localhost:15888/amm/price | jq + ## trade curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/eth_uniswap_trade.json)" https://localhost:15888/amm/trade | jq @@ -152,6 +154,8 @@ curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: app curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/polygon_sushiswap_trade_sell.json)" https://localhost:15888/amm/trade | jq +curl -s -X POST -k --key $GATEWAY_KEY --cert $GATEWAY_CERT -H "Content-Type: application/json" -d "$(envsubst < ./requests/algorand_tinyman_trade.json)" https://localhost:15888/amm/trade | jq + ## Perp - curie ### Market prices diff --git a/test-helpers/curl/requests/algorand_tinyman_trade.json b/test-helpers/curl/requests/algorand_tinyman_trade.json new file mode 100644 index 0000000000..a01879a582 --- /dev/null +++ b/test-helpers/curl/requests/algorand_tinyman_trade.json @@ -0,0 +1,10 @@ +{ + "address": "$ALGORAND_ADDRESS", + "quote": "USDC", + "base": "ALGO", + "amount": "1", + "side": "BUY", + "chain": "algorand", + "network": "mainnet", + "connector": "tinyman" +} diff --git a/test-helpers/curl/requests/price_tinyman.json b/test-helpers/curl/requests/price_tinyman.json new file mode 100644 index 0000000000..ae61f9ad5c --- /dev/null +++ b/test-helpers/curl/requests/price_tinyman.json @@ -0,0 +1,9 @@ +{ + "connector": "tinyman", + "chain": "algorand", + "network": "mainnet", + "quote": "USDC", + "base": "ALGO", + "amount": "1", + "side": "BUY" +} From 9ec73a2a4c3fd14b5a6747cce39cc6bdec525af5 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 20 Apr 2023 14:40:39 +0300 Subject: [PATCH 10/23] Update test-helpers/curl/requests/algorand_balances.json Co-authored-by: vic-en <31972210+vic-en@users.noreply.github.com> --- test-helpers/curl/requests/algorand_balances.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-helpers/curl/requests/algorand_balances.json b/test-helpers/curl/requests/algorand_balances.json index 691b7376c8..e26df9a027 100644 --- a/test-helpers/curl/requests/algorand_balances.json +++ b/test-helpers/curl/requests/algorand_balances.json @@ -1,7 +1,7 @@ { "chain": "algorand", "network": "mainnet", - "address": "FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA", + "address": "$ALGORAND_ADDRESS", "tokenSymbols": [ "ALGO" ] From 1ecfc3b84d6240aeb40b5e18fbe765f109fe410e Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 20 Apr 2023 14:40:46 +0300 Subject: [PATCH 11/23] Update test-helpers/curl/requests/algorand_opt_in.json Co-authored-by: vic-en <31972210+vic-en@users.noreply.github.com> --- test-helpers/curl/requests/algorand_opt_in.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-helpers/curl/requests/algorand_opt_in.json b/test-helpers/curl/requests/algorand_opt_in.json index f8cf3b4c19..4f2a223feb 100644 --- a/test-helpers/curl/requests/algorand_opt_in.json +++ b/test-helpers/curl/requests/algorand_opt_in.json @@ -1,5 +1,5 @@ { "network": "testnet", - "address": "Y6E7QWFTAI4KWJ4DNSJOLDZ74VU454X5XZLBEPEWMFI7V4GSJ72X3O27HQ", + "address": "$ALGORAND_ADDRESS", "assetSymbol": "USDC" } \ No newline at end of file From 4eae9a8fedef8d92e854979386d1fa991d468c03 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 20 Apr 2023 14:40:54 +0300 Subject: [PATCH 12/23] Update test-helpers/curl/requests/remove_algorand_key.json Co-authored-by: vic-en <31972210+vic-en@users.noreply.github.com> --- test-helpers/curl/requests/remove_algorand_key.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-helpers/curl/requests/remove_algorand_key.json b/test-helpers/curl/requests/remove_algorand_key.json index b1aeef7e04..8018bfd001 100644 --- a/test-helpers/curl/requests/remove_algorand_key.json +++ b/test-helpers/curl/requests/remove_algorand_key.json @@ -1,4 +1,4 @@ { - "address": "FJZ4AJ3EWSNV4PXULFTTT4R5PLMNASEIMWEK5H4EY6E67RGJNSEY7OZEMA", + "address": "$ALGORAND_ADDRESS", "chain": "algorand" } From c8f4fe762bd0315e7ebb96c5e96a4acb15a00f39 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Thu, 20 Apr 2023 18:41:19 +0700 Subject: [PATCH 13/23] (cleanup) Removes leftover to-do comments --- src/chains/algorand/algorand.ts | 2 -- src/chains/injective/injective.config.ts | 2 +- src/chains/injective/injective.mappers.ts | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index 2de224854a..cac150bf70 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -70,7 +70,6 @@ export class Algorand { } public async init(): Promise { - // todo: common EVM-like interface await this.loadAssets(); this._ready = true; return; @@ -130,7 +129,6 @@ export class Algorand { } async getCurrentBlockNumber(): Promise { - // todo: common EVM-like interface const status = await this._algod.status().do(); return status['next-version-round']; } diff --git a/src/chains/injective/injective.config.ts b/src/chains/injective/injective.config.ts index cbacefddbc..23f25f5b0a 100644 --- a/src/chains/injective/injective.config.ts +++ b/src/chains/injective/injective.config.ts @@ -15,7 +15,7 @@ export interface Config { } export function getInjectiveConfig(networkName: string): Config { - networkName = ['mainnet', 'mainnetLB'].includes(networkName) + networkName = ['mainnet', 'mainnetLB', 'mainnetK8s'].includes(networkName) ? 'mainnet' : 'testnet'; const network = getNetworkFromString(networkName); diff --git a/src/chains/injective/injective.mappers.ts b/src/chains/injective/injective.mappers.ts index a719ed352a..6838b99353 100644 --- a/src/chains/injective/injective.mappers.ts +++ b/src/chains/injective/injective.mappers.ts @@ -29,7 +29,7 @@ export function getNetworkFromString(network: string): Network | null { if (network === 'mainnetK8s') { return Network.MainnetK8s; } else if (['mainnet', 'mainnetLB'].includes(network)) { - return Network.MainnetLB; + return Network.MainnetK8s; } else if (network === 'staging') { return Network.Staging; } else if (network === 'public') { From 24510a4d1bb78b3ec1e1597c5235b157ccbd6055 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Thu, 20 Apr 2023 19:32:11 -0500 Subject: [PATCH 14/23] update --- src/amm/amm.controllers.ts | 6 +-- src/chains/algorand/algorand.ts | 9 ++--- src/connectors/tinyman/tinyman.controllers.ts | 2 +- src/connectors/tinyman/tinyman.ts | 37 +++++++++---------- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/amm/amm.controllers.ts b/src/amm/amm.controllers.ts index efd15201ae..152fc1c719 100644 --- a/src/amm/amm.controllers.ts +++ b/src/amm/amm.controllers.ts @@ -70,7 +70,7 @@ import { Algorand } from '../chains/algorand/algorand'; import { Tinyman } from '../connectors/tinyman/tinyman'; export async function price(req: PriceRequest): Promise { - const chain = await getChain( + const chain = await getInitializedChain( req.chain, req.network ); @@ -89,7 +89,7 @@ export async function price(req: PriceRequest): Promise { } export async function trade(req: TradeRequest): Promise { - const chain = await getChain( + const chain = await getInitializedChain( req.chain, req.network ); @@ -172,7 +172,7 @@ export async function poolPrice( export async function estimateGas( req: NetworkSelectionRequest ): Promise { - const chain = await getChain( + const chain = await getInitializedChain( req.chain, req.network ); diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index 271375dc47..591197e905 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -5,6 +5,7 @@ import { Indexer, mnemonicToSecretKey, makeAssetTransferTxnWithSuggestedParamsFromObject, + Account, } from 'algosdk'; import { AlgorandAsset, PollResponse } from './algorand.requests'; import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; @@ -250,13 +251,13 @@ export class Algorand { const assetIndex = this._assetMap[symbol].assetId; const suggestedParams = await this._algod.getTransactionParams().do(); const optInTxn = makeAssetTransferTxnWithSuggestedParamsFromObject({ - from: account.address, + from: account.addr, to: address, suggestedParams, assetIndex, amount: 0, }); - const signedOptInTxn = optInTxn.signTxn(this.getSk(account.mnemonic)); + const signedOptInTxn = optInTxn.signTxn(account.sk); const resp = await this._algod.sendRawTransaction(signedOptInTxn).do(); return resp; } @@ -283,8 +284,4 @@ export class Algorand { } return assetData; } - - private getSk(mnemonic: string) { - return mnemonicToSecretKey(mnemonic).sk; - } } diff --git a/src/connectors/tinyman/tinyman.controllers.ts b/src/connectors/tinyman/tinyman.controllers.ts index cb8e25edcf..497666b7cd 100644 --- a/src/connectors/tinyman/tinyman.controllers.ts +++ b/src/connectors/tinyman/tinyman.controllers.ts @@ -141,7 +141,7 @@ export async function trade( gasPriceToken: algorand.nativeTokenSymbol, gasLimit: 0, gasCost: '0.001', - txHash: tx, + txHash: tx.txnID, }; } diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts index 1c0eb0f331..981a4262bd 100644 --- a/src/connectors/tinyman/tinyman.ts +++ b/src/connectors/tinyman/tinyman.ts @@ -90,15 +90,9 @@ export class Tinyman { } /** - * Given the amount of `baseToken` to put into a transaction, calculate the - * amount of `quoteToken` that can be expected from the transaction. + * This is typically used for calculating token prices. * - * This is typically used for calculating token sell prices. - * - * @param baseToken Token input for the transaction - * @param quoteToken Output from the transaction - * @param amount Amount of `baseToken` to put into the transaction - * @param isBuy Indicate if it's a swapin or swapout + * @param req Price request object */ async estimateTrade(req: PriceRequest) { @@ -108,40 +102,45 @@ export class Tinyman { const quoteToken: AlgorandAsset | null = this.chain.getAssetForSymbol( req.quote ); + if (baseToken === null || quoteToken === null) throw new HttpException( 500, TOKEN_NOT_SUPPORTED_ERROR_MESSAGE, TOKEN_NOT_SUPPORTED_ERROR_CODE ); + const baseAsset = { id: baseToken.assetId, decimals: baseToken.decimals }; + const quoteAsset = { + id: quoteToken.assetId, + decimals: quoteToken.decimals, + }; const amount = Number(req.amount) * pow(10, baseToken.decimals); const isBuy: boolean = req.side === 'BUY'; const pool: V2PoolInfo = await this.fetchData(baseToken, quoteToken); const quote = await Swap.v2.getQuote({ - type: isBuy ? SwapType.FixedOutput : SwapType.FixedInput, + type: isBuy === true ? SwapType.FixedOutput : SwapType.FixedInput, amount: Number(amount.toString()), - assetIn: { id: baseToken.assetId, decimals: baseToken.decimals }, - assetOut: { id: quoteToken.assetId, decimals: quoteToken.decimals }, + assetIn: isBuy === true ? quoteAsset : baseAsset, + assetOut: isBuy === true ? baseAsset : quoteAsset, pool, network: this.chain.network as SupportedNetwork, isSwapRouterEnabled: false, }); const price = - quote.type === SwapQuoteType.Direct - ? quote.data.quote.rate - : quote.data.price_impact; + quote.type === SwapQuoteType.Direct ? quote.data.quote.rate : 0; logger.info( `Best quote for ${baseToken.symbol}-${quoteToken.symbol}: ` + `${price}` + `${baseToken.symbol}.` ); + const expectedPrice = isBuy === true ? 1 / price : price; const expectedAmount = req.side === 'BUY' ? Number(req.amount) - : Number(price) * Number(req.amount); + : expectedPrice * Number(req.amount); - return { trade: quote, expectedAmount, expectedPrice: price }; + return { trade: quote, expectedAmount, expectedPrice }; } /** @@ -161,9 +160,9 @@ export class Tinyman { const fixedSwapTxns = await Swap.v2.generateTxns({ client: this.chain.algod, network, - swapType: isBuy ? SwapType.FixedOutput : SwapType.FixedInput, + swapType: isBuy === true ? SwapType.FixedOutput : SwapType.FixedInput, quote: trade, - slippage: 0.05, + slippage: this.getSlippagePercentage(), initiatorAddr: account.addr, }); const signedTxns = await Swap.v2.signTxns({ @@ -177,7 +176,7 @@ export class Tinyman { signedTxns, }); - logger.info(JSON.stringify(tx)); + logger.info(`Swap transaction Id: ${tx.txnID}`); return tx; } From f1e1f5af52954feeeaa4e5b780c4ca722152e5bc Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Fri, 21 Apr 2023 07:41:17 +0700 Subject: [PATCH 15/23] (refactor) Reverts `sdk-curie`'s version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed85f4f2af..7f4eb4b7f3 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@injectivelabs/wallet-ts": "^1.0.300", "@pancakeswap/sdk": "^2.4.5", "@pangolindex/sdk": "^1.1.0", - "@perp/sdk-curie": "^1.18.0", + "@perp/sdk-curie": "^1.16.0", "@sushiswap/sdk": "^5.0.0-canary.116", "@switchboard-xyz/defikingdoms-sdk": "^1.0.7", "@traderjoe-xyz/sdk": "^1.6.1", From 3cd277326f8bde399b1fed278e51e7a82afdab36 Mon Sep 17 00:00:00 2001 From: Petio Petrov Date: Fri, 21 Apr 2023 08:32:24 +0700 Subject: [PATCH 16/23] (fix) Reverts changes to Injective --- src/chains/injective/injective.config.ts | 2 +- src/chains/injective/injective.mappers.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chains/injective/injective.config.ts b/src/chains/injective/injective.config.ts index 23f25f5b0a..cbacefddbc 100644 --- a/src/chains/injective/injective.config.ts +++ b/src/chains/injective/injective.config.ts @@ -15,7 +15,7 @@ export interface Config { } export function getInjectiveConfig(networkName: string): Config { - networkName = ['mainnet', 'mainnetLB', 'mainnetK8s'].includes(networkName) + networkName = ['mainnet', 'mainnetLB'].includes(networkName) ? 'mainnet' : 'testnet'; const network = getNetworkFromString(networkName); diff --git a/src/chains/injective/injective.mappers.ts b/src/chains/injective/injective.mappers.ts index 6838b99353..a719ed352a 100644 --- a/src/chains/injective/injective.mappers.ts +++ b/src/chains/injective/injective.mappers.ts @@ -29,7 +29,7 @@ export function getNetworkFromString(network: string): Network | null { if (network === 'mainnetK8s') { return Network.MainnetK8s; } else if (['mainnet', 'mainnetLB'].includes(network)) { - return Network.MainnetK8s; + return Network.MainnetLB; } else if (network === 'staging') { return Network.Staging; } else if (network === 'public') { From 83ab624d693eb9f331d8fa76e5a4b8cb4e070aaa Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:52:51 -0500 Subject: [PATCH 17/23] address changes --- src/chains/algorand/algorand.ts | 6 +++++ src/connectors/tinyman/tinyman.config.ts | 3 --- src/connectors/tinyman/tinyman.controllers.ts | 18 +++++++-------- src/connectors/tinyman/tinyman.ts | 22 ++++++++++++++----- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index 591197e905..ce909e11de 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -28,6 +28,9 @@ export class Algorand { private _ready: boolean = false; private _assetListType: AssetListType; private _assetListSource: string; + public gasPrice: number; + public gasLimit: number; + public gasCost: number; constructor( network: string, @@ -43,6 +46,9 @@ export class Algorand { this._indexer = new Indexer('', indexerUrl, 'undefined'); this._assetListType = assetListType; this._assetListSource = assetListSource; + this.gasPrice = 0; + this.gasLimit = 0; + this.gasCost = 0.001; } public get algod(): Algodv2 { diff --git a/src/connectors/tinyman/tinyman.config.ts b/src/connectors/tinyman/tinyman.config.ts index b49f9f9796..b3dc8a5e5a 100644 --- a/src/connectors/tinyman/tinyman.config.ts +++ b/src/connectors/tinyman/tinyman.config.ts @@ -1,9 +1,6 @@ import { ConfigManagerV2 } from '../../services/config-manager-v2'; import { AvailableNetworks } from '../../services/config-manager-types'; -/** - * To-do: Update. - */ export namespace TinymanConfig { export interface NetworkConfig { allowedSlippage: string; diff --git a/src/connectors/tinyman/tinyman.controllers.ts b/src/connectors/tinyman/tinyman.controllers.ts index 497666b7cd..979e680f04 100644 --- a/src/connectors/tinyman/tinyman.controllers.ts +++ b/src/connectors/tinyman/tinyman.controllers.ts @@ -60,10 +60,10 @@ export async function price( rawAmount: req.amount, expectedAmount: String(trade.expectedAmount), price: String(trade.expectedPrice), - gasPrice: 0, + gasPrice: algorand.gasPrice, gasPriceToken: algorand.nativeTokenSymbol, - gasLimit: 0, - gasCost: '0.001', + gasLimit: algorand.gasLimit, + gasCost: String(algorand.gasCost), }; } @@ -137,10 +137,10 @@ export async function trade( rawAmount: req.amount, expectedIn: String(trade.expectedAmount), price: String(estimatedPrice), - gasPrice: 0, + gasPrice: algorand.gasPrice, gasPriceToken: algorand.nativeTokenSymbol, - gasLimit: 0, - gasCost: '0.001', + gasLimit: algorand.gasLimit, + gasCost: String(algorand.gasCost), txHash: tx.txnID, }; } @@ -152,9 +152,9 @@ export async function estimateGas( return { network: algorand.network, timestamp: Date.now(), - gasPrice: 0, + gasPrice: algorand.gasPrice, gasPriceToken: algorand.nativeTokenSymbol, - gasLimit: 0, - gasCost: '0.001', + gasLimit: algorand.gasLimit, + gasCost: String(algorand.gasCost), }; } diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts index 981a4262bd..1e0908147e 100644 --- a/src/connectors/tinyman/tinyman.ts +++ b/src/connectors/tinyman/tinyman.ts @@ -10,9 +10,11 @@ import { } from '@tinymanorg/tinyman-js-sdk'; import { V2SwapExecution } from '@tinymanorg/tinyman-js-sdk/dist/swap/types'; import { Account } from 'algosdk'; +import LRUCache from 'lru-cache'; import { pow } from 'mathjs'; import { PriceRequest } from '../../amm/amm.requests'; import { Algorand } from '../../chains/algorand/algorand'; +import { getAlgorandConfig } from '../../chains/algorand/algorand.config'; import { AlgorandAsset } from '../../chains/algorand/algorand.requests'; import { percentRegexp } from '../../services/config-manager-v2'; import { @@ -24,7 +26,7 @@ import { logger } from '../../services/logger'; import { TinymanConfig } from './tinyman.config'; export class Tinyman { - private static _instances: { [name: string]: Tinyman }; + private static _instances: LRUCache; private chain: Algorand; private _ready: boolean = false; private _config: TinymanConfig.NetworkConfig; @@ -35,14 +37,24 @@ export class Tinyman { } public static getInstance(network: string): Tinyman { + const config = getAlgorandConfig(network); if (Tinyman._instances === undefined) { - Tinyman._instances = {}; + Tinyman._instances = new LRUCache({ + max: config.network.maxLRUCacheInstances, + }); } - if (!(network in Tinyman._instances)) { - Tinyman._instances[network] = new Tinyman(network); + + if (!Tinyman._instances.has(network)) { + if (network !== null) { + Tinyman._instances.set(network, new Tinyman(network)); + } else { + throw new Error( + `Tinyman.getInstance received an unexpected network: ${network}.` + ); + } } - return Tinyman._instances[network]; + return Tinyman._instances.get(network) as Tinyman; } public async init() { From a68fd4d4385b8ff5cab054e0bfb622c3e1ae5b0b Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Wed, 26 Apr 2023 17:00:40 -0500 Subject: [PATCH 18/23] update tinyman --- src/connectors/connectors.routes.ts | 2 +- src/connectors/tinyman/tinyman.config.ts | 2 +- yarn.lock | 382 +++++++++++------------ 3 files changed, 193 insertions(+), 193 deletions(-) diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index 030dffc603..c45290f569 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -128,7 +128,7 @@ export namespace ConnectorsRoutes { { name: 'tinyman', trading_type: TinymanConfig.config.tradingTypes, - available_networks: DexalotCLOBConfig.config.availableNetworks, + available_networks: TinymanConfig.config.availableNetworks, }, ], }); diff --git a/src/connectors/tinyman/tinyman.config.ts b/src/connectors/tinyman/tinyman.config.ts index b3dc8a5e5a..86d26b802e 100644 --- a/src/connectors/tinyman/tinyman.config.ts +++ b/src/connectors/tinyman/tinyman.config.ts @@ -12,7 +12,7 @@ export namespace TinymanConfig { allowedSlippage: ConfigManagerV2.getInstance().get( 'tinyman.allowedSlippage' ), - tradingTypes: ['EVM_AMM'], + tradingTypes: ['ALGORAND_AMM'], availableNetworks: [ { chain: 'algorand', networks: ['mainnet', 'testnet'] }, ], diff --git a/yarn.lock b/yarn.lock index 6ac8147df7..491b27a682 100644 --- a/yarn.lock +++ b/yarn.lock @@ -956,137 +956,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-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-ca85e672-e100-4690-8600-95d29ec3ba82-1681770717085/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abi-5.7.0-5df6024f-edd5-4261-bfb2-05c3d658a052-1682468955527/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-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-ca1a5a52-afa6-4d96-8733-fa15b595c505-1681770717084/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-provider-5.7.0-9b757152-800c-4d7a-8b00-efa4e62d6de4-1682468955532/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-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-f80e7524-ff58-445f-9ebc-e165d89f88b7-1681770717086/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-cdba44f3-e007-4865-ad6e-882731642ebb-1682468955527/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-cdba44f3-e007-4865-ad6e-882731642ebb-1682468955527/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-cdba44f3-e007-4865-ad6e-882731642ebb-1682468955527/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-cdba44f3-e007-4865-ad6e-882731642ebb-1682468955527/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-abstract-signer-5.7.0-cdba44f3-e007-4865-ad6e-882731642ebb-1682468955527/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-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-de302b08-18de-47d9-a2f0-488a62f7958f-1681770717085/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-3bc58fbf-8e4f-4c7d-9c20-dab7b3732d75-1682468955527/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-3bc58fbf-8e4f-4c7d-9c20-dab7b3732d75-1682468955527/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-3bc58fbf-8e4f-4c7d-9c20-dab7b3732d75-1682468955527/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-3bc58fbf-8e4f-4c7d-9c20-dab7b3732d75-1682468955527/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-address-5.7.0-3bc58fbf-8e4f-4c7d-9c20-dab7b3732d75-1682468955527/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-2d489829-70c0-4c95-9c41-9aeec8a6348e-1681770717084/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-base64-5.7.0-586e0e33-6445-49a6-b1ec-77a2bd8e6e6e-1682468955527/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-0ada18f8-3906-42bd-a118-1418aa972f5d-1681770717084/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-0ada18f8-3906-42bd-a118-1418aa972f5d-1681770717084/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-dad76727-f7fe-4218-aab6-f8f5a3d469b8-1682468955526/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-basex-5.7.0-dad76727-f7fe-4218-aab6-f8f5a3d469b8-1682468955526/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-2a3cb939-d17f-4eb4-878f-37795c3ae053-1681770717085/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-2a3cb939-d17f-4eb4-878f-37795c3ae053-1681770717085/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-67a3274b-f841-4da4-9820-9b196db2167e-1682468955528/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bignumber-5.7.0-67a3274b-f841-4da4-9820-9b196db2167e-1682468955528/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-b839ebd7-bccc-4cb6-9018-703835f1b91c-1681770717085/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-bytes-5.7.0-842c68e9-b9f3-4a5e-8506-940bf0e60848-1682468955527/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-2f640ea4-dc4a-4905-a321-711f3f48ec07-1681770717087/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-constants-5.7.0-11c73893-2143-4fd5-9c72-745790e0c13d-1682468955528/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-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-92a8a667-a382-4d02-aae8-c23e16e731d6-1681770717088/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-contracts-5.6.0-a5bb1393-e5ef-44a3-b2c7-83c73b170c8a-1682468955528/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-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-80fa2f7e-307b-4284-98aa-649df6982694-1681770717087/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hash-5.7.0-b12a2f01-4c0d-4a99-a546-d569fddcff15-1682468955530/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-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-624bdeec-f37f-49aa-9743-2aa2a2f8b105-1681770717086/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-hdnode-5.7.0-3a00cc41-ca3a-4686-a2f5-3b3b8446614b-1682468955529/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-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-f9a1bf4a-82e8-4adc-b582-fa8dc08ff8e4-1681770717088/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-json-wallets-5.6.0-10534137-2fc8-4dce-87a2-af66e1a2af68-1682468955528/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-ae6fbf76-d550-422e-ad1d-d897fbc7cc99-1681770717089/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-keccak256-5.7.0-02eb02fd-3101-4a0d-8169-e334d5740f00-1682468955529/node_modules/@ethersproject-xdc/bytes" js-sha3 "0.8.0" "@ethersproject-xdc/logger@file:vendor/@ethersproject-xdc/logger": @@ -1095,67 +1095,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-331beffa-a28f-4566-8747-6773f8caa428-1681770717087/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-networks-5.7.1-7222cc39-5481-4de5-9b4e-b94e6443a83c-1682468955535/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-b8ed91bc-992d-4bdc-9c47-274eb0b49ca2-1681770717088/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-b8ed91bc-992d-4bdc-9c47-274eb0b49ca2-1681770717088/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-972baf08-d857-4157-8f36-0f493ebb7b9c-1682468955529/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-pbkdf2-5.7.0-972baf08-d857-4157-8f36-0f493ebb7b9c-1682468955529/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-8eb81fc0-68d6-4b5f-a9b1-4e5de5fd35f9-1681770717090/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-properties-5.7.0-84e3c532-a0c3-4b34-bc72-00c0b289aeea-1682468955531/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-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-7f59f008-6dd5-433b-82ed-9ea5189db342-1681770717089/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-providers-5.6.2-f88cd706-76ee-4b22-b19b-689d11a3f6a7-1682468955531/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-640275d9-8358-4cc3-b92c-ff3edbd03fa1-1681770717089/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-640275d9-8358-4cc3-b92c-ff3edbd03fa1-1681770717089/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-4b93fc02-96a4-47e1-9d41-6f70240d4193-1682468955535/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-random-5.7.0-4b93fc02-96a4-47e1-9d41-6f70240d4193-1682468955535/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-d886d5c5-bea7-4455-90e7-7a11ccea7112-1681770717093/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-d886d5c5-bea7-4455-90e7-7a11ccea7112-1681770717093/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-2d11c497-6dab-4ee8-b362-d1ee5d4cc951-1682468955530/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-rlp-5.7.0-2d11c497-6dab-4ee8-b362-d1ee5d4cc951-1682468955530/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-df40d5b6-7557-493e-bd86-a2879e27d4a5-1681770717093/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-df40d5b6-7557-493e-bd86-a2879e27d4a5-1681770717093/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-5171efc2-7fa6-4dce-922e-d2acc107bae7-1682468955530/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-sha2-5.7.0-5171efc2-7fa6-4dce-922e-d2acc107bae7-1682468955530/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-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-13f2d001-589d-4028-b2b8-f40ffdd1ced5-1681770717093/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-6d70ca41-feca-4925-b970-db1e7e988c6a-1682468955531/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-6d70ca41-feca-4925-b970-db1e7e988c6a-1682468955531/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-signing-key-5.7.0-6d70ca41-feca-4925-b970-db1e7e988c6a-1682468955531/node_modules/@ethersproject-xdc/properties" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -1163,76 +1163,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-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-fd4698fa-cb86-488a-b489-a6f03b75e80d-1681770717093/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-solidity-5.6.0-d32c2938-3d9a-492c-9560-f826a4da7439-1682468955530/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-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-449561b3-b4e1-462b-8771-ea78d4f22d01-1681770717090/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-826c4c3b-5d0e-4f5e-bea3-a02272c3f2ab-1682468955533/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-826c4c3b-5d0e-4f5e-bea3-a02272c3f2ab-1682468955533/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-strings-5.7.0-826c4c3b-5d0e-4f5e-bea3-a02272c3f2ab-1682468955533/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-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-4ed6f3a5-5e79-48e8-9e59-a7cde5100c4e-1681770717094/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-transactions-5.7.0-3bd1c294-f8a9-454d-988d-dfc0d793bb02-1682468955536/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-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-79858b3f-74ef-42b9-99e6-a17e005f31a0-1681770717094/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-dbd45ff4-dc9a-4927-bf5e-e119e4f2b293-1682468955535/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-dbd45ff4-dc9a-4927-bf5e-e119e4f2b293-1682468955535/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-units-5.6.0-dbd45ff4-dc9a-4927-bf5e-e119e4f2b293-1682468955535/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-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-d3392dad-9a0a-4136-9f75-321981316853-1681770717095/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wallet-5.6.0-31688cef-c9fe-4ccb-9493-664d96f5ad77-1682468955537/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-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-6f19161e-fda7-4174-a5f0-cfd586520be2-1681770717095/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-c440448b-0b0b-467c-919e-eafe6912e54c-1682468955537/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-c440448b-0b0b-467c-919e-eafe6912e54c-1682468955537/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-c440448b-0b0b-467c-919e-eafe6912e54c-1682468955537/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-c440448b-0b0b-467c-919e-eafe6912e54c-1682468955537/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-web-5.7.1-c440448b-0b0b-467c-919e-eafe6912e54c-1682468955537/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-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-34986e6a-01af-4a2f-aed3-5d796ce74ac4-1681770717094/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-a985a11e-3c0d-4a70-872d-1ff95c628177-1682468955536/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-a985a11e-3c0d-4a70-872d-1ff95c628177-1682468955536/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-a985a11e-3c0d-4a70-872d-1ff95c628177-1682468955536/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-a985a11e-3c0d-4a70-872d-1ff95c628177-1682468955536/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-@ethersproject-xdc-wordlists-5.7.0-a985a11e-3c0d-4a70-872d-1ff95c628177-1682468955536/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" @@ -3325,17 +3325,17 @@ resolved "https://registry.yarnpkg.com/@pedrouid/environment/-/environment-1.0.1.tgz#858f0f8a057340e0b250398b75ead77d6f4342ec" integrity sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug== -"@perp/curie-deployments@2022.12.20-1671509278203": - version "2022.12.20-1671509278203" - resolved "https://registry.yarnpkg.com/@perp/curie-deployments/-/curie-deployments-2022.12.20-1671509278203.tgz#16c716936741df41cd91171d3d75575eb49971d8" - integrity sha512-zEHFTzg7S/4V2uRmFQZVrQDghWE8uyMYedp/tMdgKdNCiUaGbsm7c0dBAdO1HxFA49JrshhefJ9rjoaCMLvGTQ== +"@perp/curie-deployments@2023.4.12-1681295833590": + version "2023.4.12-1681295833590" + resolved "https://registry.yarnpkg.com/@perp/curie-deployments/-/curie-deployments-2023.4.12-1681295833590.tgz#d4f0afe189ec37799dc32b53242db56fc18f2f14" + integrity sha512-NJbTy3frix5AQS5Bk/littykkmQ/m1rFD5HUQG8b0SDVGsqvIsSr5NSlhwb+UGJS7EHtgxevh4P4dTPc4dN6lQ== -"@perp/sdk-curie@^1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@perp/sdk-curie/-/sdk-curie-1.18.0.tgz#8b1400390b066ed6109140d7c2ae7f42462e932e" - integrity sha512-im2uk0xq42PzLw2OHcDmp/I9Nie1eSBD0D+xFd4N6MlJ1ilVSzex88jdZfxJJG9aKts9DLxNNzz6hFh0poDxGA== +"@perp/sdk-curie@^1.16.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@perp/sdk-curie/-/sdk-curie-1.20.0.tgz#3d070a3626b35d605003523705d9781c8a6e711e" + integrity sha512-J1cVhqfbI04glsDZjbZT82OG31U9yLRzc4pPVBhEhzMk74PY8EhiO6BDbo8X/5AreMQk+8HKzbSXr/FhBR6yag== dependencies: - "@perp/curie-deployments" "2022.12.20-1671509278203" + "@perp/curie-deployments" "2023.4.12-1681295833590" cross-fetch "3.1.5" exponential-backoff "3.1.0" @@ -9585,36 +9585,36 @@ ethereumjs-vm@^2.3.4: "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-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abi" - "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abstract-provider" - "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/abstract-signer" - "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/address" - "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/base64" - "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/basex" - "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/bignumber" - "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/bytes" - "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/constants" - "@ethersproject-xdc/contracts" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/contracts" - "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/hash" - "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/hdnode" - "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/json-wallets" - "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/keccak256" - "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/logger" - "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/networks" - "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/pbkdf2" - "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/properties" - "@ethersproject-xdc/providers" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/providers" - "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/random" - "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/rlp" - "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/sha2" - "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/signing-key" - "@ethersproject-xdc/solidity" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/solidity" - "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/strings" - "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/transactions" - "@ethersproject-xdc/units" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/units" - "@ethersproject-xdc/wallet" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/wallet" - "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/web" - "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-2f496820-d49e-4a35-80b1-7cfbf1d4dfc1-1681770717073/node_modules/@ethersproject-xdc/wordlists" + "@ethersproject-xdc/abi" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/abi" + "@ethersproject-xdc/abstract-provider" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/abstract-provider" + "@ethersproject-xdc/abstract-signer" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/abstract-signer" + "@ethersproject-xdc/address" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/address" + "@ethersproject-xdc/base64" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/base64" + "@ethersproject-xdc/basex" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/basex" + "@ethersproject-xdc/bignumber" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/bignumber" + "@ethersproject-xdc/bytes" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/bytes" + "@ethersproject-xdc/constants" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/constants" + "@ethersproject-xdc/contracts" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/contracts" + "@ethersproject-xdc/hash" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/hash" + "@ethersproject-xdc/hdnode" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/hdnode" + "@ethersproject-xdc/json-wallets" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/json-wallets" + "@ethersproject-xdc/keccak256" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/keccak256" + "@ethersproject-xdc/logger" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/logger" + "@ethersproject-xdc/networks" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/networks" + "@ethersproject-xdc/pbkdf2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/pbkdf2" + "@ethersproject-xdc/properties" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/properties" + "@ethersproject-xdc/providers" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/providers" + "@ethersproject-xdc/random" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/random" + "@ethersproject-xdc/rlp" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/rlp" + "@ethersproject-xdc/sha2" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/sha2" + "@ethersproject-xdc/signing-key" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/signing-key" + "@ethersproject-xdc/solidity" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/solidity" + "@ethersproject-xdc/strings" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/strings" + "@ethersproject-xdc/transactions" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/transactions" + "@ethersproject-xdc/units" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/units" + "@ethersproject-xdc/wallet" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/wallet" + "@ethersproject-xdc/web" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/web" + "@ethersproject-xdc/wordlists" "file:../../../../Library/Caches/Yarn/v6/npm-ethers-xdc-5.7.2-579f645f-53cc-436e-a696-5ca1dc0bea41-1682468955518/node_modules/@ethersproject-xdc/wordlists" ethers@4.0.0-beta.3: version "4.0.0-beta.3" From bc1b2177b99fc7f6455c32bdb4aa4d5d7a2a5f99 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Wed, 26 Apr 2023 20:51:25 -0500 Subject: [PATCH 19/23] add unit test --- src/connectors/tinyman/tinyman.ts | 4 +- test/connectors/tinyman/tinyman.test.ts | 258 ++++++++++++++++++++++++ 2 files changed, 260 insertions(+), 2 deletions(-) create mode 100644 test/connectors/tinyman/tinyman.test.ts diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts index 1e0908147e..5bf959614f 100644 --- a/src/connectors/tinyman/tinyman.ts +++ b/src/connectors/tinyman/tinyman.ts @@ -71,7 +71,7 @@ export class Tinyman { /** * Gets the allowed slippage percent from configuration. */ - getSlippagePercentage(): number { + getSlippage(): number { const allowedSlippage = this._config.allowedSlippage; const nd = allowedSlippage.match(percentRegexp); let slippage = 0.0; @@ -174,7 +174,7 @@ export class Tinyman { network, swapType: isBuy === true ? SwapType.FixedOutput : SwapType.FixedInput, quote: trade, - slippage: this.getSlippagePercentage(), + slippage: this.getSlippage(), initiatorAddr: account.addr, }); const signedTxns = await Swap.v2.signTxns({ diff --git a/test/connectors/tinyman/tinyman.test.ts b/test/connectors/tinyman/tinyman.test.ts new file mode 100644 index 0000000000..425a574d82 --- /dev/null +++ b/test/connectors/tinyman/tinyman.test.ts @@ -0,0 +1,258 @@ +jest.useFakeTimers(); +import { Tinyman } from '../../../src/connectors/tinyman/tinyman'; +import { patch, unpatch } from '../../services/patch'; +import { Algorand } from '../../../src/chains/algorand/algorand'; +import { poolUtils, Swap } from '@tinymanorg/tinyman-js-sdk'; +import { getAlgorandConfig } from '../../../src/chains/algorand/algorand.config'; + +let algorand: Algorand; +let tm: Tinyman; +const EXPECTED_CURRENT_BLOCK_NUMBER = 100; +const CHAIN_NAME = 'algorand'; +const NETWORK = 'testnet'; +const CONFIG = getAlgorandConfig(NETWORK); +const NATIVE_TOKEN = CONFIG.nativeCurrencySymbol; +const NATIVE_TOKEN_ID = 0; +const USDC_TOKEN = 'USDC'; +const USDC_TOKEN_ID = 10458941; +const MNEUMONIC = + 'share' + + ' general' + + ' gasp' + + ' trial' + + ' until' + + ' jelly' + + ' mobile' + + ' category' + + ' viable' + + ' meadow' + + ' civil' + + ' pigeon' + + ' dream' + + ' vehicle' + + ' process' + + ' crack' + + ' devote' + + ' outside' + + ' ankle' + + ' mobile' + + ' analyst' + + ' stomach' + + ' dignity' + + ' above' + + ' vast'; // mock +const ALGO_DECIMALS = 6; +const USDC_DECIMALS = 6; + +export const patchCurrentBlockNumber = ( + withError: boolean = false, + instance: Algorand | undefined = undefined, + expectedCurrentBlockNumber: number = EXPECTED_CURRENT_BLOCK_NUMBER +) => { + instance = instance !== undefined ? instance : algorand; + patch(instance.algod, 'status', () => { + return withError + ? {} + : { + do: async () => { + return { 'next-version-round': expectedCurrentBlockNumber }; + }, + }; + }); +}; + +export const patchGetAssetData = () => { + patch(algorand, 'getAssetData', async () => { + return [ + { + id: NATIVE_TOKEN_ID.toString(), + is_liquidity_token: false, + name: 'Algorand', + unit_name: NATIVE_TOKEN, + decimals: ALGO_DECIMALS, + total_amount: null, + url: 'https://algorand.org', + is_verified: true, + clawback_address: '', + liquidity_in_usd: '744662.849801994861', + last_day_volume_in_usd: '58.407348762305', + last_week_volume_in_usd: '2261.387003578427', + last_day_price_change: '-0.156310', + is_stable: false, + is_wrapped: false, + }, + { + id: USDC_TOKEN_ID.toString(), + is_liquidity_token: false, + name: 'USDC', + unit_name: USDC_TOKEN, + decimals: USDC_DECIMALS, + total_amount: '18446744073709551615', + url: 'https://centre.io', + is_verified: true, + clawback_address: + 'XM2W7VZODABS6RAL3FENBRKCOF6XLOQZZWIVVZTBYCVH2ADRYKN53CQLXM', + liquidity_in_usd: '210464.272543000000', + last_day_volume_in_usd: '8.000000000000', + last_week_volume_in_usd: '6198.073873000000', + last_day_price_change: '0.000000', + is_stable: false, + is_wrapped: false, + }, + ]; + }); +}; + +beforeAll(async () => { + algorand = Algorand.getInstance(NETWORK); + await algorand.init(); + patchCurrentBlockNumber(); + patchGetAssetData(); + + tm = Tinyman.getInstance(NETWORK); + await tm.init(); +}); + +afterEach(() => { + unpatch(); +}); + +afterAll(async () => { + await algorand.close(); +}); + +const patchSendHelper = () => { + patch(Swap.v2, 'execute', () => { + return { txID: 1234, round: 1 }; + }); +}; + +const patchFetcher = () => { + patch(poolUtils.v2, 'getPoolInfo', () => { + return { + account: { + lsig: { + tag: new Uint8Array([80, 114, 111, 103, 114, 97, 109]), + logic: new Uint8Array([ + 6, 128, 24, 0, 0, 0, 0, 59, 193, 147, 29, 0, 0, 0, 0, 1, 225, 171, + 112, 0, 0, 0, 0, 0, 0, 0, 0, 129, 0, 91, 53, 0, 52, 0, 49, 24, 18, + 68, 49, 25, 129, 1, 18, 68, 129, 1, 67, + ]), + args: undefined, + sig: undefined, + msig: undefined, + }, + sigkey: undefined, + }, + validatorAppID: 1002541853, + asset1ID: 31566704, + asset2ID: 0, + status: 'ready', + contractVersion: 'v2', + asset1ProtocolFees: BigInt('10961420982'), + asset2ProtocolFees: BigInt('48196942141'), + asset1Reserves: BigInt('1200097723737'), + asset2Reserves: BigInt('6633822022882'), + issuedPoolTokens: BigInt('2690871970933'), + cumulativePriceUpdateTimeStamp: 1682547803, + protocolFeeRatio: 6, + totalFeeShare: BigInt('30'), + poolTokenID: 1002590888, + }; + }); +}; + +describe('verify Tinyman estimate Sell Trade', () => { + it('Should return an ExpectedTrade when available', async () => { + patchFetcher(); + + const expectedTrade = await tm.estimateTrade({ + chain: CHAIN_NAME, + network: NETWORK, + base: 'ALGO', + quote: 'USDC', + amount: '1', + side: 'SELL', + }); + expect(expectedTrade).toHaveProperty('trade'); + expect(expectedTrade).toHaveProperty('expectedAmount'); + }); + + it('Should throw an error if no pair is available', async () => { + patchFetcher(); + + await expect(async () => { + await tm.estimateTrade({ + chain: CHAIN_NAME, + network: NETWORK, + base: 'ETH', + quote: 'DAI', + amount: '1', + side: 'SELL', + }); + }).rejects.toThrow(''); + }); +}); + +describe('verify Tinyman estimate Buy Trade', () => { + it('Should return an ExpectedTrade when available', async () => { + patchFetcher(); + + const expectedTrade = await tm.estimateTrade({ + chain: CHAIN_NAME, + network: NETWORK, + base: 'ALGO', + quote: 'USDC', + amount: '1', + side: 'BUY', + }); + expect(expectedTrade).toHaveProperty('trade'); + expect(expectedTrade).toHaveProperty('expectedAmount'); + }); + + it('Should return an error if no pair is available', async () => { + patchFetcher(); + + await expect(async () => { + await tm.estimateTrade({ + chain: CHAIN_NAME, + network: NETWORK, + base: 'ETH', + quote: 'DAI', + amount: '1', + side: 'BUY', + }); + }).rejects.toThrow(''); + }); +}); + +describe('getAllowedSlippage', () => { + it('return value from config when string is null', () => { + const allowedSlippage = tm.getSlippage(); + expect(allowedSlippage).toEqual(0.02); + }); +}); + +describe('verify Tinyman executeTrade', () => { + it('Should pass when pair is available', async () => { + patchFetcher(); + patchSendHelper(); + + const trade = await tm.estimateTrade({ + chain: CHAIN_NAME, + network: NETWORK, + base: 'ALGO', + quote: 'USDC', + amount: '1', + side: 'BUY', + }); + + const tradeResult = await tm.executeTrade( + algorand.getAccountFromPrivateKey(MNEUMONIC), + trade.trade, + true + ); + expect(tradeResult.txnID).toEqual(123); + expect(tradeResult.round).toEqual(1); + }); +}); From 07b655901bf49ffee7559268ad37229dddfef307 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:12:27 -0500 Subject: [PATCH 20/23] update patch and address comment --- src/connectors/tinyman/tinyman.ts | 22 +++++++++------ test/connectors/tinyman/tinyman.test.ts | 37 +++++++++++++++++++------ 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/src/connectors/tinyman/tinyman.ts b/src/connectors/tinyman/tinyman.ts index 5bf959614f..a2cd31371e 100644 --- a/src/connectors/tinyman/tinyman.ts +++ b/src/connectors/tinyman/tinyman.ts @@ -30,10 +30,16 @@ export class Tinyman { private chain: Algorand; private _ready: boolean = false; private _config: TinymanConfig.NetworkConfig; + private _swap; + + public get swap() { + return this._swap; + } private constructor(network: string) { this._config = TinymanConfig.config; this.chain = Algorand.getInstance(network); + this._swap = Swap; } public static getInstance(network: string): Tinyman { @@ -130,7 +136,7 @@ export class Tinyman { const isBuy: boolean = req.side === 'BUY'; const pool: V2PoolInfo = await this.fetchData(baseToken, quoteToken); - const quote = await Swap.v2.getQuote({ + const quote = await this.swap.v2.getQuote({ type: isBuy === true ? SwapType.FixedOutput : SwapType.FixedInput, amount: Number(amount.toString()), assetIn: isBuy === true ? quoteAsset : baseAsset, @@ -159,31 +165,31 @@ export class Tinyman { * Given an account and a tinyman trade, try to execute it on blockchain. * * @param account Algorand account - * @param trade Expected trade + * @param quote Expected trade * @param isBuy Used to indicate buy or sell swap */ async executeTrade( account: Account, - trade: SwapQuote, + quote: SwapQuote, isBuy: boolean ): Promise { const network = this.chain.network as SupportedNetwork; - const fixedSwapTxns = await Swap.v2.generateTxns({ + const fixedSwapTxns = await this.swap.v2.generateTxns({ client: this.chain.algod, network, swapType: isBuy === true ? SwapType.FixedOutput : SwapType.FixedInput, - quote: trade, + quote, slippage: this.getSlippage(), initiatorAddr: account.addr, }); - const signedTxns = await Swap.v2.signTxns({ + const signedTxns = await this.swap.v2.signTxns({ txGroup: fixedSwapTxns, initiatorSigner: this.signerWithSecretKey(account), }); - const tx = await Swap.v2.execute({ + const tx = await this.swap.v2.execute({ client: this.chain.algod, - quote: trade, + quote, txGroup: fixedSwapTxns, signedTxns, }); diff --git a/test/connectors/tinyman/tinyman.test.ts b/test/connectors/tinyman/tinyman.test.ts index 425a574d82..0c85d06c5b 100644 --- a/test/connectors/tinyman/tinyman.test.ts +++ b/test/connectors/tinyman/tinyman.test.ts @@ -2,7 +2,7 @@ jest.useFakeTimers(); import { Tinyman } from '../../../src/connectors/tinyman/tinyman'; import { patch, unpatch } from '../../services/patch'; import { Algorand } from '../../../src/chains/algorand/algorand'; -import { poolUtils, Swap } from '@tinymanorg/tinyman-js-sdk'; +import { poolUtils, SwapQuoteType, } from '@tinymanorg/tinyman-js-sdk'; import { getAlgorandConfig } from '../../../src/chains/algorand/algorand.config'; let algorand: Algorand; @@ -15,6 +15,12 @@ const NATIVE_TOKEN = CONFIG.nativeCurrencySymbol; const NATIVE_TOKEN_ID = 0; const USDC_TOKEN = 'USDC'; const USDC_TOKEN_ID = 10458941; +const TX = { + txnID: 1234, + round: 1, + quote: {}, + assetOut: undefined, +}; const MNEUMONIC = 'share' + ' general' + @@ -105,9 +111,9 @@ export const patchGetAssetData = () => { beforeAll(async () => { algorand = Algorand.getInstance(NETWORK); - await algorand.init(); patchCurrentBlockNumber(); patchGetAssetData(); + await algorand.init(); tm = Tinyman.getInstance(NETWORK); await tm.init(); @@ -121,9 +127,20 @@ afterAll(async () => { await algorand.close(); }); -const patchSendHelper = () => { - patch(Swap.v2, 'execute', () => { - return { txID: 1234, round: 1 }; +const patchSwap = () => { + patch(tm.swap, 'v2', { + getQuote() { + return { type: SwapQuoteType.Direct, data: { quote: { rate: 1 } } }; + }, + generateTxns() { + return []; + }, + signTxns() { + return; + }, + async execute() { + return TX; + }, }); }; @@ -176,6 +193,8 @@ describe('verify Tinyman estimate Sell Trade', () => { }); expect(expectedTrade).toHaveProperty('trade'); expect(expectedTrade).toHaveProperty('expectedAmount'); + expect(expectedTrade.expectedAmount).toEqual(0.180363); + expect(expectedTrade.expectedPrice).toEqual(0.180363); }); it('Should throw an error if no pair is available', async () => { @@ -208,6 +227,8 @@ describe('verify Tinyman estimate Buy Trade', () => { }); expect(expectedTrade).toHaveProperty('trade'); expect(expectedTrade).toHaveProperty('expectedAmount'); + expect(expectedTrade.expectedAmount).toEqual(1); + expect(expectedTrade.expectedPrice).toEqual(0.18145); }); it('Should return an error if no pair is available', async () => { @@ -236,7 +257,7 @@ describe('getAllowedSlippage', () => { describe('verify Tinyman executeTrade', () => { it('Should pass when pair is available', async () => { patchFetcher(); - patchSendHelper(); + patchSwap(); const trade = await tm.estimateTrade({ chain: CHAIN_NAME, @@ -252,7 +273,7 @@ describe('verify Tinyman executeTrade', () => { trade.trade, true ); - expect(tradeResult.txnID).toEqual(123); - expect(tradeResult.round).toEqual(1); + expect(tradeResult.txnID).toEqual(TX.txnID); + expect(tradeResult.round).toEqual(TX.round); }); }); From ebb2579ccdd49330f5db3d2f46fa343bb23b36fa Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Tue, 2 May 2023 03:51:40 -0500 Subject: [PATCH 21/23] update controller --- src/clob/clob.controllers.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/clob/clob.controllers.ts b/src/clob/clob.controllers.ts index ae42d694b2..42ce7624d3 100644 --- a/src/clob/clob.controllers.ts +++ b/src/clob/clob.controllers.ts @@ -252,7 +252,7 @@ export async function perpGetMarkets( request: PerpClobMarketRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -271,7 +271,7 @@ export async function perpGetOrderBooks( request: PerpClobOrderbookRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -290,7 +290,7 @@ export async function perpGetTickers( request: PerpClobTickerRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -309,7 +309,7 @@ export async function perpGetOrders( request: PerpClobGetOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -328,7 +328,7 @@ export async function perpPostOrder( request: PerpClobPostOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -347,7 +347,7 @@ export async function perpDeleteOrder( request: PerpClobDeleteOrderRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -366,7 +366,7 @@ export async function perpEstimateGas( request: NetworkSelectionRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -385,7 +385,7 @@ export async function perpFundingInfo( request: PerpClobFundingInfoRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -404,7 +404,7 @@ export async function perpFundingPayments( request: PerpClobFundingPaymentsRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -423,7 +423,7 @@ export async function perpPositions( request: PerpClobPositionRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -442,7 +442,7 @@ export async function perpTrades( request: PerpClobGetTradesRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -461,7 +461,7 @@ export async function perpLastTradePrice( request: PerpClobGetLastTradePriceRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, @@ -489,7 +489,7 @@ export async function perpBatchOrders( request: PerpClobBatchUpdateRequest ): Promise { const startTimestamp: number = Date.now(); - await getChain(request.chain, request.network); + await getInitializedChain(request.chain, request.network); const connector: any = await getConnector( request.chain, request.network, From 1bd13806530271dec381ba80737889e69ea6f304 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Wed, 17 May 2023 09:27:22 -0500 Subject: [PATCH 22/23] add chain type to tinyman connector config --- src/connectors/connectors.routes.ts | 1 + src/connectors/tinyman/tinyman.config.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/connectors/connectors.routes.ts b/src/connectors/connectors.routes.ts index 917d7e13bd..7deace6d43 100644 --- a/src/connectors/connectors.routes.ts +++ b/src/connectors/connectors.routes.ts @@ -143,6 +143,7 @@ export namespace ConnectorsRoutes { { name: 'tinyman', trading_type: TinymanConfig.config.tradingTypes, + chain_type: TinymanConfig.config.chainType, available_networks: TinymanConfig.config.availableNetworks, }, ], diff --git a/src/connectors/tinyman/tinyman.config.ts b/src/connectors/tinyman/tinyman.config.ts index 86d26b802e..e9e974b991 100644 --- a/src/connectors/tinyman/tinyman.config.ts +++ b/src/connectors/tinyman/tinyman.config.ts @@ -5,6 +5,7 @@ export namespace TinymanConfig { export interface NetworkConfig { allowedSlippage: string; tradingTypes: Array; + chainType: string; availableNetworks: Array; } @@ -12,7 +13,8 @@ export namespace TinymanConfig { allowedSlippage: ConfigManagerV2.getInstance().get( 'tinyman.allowedSlippage' ), - tradingTypes: ['ALGORAND_AMM'], + tradingTypes: ['AMM'], + chainType: 'ALGORAND', availableNetworks: [ { chain: 'algorand', networks: ['mainnet', 'testnet'] }, ], From 886dbd1c53ae46d00ae1f4aa4ab86b491305d5d4 Mon Sep 17 00:00:00 2001 From: vic-en <31972210+vic-en@users.noreply.github.com> Date: Thu, 18 May 2023 14:58:26 -0500 Subject: [PATCH 23/23] update symbols to upper case --- src/chains/algorand/algorand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chains/algorand/algorand.ts b/src/chains/algorand/algorand.ts index ce909e11de..b1ce86ffce 100644 --- a/src/chains/algorand/algorand.ts +++ b/src/chains/algorand/algorand.ts @@ -272,7 +272,7 @@ export class Algorand { const assetData = await this.getAssetData(); for (const result of assetData) { this._assetMap[result.unit_name.toUpperCase()] = { - symbol: result.unit_name, + symbol: result.unit_name.toUpperCase(), assetId: +result.id, decimals: result.decimals, };