From c268df8b19cbab3ba9c594fe4aee6852d9d436c2 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Mon, 4 Jul 2022 13:42:56 +0300 Subject: [PATCH 01/18] Add nft celer services --- package.json | 2 +- .../cross-chain-trade-providers-data.ts | 54 +- .../celer-cross-chain-trade.ts | 18 +- .../nft-celer-cross-chain-contract-abi.ts | 897 ++++++++++ .../nft-celer-cross-chain-contract-address.ts | 1 + .../nft-celer-cross-chain-trade-provider.ts | 38 + .../nft-celer-cross-chain-trade.ts | 75 + yarn.lock | 1485 ++++++++--------- 8 files changed, 1735 insertions(+), 835 deletions(-) create mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts create mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts create mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts create mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts diff --git a/package.json b/package.json index fd61ebe934..59b2d0c149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.2.0-alpha.3", + "version": "2.2.13", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts b/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts index 76b769ea6a..08f11c41f5 100644 --- a/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts +++ b/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts @@ -3,13 +3,7 @@ import { SushiSwapEthereumProvider } from '@rsdk-features/instant-trades/dexes/e import { UniSwapV3EthereumProvider } from '@rsdk-features/instant-trades/dexes/ethereum/uni-swap-v3-ethereum/uni-swap-v3-ethereum-provider'; import { OneinchEthereumProvider } from '@rsdk-features/instant-trades/dexes/ethereum/oneinch-ethereum/oneinch-ethereum-provider'; import { PancakeSwapProvider } from '@rsdk-features/instant-trades/dexes/bsc/pancake-swap/pancake-swap-provider'; -import { SushiSwapBscProvider } from '@rsdk-features/instant-trades/dexes/bsc/sushi-swap-bsc/sushi-swap-bsc-provider'; -import { OneinchBscProvider } from '@rsdk-features/instant-trades/dexes/bsc/oneinch-bsc/oneinch-bsc-provider'; import { QuickSwapProvider } from '@rsdk-features/instant-trades/dexes/polygon/quick-swap/quick-swap-provider'; -import { SushiSwapPolygonProvider } from '@rsdk-features/instant-trades/dexes/polygon/sushi-swap-polygon/sushi-swap-polygon-provider'; -import { UniSwapV3PolygonProvider } from '@rsdk-features/instant-trades/dexes/polygon/uni-swap-v3-polygon/uni-swap-v3-polygon-provider'; -import { AlgebraProvider } from '@rsdk-features/instant-trades/dexes/polygon/algebra/algebra-provider'; -import { OneinchPolygonProvider } from '@rsdk-features/instant-trades/dexes/polygon/oneinch-polygon/oneinch-polygon-provider'; import { PangolinProvider } from '@rsdk-features/instant-trades/dexes/avalanche/pangolin/pangolin-provider'; import { JoeProvider } from '@rsdk-features/instant-trades/dexes/avalanche/joe/joe-provider'; import { SushiSwapAvalancheProvider } from '@rsdk-features/instant-trades/dexes/avalanche/sushi-swap-avalanche/sushi-swap-avalanche-provider'; @@ -64,37 +58,37 @@ export const crossChainTradeProvidersData: DeepReadonly< { ProviderClass: PancakeSwapProvider, methodSuffix: '' - }, - { - ProviderClass: SushiSwapBscProvider, - methodSuffix: '1' - }, - { - ProviderClass: OneinchBscProvider, - methodSuffix: 'Inch' } + // { + // ProviderClass: SushiSwapBscProvider, + // methodSuffix: '1' + // }, + // { + // ProviderClass: OneinchBscProvider, + // methodSuffix: 'Inch' + // } ], [BLOCKCHAIN_NAME.POLYGON]: [ { ProviderClass: QuickSwapProvider, methodSuffix: '' - }, - { - ProviderClass: SushiSwapPolygonProvider, - methodSuffix: '1' - }, - { - ProviderClass: UniSwapV3PolygonProvider, - methodSuffix: 'V3' - }, - { - ProviderClass: AlgebraProvider, - methodSuffix: 'ALGB' - }, - { - ProviderClass: OneinchPolygonProvider, - methodSuffix: 'Inch' } + // { + // ProviderClass: SushiSwapPolygonProvider, + // methodSuffix: '1' + // }, + // { + // ProviderClass: UniSwapV3PolygonProvider, + // methodSuffix: 'V3' + // }, + // { + // ProviderClass: AlgebraProvider, + // methodSuffix: 'ALGB' + // }, + // { + // ProviderClass: OneinchPolygonProvider, + // methodSuffix: 'Inch' + // } ], [BLOCKCHAIN_NAME.AVALANCHE]: [ { diff --git a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts index efd6f6d183..452b8d69e2 100644 --- a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts @@ -25,12 +25,11 @@ import { CROSS_CHAIN_TRADE_TYPE, TradeType } from 'src/features'; * Calculated Celer cross chain trade. */ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { - /** @internal */ public readonly type = CROSS_CHAIN_TRADE_TYPE.CELER; public readonly itType: { from: TradeType; to: TradeType }; - private readonly feeInPercents: number; + public readonly feeInPercents: number; /** @internal */ public static async getGasData( @@ -117,7 +116,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { feeInPercents: number; }, providerAddress: string, - private readonly maxSlippage: number + public readonly maxSlippage: number ) { super(providerAddress); @@ -189,17 +188,6 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { gasPrice, value, onTransactionHash - }, - err => { - const includesErrCode = err?.message?.includes('-32000'); - const allowedErrors = [ - 'insufficient funds for transfer', - 'insufficient funds for gas * price + value' - ]; - const includesPhrase = allowedErrors.some(error => - err?.message?.includes(error) - ); - return includesErrCode && includesPhrase; } ); @@ -252,7 +240,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { }; } - private async calculateSwapValue(amountIn: BigNumber, data: unknown[]): Promise { + protected async calculateSwapValue(amountIn: BigNumber, data: unknown[]): Promise { const contract = this.fromTrade.contract as CelerCrossChainContractData; const { isNative } = this.fromTrade.fromToken; const isBridge = this.fromTrade.fromToken.isEqualTo(this.fromTrade.toToken); diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts new file mode 100644 index 0000000000..66aada0370 --- /dev/null +++ b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts @@ -0,0 +1,897 @@ +import { AbiItem } from 'web3-utils'; + +export const ntfCelerCrossChainContractAbi: AbiItem[] = [ + { + inputs: [ + { internalType: 'uint256[]', name: '_blockchainIDs', type: 'uint256[]' }, + { internalType: 'uint256[]', name: '_cryptoFees', type: 'uint256[]' }, + { internalType: 'uint256[]', name: '_platformFees', type: 'uint256[]' }, + { internalType: 'address[]', name: '_tokens', type: 'address[]' }, + { internalType: 'uint256[]', name: '_minTokenAmounts', type: 'uint256[]' }, + { internalType: 'uint256[]', name: '_maxTokenAmounts', type: 'uint256[]' }, + { internalType: 'address[]', name: '_routers', type: 'address[]' }, + { internalType: 'address', name: '_executor', type: 'address' }, + { internalType: 'address', name: '_messageBus', type: 'address' }, + { internalType: 'address', name: '_nativeWrap', type: 'address' } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, + { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, + { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, + { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } + ], + name: 'BridgeRequestSent', + type: 'event' + }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: 'uint8', name: 'version', type: 'uint8' }], + name: 'Initialized', + type: 'event' + }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: 'address', name: 'messageBus', type: 'address' }], + name: 'MessageBusUpdated', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { indexed: false, internalType: 'uint256', name: 'price', type: 'uint256' } + ], + name: 'NFTPurchased', + type: 'event' + }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }], + name: 'Paused', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { indexed: true, internalType: 'bytes32', name: 'previousAdminRole', type: 'bytes32' }, + { indexed: true, internalType: 'bytes32', name: 'newAdminRole', type: 'bytes32' } + ], + name: 'RoleAdminChanged', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { indexed: true, internalType: 'address', name: 'account', type: 'address' }, + { indexed: true, internalType: 'address', name: 'sender', type: 'address' } + ], + name: 'RoleGranted', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { indexed: true, internalType: 'address', name: 'account', type: 'address' }, + { indexed: true, internalType: 'address', name: 'sender', type: 'address' } + ], + name: 'RoleRevoked', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, + { indexed: false, internalType: 'uint256', name: 'dstAmount', type: 'uint256' }, + { + indexed: false, + internalType: 'enum BridgeBase.SwapStatus', + name: 'status', + type: 'uint8' + } + ], + name: 'SwapRequestDone', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, + { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, + { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, + { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } + ], + name: 'SwapRequestSentInch', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, + { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, + { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, + { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } + ], + name: 'SwapRequestSentV2', + type: 'event' + }, + { + anonymous: false, + inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }], + name: 'Unpaused', + type: 'event' + }, + { stateMutability: 'payable', type: 'fallback' }, + { + inputs: [], + name: 'DEFAULT_ADMIN_ROLE', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'EXECUTOR_ROLE', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'MANAGER_ROLE', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + name: 'MPRegistry', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'RELAYER_ROLE', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'SIGNATURE_LENGTH', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'VALIDATOR_ROLE', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '', type: 'address' }, + { internalType: 'address', name: '', type: 'address' } + ], + name: 'availableIntegratorFee', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'availableRubicFee', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + name: 'blockchainCryptoFee', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { internalType: 'address', name: '_srcBridgeToken', type: 'address' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'bridgeWithSwap', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { internalType: 'address', name: '_srcBridgeToken', type: 'address' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'bridgeWithSwapNative', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: '_id', type: 'bytes32' }, + { internalType: 'enum BridgeBase.SwapStatus', name: '_statusCode', type: 'uint8' } + ], + name: 'changeTxStatus', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address payable', name: '_to', type: 'address' }], + name: 'collectCryptoFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_token', type: 'address' }], + name: 'collectIntegratorFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'address', name: '_integrator', type: 'address' } + ], + name: 'collectIntegratorFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_token', type: 'address' }], + name: 'collectRubicFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: 'hash', type: 'bytes32' }, + { internalType: 'bytes', name: 'signature', type: 'bytes' }, + { internalType: 'uint256', name: 'offset', type: 'uint256' } + ], + name: 'ecOffsetRecover', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'pure', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_sender', type: 'address' }, + { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, + { internalType: 'bytes', name: '_message', type: 'bytes' }, + { internalType: 'address', name: '_executor', type: 'address' } + ], + name: 'executeMessage', + outputs: [ + { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } + ], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '', type: 'address' }, + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_amount', type: 'uint256' }, + { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, + { internalType: 'bytes', name: '_message', type: 'bytes' }, + { internalType: 'address', name: '_executor', type: 'address' } + ], + name: 'executeMessageWithTransfer', + outputs: [ + { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } + ], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '', type: 'address' }, + { internalType: 'address', name: '', type: 'address' }, + { internalType: 'uint256', name: '_amount', type: 'uint256' }, + { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, + { internalType: 'bytes', name: '_message', type: 'bytes' }, + { internalType: 'address', name: '_executor', type: 'address' } + ], + name: 'executeMessageWithTransferFallback', + outputs: [ + { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } + ], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_amount', type: 'uint256' }, + { internalType: 'bytes', name: '_message', type: 'bytes' }, + { internalType: 'address', name: '_executor', type: 'address' } + ], + name: 'executeMessageWithTransferRefund', + outputs: [ + { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } + ], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + name: 'feeAmountOfBlockchain', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'getAvailableRouters', + outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: 'user', type: 'address' }, + { internalType: 'uint256', name: 'amountWithFee', type: 'uint256' }, + { internalType: 'bytes32', name: 'originalTxHash', type: 'bytes32' }, + { internalType: 'uint256', name: 'blockchainNum', type: 'uint256' } + ], + name: 'getHashPacked', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'pure', + type: 'function' + }, + { + inputs: [{ internalType: 'bytes32', name: 'role', type: 'bytes32' }], + name: 'getRoleAdmin', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { internalType: 'address', name: 'account', type: 'address' } + ], + name: 'grantRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { internalType: 'address', name: 'account', type: 'address' } + ], + name: 'hasRole', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'integratorFee', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_who', type: 'address' }], + name: 'isAdmin', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_who', type: 'address' }], + name: 'isManager', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_who', type: 'address' }], + name: 'isRelayer', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_who', type: 'address' }], + name: 'isValidator', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: '_id', type: 'bytes32' }, + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_amount', type: 'uint256' }, + { internalType: 'address', name: '_to', type: 'address' }, + { internalType: 'bool', name: '_nativeOut', type: 'bool' } + ], + name: 'manualRefund', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'maxTokenAmount', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'messageBus', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'minConfirmationSignatures', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'minTokenAmount', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'nativeWrap', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'nonce', + outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'pauseExecution', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'paused', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '', type: 'address' }], + name: 'platformShare', + outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + name: 'processedTransactions', + outputs: [{ internalType: 'enum BridgeBase.SwapStatus', name: '', type: 'uint8' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { internalType: 'address', name: 'account', type: 'address' } + ], + name: 'renounceRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'bytes32', name: 'role', type: 'bytes32' }, + { internalType: 'address', name: 'account', type: 'address' } + ], + name: 'revokeRole', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'uint256', name: '_blockchainID', type: 'uint256' }, + { internalType: 'uint256', name: '_feeAmount', type: 'uint256' } + ], + name: 'setCryptoFeeOfBlockchain', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'uint256', name: '_blockchainID', type: 'uint256' }, + { internalType: 'uint256', name: '_feeAmount', type: 'uint256' } + ], + name: 'setFeeAmountOfBlockchain', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_integrator', type: 'address' }, + { internalType: 'uint256', name: '_fee', type: 'uint256' }, + { internalType: 'uint256', name: '_platformShare', type: 'uint256' } + ], + name: 'setIntegratorFee', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'uint256', name: '_marketID', type: 'uint256' }, + { internalType: 'address', name: '_implementation', type: 'address' } + ], + name: 'setMPRegistry', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_maxTokenAmount', type: 'uint256' } + ], + name: 'setMaxTokenAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_messageBus', type: 'address' }], + name: 'setMessageBus', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'uint256', name: '_minConfirmationSignatures', type: 'uint256' }], + name: 'setMinConfirmationSignatures', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_minTokenAmount', type: 'uint256' } + ], + name: 'setMinTokenAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_nativeWrap', type: 'address' }], + name: 'setNativeWrap', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }], + name: 'supportsInterface', + outputs: [{ internalType: 'bool', name: '', type: 'bool' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_token', type: 'address' }, + { internalType: 'uint256', name: '_amount', type: 'uint256' } + ], + name: 'sweepTokens', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'bytes32', name: 'hash', type: 'bytes32' }], + name: 'toEthSignedMessageHash', + outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], + stateMutability: 'pure', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: '_newAdmin', type: 'address' }], + name: 'transferAdmin', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'data', type: 'bytes' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoInch', + name: '_srcSwap', + type: 'tuple' + }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'transferWithSwapInch', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'data', type: 'bytes' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoInch', + name: '_srcSwap', + type: 'tuple' + }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'transferWithSwapInchNative', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoV2', + name: '_srcSwap', + type: 'tuple' + }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'transferWithSwapV2', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [ + { internalType: 'address', name: '_receiver', type: 'address' }, + { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, + { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoV2', + name: '_srcSwap', + type: 'tuple' + }, + { + components: [ + { internalType: 'address', name: 'dex', type: 'address' }, + { internalType: 'bool', name: 'nativeOut', type: 'bool' }, + { internalType: 'address', name: 'integrator', type: 'address' }, + { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, + { internalType: 'address[]', name: 'path', type: 'address[]' }, + { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, + { + components: [ + { internalType: 'uint256', name: 'marketID', type: 'uint256' }, + { internalType: 'uint256', name: 'value', type: 'uint256' }, + { internalType: 'bytes', name: 'data', type: 'bytes' } + ], + internalType: 'struct SwapBase.NFTInfo', + name: 'NFTPurchaseInfo', + type: 'tuple' + }, + { internalType: 'uint256', name: 'deadline', type: 'uint256' }, + { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } + ], + internalType: 'struct SwapBase.SwapInfoDest', + name: '_dstSwap', + type: 'tuple' + }, + { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } + ], + name: 'transferWithSwapV2Native', + outputs: [], + stateMutability: 'payable', + type: 'function' + }, + { + inputs: [], + name: 'unpauseExecution', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { stateMutability: 'payable', type: 'receive' } +] as AbiItem[]; diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts new file mode 100644 index 0000000000..b93e0295b7 --- /dev/null +++ b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts @@ -0,0 +1 @@ +export const nftCelerCrossChainContractAddress = '0xf5832CB86AFDB364dD617a1297e3B2148936B2d3'; diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts new file mode 100644 index 0000000000..4325286324 --- /dev/null +++ b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts @@ -0,0 +1,38 @@ +import { PriceToken, PriceTokenAmount } from 'src/core'; +import { RequiredCrossChainOptions } from 'src/features/cross-chain/models/cross-chain-options'; +import { CelerCrossChainTradeProvider } from 'src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider'; +import { NftCelerCrossChainTrade } from 'src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade'; + +import { CelerCrossChainTrade } from 'src/features'; + +export class NftCelerCrossChainTradeProvider { + public async calculate( + from: PriceTokenAmount, + to: PriceToken, + swapData: string, + options: RequiredCrossChainOptions + ) { + const celerProvider = new CelerCrossChainTradeProvider(); + const wrappedCelerTrade = await celerProvider.calculate(from, to, options); + + if (!wrappedCelerTrade?.trade) { + console.error('Could not calculate', wrappedCelerTrade?.error); + return null; + } + const celerTrade = wrappedCelerTrade.trade as CelerCrossChainTrade; + + return new NftCelerCrossChainTrade( + { + fromTrade: celerTrade.fromTrade, + toTrade: celerTrade.toTrade, + cryptoFeeToken: celerTrade.cryptoFeeToken, + transitFeeToken: celerTrade.transitFeeToken, + gasData: celerTrade.gasData, + feeInPercents: celerTrade.feeInPercents, + swapData + }, + options.providerAddress, + celerTrade.maxSlippage + ); + } +} diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts new file mode 100644 index 0000000000..690731afb4 --- /dev/null +++ b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts @@ -0,0 +1,75 @@ +import { CelerCrossChainTrade } from 'src/features'; +import { CrossChainContractTrade } from 'src/features/cross-chain/providers/common/celer-rubic/cross-chain-contract-trade'; +import { PriceTokenAmount } from 'src/core'; +import { GasData } from 'src/features/cross-chain/models/gas-data'; +import { ContractParams } from 'src/features/cross-chain/models/contract-params'; +import { CelerCrossChainContractTrade } from 'src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-contract-trade/celer-cross-chain-contract-trade'; +import BigNumber from 'bignumber.js'; +import { nftCelerCrossChainContractAddress } from 'src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address'; +import { ntfCelerCrossChainContractAbi } from 'src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi'; + +export class NftCelerCrossChainTrade extends CelerCrossChainTrade { + private readonly swapData: string; + + protected get fromContractAddress(): string { + return nftCelerCrossChainContractAddress; + } + + constructor( + crossChainTrade: { + fromTrade: CrossChainContractTrade; + toTrade: CrossChainContractTrade; + cryptoFeeToken: PriceTokenAmount; + transitFeeToken: PriceTokenAmount; + gasData: GasData | null; + feeInPercents: number; + swapData: string; + }, + providerAddress: string, + maxSlippage: number + ) { + super(crossChainTrade, providerAddress, maxSlippage); + + this.swapData = crossChainTrade.swapData; + } + + protected async getContractParams(fromAddress?: string): Promise { + const contractAddress = nftCelerCrossChainContractAddress; + const contractAbi = ntfCelerCrossChainContractAbi; + const methodName = 'bridgeWithSwap'; + + const fromTrade = this.fromTrade as CelerCrossChainContractTrade; + const toTrade = this.toTrade as CelerCrossChainContractTrade; + const celerMethodArguments = await fromTrade.getMethodArguments( + toTrade, + fromAddress || this.walletAddress, + this.providerAddress, + { + maxSlippage: this.maxSlippage + } + ); + const dstSwapArguments = celerMethodArguments[4] as Array; + const nftDstSwapArguments = [dstSwapArguments[0]] + .concat(true) + .concat(dstSwapArguments.slice(1, 5)) + .concat([[3, '600000000000000000', this.swapData]]) + .concat(dstSwapArguments.slice(5, 6)) + .concat(['600000000000000000']); + const methodArguments = (['0x4B4044Fda9e2CEe76a554923AFA627C727dA9E29'] as unknown[]) + .concat(celerMethodArguments.slice(1, 4)) + .concat([nftDstSwapArguments]) + .concat(celerMethodArguments.slice(5)); + + const tokenInAmountAbsolute = fromTrade.fromToken.weiAmount; + const msgValue = await this.calculateSwapValue(tokenInAmountAbsolute, methodArguments); + const value = new BigNumber(msgValue).toFixed(0); + + return { + contractAddress, + contractAbi, + methodName, + methodArguments, + value + }; + } +} diff --git a/yarn.lock b/yarn.lock index b0cdbdbd9c..c3093e64b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,12 +24,24 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + "@babel/compat-data@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== -"@babel/core@^7.0.0-0", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": +"@babel/compat-data@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.6.tgz#8b37d24e88e8e21c499d4328db80577d8882fa53" + integrity sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ== + +"@babel/core@^7.0.0-0", "@babel/core@^7.12.3": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.2.tgz#87b2fcd7cce9becaa7f5acebdc4f09f3dd19d876" integrity sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ== @@ -50,6 +62,27 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/core@^7.11.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" + integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helpers" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/generator@^7.18.2", "@babel/generator@^7.7.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" @@ -59,6 +92,15 @@ "@jridgewell/gen-mapping" "^0.3.0" jsesc "^2.5.1" +"@babel/generator@^7.18.6": + version "7.18.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" + integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== + dependencies: + "@babel/types" "^7.18.7" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-compilation-targets@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b" @@ -69,11 +111,26 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" + integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== + dependencies: + "@babel/compat-data" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== +"@babel/helper-environment-visitor@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" + integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== + "@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" @@ -82,6 +139,14 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" +"@babel/helper-function-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" + integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== + dependencies: + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" @@ -89,6 +154,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" @@ -96,6 +168,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-transforms@^7.18.0": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd" @@ -110,6 +189,20 @@ "@babel/traverse" "^7.18.0" "@babel/types" "^7.18.0" +"@babel/helper-module-transforms@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz#57e3ca669e273d55c3cda55e6ebf552f37f483c8" + integrity sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" @@ -122,6 +215,13 @@ dependencies: "@babel/types" "^7.18.2" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" @@ -129,16 +229,33 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + "@babel/helpers@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384" @@ -148,6 +265,15 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" +"@babel/helpers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" + integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" @@ -157,11 +283,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.18.0": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== +"@babel/parser@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.6.tgz#845338edecad65ebffef058d3be851f1d28a63bc" + integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -262,6 +402,15 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/template@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" + integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.7.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8" @@ -278,6 +427,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.6.tgz#a228562d2f46e89258efa4ddd0416942e2fd671d" + integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/types" "^7.18.6" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" @@ -286,6 +451,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.6", "@babel/types@^7.18.7": + version "7.18.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.7.tgz#a4a2c910c15040ea52cdd1ddb1614a65c8041726" + integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -713,173 +886,197 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== +"@jest/console@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.1.tgz#305f8ca50b6e70413839f54c0e002b60a0f2fd7d" + integrity sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" slash "^3.0.0" -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +"@jest/core@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.2.tgz#eac519b9acbd154313854b8823a47b5c645f785a" + integrity sha512-Xo4E+Sb/nZODMGOPt2G3cMmCBqL4/W2Ijwr7/mrXlq4jdJwcFQ/9KrrJZT2adQRk2otVBXXOz1GRQ4Z5iOgvRQ== + dependencies: + "@jest/console" "^28.1.1" + "@jest/reporters" "^28.1.2" + "@jest/test-result" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - emittery "^0.8.1" + ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" + jest-changed-files "^28.0.2" + jest-config "^28.1.2" + jest-haste-map "^28.1.1" + jest-message-util "^28.1.1" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.1" + jest-resolve-dependencies "^28.1.2" + jest-runner "^28.1.2" + jest-runtime "^28.1.2" + jest-snapshot "^28.1.2" + jest-util "^28.1.1" + jest-validate "^28.1.1" + jest-watcher "^28.1.1" micromatch "^4.0.4" + pretty-format "^28.1.1" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== +"@jest/environment@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.2.tgz#94a052c0c5f9f8c8e6d13ea6da78dbc5d7d9b85b" + integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q== dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/fake-timers" "^28.1.2" + "@jest/types" "^28.1.1" "@types/node" "*" - jest-mock "^27.5.1" + jest-mock "^28.1.1" -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== +"@jest/expect-utils@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.1.tgz#d84c346025b9f6f3886d02c48a6177e2b0360587" + integrity sha512-n/ghlvdhCdMI/hTcnn4qV57kQuV9OTsZzH1TTCVARANKhl6hXJqLKUkwX69ftMGpsbpt96SsDD8n8LD2d9+FRw== dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + jest-get-type "^28.0.2" + +"@jest/expect@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.2.tgz#0b25acedff46e1e1e5606285306c8a399c12534f" + integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw== + dependencies: + expect "^28.1.1" + jest-snapshot "^28.1.2" + +"@jest/fake-timers@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.2.tgz#d49e8ee4e02ba85a6e844a52a5e7c59c23e3b76f" + integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg== + dependencies: + "@jest/types" "^28.1.1" + "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^28.1.1" + jest-mock "^28.1.1" + jest-util "^28.1.1" -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== +"@jest/globals@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.2.tgz#92fab296e337c7309c25e4202fb724f62249d83f" + integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg== dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" + "@jest/environment" "^28.1.2" + "@jest/expect" "^28.1.2" + "@jest/types" "^28.1.1" -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== +"@jest/reporters@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.2.tgz#0327be4ce4d0d9ae49e7908656f89669d0c2a260" + integrity sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^28.1.1" + "@jest/test-result" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" + "@jridgewell/trace-mapping" "^0.3.13" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.2" + glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" istanbul-lib-instrument "^5.1.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" + jest-worker "^28.1.1" slash "^3.0.0" - source-map "^0.6.0" string-length "^4.0.1" + strip-ansi "^6.0.0" terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" + v8-to-istanbul "^9.0.1" -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== +"@jest/schemas@^28.0.2": + version "28.0.2" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.0.2.tgz#08c30df6a8d07eafea0aef9fb222c5e26d72e613" + integrity sha512-YVDJZjd4izeTDkij00vHHAymNXQ6WWsdChFRK86qck6Jpr3DCL5W3Is3vslviRlP+bLuMYRLbdp98amMvqudhA== + dependencies: + "@sinclair/typebox" "^0.23.3" + +"@jest/source-map@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.1.2.tgz#7fe832b172b497d6663cdff6c13b0a920e139e24" + integrity sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww== dependencies: + "@jridgewell/trace-mapping" "^0.3.13" callsites "^3.0.0" graceful-fs "^4.2.9" - source-map "^0.6.0" -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== +"@jest/test-result@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.1.tgz#c6f18d1bbb01aa88925dd687872a75f8414b317a" + integrity sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ== dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^28.1.1" + "@jest/types" "^28.1.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== +"@jest/test-sequencer@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz#f594ee2331df75000afe0d1ae3237630ecec732e" + integrity sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA== dependencies: - "@jest/test-result" "^27.5.1" + "@jest/test-result" "^28.1.1" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" + jest-haste-map "^28.1.1" + slash "^3.0.0" -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== +"@jest/transform@^28.1.2": + version "28.1.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.2.tgz#b367962c53fd53821269bde050ce373e111327c1" + integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/types" "^28.1.1" + "@jridgewell/trace-mapping" "^0.3.13" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^28.1.1" + jest-regex-util "^28.0.2" + jest-util "^28.1.1" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" + write-file-atomic "^4.0.1" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== +"@jest/types@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.1.tgz#d059bbc80e6da6eda9f081f293299348bd78ee0b" + integrity sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw== dependencies: + "@jest/schemas" "^28.0.2" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" - "@types/yargs" "^16.0.0" + "@types/yargs" "^17.0.8" chalk "^4.0.0" "@jridgewell/gen-mapping@^0.1.0": @@ -899,6 +1096,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -909,6 +1115,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea" integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ== +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + "@jridgewell/source-map@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" @@ -922,6 +1133,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c" integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": version "0.3.13" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" @@ -969,6 +1188,11 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== +"@sinclair/typebox@^0.23.3": + version "0.23.5" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.23.5.tgz#93f7b9f4e3285a7a9ade7557d9a8d36809cbc47d" + integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -981,10 +1205,10 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== +"@sinonjs/fake-timers@^9.1.2": + version "9.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" + integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== dependencies: "@sinonjs/commons" "^1.7.0" @@ -995,12 +1219,7 @@ dependencies: defer-to-connect "^1.0.1" -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": +"@types/babel__core@^7.1.14": version "7.1.19" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== @@ -1026,7 +1245,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.17.1" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.1.tgz#1a0e73e8c28c7e832656db372b779bfd2ef37314" integrity sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA== @@ -1076,7 +1295,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/graceful-fs@^4.1.2": +"@types/graceful-fs@^4.1.3": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== @@ -1102,13 +1321,13 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^27.0.3": - version "27.5.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" - integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== +"@types/jest@^28.1.2": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.3.tgz#52f3f3e50ce59191ff5fbb1084896cc0cf30c9ce" + integrity sha512-Tsbjk8Y2hkBaY/gJsataeb4q9Mubw9EOz7+4RjPkzD5KjTvHHs7cpws22InaoXxAVAhF5HfFbzJjo6oKWqSZLw== dependencies: - jest-matcher-utils "^27.0.0" - pretty-format "^27.0.0" + jest-matcher-utils "^28.0.0" + pretty-format "^28.0.0" "@types/json-schema@*", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" @@ -1169,10 +1388,10 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== +"@types/yargs@^17.0.8": + version "17.0.10" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.10.tgz#591522fce85d8739bca7b8bb90d048e4478d186a" + integrity sha512-gmEaFwpj/7f/ROdtIlci1R1VYU1J4j95m8T+Tj3iBgiBFKg1foE/PSl93bBd5T9LDXNPo8UlNN6W0qwD8O5OaA== dependencies: "@types/yargs-parser" "*" @@ -1399,11 +1618,6 @@ Base64@~0.2.0: resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" integrity sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw== -abab@^2.0.3, abab@^2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -1412,14 +1626,6 @@ accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - acorn-import-assertions@^1.7.6: version "1.8.0" resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" @@ -1430,22 +1636,17 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - acorn-walk@^8.0.0: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0: +acorn@^8.0.4, acorn@^8.4.1, acorn@^8.5.0: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== @@ -1460,13 +1661,6 @@ aes-js@^3.1.2: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -1692,23 +1886,22 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25" - integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w== +axios@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== dependencies: - follow-redirects "^1.14.4" + follow-redirects "^1.14.8" -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== +babel-jest@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.2.tgz#2b37fb81439f14d34d8b2cc4a4bd7efabf9acbfe" + integrity sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q== dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/transform" "^28.1.2" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" + babel-preset-jest "^28.1.1" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -1724,14 +1917,14 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== +babel-plugin-jest-hoist@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz#5e055cdcc47894f28341f87f5e35aad2df680b11" + integrity sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" + "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: @@ -1752,12 +1945,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== +babel-preset-jest@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz#5b6e5e69f963eb2d70f739c607b8f723c0ee75e4" + integrity sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g== dependencies: - babel-plugin-jest-hoist "^27.5.1" + babel-plugin-jest-hoist "^28.1.1" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -1908,11 +2101,6 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -2262,7 +2450,7 @@ colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.17.tgz#5dd4c0d15e2984b7433cb4a9f2ead45063b80c47" integrity sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2430,23 +2618,6 @@ crypto-browserify@3.12.0, crypto-browserify@^3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -2462,15 +2633,6 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -2478,13 +2640,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -2492,16 +2647,18 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decimal.js-light@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934" integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== -decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -2519,7 +2676,7 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== -deep-is@^0.1.3, deep-is@~0.1.3: +deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== @@ -2597,10 +2754,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== diffie-hellman@^5.0.0: version "5.0.3" @@ -2644,13 +2801,6 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -2692,10 +2842,10 @@ elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +emittery@^0.10.2: + version "0.10.2" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" + integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== emoji-regex@^8.0.0: version "8.0.0" @@ -2847,18 +2997,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - eslint-config-airbnb-base@^14.2.0, eslint-config-airbnb-base@^14.2.1: version "14.2.1" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" @@ -3032,7 +3170,7 @@ espree@^7.3.0, espree@^7.3.1: acorn-jsx "^5.3.1" eslint-visitor-keys "^1.3.0" -esprima@^4.0.0, esprima@^4.0.1: +esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -3248,15 +3386,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== +expect@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.1.tgz#ca6fff65f6517cf7220c2e805a49c19aea30b420" + integrity sha512-/AANEwGL0tWBwzLNOvO0yUdy2D52jVdNXppOqswC49sxMN2cPWsGCQdzuIf9tj6hHoBQzNvx75JUYuQAckPo3w== dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" + "@jest/expect-utils" "^28.1.1" + jest-get-type "^28.0.2" + jest-matcher-utils "^28.1.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" express@^4.14.0: version "4.18.1" @@ -3384,7 +3523,7 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== @@ -3473,7 +3612,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -follow-redirects@^1.14.4: +follow-redirects@^1.14.8: version "1.15.1" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== @@ -3495,15 +3634,6 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -3674,7 +3804,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -3915,13 +4045,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -3956,15 +4079,6 @@ http-https@^1.0.0: resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -3979,14 +4093,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -4279,11 +4385,6 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -4441,219 +4542,179 @@ isurl@^1.0.0-alpha5: has-to-string-tag-x "^1.2.0" is-object "^1.0.1" -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== +jest-changed-files@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-28.0.2.tgz#7d7810660a5bd043af9e9cfbe4d58adb05e91531" + integrity sha512-QX9u+5I2s54ZnGoMEjiM2WeBvJR2J7w/8ZUmH2um/WLAuGAYFQcsVXY9+1YL6k0H/AGUdH8pXUAv6erDqEsvIA== dependencies: - "@jest/types" "^27.5.1" execa "^5.0.0" throat "^6.0.1" -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== +jest-circus@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.2.tgz#0d5a5623eccb244efe87d1edc365696e4fcf80ce" + integrity sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ== dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/environment" "^28.1.2" + "@jest/expect" "^28.1.2" + "@jest/test-result" "^28.1.1" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" - expect "^27.5.1" is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + jest-each "^28.1.1" + jest-matcher-utils "^28.1.1" + jest-message-util "^28.1.1" + jest-runtime "^28.1.2" + jest-snapshot "^28.1.2" + jest-util "^28.1.1" + pretty-format "^28.1.1" slash "^3.0.0" stack-utils "^2.0.3" throat "^6.0.1" -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== +jest-cli@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-28.1.2.tgz#b89012e5bad14135e71b1628b85475d3773a1bbc" + integrity sha512-l6eoi5Do/IJUXAFL9qRmDiFpBeEJAnjJb1dcd9i/VWfVWbp3mJhuH50dNtX67Ali4Ecvt4eBkWb4hXhPHkAZTw== dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/core" "^28.1.2" + "@jest/test-result" "^28.1.1" + "@jest/types" "^28.1.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-config "^28.1.2" + jest-util "^28.1.1" + jest-validate "^28.1.1" prompts "^2.0.1" - yargs "^16.2.0" + yargs "^17.3.1" -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== +jest-config@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.2.tgz#ba00ad30caf62286c86e7c1099e915218a0ac8c6" + integrity sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA== dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^28.1.1" + "@jest/types" "^28.1.1" + babel-jest "^28.1.2" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" - glob "^7.1.1" + glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-circus "^28.1.2" + jest-environment-node "^28.1.2" + jest-get-type "^28.0.2" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.1" + jest-runner "^28.1.2" + jest-util "^28.1.1" + jest-validate "^28.1.1" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^27.5.1" + pretty-format "^28.1.1" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== +jest-diff@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.1.tgz#1a3eedfd81ae79810931c63a1d0f201b9120106c" + integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== dependencies: chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== +jest-docblock@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8" + integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA== dependencies: detect-newline "^3.0.0" -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== +jest-each@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.1.tgz#ba5238dacf4f31d9fe23ddc2c44c01e7c23885c4" + integrity sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + jest-get-type "^28.0.2" + jest-util "^28.1.1" + pretty-format "^28.1.1" + +jest-environment-node@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.2.tgz#3e2eb47f6d173b0648d5f7c717cb1c26651d5c8a" + integrity sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw== + dependencies: + "@jest/environment" "^28.1.2" + "@jest/fake-timers" "^28.1.2" + "@jest/types" "^28.1.1" "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" + jest-mock "^28.1.1" + jest-util "^28.1.1" -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" +jest-get-type@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== +jest-haste-map@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.1.tgz#471685f1acd365a9394745bb97c8fc16289adca3" + integrity sha512-ZrRSE2o3Ezh7sb1KmeLEZRZ4mgufbrMwolcFHNRSjKZhpLa8TdooXOOFlSwoUzlbVs1t0l7upVRW2K7RWGHzbQ== dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" + "@jest/types" "^28.1.1" + "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-regex-util "^28.0.2" + jest-util "^28.1.1" + jest-worker "^28.1.1" micromatch "^4.0.4" - walker "^1.0.7" + walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== +jest-leak-detector@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz#537f37afd610a4b3f4cab15e06baf60484548efb" + integrity sha512-4jvs8V8kLbAaotE+wFR7vfUGf603cwYtFf1/PYEsyX2BAjSzj8hQSVTP6OWzseTl0xL6dyHuKs2JAks7Pfubmw== dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== +jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz#a7c4653c2b782ec96796eb3088060720f1e29304" + integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== dependencies: chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + jest-diff "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== +jest-message-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.1.tgz#60aa0b475cfc08c8a9363ed2fb9108514dd9ab89" + integrity sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^27.5.1" + pretty-format "^28.1.1" slash "^3.0.0" stack-utils "^2.0.3" @@ -4662,12 +4723,12 @@ jest-mock-promise@^2.0.2: resolved "https://registry.yarnpkg.com/jest-mock-promise/-/jest-mock-promise-2.0.2.tgz#560d2617d8d92c2e9be5ea03a8ede6557eb5ee34" integrity sha512-JD5zcuoagmSJ+Gb05iD8o+Ze/viWLzI7QnrVY3Q8FyDVGUH5aXxZON+u7S9ouAt59sLNR97dSMWGezfTkkb5hg== -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== +jest-mock@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.1.tgz#37903d269427fa1ef5b2447be874e1c62a39a371" + integrity sha512-bDCb0FjfsmKweAvE09dZT59IMkzgN0fYBH6t5S45NoJfd2DHkS3ySG2K+hucortryhO3fVuXdlxWcbtIuV/Skw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -4675,165 +4736,157 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== +jest-regex-util@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-28.0.2.tgz#afdc377a3b25fb6e80825adcf76c854e5bf47ead" + integrity sha512-4s0IgyNIy0y9FK+cjoVYoxamT7Zeo7MhzqRGx7YDYmaQn1wucY9rotiGkBzzcMXTtjrCAP/f7f+E0F7+fxPNdw== -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== +jest-resolve-dependencies@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-28.1.2.tgz#ca528858e0c6642d5a1dda8fc7cda10230c275bc" + integrity sha512-OXw4vbOZuyRTBi3tapWBqdyodU+T33ww5cPZORuTWkg+Y8lmsxQlVu3MWtJh6NMlKRTHQetF96yGPv01Ye7Mbg== dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" + jest-regex-util "^28.0.2" + jest-snapshot "^28.1.2" -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== +jest-resolve@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.1.tgz#bc2eaf384abdcc1aaf3ba7c50d1adf01e59095e5" + integrity sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA== dependencies: - "@jest/types" "^27.5.1" chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" + jest-haste-map "^28.1.1" jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-util "^28.1.1" + jest-validate "^28.1.1" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== - dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +jest-runner@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.2.tgz#f293409592a62234285a71237e38499a3554e350" + integrity sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A== + dependencies: + "@jest/console" "^28.1.1" + "@jest/environment" "^28.1.2" + "@jest/test-result" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" - emittery "^0.8.1" + emittery "^0.10.2" graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" + jest-docblock "^28.1.1" + jest-environment-node "^28.1.2" + jest-haste-map "^28.1.1" + jest-leak-detector "^28.1.1" + jest-message-util "^28.1.1" + jest-resolve "^28.1.1" + jest-runtime "^28.1.2" + jest-util "^28.1.1" + jest-watcher "^28.1.1" + jest-worker "^28.1.1" + source-map-support "0.5.13" throat "^6.0.1" -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" +jest-runtime@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.2.tgz#d68f34f814a848555a345ceda23289f14d59a688" + integrity sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw== + dependencies: + "@jest/environment" "^28.1.2" + "@jest/fake-timers" "^28.1.2" + "@jest/globals" "^28.1.2" + "@jest/source-map" "^28.1.2" + "@jest/test-result" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^28.1.1" + jest-message-util "^28.1.1" + jest-mock "^28.1.1" + jest-regex-util "^28.0.2" + jest-resolve "^28.1.1" + jest-snapshot "^28.1.2" + jest-util "^28.1.1" slash "^3.0.0" strip-bom "^4.0.0" -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== +jest-snapshot@^28.1.2: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.2.tgz#93d31b87b11b384f5946fe0767541496135f8d52" + integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA== dependencies: - "@babel/core" "^7.7.2" + "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^28.1.1" + "@jest/transform" "^28.1.2" + "@jest/types" "^28.1.1" + "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.5.1" + expect "^28.1.1" graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-diff "^28.1.1" + jest-get-type "^28.0.2" + jest-haste-map "^28.1.1" + jest-matcher-utils "^28.1.1" + jest-message-util "^28.1.1" + jest-util "^28.1.1" natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" + pretty-format "^28.1.1" + semver "^7.3.5" -jest-util@^27.0.0, jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== +jest-util@^28.0.0, jest-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.1.tgz#ff39e436a1aca397c0ab998db5a51ae2b7080d05" + integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== +jest-validate@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.1.tgz#59b7b339b3c85b5144bd0c06ad3600f503a4acc8" + integrity sha512-Kpf6gcClqFCIZ4ti5++XemYJWUPCFUW+N2gknn+KgnDf549iLul3cBuKVe1YcWRlaF8tZV8eJCap0eECOEE3Ug== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^28.1.1" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.5.1" + jest-get-type "^28.0.2" leven "^3.1.0" - pretty-format "^27.5.1" + pretty-format "^28.1.1" -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== +jest-watcher@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.1.tgz#533597fb3bfefd52b5cd115cd916cffd237fb60c" + integrity sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug== dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/test-result" "^28.1.1" + "@jest/types" "^28.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.5.1" + emittery "^0.10.2" + jest-util "^28.1.1" string-length "^4.0.1" -jest-worker@^27.4.5, jest-worker@^27.5.1: +jest-worker@^27.4.5: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== @@ -4842,14 +4895,24 @@ jest-worker@^27.4.5, jest-worker@^27.5.1: merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.1.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== +jest-worker@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.1.tgz#3480c73247171dfd01eda77200f0063ab6a3bf28" + integrity sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@^28.1.1: + version "28.1.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.2.tgz#451ff24081ce31ca00b07b60c61add13aa96f8eb" + integrity sha512-Tuf05DwLeCh2cfWCQbcz9UxldoDyiR1E9Igaei5khjonKncYdc6LDfynKCEWozK0oLE3GD+xKAo2u8x/0s6GOg== dependencies: - "@jest/core" "^27.5.1" + "@jest/core" "^28.1.2" + "@jest/types" "^28.1.1" import-local "^3.0.2" - jest-cli "^27.5.1" + jest-cli "^28.1.2" js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" @@ -4884,39 +4947,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4957,11 +4987,6 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -json5@2.x, json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -4969,6 +4994,11 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonc-parser@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" @@ -5049,14 +5079,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -5102,7 +5124,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.20, lodash@^4.7.0: +lodash@^4.17.20: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -5498,11 +5520,6 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -5615,18 +5632,6 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -5732,11 +5737,6 @@ parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -5852,11 +5852,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -5879,14 +5874,15 @@ prettier@^2.2.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== -pretty-format@^27.0.0, pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== +pretty-format@^28.0.0, pretty-format@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.1.tgz#f731530394e0f7fcd95aba6b43c50e02d86b95cb" + integrity sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw== dependencies: + "@jest/schemas" "^28.0.2" ansi-regex "^5.0.1" ansi-styles "^5.0.0" - react-is "^17.0.1" + react-is "^18.0.0" process@^0.11.10: version "0.11.10" @@ -5914,7 +5910,7 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -psl@^1.1.28, psl@^1.1.33: +psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== @@ -6015,10 +6011,10 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.0" @@ -6208,13 +6204,6 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - schema-utils@^3.1.0, schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" @@ -6248,7 +6237,7 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@7.x, semver@^7.2.1, semver@^7.3.4, semver@^7.3.5: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -6372,7 +6361,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -6465,7 +6454,15 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6, source-map-support@~0.5.20: +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -6483,16 +6480,11 @@ source-map@^0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -6695,11 +6687,6 @@ symbiosis-js-sdk@^2.6.5: tiny-warning "^1.0.3" toformat "^2.0.0" -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - table@^6.0.9: version "6.8.0" resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca" @@ -6854,15 +6841,6 @@ totalist@^1.0.0: resolved "https://registry.yarnpkg.com/totalist/-/totalist-1.1.0.tgz#a4d65a3e546517701e3e5c37a47a70ac97fe56df" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -6871,13 +6849,6 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -6888,24 +6859,24 @@ ts-essentials@^9.0.0: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-9.1.2.tgz#46db6944b73b4cd603f3d959ef1123c16ba56f59" integrity sha512-EaSmXsAhEiirrTY1Oaa7TSpei9dzuCuFPmjKRJRPamERYtfaGS8/KpOSbjergLz/Y76/aZlV9i/krgzsuWEBbg== -ts-jest@^27.1.2: - version "27.1.5" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297" - integrity sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA== +ts-jest@^28.0.5: + version "28.0.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-28.0.5.tgz#31776f768fba6dfc8c061d488840ed0c8eeac8b9" + integrity sha512-Sx9FyP9pCY7pUzQpy4FgRZf2bhHY3za576HMKJFs+OnQ9jS96Du5vNsDKkyedQkik+sEabbKAnCliv9BEsHZgQ== dependencies: bs-logger "0.x" fast-json-stable-stringify "2.x" - jest-util "^27.0.0" - json5 "2.x" + jest-util "^28.0.0" + json5 "^2.2.1" lodash.memoize "4.x" make-error "1.x" semver "7.x" - yargs-parser "20.x" + yargs-parser "^21.0.1" -ts-loader@^9.2.6: - version "9.3.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.0.tgz#980f4dbfb60e517179e15e10ed98e454b132159f" - integrity sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog== +ts-loader@^9.3.0: + version "9.3.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.1.tgz#fe25cca56e3e71c1087fe48dc67f4df8c59b22d4" + integrity sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -6970,13 +6941,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -7017,10 +6981,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedoc@^0.22.15: - version "0.22.17" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.17.tgz#bc51cc95f569040112504300831cdac4f8089b7b" - integrity sha512-h6+uXHVVCPDaANzjwzdsj9aePBjZiBTpiMpBBeyh1zcN2odVsDCNajz8zyKnixF93HJeGpl34j/70yoEE5BfNg== +typedoc@^0.22.17: + version "0.22.18" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.22.18.tgz#1d000c33b66b88fd8cdfea14a26113a83b7e6591" + integrity sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA== dependencies: glob "^8.0.3" lunr "^2.3.9" @@ -7063,7 +7027,7 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" -universalify@^0.1.0, universalify@^0.1.2: +universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== @@ -7184,14 +7148,14 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-to-istanbul@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" - integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== +v8-to-istanbul@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" + integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== dependencies: + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" - source-map "^0.7.3" varint@^5.0.0: version "5.0.2" @@ -7222,21 +7186,7 @@ vscode-textmate@5.2.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e" integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ== -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7: +walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -7484,16 +7434,6 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - webpack-bundle-analyzer@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz#1b0eea2947e73528754a6f9af3e91b2b6e0f79d5" @@ -7582,18 +7522,6 @@ websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -7602,15 +7530,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -7646,7 +7565,7 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== -word-wrap@^1.2.3, word-wrap@~1.2.3: +word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -7665,15 +7584,13 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== +write-file-atomic@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" + integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ== dependencies: imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" + signal-exit "^3.0.7" ws@7.4.6: version "7.4.6" @@ -7689,7 +7606,7 @@ ws@^3.0.0: safe-buffer "~5.1.0" ultron "~1.1.0" -ws@^7.3.1, ws@^7.4.6: +ws@^7.3.1: version "7.5.8" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== @@ -7731,16 +7648,6 @@ xhr@^2.0.4, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -7766,20 +7673,20 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.x, yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^21.0.0, yargs-parser@^21.0.1: + version "21.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" + integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@^17.3.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.0.0" From 30371612f77b5502d11acacee82ba259e885b2f8 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Mon, 8 Aug 2022 11:51:51 +0300 Subject: [PATCH 02/18] minor fixes for nft-widget --- package.json | 2 +- src/core/index.ts | 6 +- src/core/sdk/sdk.ts | 4 +- .../cross-chain-trade-providers-data.ts | 54 +- .../celer-cross-chain-trade-provider.ts | 21 +- .../celer-cross-chain-trade.ts | 2 +- .../providers/common/cross-chain-trade.ts | 2 +- .../nft-celer-cross-chain-contract-abi.ts | 897 ------------------ .../nft-celer-cross-chain-contract-address.ts | 1 - .../nft-celer-cross-chain-trade-provider.ts | 38 - .../nft-celer-cross-chain-trade.ts | 75 -- .../rubic-cross-chain-trade.ts | 2 +- .../symbiosis-cross-chain-trade.ts | 2 +- 13 files changed, 59 insertions(+), 1047 deletions(-) delete mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts delete mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts delete mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts delete mode 100644 src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts diff --git a/package.json b/package.json index 0718937a9f..6260af7cf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.5.1", + "version": "2.5.2", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/core/index.ts b/src/core/index.ts index 09ea49ffab..4b0a395395 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -5,10 +5,10 @@ export { Web3Pure } from './blockchain/web3-pure/web3-pure'; export { BlockchainsInfo } from './blockchain/blockchains-info'; export { BlockchainName, BLOCKCHAIN_NAME } from './blockchain/models/blockchain-name'; export { Configuration, RpcProvider, WalletProvider } from './sdk/models/configuration'; +export { Token } from './blockchain/tokens/token'; +export { PriceToken } from './blockchain/tokens/price-token'; +export { PriceTokenAmount } from './blockchain/tokens/price-token-amount'; -export type { Token } from './blockchain/tokens/token'; -export type { PriceToken } from './blockchain/tokens/price-token'; -export type { PriceTokenAmount } from './blockchain/tokens/price-token-amount'; export type { BasicTransactionOptions } from './blockchain/models/basic-transaction-options'; export type { Blockchain } from './blockchain/models/blockchain'; export type { TokenBaseStruct } from './blockchain/models/token-base-struct'; diff --git a/src/core/sdk/sdk.ts b/src/core/sdk/sdk.ts index 84713d9af2..df147c4d51 100644 --- a/src/core/sdk/sdk.ts +++ b/src/core/sdk/sdk.ts @@ -44,7 +44,9 @@ export class SDK { /** * Can be used to send transactions and execute smart contracts methods. */ - public readonly web3Private = Injector.web3Private; + public get web3Private(): Web3Private { + return Injector.web3Private; + } /** * Use it to get gas price information. diff --git a/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts b/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts index 08f11c41f5..9dd34dba95 100644 --- a/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts +++ b/src/features/cross-chain/constants/cross-chain-trade-providers-data.ts @@ -26,6 +26,12 @@ import { SushiSwapTelosProvider } from '@rsdk-features/instant-trades/dexes/telo import { ZappyProvider } from '@rsdk-features/instant-trades/dexes/telos/zappy/trisolaris-aurora-provider'; import { OneinchFantomProvider } from 'src/features/instant-trades/dexes/fantom/oneinch-fantom/oneinch-fantom-provider'; import { OneinchAvalancheProvider } from 'src/features/instant-trades/dexes/avalanche/oneinch-avalanche/oneinch-avalanche-provider'; +import { UniSwapV3PolygonProvider } from 'src/features/instant-trades/dexes/polygon/uni-swap-v3-polygon/uni-swap-v3-polygon-provider'; +import { SushiSwapBscProvider } from 'src/features/instant-trades/dexes/bsc/sushi-swap-bsc/sushi-swap-bsc-provider'; +import { OneinchBscProvider } from 'src/features/instant-trades/dexes/bsc/oneinch-bsc/oneinch-bsc-provider'; +import { AlgebraProvider } from 'src/features/instant-trades/dexes/polygon/algebra/algebra-provider'; +import { OneinchPolygonProvider } from 'src/features/instant-trades/dexes/polygon/oneinch-polygon/oneinch-polygon-provider'; +import { SushiSwapPolygonProvider } from 'src/features/instant-trades/dexes/polygon/sushi-swap-polygon/sushi-swap-polygon-provider'; /** * Stores contracts info. @@ -58,37 +64,37 @@ export const crossChainTradeProvidersData: DeepReadonly< { ProviderClass: PancakeSwapProvider, methodSuffix: '' + }, + { + ProviderClass: SushiSwapBscProvider, + methodSuffix: '1' + }, + { + ProviderClass: OneinchBscProvider, + methodSuffix: 'Inch' } - // { - // ProviderClass: SushiSwapBscProvider, - // methodSuffix: '1' - // }, - // { - // ProviderClass: OneinchBscProvider, - // methodSuffix: 'Inch' - // } ], [BLOCKCHAIN_NAME.POLYGON]: [ { ProviderClass: QuickSwapProvider, methodSuffix: '' + }, + { + ProviderClass: SushiSwapPolygonProvider, + methodSuffix: '1' + }, + { + ProviderClass: UniSwapV3PolygonProvider, + methodSuffix: 'V3' + }, + { + ProviderClass: AlgebraProvider, + methodSuffix: 'ALGB' + }, + { + ProviderClass: OneinchPolygonProvider, + methodSuffix: 'Inch' } - // { - // ProviderClass: SushiSwapPolygonProvider, - // methodSuffix: '1' - // }, - // { - // ProviderClass: UniSwapV3PolygonProvider, - // methodSuffix: 'V3' - // }, - // { - // ProviderClass: AlgebraProvider, - // methodSuffix: 'ALGB' - // }, - // { - // ProviderClass: OneinchPolygonProvider, - // methodSuffix: 'Inch' - // } ], [BLOCKCHAIN_NAME.AVALANCHE]: [ { diff --git a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider.ts index 430109968c..b1f5a56598 100644 --- a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider.ts @@ -1,4 +1,9 @@ -import { CROSS_CHAIN_TRADE_TYPE, TRADE_TYPE, TradeType } from 'src/features'; +import { + CROSS_CHAIN_TRADE_TYPE, + TRADE_TYPE, + TradeType, + UniswapV2AbstractProvider +} from 'src/features'; import { BlockchainName, BlockchainsInfo, Web3Pure } from 'src/core'; import { PriceToken } from '@rsdk-core/blockchain/tokens/price-token'; import { PriceTokenAmount } from '@rsdk-core/blockchain/tokens/price-token-amount'; @@ -24,6 +29,10 @@ import { WrappedCrossChainTrade } from '@rsdk-features/cross-chain/providers/com import { LowToSlippageError } from '@rsdk-common/errors/cross-chain/low-to-slippage.error'; import { CrossChainTradeProvider } from 'src/features/cross-chain/providers/common/cross-chain-trade-provider'; +interface CelerCrossChainOptions extends RequiredCrossChainOptions { + isUniV2?: boolean; +} + export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvider { public static isSupportedBlockchain( blockchain: BlockchainName @@ -50,7 +59,7 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi public async calculate( from: PriceTokenAmount, to: PriceToken, - options: RequiredCrossChainOptions + options: CelerCrossChainOptions ): Promise | null> { const fromBlockchain = from.blockchain; const toBlockchain = to.blockchain; @@ -83,7 +92,8 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi fromBlockchain, from, fromTransitToken, - slippages.fromSlippageTolerance + slippages.fromSlippageTolerance, + options.isUniV2 ); const celerSlippage = await this.fetchCelerSlippage( @@ -129,6 +139,7 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi toTransit, to, toSlippageTolerance, + options.isUniV2, [TRADE_TYPE.ONE_INCH] ); @@ -265,6 +276,7 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi from: PriceTokenAmount, toToken: PriceToken, slippageTolerance: number, + isUniV2?: boolean, disabledProviders?: TradeType[] ): Promise { if (compareAddresses(from.address, toToken.address)) { @@ -281,6 +293,7 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi from, toToken, slippageTolerance, + isUniV2, disabledProviders ); } @@ -312,11 +325,13 @@ export class CelerCrossChainTradeProvider extends CelerRubicCrossChainTradeProvi from: PriceTokenAmount, toToken: PriceToken, slippageTolerance: number, + isUniV2?: boolean, disabledProviders?: TradeType[] ): Promise { const contract = this.contracts(blockchain); const promises: Promise[] = contract.providersData .filter(data => !disabledProviders?.some(provider => provider === data.provider.type)) + .filter(data => !isUniV2 || data.provider instanceof UniswapV2AbstractProvider) .map(async (_, providerIndex) => { return this.getItCalculatedTrade( contract, diff --git a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts index 616fb811c9..9decb68498 100644 --- a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts @@ -210,7 +210,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { throw err; } - protected async getContractParams(fromAddress?: string): Promise { + public async getContractParams(fromAddress?: string): Promise { const fromTrade = this.fromTrade as CelerCrossChainContractTrade; const toTrade = this.toTrade as CelerCrossChainContractTrade; diff --git a/src/features/cross-chain/providers/common/cross-chain-trade.ts b/src/features/cross-chain/providers/common/cross-chain-trade.ts index 52ba11d0cb..f5906ff3c5 100644 --- a/src/features/cross-chain/providers/common/cross-chain-trade.ts +++ b/src/features/cross-chain/providers/common/cross-chain-trade.ts @@ -84,7 +84,7 @@ export abstract class CrossChainTrade { */ public abstract swap(options?: SwapTransactionOptions): Promise; - protected abstract getContractParams(fromAddress?: string): Promise; + public abstract getContractParams(fromAddress?: string): Promise; /** * Returns true, if allowance is not enough. diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts deleted file mode 100644 index 66aada0370..0000000000 --- a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi.ts +++ /dev/null @@ -1,897 +0,0 @@ -import { AbiItem } from 'web3-utils'; - -export const ntfCelerCrossChainContractAbi: AbiItem[] = [ - { - inputs: [ - { internalType: 'uint256[]', name: '_blockchainIDs', type: 'uint256[]' }, - { internalType: 'uint256[]', name: '_cryptoFees', type: 'uint256[]' }, - { internalType: 'uint256[]', name: '_platformFees', type: 'uint256[]' }, - { internalType: 'address[]', name: '_tokens', type: 'address[]' }, - { internalType: 'uint256[]', name: '_minTokenAmounts', type: 'uint256[]' }, - { internalType: 'uint256[]', name: '_maxTokenAmounts', type: 'uint256[]' }, - { internalType: 'address[]', name: '_routers', type: 'address[]' }, - { internalType: 'address', name: '_executor', type: 'address' }, - { internalType: 'address', name: '_messageBus', type: 'address' }, - { internalType: 'address', name: '_nativeWrap', type: 'address' } - ], - stateMutability: 'nonpayable', - type: 'constructor' - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, - { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, - { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, - { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } - ], - name: 'BridgeRequestSent', - type: 'event' - }, - { - anonymous: false, - inputs: [{ indexed: false, internalType: 'uint8', name: 'version', type: 'uint8' }], - name: 'Initialized', - type: 'event' - }, - { - anonymous: false, - inputs: [{ indexed: false, internalType: 'address', name: 'messageBus', type: 'address' }], - name: 'MessageBusUpdated', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { indexed: false, internalType: 'uint256', name: 'price', type: 'uint256' } - ], - name: 'NFTPurchased', - type: 'event' - }, - { - anonymous: false, - inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }], - name: 'Paused', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { indexed: true, internalType: 'bytes32', name: 'previousAdminRole', type: 'bytes32' }, - { indexed: true, internalType: 'bytes32', name: 'newAdminRole', type: 'bytes32' } - ], - name: 'RoleAdminChanged', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { indexed: true, internalType: 'address', name: 'account', type: 'address' }, - { indexed: true, internalType: 'address', name: 'sender', type: 'address' } - ], - name: 'RoleGranted', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { indexed: true, internalType: 'address', name: 'account', type: 'address' }, - { indexed: true, internalType: 'address', name: 'sender', type: 'address' } - ], - name: 'RoleRevoked', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, - { indexed: false, internalType: 'uint256', name: 'dstAmount', type: 'uint256' }, - { - indexed: false, - internalType: 'enum BridgeBase.SwapStatus', - name: 'status', - type: 'uint8' - } - ], - name: 'SwapRequestDone', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, - { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, - { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, - { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } - ], - name: 'SwapRequestSentInch', - type: 'event' - }, - { - anonymous: false, - inputs: [ - { indexed: false, internalType: 'bytes32', name: 'id', type: 'bytes32' }, - { indexed: false, internalType: 'uint64', name: 'dstChainId', type: 'uint64' }, - { indexed: false, internalType: 'uint256', name: 'srcAmount', type: 'uint256' }, - { indexed: false, internalType: 'address', name: 'srcToken', type: 'address' } - ], - name: 'SwapRequestSentV2', - type: 'event' - }, - { - anonymous: false, - inputs: [{ indexed: false, internalType: 'address', name: 'account', type: 'address' }], - name: 'Unpaused', - type: 'event' - }, - { stateMutability: 'payable', type: 'fallback' }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'EXECUTOR_ROLE', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'MANAGER_ROLE', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - name: 'MPRegistry', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'RELAYER_ROLE', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'SIGNATURE_LENGTH', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'VALIDATOR_ROLE', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '', type: 'address' }, - { internalType: 'address', name: '', type: 'address' } - ], - name: 'availableIntegratorFee', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'availableRubicFee', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - name: 'blockchainCryptoFee', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { internalType: 'address', name: '_srcBridgeToken', type: 'address' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'bridgeWithSwap', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { internalType: 'address', name: '_srcBridgeToken', type: 'address' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'bridgeWithSwapNative', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: '_id', type: 'bytes32' }, - { internalType: 'enum BridgeBase.SwapStatus', name: '_statusCode', type: 'uint8' } - ], - name: 'changeTxStatus', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address payable', name: '_to', type: 'address' }], - name: 'collectCryptoFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_token', type: 'address' }], - name: 'collectIntegratorFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'address', name: '_integrator', type: 'address' } - ], - name: 'collectIntegratorFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_token', type: 'address' }], - name: 'collectRubicFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: 'hash', type: 'bytes32' }, - { internalType: 'bytes', name: 'signature', type: 'bytes' }, - { internalType: 'uint256', name: 'offset', type: 'uint256' } - ], - name: 'ecOffsetRecover', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_sender', type: 'address' }, - { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, - { internalType: 'bytes', name: '_message', type: 'bytes' }, - { internalType: 'address', name: '_executor', type: 'address' } - ], - name: 'executeMessage', - outputs: [ - { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '', type: 'address' }, - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_amount', type: 'uint256' }, - { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, - { internalType: 'bytes', name: '_message', type: 'bytes' }, - { internalType: 'address', name: '_executor', type: 'address' } - ], - name: 'executeMessageWithTransfer', - outputs: [ - { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '', type: 'address' }, - { internalType: 'address', name: '', type: 'address' }, - { internalType: 'uint256', name: '_amount', type: 'uint256' }, - { internalType: 'uint64', name: '_srcChainId', type: 'uint64' }, - { internalType: 'bytes', name: '_message', type: 'bytes' }, - { internalType: 'address', name: '_executor', type: 'address' } - ], - name: 'executeMessageWithTransferFallback', - outputs: [ - { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_amount', type: 'uint256' }, - { internalType: 'bytes', name: '_message', type: 'bytes' }, - { internalType: 'address', name: '_executor', type: 'address' } - ], - name: 'executeMessageWithTransferRefund', - outputs: [ - { internalType: 'enum IMessageReceiverApp.ExecutionStatus', name: '', type: 'uint8' } - ], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - name: 'feeAmountOfBlockchain', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'getAvailableRouters', - outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: 'user', type: 'address' }, - { internalType: 'uint256', name: 'amountWithFee', type: 'uint256' }, - { internalType: 'bytes32', name: 'originalTxHash', type: 'bytes32' }, - { internalType: 'uint256', name: 'blockchainNum', type: 'uint256' } - ], - name: 'getHashPacked', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [{ internalType: 'bytes32', name: 'role', type: 'bytes32' }], - name: 'getRoleAdmin', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { internalType: 'address', name: 'account', type: 'address' } - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { internalType: 'address', name: 'account', type: 'address' } - ], - name: 'hasRole', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'integratorFee', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_who', type: 'address' }], - name: 'isAdmin', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_who', type: 'address' }], - name: 'isManager', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_who', type: 'address' }], - name: 'isRelayer', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_who', type: 'address' }], - name: 'isValidator', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: '_id', type: 'bytes32' }, - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_amount', type: 'uint256' }, - { internalType: 'address', name: '_to', type: 'address' }, - { internalType: 'bool', name: '_nativeOut', type: 'bool' } - ], - name: 'manualRefund', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'maxTokenAmount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'messageBus', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'minConfirmationSignatures', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'minTokenAmount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nativeWrap', - outputs: [{ internalType: 'address', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'nonce', - outputs: [{ internalType: 'uint64', name: '', type: 'uint64' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [], - name: 'pauseExecution', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [], - name: 'paused', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'platformShare', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - name: 'processedTransactions', - outputs: [{ internalType: 'enum BridgeBase.SwapStatus', name: '', type: 'uint8' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { internalType: 'address', name: 'account', type: 'address' } - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'bytes32', name: 'role', type: 'bytes32' }, - { internalType: 'address', name: 'account', type: 'address' } - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'uint256', name: '_blockchainID', type: 'uint256' }, - { internalType: 'uint256', name: '_feeAmount', type: 'uint256' } - ], - name: 'setCryptoFeeOfBlockchain', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'uint256', name: '_blockchainID', type: 'uint256' }, - { internalType: 'uint256', name: '_feeAmount', type: 'uint256' } - ], - name: 'setFeeAmountOfBlockchain', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_integrator', type: 'address' }, - { internalType: 'uint256', name: '_fee', type: 'uint256' }, - { internalType: 'uint256', name: '_platformShare', type: 'uint256' } - ], - name: 'setIntegratorFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'uint256', name: '_marketID', type: 'uint256' }, - { internalType: 'address', name: '_implementation', type: 'address' } - ], - name: 'setMPRegistry', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_maxTokenAmount', type: 'uint256' } - ], - name: 'setMaxTokenAmount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_messageBus', type: 'address' }], - name: 'setMessageBus', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'uint256', name: '_minConfirmationSignatures', type: 'uint256' }], - name: 'setMinConfirmationSignatures', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_minTokenAmount', type: 'uint256' } - ], - name: 'setMinTokenAmount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_nativeWrap', type: 'address' }], - name: 'setNativeWrap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'bytes4', name: 'interfaceId', type: 'bytes4' }], - name: 'supportsInterface', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_token', type: 'address' }, - { internalType: 'uint256', name: '_amount', type: 'uint256' } - ], - name: 'sweepTokens', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [{ internalType: 'bytes32', name: 'hash', type: 'bytes32' }], - name: 'toEthSignedMessageHash', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'pure', - type: 'function' - }, - { - inputs: [{ internalType: 'address', name: '_newAdmin', type: 'address' }], - name: 'transferAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoInch', - name: '_srcSwap', - type: 'tuple' - }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'transferWithSwapInch', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoInch', - name: '_srcSwap', - type: 'tuple' - }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'transferWithSwapInchNative', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoV2', - name: '_srcSwap', - type: 'tuple' - }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'transferWithSwapV2', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [ - { internalType: 'address', name: '_receiver', type: 'address' }, - { internalType: 'uint256', name: '_amountIn', type: 'uint256' }, - { internalType: 'uint64', name: '_dstChainId', type: 'uint64' }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoV2', - name: '_srcSwap', - type: 'tuple' - }, - { - components: [ - { internalType: 'address', name: 'dex', type: 'address' }, - { internalType: 'bool', name: 'nativeOut', type: 'bool' }, - { internalType: 'address', name: 'integrator', type: 'address' }, - { internalType: 'enum SwapBase.SwapVersion', name: 'version', type: 'uint8' }, - { internalType: 'address[]', name: 'path', type: 'address[]' }, - { internalType: 'bytes', name: 'pathV3', type: 'bytes' }, - { - components: [ - { internalType: 'uint256', name: 'marketID', type: 'uint256' }, - { internalType: 'uint256', name: 'value', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' } - ], - internalType: 'struct SwapBase.NFTInfo', - name: 'NFTPurchaseInfo', - type: 'tuple' - }, - { internalType: 'uint256', name: 'deadline', type: 'uint256' }, - { internalType: 'uint256', name: 'amountOutMinimum', type: 'uint256' } - ], - internalType: 'struct SwapBase.SwapInfoDest', - name: '_dstSwap', - type: 'tuple' - }, - { internalType: 'uint32', name: '_maxBridgeSlippage', type: 'uint32' } - ], - name: 'transferWithSwapV2Native', - outputs: [], - stateMutability: 'payable', - type: 'function' - }, - { - inputs: [], - name: 'unpauseExecution', - outputs: [], - stateMutability: 'nonpayable', - type: 'function' - }, - { stateMutability: 'payable', type: 'receive' } -] as AbiItem[]; diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts deleted file mode 100644 index b93e0295b7..0000000000 --- a/src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address.ts +++ /dev/null @@ -1 +0,0 @@ -export const nftCelerCrossChainContractAddress = '0xf5832CB86AFDB364dD617a1297e3B2148936B2d3'; diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts deleted file mode 100644 index 4325286324..0000000000 --- a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade-provider.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { PriceToken, PriceTokenAmount } from 'src/core'; -import { RequiredCrossChainOptions } from 'src/features/cross-chain/models/cross-chain-options'; -import { CelerCrossChainTradeProvider } from 'src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade-provider'; -import { NftCelerCrossChainTrade } from 'src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade'; - -import { CelerCrossChainTrade } from 'src/features'; - -export class NftCelerCrossChainTradeProvider { - public async calculate( - from: PriceTokenAmount, - to: PriceToken, - swapData: string, - options: RequiredCrossChainOptions - ) { - const celerProvider = new CelerCrossChainTradeProvider(); - const wrappedCelerTrade = await celerProvider.calculate(from, to, options); - - if (!wrappedCelerTrade?.trade) { - console.error('Could not calculate', wrappedCelerTrade?.error); - return null; - } - const celerTrade = wrappedCelerTrade.trade as CelerCrossChainTrade; - - return new NftCelerCrossChainTrade( - { - fromTrade: celerTrade.fromTrade, - toTrade: celerTrade.toTrade, - cryptoFeeToken: celerTrade.cryptoFeeToken, - transitFeeToken: celerTrade.transitFeeToken, - gasData: celerTrade.gasData, - feeInPercents: celerTrade.feeInPercents, - swapData - }, - options.providerAddress, - celerTrade.maxSlippage - ); - } -} diff --git a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts b/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts deleted file mode 100644 index 690731afb4..0000000000 --- a/src/features/cross-chain/providers/nft-celer-trade-provider/nft-celer-cross-chain-trade.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { CelerCrossChainTrade } from 'src/features'; -import { CrossChainContractTrade } from 'src/features/cross-chain/providers/common/celer-rubic/cross-chain-contract-trade'; -import { PriceTokenAmount } from 'src/core'; -import { GasData } from 'src/features/cross-chain/models/gas-data'; -import { ContractParams } from 'src/features/cross-chain/models/contract-params'; -import { CelerCrossChainContractTrade } from 'src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-contract-trade/celer-cross-chain-contract-trade'; -import BigNumber from 'bignumber.js'; -import { nftCelerCrossChainContractAddress } from 'src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-address'; -import { ntfCelerCrossChainContractAbi } from 'src/features/cross-chain/providers/nft-celer-trade-provider/costants/nft-celer-cross-chain-contract-abi'; - -export class NftCelerCrossChainTrade extends CelerCrossChainTrade { - private readonly swapData: string; - - protected get fromContractAddress(): string { - return nftCelerCrossChainContractAddress; - } - - constructor( - crossChainTrade: { - fromTrade: CrossChainContractTrade; - toTrade: CrossChainContractTrade; - cryptoFeeToken: PriceTokenAmount; - transitFeeToken: PriceTokenAmount; - gasData: GasData | null; - feeInPercents: number; - swapData: string; - }, - providerAddress: string, - maxSlippage: number - ) { - super(crossChainTrade, providerAddress, maxSlippage); - - this.swapData = crossChainTrade.swapData; - } - - protected async getContractParams(fromAddress?: string): Promise { - const contractAddress = nftCelerCrossChainContractAddress; - const contractAbi = ntfCelerCrossChainContractAbi; - const methodName = 'bridgeWithSwap'; - - const fromTrade = this.fromTrade as CelerCrossChainContractTrade; - const toTrade = this.toTrade as CelerCrossChainContractTrade; - const celerMethodArguments = await fromTrade.getMethodArguments( - toTrade, - fromAddress || this.walletAddress, - this.providerAddress, - { - maxSlippage: this.maxSlippage - } - ); - const dstSwapArguments = celerMethodArguments[4] as Array; - const nftDstSwapArguments = [dstSwapArguments[0]] - .concat(true) - .concat(dstSwapArguments.slice(1, 5)) - .concat([[3, '600000000000000000', this.swapData]]) - .concat(dstSwapArguments.slice(5, 6)) - .concat(['600000000000000000']); - const methodArguments = (['0x4B4044Fda9e2CEe76a554923AFA627C727dA9E29'] as unknown[]) - .concat(celerMethodArguments.slice(1, 4)) - .concat([nftDstSwapArguments]) - .concat(celerMethodArguments.slice(5)); - - const tokenInAmountAbsolute = fromTrade.fromToken.weiAmount; - const msgValue = await this.calculateSwapValue(tokenInAmountAbsolute, methodArguments); - const value = new BigNumber(msgValue).toFixed(0); - - return { - contractAddress, - contractAbi, - methodName, - methodArguments, - value - }; - } -} diff --git a/src/features/cross-chain/providers/rubic-trade-provider/rubic-cross-chain-trade.ts b/src/features/cross-chain/providers/rubic-trade-provider/rubic-cross-chain-trade.ts index 686db0ad0f..b7f99e06af 100644 --- a/src/features/cross-chain/providers/rubic-trade-provider/rubic-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/rubic-trade-provider/rubic-cross-chain-trade.ts @@ -153,7 +153,7 @@ export class RubicCrossChainTrade extends CelerRubicCrossChainTrade { ]); } - protected async getContractParams( + public async getContractParams( fromAddress?: string, swapTokenWithFee = false ): Promise { diff --git a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts index a49843c17a..7a05cbcefc 100644 --- a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts @@ -207,7 +207,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { } } - protected async getContractParams(): Promise { + public async getContractParams(): Promise { const contractAddress = SYMBIOSIS_CONTRACT_ADDRESS[this.fromBlockchain]; const contractAbi = SYMBIOSIS_CONTRACT_ABI; From 51f29b15bb1654a441174871bde9c1efac822a88 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Mon, 8 Aug 2022 14:44:23 +0300 Subject: [PATCH 03/18] Add Cronos and Oke to cross chain --- package.json | 2 +- .../constants/lifi-cross-chain-supported-blockchain.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c3e493fdb8..d665b1d9b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.2", + "version": "2.8.4-alpha.0", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts b/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts index ef19ca3456..a6cb66a986 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts @@ -9,6 +9,8 @@ export const lifiCrossChainSupportedBlockchains = [ BLOCKCHAIN_NAME.MOONRIVER, BLOCKCHAIN_NAME.ARBITRUM, BLOCKCHAIN_NAME.OPTIMISM, + BLOCKCHAIN_NAME.CRONOS, + BLOCKCHAIN_NAME.OKE_X_CHAIN, BLOCKCHAIN_NAME.GNOSIS, BLOCKCHAIN_NAME.FUSE, BLOCKCHAIN_NAME.MOONBEAM From cbbb48dfaed7fa24c8198805dd253d70555f8248 Mon Sep 17 00:00:00 2001 From: axtezy Date: Tue, 9 Aug 2022 11:03:14 +0300 Subject: [PATCH 04/18] Add receiver address --- package.json | 2 +- .../debridge-cross-chain-trade.ts | 21 +++++++++------- .../lifi-cross-chain-trade.ts | 14 +++++------ .../symbiosis-cross-chain-trade-provider.ts | 16 ++++++++++--- .../symbiosis-cross-chain-trade.ts | 24 +++++++++---------- 5 files changed, 45 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 8f0a0500a5..0689219074 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.2-alpha.4", + "version": "2.8.5-alpha.0q", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts b/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts index 1ae6bdc1cd..4807618560 100644 --- a/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts @@ -63,7 +63,7 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { cryptoFeeToken: from }, EMPTY_ADDRESS - ).getContractParams(); + ).getContractParams({}); const web3Public = Injector.web3PublicService.getWeb3Public(fromBlockchain); const [gasLimit, gasPrice] = await Promise.all([ @@ -165,7 +165,7 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { const { onConfirm, gasLimit, gasPrice } = options; const { contractAddress, contractAbi, methodName, methodArguments, value } = - await this.getContractParams(); + await this.getContractParams(options); let transactionHash: string; const onTransactionHash = (hash: string) => { @@ -193,8 +193,8 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { } } - public async getContractParams(): Promise { - const data = await this.getTransactionRequest(); + public async getContractParams(options: SwapTransactionOptions): Promise { + const data = await this.getTransactionRequest(options?.receiverAddress); const toChainId = BlockchainsInfo.getBlockchainByName(this.to.blockchain).id; const fromContracts = DE_BRIDGE_CONTRACT_ADDRESS[ @@ -207,7 +207,7 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { toChainId, this.to.address, Web3Pure.toWei(this.toTokenAmountMin, this.to.decimals), - this.walletAddress, + options?.receiverAddress || this.walletAddress, this.providerAddress, fromContracts.providerRouter ]; @@ -239,12 +239,15 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { return this.transitAmount.plus(usdCryptoFee).dividedBy(this.to.tokenAmount); } - private async getTransactionRequest(): Promise { + private async getTransactionRequest(receiverAddress?: string): Promise { + const params = { + ...this.transactionRequest, + ...(receiverAddress && { dstChainTokenOutRecipient: receiverAddress }) + }; + const { tx } = await Injector.httpClient.get( DebridgeCrossChainTradeProvider.apiEndpoint, - { - params: this.transactionRequest as unknown as {} - } + { params } ); return tx.data; } diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts index 22542323f6..ef31f1de44 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts @@ -60,7 +60,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { } }, EMPTY_ADDRESS - ).getContractParams(); + ).getContractParams({}); const web3Public = Injector.web3PublicService.getWeb3Public(fromBlockchain); const [gasLimit, gasPrice] = await Promise.all([ @@ -159,7 +159,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { const { onConfirm, gasLimit, gasPrice } = options; const { contractAddress, contractAbi, methodName, methodArguments, value } = - await this.getContractParams(); + await this.getContractParams(options); let transactionHash: string; try { @@ -197,8 +197,8 @@ export class LifiCrossChainTrade extends CrossChainTrade { } } - public async getContractParams(): Promise { - const data = await this.getSwapData(); + public async getContractParams(options: SwapTransactionOptions): Promise { + const data = await this.getSwapData(options?.receiverAddress); const toChainId = BlockchainsInfo.getBlockchainByName(this.to.blockchain).id; const fromContracts = lifiContractAddress[this.from.blockchain as LifiCrossChainSupportedBlockchain]; @@ -209,7 +209,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { toChainId, this.to.address, Web3Pure.toWei(this.toTokenAmountMin, this.to.decimals), - this.walletAddress, + options?.receiverAddress || this.walletAddress, this.providerAddress, fromContracts.providerRouter ]; @@ -233,14 +233,14 @@ export class LifiCrossChainTrade extends CrossChainTrade { }; } - private async getSwapData(): Promise { + private async getSwapData(receiverAddress?: string): Promise { const firstStep = this.route.steps[0]!; const step = { ...firstStep, action: { ...firstStep.action, fromAddress: this.walletAddress, - toAddress: this.walletAddress + toAddress: receiverAddress || this.walletAddress }, execution: { status: 'NOT_STARTED', diff --git a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts index c3715a9c56..a6da4b454f 100644 --- a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts @@ -126,7 +126,6 @@ export class SymbiosisCrossChainTradeProvider extends CrossChainTradeProvider { const { tokenAmountOut, - transactionRequest, priceImpact, fee: transitTokenFee } = await swapping.exactIn( @@ -139,6 +138,17 @@ export class SymbiosisCrossChainTradeProvider extends CrossChainTradeProvider { deadline, true ); + const swapFunction = (receiver?: string) => + swapping.exactIn( + tokenAmountIn, + tokenOut, + fromAddress, + receiver || fromAddress, + fromAddress, + slippageTolerance, + deadline, + true + ); const to = new PriceTokenAmount({ ...toToken.asStruct, tokenAmount: new BigNumber(tokenAmountOut.toFixed()) @@ -146,7 +156,7 @@ export class SymbiosisCrossChainTradeProvider extends CrossChainTradeProvider { const gasData = options.gasCalculation === 'enabled' - ? await SymbiosisCrossChainTrade.getGasData(from, to, transactionRequest) + ? await SymbiosisCrossChainTrade.getGasData(from, to) : null; const transitToken = celerTransitTokens[fromBlockchain]; @@ -168,7 +178,7 @@ export class SymbiosisCrossChainTradeProvider extends CrossChainTradeProvider { { from, to, - transactionRequest, + swapFunction, gasData, priceImpact: parseFloat(priceImpact.toFixed()), slippage: options.slippageTolerance, diff --git a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts index 5929382140..49069eadc9 100644 --- a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts @@ -5,7 +5,6 @@ import { TradeType } from 'src/features'; import { CrossChainTrade } from '@rsdk-features/cross-chain/providers/common/cross-chain-trade'; -import { TransactionRequest } from '@ethersproject/providers'; import { BlockchainsInfo, PriceTokenAmount, Web3Public, Web3Pure } from 'src/core'; import { Injector } from '@rsdk-core/sdk/injector'; import { SYMBIOSIS_CONTRACT_ADDRESS } from '@rsdk-features/cross-chain/providers/symbiosis-trade-provider/constants/contract-address'; @@ -17,6 +16,7 @@ import { EMPTY_ADDRESS } from '@rsdk-core/blockchain/constants/empty-address'; import BigNumber from 'bignumber.js'; import { FeeInfo } from 'src/features/cross-chain/providers/common/models/fee'; import { commonCrossChainAbi } from 'src/features/cross-chain/providers/common/constants/common-cross-chain-abi'; +import { SwapExactIn } from 'symbiosis-js-sdk/dist/crosschain/baseSwapping'; /** * Calculated Symbiosis cross chain trade. @@ -30,8 +30,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { /** @internal */ public static async getGasData( from: PriceTokenAmount, - to: PriceTokenAmount, - transactionRequest: TransactionRequest + to: PriceTokenAmount ): Promise { const fromBlockchain = from.blockchain as SymbiosisCrossChainSupportedBlockchain; const walletAddress = Injector.web3Private.address; @@ -45,7 +44,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { { from, to, - transactionRequest, + swapFunction: () => new Promise(resolve => resolve), gasData: null, priceImpact: 0, slippage: 0, @@ -57,7 +56,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { transitAmount: new BigNumber(NaN) }, EMPTY_ADDRESS - ).getContractParams(); + ).getContractParams({}); const web3Public = Injector.web3PublicService.getWeb3Public(fromBlockchain); const [gasLimit, gasPrice] = await Promise.all([ @@ -103,7 +102,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { public readonly gasData: GasData | null; - private readonly transactionRequest: TransactionRequest; + private readonly getSwapExactIn: (receiver?: string) => SwapExactIn; protected readonly fromWeb3Public: Web3Public; @@ -119,7 +118,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { crossChainTrade: { from: PriceTokenAmount; to: PriceTokenAmount; - transactionRequest: TransactionRequest; + swapFunction: (receiver?: string) => SwapExactIn; gasData: GasData | null; priceImpact: number; slippage: number; @@ -132,7 +131,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { this.from = crossChainTrade.from; this.to = crossChainTrade.to; - this.transactionRequest = crossChainTrade.transactionRequest; + this.getSwapExactIn = crossChainTrade.swapFunction; this.gasData = crossChainTrade.gasData; this.priceImpact = crossChainTrade.priceImpact; this.toTokenAmountMin = this.to.tokenAmount.multipliedBy(1 - crossChainTrade.slippage); @@ -162,7 +161,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { const { onConfirm, gasLimit, gasPrice } = options; const { contractAddress, contractAbi, methodName, methodArguments, value } = - await this.getContractParams(); + await this.getContractParams(options); let transactionHash: string; const onTransactionHash = (hash: string) => { @@ -190,8 +189,9 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { } } - protected async getContractParams(): Promise { - const data = await this.transactionRequest.data; + protected async getContractParams(options: SwapTransactionOptions): Promise { + const exactIn = await this.getSwapExactIn(options?.receiverAddress); + const { data } = exactIn.transactionRequest; const toChainId = BlockchainsInfo.getBlockchainByName(this.to.blockchain).id; const swapArguments = [ this.from.address, @@ -199,7 +199,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { toChainId, this.to.address, Web3Pure.toWei(this.toTokenAmountMin, this.to.decimals), - this.walletAddress, + options?.receiverAddress || this.walletAddress, this.providerAddress, SYMBIOSIS_CONTRACT_ADDRESS[this.fromBlockchain].providerRouter ]; From 9f24a930c9d7f07546f587d954b8ffbe848a1ae1 Mon Sep 17 00:00:00 2001 From: axtezy Date: Tue, 9 Aug 2022 17:09:48 +0300 Subject: [PATCH 05/18] Update version and remove error --- package.json | 2 +- src/core/blockchain/web3-private/web3-private.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cfe4905db3..1ccbef1123 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.0", + "version": "2.9.1-alpha.0", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/core/blockchain/web3-private/web3-private.ts b/src/core/blockchain/web3-private/web3-private.ts index 1f77c611ce..8bdc17f545 100644 --- a/src/core/blockchain/web3-private/web3-private.ts +++ b/src/core/blockchain/web3-private/web3-private.ts @@ -12,7 +12,7 @@ import { WalletConnectionConfiguration } from '@rsdk-core/blockchain/models/wall import { RubicSdkError } from '@rsdk-common/errors/rubic-sdk.error'; import { FailedToCheckForTransactionReceiptError } from '@rsdk-common/errors/swap/failed-to-check-for-transaction-receipt.error'; import { Web3Pure } from 'src/core'; -import { InsufficientFundsGasPriceValueError, LowSlippageError } from 'src/common'; +import { LowSlippageError } from 'src/common'; import { parseError } from 'src/common/utils/errors'; import { TransactionConfig } from 'web3-core'; @@ -78,9 +78,6 @@ export class Web3Private { if (err.message.includes('Failed to check for transaction receipt')) { return new FailedToCheckForTransactionReceiptError(); } - if (err.message.includes('Ok(OutOfFund)')) { - return new InsufficientFundsGasPriceValueError(); - } if (err.code === -32603) { return new LowGasError(); } From cf88bf918dbe666a63c0fd2515ff981d55450ee3 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Tue, 9 Aug 2022 17:50:22 +0300 Subject: [PATCH 06/18] Add multichain in LiFi --- package.json | 2 +- .../lifi-trade-provider/lifi-cross-chain-trade-provider.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d665b1d9b2..a9a43e1a64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.4-alpha.0", + "version": "2.8.4-alpha.1", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts index 5de300221d..ad88c1ad87 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts @@ -75,10 +75,7 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { const routeOptions: RouteOptions = { slippage: options.slippageTolerance, order: 'RECOMMENDED', - allowSwitchChain: false, - bridges: { - deny: ['multichain'] // @TODO remove after whitelisting - } + allowSwitchChain: false }; const fromChainId = BlockchainsInfo.getBlockchainByName(fromBlockchain).id; From d1f7fbbb77885917bdecf508251f8be86981508e Mon Sep 17 00:00:00 2001 From: axtezy Date: Wed, 10 Aug 2022 12:18:51 +0300 Subject: [PATCH 07/18] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ccbef1123..019ef9b33b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.1-alpha.0", + "version": "2.9.2-alpha.0", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", From 433e5ca8580c36ca3c1803337926c0d247bf1e75 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Wed, 10 Aug 2022 16:51:45 +0300 Subject: [PATCH 08/18] Update version --- package.json | 2 +- yarn.lock | 38 ++++++++++++-------------------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index b9f2be7264..87b0d2b4a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.1", + "version": "2.9.2", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/yarn.lock b/yarn.lock index 8fba11f631..4fff192544 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1634,7 +1634,7 @@ ajv@^8.0.0, ajv@^8.0.1, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -ansi-colors@4.1.3, ansi-colors@^4.1.1: +ansi-colors@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== @@ -2445,11 +2445,6 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@9.4.0, commander@^9.0.0: - version "9.4.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" - integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== - commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -3495,17 +3490,6 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@3.2.11, fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-glob@^2.2.6: version "2.2.7" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" @@ -3518,6 +3502,17 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -6145,15 +6140,6 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve-tspaths@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/resolve-tspaths/-/resolve-tspaths-0.7.4.tgz#f709081fa2e64bff7348a3e758a62c5460f31f37" - integrity sha512-3aVQko81//A2jdw4H13oMAwVFB/EdaEXGrrhSXmXIxDnAH2v4e+h4hOnbtxAuuz0GXjzVX0LMSg3lP2MJjMFjw== - dependencies: - ansi-colors "4.1.3" - commander "9.4.0" - fast-glob "3.2.11" - resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" From e24a939c79144e2acc1db61396b1141e768fe757 Mon Sep 17 00:00:00 2001 From: axtezy Date: Wed, 10 Aug 2022 17:22:27 +0300 Subject: [PATCH 09/18] Add reciever address checks --- package.json | 2 +- .../errors/blockchain/wrong-receiver-address.ts | 11 +++++++++++ .../celer-cross-chain-trade.ts | 3 ++- .../providers/common/cross-chain-trade.ts | 15 +++++++++++++++ .../debridge-cross-chain-trade.ts | 1 + .../lifi-trade-provider/lifi-cross-chain-trade.ts | 1 + .../symbiosis-cross-chain-trade.ts | 1 + 7 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/common/errors/blockchain/wrong-receiver-address.ts diff --git a/package.json b/package.json index 019ef9b33b..6f888cd9ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.2-alpha.0", + "version": "2.9.2", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/common/errors/blockchain/wrong-receiver-address.ts b/src/common/errors/blockchain/wrong-receiver-address.ts new file mode 100644 index 0000000000..1ad6f6885a --- /dev/null +++ b/src/common/errors/blockchain/wrong-receiver-address.ts @@ -0,0 +1,11 @@ +import { RubicSdkError } from 'src/common'; + +/** + * Thrown, when passed wrong receiver address. + */ +export class WrongReceiverAddress extends RubicSdkError { + constructor() { + super(); + Object.setPrototypeOf(this, WrongReceiverAddress.prototype); + } +} diff --git a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts index fcd380e51f..7a6d7b3541 100644 --- a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts @@ -19,7 +19,7 @@ import { } from '@rsdk-features/cross-chain/providers/celer-trade-provider/constants/celer-cross-chain-fee-multipliers'; import { CelerCrossChainContractTrade } from '@rsdk-features/cross-chain/providers/celer-trade-provider/celer-cross-chain-contract-trade/celer-cross-chain-contract-trade'; import { CelerItCrossChainContractTrade } from '@rsdk-features/cross-chain/providers/celer-trade-provider/celer-cross-chain-contract-trade/celer-it-cross-chain-contract-trade/celer-it-cross-chain-contract-trade'; -import { CROSS_CHAIN_TRADE_TYPE, TradeType } from 'src/features'; +import { CROSS_CHAIN_TRADE_TYPE, CrossChainTrade, TradeType } from 'src/features'; import { FeeInfo } from 'src/features/cross-chain/providers/common/models/fee'; import { CelerDirectCrossChainContractTrade } from 'src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-contract-trade/celer-direct-cross-chain-trade/celer-direct-cross-chain-contract-trade'; @@ -180,6 +180,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { public async swap(options: SwapTransactionOptions = {}): Promise { await this.checkTradeErrors(); await this.checkAllowanceAndApprove(options); + CrossChainTrade.checkReceiverAddress(options?.receiverAddress); const { onConfirm, gasLimit, gasPrice } = options; diff --git a/src/features/cross-chain/providers/common/cross-chain-trade.ts b/src/features/cross-chain/providers/common/cross-chain-trade.ts index 9e31d342de..0260141751 100644 --- a/src/features/cross-chain/providers/common/cross-chain-trade.ts +++ b/src/features/cross-chain/providers/common/cross-chain-trade.ts @@ -20,11 +20,26 @@ import { TransactionReceipt } from 'web3-eth'; import { ContractParams } from '@rsdk-features/cross-chain/models/contract-params'; import { TransactionConfig } from 'web3-core'; import { FeeInfo } from 'src/features/cross-chain/providers/common/models/fee'; +import { WrongReceiverAddress } from 'src/common/errors/blockchain/wrong-receiver-address'; /** * Abstract class for all cross chain providers' trades. */ export abstract class CrossChainTrade { + /** + * Checks receiver address for correctness. + * @param receiverAddress + */ + public static checkReceiverAddress(receiverAddress: string | undefined): void { + if (!receiverAddress) { + return; + } + if (Web3Pure.isAddressCorrect(receiverAddress)) { + return; + } + throw new WrongReceiverAddress(); + } + /** * Type of calculated cross chain trade. */ diff --git a/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts b/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts index 4807618560..a58639f2da 100644 --- a/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/debridge-trade-provider/debridge-cross-chain-trade.ts @@ -162,6 +162,7 @@ export class DebridgeCrossChainTrade extends CrossChainTrade { public async swap(options: SwapTransactionOptions = {}): Promise { await this.checkTradeErrors(); await this.checkAllowanceAndApprove(options); + CrossChainTrade.checkReceiverAddress(options?.receiverAddress); const { onConfirm, gasLimit, gasPrice } = options; const { contractAddress, contractAbi, methodName, methodArguments, value } = diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts index ef31f1de44..354a960652 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts @@ -155,6 +155,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { public async swap(options: SwapTransactionOptions = {}): Promise { await this.checkTradeErrors(); await this.checkAllowanceAndApprove(options); + CrossChainTrade.checkReceiverAddress(options?.receiverAddress); const { onConfirm, gasLimit, gasPrice } = options; diff --git a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts index 49069eadc9..6a517f8898 100644 --- a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade.ts @@ -158,6 +158,7 @@ export class SymbiosisCrossChainTrade extends CrossChainTrade { public async swap(options: SwapTransactionOptions = {}): Promise { await this.checkTradeErrors(); await this.checkAllowanceAndApprove(options); + CrossChainTrade.checkReceiverAddress(options?.receiverAddress); const { onConfirm, gasLimit, gasPrice } = options; const { contractAddress, contractAbi, methodName, methodArguments, value } = From 7176087bda8052b3be4ea3487e7e3c5d80a8c1ec Mon Sep 17 00:00:00 2001 From: ottebrut Date: Wed, 10 Aug 2022 17:25:31 +0300 Subject: [PATCH 10/18] minor changes --- src/core/sdk/sdk.ts | 4 +++- .../providers/celer-trade-provider/celer-cross-chain-trade.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/sdk/sdk.ts b/src/core/sdk/sdk.ts index 099c1af120..f6eea32b94 100644 --- a/src/core/sdk/sdk.ts +++ b/src/core/sdk/sdk.ts @@ -45,7 +45,9 @@ export class SDK { /** * Can be used to get `Web3Public` instance by blockchain name to get public information from blockchain. */ - public readonly web3PublicService = Injector.web3PublicService; + public get web3PublicService(): Web3PublicService { + return Injector.web3PublicService; + } /** * Can be used to send transactions and execute smart contracts methods. diff --git a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts index 957ceda033..f88ba7a30b 100644 --- a/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/celer-trade-provider/celer-cross-chain-trade.ts @@ -126,7 +126,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { feeInfo: FeeInfo; }, providerAddress: string, - public readonly maxSlippage: number + private readonly maxSlippage: number ) { super(providerAddress); @@ -264,7 +264,7 @@ export class CelerCrossChainTrade extends CelerRubicCrossChainTrade { }; } - protected async calculateSwapValue(amountIn: BigNumber, data: unknown[]): Promise { + private async calculateSwapValue(amountIn: BigNumber, data: unknown[]): Promise { const contract = this.fromTrade.contract as CelerCrossChainContractData; const { isNative } = this.fromTrade.fromToken; const isBridge = this.fromTrade.fromToken.isEqualTo(this.fromTrade.toToken); From aee67aad91ec6b6e6a0fa5aabbb658576137dbb4 Mon Sep 17 00:00:00 2001 From: axtezy Date: Wed, 10 Aug 2022 17:44:35 +0300 Subject: [PATCH 11/18] Fix symbiosis revert address --- package.json | 2 +- .../symbiosis-cross-chain-trade-provider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6f888cd9ab..222593cfd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.2", + "version": "2.9.3", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts index 860eb2b574..0bd9e9c764 100644 --- a/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/symbiosis-trade-provider/symbiosis-cross-chain-trade-provider.ts @@ -144,7 +144,7 @@ export class SymbiosisCrossChainTradeProvider extends CrossChainTradeProvider { tokenOut, fromAddress, receiver || fromAddress, - fromAddress, + receiver || fromAddress, slippageTolerance, deadline, true From 45559ecf98f3cbdbee4446f2da555c30e783e2a4 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Wed, 10 Aug 2022 17:51:27 +0300 Subject: [PATCH 12/18] minor fixes --- package.json | 2 +- ...ng-receiver-address.ts => wrong-receiver-address.error.ts} | 4 ++-- .../cross-chain/providers/common/cross-chain-trade.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/common/errors/blockchain/{wrong-receiver-address.ts => wrong-receiver-address.error.ts} (51%) diff --git a/package.json b/package.json index 284b0bfd76..cea624a6e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.3", + "version": "2.9.4", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/common/errors/blockchain/wrong-receiver-address.ts b/src/common/errors/blockchain/wrong-receiver-address.error.ts similarity index 51% rename from src/common/errors/blockchain/wrong-receiver-address.ts rename to src/common/errors/blockchain/wrong-receiver-address.error.ts index 1ad6f6885a..9ecdae8357 100644 --- a/src/common/errors/blockchain/wrong-receiver-address.ts +++ b/src/common/errors/blockchain/wrong-receiver-address.error.ts @@ -3,9 +3,9 @@ import { RubicSdkError } from 'src/common'; /** * Thrown, when passed wrong receiver address. */ -export class WrongReceiverAddress extends RubicSdkError { +export class WrongReceiverAddressError extends RubicSdkError { constructor() { super(); - Object.setPrototypeOf(this, WrongReceiverAddress.prototype); + Object.setPrototypeOf(this, WrongReceiverAddressError.prototype); } } diff --git a/src/features/cross-chain/providers/common/cross-chain-trade.ts b/src/features/cross-chain/providers/common/cross-chain-trade.ts index b1e28e7b8a..6751fd788c 100644 --- a/src/features/cross-chain/providers/common/cross-chain-trade.ts +++ b/src/features/cross-chain/providers/common/cross-chain-trade.ts @@ -20,7 +20,7 @@ import { TransactionReceipt } from 'web3-eth'; import { ContractParams } from '@rsdk-features/cross-chain/models/contract-params'; import { TransactionConfig } from 'web3-core'; import { FeeInfo } from 'src/features/cross-chain/providers/common/models/fee'; -import { WrongReceiverAddress } from 'src/common/errors/blockchain/wrong-receiver-address'; +import { WrongReceiverAddressError } from 'src/common/errors/blockchain/wrong-receiver-address.error'; /** * Abstract class for all cross chain providers' trades. @@ -37,7 +37,7 @@ export abstract class CrossChainTrade { if (Web3Pure.isAddressCorrect(receiverAddress)) { return; } - throw new WrongReceiverAddress(); + throw new WrongReceiverAddressError(); } /** From d0de9d7c3ac8a0ff8df38e84ea23f4a6bda5cb4e Mon Sep 17 00:00:00 2001 From: ottebrut Date: Thu, 11 Aug 2022 12:09:33 +0300 Subject: [PATCH 13/18] Add celo to lifi --- package.json | 2 +- .../constants/lifi-cross-chain-supported-blockchain.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a9a43e1a64..e9463ded68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.4-alpha.1", + "version": "2.8.4-alpha.2", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts b/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts index a6cb66a986..1096f850a5 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain.ts @@ -13,7 +13,8 @@ export const lifiCrossChainSupportedBlockchains = [ BLOCKCHAIN_NAME.OKE_X_CHAIN, BLOCKCHAIN_NAME.GNOSIS, BLOCKCHAIN_NAME.FUSE, - BLOCKCHAIN_NAME.MOONBEAM + BLOCKCHAIN_NAME.MOONBEAM, + BLOCKCHAIN_NAME.CELO ] as const; export type LifiCrossChainSupportedBlockchain = typeof lifiCrossChainSupportedBlockchains[number]; From 7c66cff81fed459e66aa04ae4299ce3d02dd72ca Mon Sep 17 00:00:00 2001 From: ottebrut Date: Thu, 11 Aug 2022 12:58:43 +0300 Subject: [PATCH 14/18] minor fix --- package.json | 2 +- src/features/cross-chain/cross-chain-status-manager.ts | 2 +- .../common/celer-rubic/models/celer-swap-status.enum.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cea624a6e8..e5991401de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.4", + "version": "2.9.5", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/cross-chain-status-manager.ts b/src/features/cross-chain/cross-chain-status-manager.ts index b65f1eaab1..1b04343904 100644 --- a/src/features/cross-chain/cross-chain-status-manager.ts +++ b/src/features/cross-chain/cross-chain-status-manager.ts @@ -298,7 +298,7 @@ export class CrossChainStatusManager { return CrossChainTxStatus.FAIL; } - if (dstTxStatus === CelerSwapStatus.SUCСESS) { + if (dstTxStatus === CelerSwapStatus.SUCCESS) { return CrossChainTxStatus.SUCCESS; } diff --git a/src/features/cross-chain/providers/common/celer-rubic/models/celer-swap-status.enum.ts b/src/features/cross-chain/providers/common/celer-rubic/models/celer-swap-status.enum.ts index c6089d978f..9b8b9ae453 100644 --- a/src/features/cross-chain/providers/common/celer-rubic/models/celer-swap-status.enum.ts +++ b/src/features/cross-chain/providers/common/celer-rubic/models/celer-swap-status.enum.ts @@ -1,6 +1,6 @@ export enum CelerSwapStatus { NULL = 0, - SUCСESS = 1, + SUCCESS = 1, FAILED = 2, FALLBACK = 3 } From 8dd3e9440279bffe93ef2212909b8ae12fe88137 Mon Sep 17 00:00:00 2001 From: ottebrut Date: Thu, 11 Aug 2022 16:50:34 +0300 Subject: [PATCH 15/18] Update parsing lifi providers --- package.json | 2 +- .../lifi-cross-chain-trade-provider.ts | 54 ++++++++++++------- .../lifi-cross-chain-trade.ts | 7 ++- .../models/lifi-providers.ts | 2 +- 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index b1de56fadd..d4ef8c4cfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.4-alpha.2", + "version": "2.8.4-alpha.3", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts index 6014417345..191d2f482d 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts @@ -1,11 +1,11 @@ -import { CROSS_CHAIN_TRADE_TYPE } from 'src/features'; +import { CROSS_CHAIN_TRADE_TYPE, LiFiTradeSubtype, TradeType } from 'src/features'; import { BlockchainName, BlockchainsInfo, PriceToken, Web3Pure } from 'src/core'; import BigNumber from 'bignumber.js'; import { LifiCrossChainSupportedBlockchain, lifiCrossChainSupportedBlockchains } from 'src/features/cross-chain/providers/lifi-trade-provider/constants/lifi-cross-chain-supported-blockchain'; -import LIFI, { RouteOptions } from '@lifi/sdk'; +import LIFI, { Route, RouteOptions } from '@lifi/sdk'; import { LifiCrossChainTrade } from 'src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade'; import { Injector } from 'src/core/sdk/injector'; import { WrappedCrossChainTrade } from 'src/features/cross-chain/providers/common/models/wrapped-cross-chain-trade'; @@ -119,21 +119,7 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { ? await LifiCrossChainTrade.getGasData(from, to, bestRoute) : null; - const steps = (bestRoute.steps[0] as LifiStep).includedSteps; - const sourceDex = - steps?.[0] && steps[0].action.fromChainId === steps[0].action.toChainId - ? steps?.[0].tool - : undefined; - - const [, ...stepsWithoutFirst] = steps; - const targetDex = stepsWithoutFirst.find( - provider => provider.action.fromChainId === provider.action.toChainId - )?.tool; - - const itType = { - from: sourceDex ? lifiProviders[sourceDex] : undefined, - to: targetDex ? lifiProviders[targetDex] : undefined - }; + const { itType, subType } = this.parseTradeTypes(bestRoute); const trade = new LifiCrossChainTrade( { @@ -144,7 +130,8 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { toTokenAmountMin: Web3Pure.fromWei(bestRoute.toAmountMin, to.decimals), feeInfo, priceImpact, - itType + itType, + subType }, options.providerAddress ); @@ -210,4 +197,35 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { cryptoFee: null }; } + + private parseTradeTypes(route: Route): { + subType: LiFiTradeSubtype; + itType: { from: TradeType | undefined; to: TradeType | undefined }; + } { + const steps = + route.steps.length === 1 ? (route.steps[0] as LifiStep).includedSteps : route.steps; + const sourceDex = + steps?.[0] && steps[0].action.fromChainId === steps[0].action.toChainId + ? steps?.[0].toolDetails.name.toLowerCase() + : undefined; + + const [, ...stepsWithoutFirst] = steps; + const targetDex = stepsWithoutFirst + .find(provider => provider.action.fromChainId === provider.action.toChainId) + ?.toolDetails.name.toLowerCase(); + + const subType = steps?.find( + provider => provider.action.fromChainId !== provider.action.toChainId + )?.tool as LiFiTradeSubtype; + + const itType = { + from: sourceDex ? lifiProviders[sourceDex] : undefined, + to: targetDex ? lifiProviders[targetDex] : undefined + }; + + return { + subType, + itType + }; + } } diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts index 354a960652..c4463e54c0 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade.ts @@ -2,6 +2,7 @@ import BigNumber from 'bignumber.js'; import { BlockchainsInfo, PriceTokenAmount, Web3Public, Web3Pure } from 'src/core'; import { CROSS_CHAIN_TRADE_TYPE, + Li_FI_TRADE_SUBTYPE, SwapTransactionOptions, TRADE_TYPE, TradeType @@ -57,7 +58,8 @@ export class LifiCrossChainTrade extends CrossChainTrade { itType: { from: TRADE_TYPE.ONE_INCH, to: TRADE_TYPE.ONE_INCH - } + }, + subType: Li_FI_TRADE_SUBTYPE.CONNEXT }, EMPTY_ADDRESS ).getContractParams({}); @@ -126,6 +128,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { feeInfo: FeeInfo; priceImpact: number; itType: { from: TradeType | undefined; to: TradeType | undefined }; + subType: LiFiTradeSubtype; }, providerAddress: string ) { @@ -136,7 +139,7 @@ export class LifiCrossChainTrade extends CrossChainTrade { this.route = crossChainTrade.route; this.gasData = crossChainTrade.gasData; this.toTokenAmountMin = crossChainTrade.toTokenAmountMin; - this.subType = this.route?.steps?.[0]?.tool as LiFiTradeSubtype; + this.subType = crossChainTrade.subType; this.feeInfo = crossChainTrade.feeInfo; this.priceImpact = crossChainTrade.priceImpact; diff --git a/src/features/cross-chain/providers/lifi-trade-provider/models/lifi-providers.ts b/src/features/cross-chain/providers/lifi-trade-provider/models/lifi-providers.ts index 636a9553d9..468194d36a 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/models/lifi-providers.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/models/lifi-providers.ts @@ -1,5 +1,5 @@ export const Li_FI_TRADE_SUBTYPE = { - CONNECT: 'connext', + CONNEXT: 'connext', HOP: 'hop', CELER_BRIDGE: 'cbridge', MULTICHAIN: 'multichain', From f48e8233750ff839c6c62972706497c0a2656c5f Mon Sep 17 00:00:00 2001 From: ottebrut Date: Thu, 11 Aug 2022 18:09:38 +0300 Subject: [PATCH 16/18] Exclude multichain from certain blockchains --- package.json | 2 +- .../lifi-cross-chain-trade-provider.ts | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d4ef8c4cfd..5162b9dd03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.4-alpha.3", + "version": "2.8.4-alpha.4", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts index 191d2f482d..6f0dd637d6 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts @@ -1,5 +1,5 @@ import { CROSS_CHAIN_TRADE_TYPE, LiFiTradeSubtype, TradeType } from 'src/features'; -import { BlockchainName, BlockchainsInfo, PriceToken, Web3Pure } from 'src/core'; +import { BLOCKCHAIN_NAME, BlockchainName, BlockchainsInfo, PriceToken, Web3Pure } from 'src/core'; import BigNumber from 'bignumber.js'; import { LifiCrossChainSupportedBlockchain, @@ -72,11 +72,23 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { ); const tokenAmountIn = from.weiAmount.minus(feeAmount).toFixed(0); - const routeOptions: RouteOptions = { + let routeOptions: RouteOptions = { slippage: options.slippageTolerance, order: 'RECOMMENDED', allowSwitchChain: false }; + // @TODO remove after whitelisting + if ( + fromBlockchain === BLOCKCHAIN_NAME.CRONOS || + fromBlockchain === BLOCKCHAIN_NAME.OKE_X_CHAIN + ) { + routeOptions = { + ...routeOptions, + bridges: { + deny: ['multichain'] + } + }; + } const fromChainId = BlockchainsInfo.getBlockchainByName(fromBlockchain).id; const toChainId = BlockchainsInfo.getBlockchainByName(toBlockchain).id; From ddf4fc2b8a521ce79fd82216829719959dbba5cb Mon Sep 17 00:00:00 2001 From: ottebrut Date: Thu, 11 Aug 2022 18:24:11 +0300 Subject: [PATCH 17/18] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5162b9dd03..65da1ff1ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.8.4-alpha.4", + "version": "2.9.6", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", From 4ffb8763a4dca549cad35a66c4a4b782325f2d7b Mon Sep 17 00:00:00 2001 From: ottebrut Date: Mon, 15 Aug 2022 10:10:18 +0300 Subject: [PATCH 18/18] minor fix --- package.json | 2 +- .../lifi-trade-provider/lifi-cross-chain-trade-provider.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 65da1ff1ea..2b1626af0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubic-sdk", - "version": "2.9.6", + "version": "2.9.9", "description": "Simplify dApp creation", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts index 6f0dd637d6..0130bbbfad 100644 --- a/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts +++ b/src/features/cross-chain/providers/lifi-trade-provider/lifi-cross-chain-trade-provider.ts @@ -78,10 +78,7 @@ export class LifiCrossChainTradeProvider extends CrossChainTradeProvider { allowSwitchChain: false }; // @TODO remove after whitelisting - if ( - fromBlockchain === BLOCKCHAIN_NAME.CRONOS || - fromBlockchain === BLOCKCHAIN_NAME.OKE_X_CHAIN - ) { + if (fromBlockchain === BLOCKCHAIN_NAME.CRONOS || toBlockchain === BLOCKCHAIN_NAME.CRONOS) { routeOptions = { ...routeOptions, bridges: {