From c25f5b27dfa269afc2f50495428b0afb90f61f19 Mon Sep 17 00:00:00 2001 From: nazariikyselevych Date: Tue, 7 Jan 2025 10:28:17 +0200 Subject: [PATCH] temp: fluid broken test case --- src/dex/fluid-dex/fluid-dex-e2e.test.ts | 45 +++++++++++++++++-------- tests/constants-e2e.ts | 3 +- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/dex/fluid-dex/fluid-dex-e2e.test.ts b/src/dex/fluid-dex/fluid-dex-e2e.test.ts index 41ca4f4b5..56619b600 100644 --- a/src/dex/fluid-dex/fluid-dex-e2e.test.ts +++ b/src/dex/fluid-dex/fluid-dex-e2e.test.ts @@ -71,7 +71,7 @@ function testForNetwork( const sideToContractMethods = new Map([ [SwapSide.SELL, [ContractMethod.swapExactAmountIn]], - [SwapSide.BUY, [ContractMethod.swapExactAmountOut]], + // [SwapSide.BUY, [ContractMethod.swapExactAmountOut]], ]); describe(`${network}`, () => { @@ -92,19 +92,19 @@ function testForNetwork( provider, ); }); - it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => { - await testE2E( - tokens[tokenBSymbol], - tokens[tokenASymbol], - holders[tokenBSymbol], - tokenBAmount, - side, - dexKey, - contractMethod as ContractMethod, - network, - provider, - ); - }); + // it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => { + // await testE2E( + // tokens[tokenBSymbol], + // tokens[tokenASymbol], + // holders[tokenBSymbol], + // tokenBAmount, + // side, + // dexKey, + // contractMethod as ContractMethod, + // network, + // provider, + // ); + // }); }); }); }), @@ -118,6 +118,23 @@ describe('FluidDex E2E', () => { describe('Mainnet', () => { const network = Network.MAINNET; + describe.only('FLUID -> ETH', () => { + const tokenASymbol: string = 'FLUID'; + const tokenBSymbol: string = 'ETH'; + + const tokenAAmount: string = '160097047322810379'; + const tokenBAmount: string = '79923068733005505624'; + + testForNetwork( + network, + dexKey, + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + ); + }); + describe('ETH -> INST', () => { const tokenASymbol: string = 'ETH'; const tokenBSymbol: string = 'INST'; diff --git a/tests/constants-e2e.ts b/tests/constants-e2e.ts index 58a825ebb..fa57cc6d0 100644 --- a/tests/constants-e2e.ts +++ b/tests/constants-e2e.ts @@ -131,7 +131,7 @@ export const Tokens: { addBalance: balancesFn, addAllowance: allowedFn, }, - INST: { + FLUID: { address: '0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb', decimals: 18, }, @@ -1816,6 +1816,7 @@ export const Holders: { USDM: '0x57F5E098CaD7A3D1Eed53991D4d66C45C9AF7812', wUSDM: '0x3B95bC951EE0f553ba487327278cAc44f29715E5', UsualM: '0xE3f7A0c4a44b740328157A5152A85c3bCB54DA09', + FLUID: '0x2d675D4C52a8aE117b935fF98c6F9f29A15827F0', }, [Network.POLYGON]: { jGBP: '0x02aa0B826c7BA6386DdBE04C0a8715A1c0A16B24',