From 880c1fb12fcee7878b466168aed7168f02ea9711 Mon Sep 17 00:00:00 2001 From: Oskar <43062492+oskarvu@users.noreply.github.com> Date: Mon, 17 Jun 2024 08:22:41 +0200 Subject: [PATCH] Add savings USDC deposit and withdraw tests (#102) * Add deposit USDC test * Add USDC withdrawal test * Add max usdc withdrawal test * Remove old dai and usdc deposit tests * Adjust slippage tests * Remove unused usdc hars * Adjust dialog withdraw tests --- packages/app/.env.playwright | 2 +- .../common/e2e/SavingsDialog.PageObject.ts | 23 +- .../deposit/SavingsDepositDialog.test-e2e.ts | 108 ++------ .../deposit/e2e/DepositDAI.test-e2e.ts | 2 +- .../deposit/e2e/DepositUSDC.test-e2e.ts | 76 ++++++ .../SavingsWithdrawDialog.test-e2e.ts | 154 +---------- .../withdraw/e2e/WithdrawDAI.test-e2e.ts | 2 +- .../withdraw/e2e/WithdrawMaxDAI.test-e2e.ts | 2 +- .../withdraw/e2e/WithdrawMaxUSDC.test-e2e.ts | 78 ++++++ .../withdraw/e2e/WithdrawUSDC.test-e2e.ts | 77 ++++++ packages/app/src/test/e2e/constants.ts | 3 + ...56d762ecf69e0ab62dfae379cb900a8777a20.json | 148 ---------- ...0959e71d0a39bbf3fd4644c4c574c4cd627d9.json | 148 ---------- .../100-usdc-to-sdai-slippage-0.005/main.har | 122 --------- ...155e5dde14a0877c54dcb05e822ace907b4b7.json | 148 ---------- ...67e285cfd50caaeae07dee4731e7ce533ac95.json | 148 ---------- ...6b8174dad7d5ba7830afca072267f65d1db78.json | 253 ++++++++++++++++++ .../main.har | 36 ++- ...65f9053b80a3f86ceb5753a74266fc008e321.json | 253 ++++++++++++++++++ .../main.har | 36 ++- ...c1244d91a29a4f53881c97be18fe79e0c0288.json | 253 ++++++++++++++++++ .../main.har | 38 ++- ...901124ee2dcf5dd127308b640cf338233af6d.json | 148 ---------- .../test/e2e/hars/1000-sdai-to-usdc/main.har | 122 --------- ...2b6c153510dc5089118d027d6d0902c7ff65f.json | 1 - ...957599eb9ea538338b7ffaac11d275f00bb25.json | 148 ---------- ...20df16681f730f54fd1a653477cf5772418e2.json | 148 ---------- ...62047922d7aeb444f22d3e905d6250de938fd.json | 1 - .../main.har | 89 ------ ...9ee000aac55bb9248cc28a4a7bdcb52116c62.json | 253 ++++++++++++++++++ ...33cb37b4d3c754235c6d093ed160243c6a1c8.json | 1 + .../main.har | 22 +- ...95f5defdcdb3b4eb38a99380d1dab9e3a0760.json | 1 - ...feefe4b7416525e0fd30ecf598222298a6f2a.json | 148 ---------- .../test/e2e/hars/sdai-to-1000-usdc/main.har | 89 ------ 35 files changed, 1354 insertions(+), 1927 deletions(-) create mode 100644 packages/app/src/features/dialogs/savings/deposit/e2e/DepositUSDC.test-e2e.ts create mode 100644 packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxUSDC.test-e2e.ts create mode 100644 packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawUSDC.test-e2e.ts delete mode 100644 packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/22356d762ecf69e0ab62dfae379cb900a8777a20.json delete mode 100644 packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/8cc0959e71d0a39bbf3fd4644c4c574c4cd627d9.json delete mode 100644 packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/main.har delete mode 100644 packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/bd4155e5dde14a0877c54dcb05e822ace907b4b7.json delete mode 100644 packages/app/src/test/e2e/hars/100-usdc-to-sdai/23e67e285cfd50caaeae07dee4731e7ce533ac95.json create mode 100644 packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/23c6b8174dad7d5ba7830afca072267f65d1db78.json rename packages/app/src/test/e2e/hars/{100-usdc-to-sdai-slippage-0.001 => 100-usdt-to-sdai-slippage-0.001}/main.har (76%) create mode 100644 packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/20965f9053b80a3f86ceb5753a74266fc008e321.json rename packages/app/src/test/e2e/hars/{100-usdc-to-sdai-slippage-0.007 => 100-usdt-to-sdai-slippage-0.005}/main.har (76%) create mode 100644 packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/1aac1244d91a29a4f53881c97be18fe79e0c0288.json rename packages/app/src/test/e2e/hars/{100-usdc-to-sdai => 100-usdt-to-sdai-slippage-0.007}/main.har (75%) delete mode 100644 packages/app/src/test/e2e/hars/1000-sdai-to-usdc/fb3901124ee2dcf5dd127308b640cf338233af6d.json delete mode 100644 packages/app/src/test/e2e/hars/1000-sdai-to-usdc/main.har delete mode 100644 packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/6762b6c153510dc5089118d027d6d0902c7ff65f.json delete mode 100644 packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/899957599eb9ea538338b7ffaac11d275f00bb25.json delete mode 100644 packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/3cb20df16681f730f54fd1a653477cf5772418e2.json delete mode 100644 packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/69b62047922d7aeb444f22d3e905d6250de938fd.json delete mode 100644 packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/main.har create mode 100644 packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2289ee000aac55bb9248cc28a4a7bdcb52116c62.json create mode 100644 packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2ca33cb37b4d3c754235c6d093ed160243c6a1c8.json rename packages/app/src/test/e2e/hars/{10277.276260680656857010-sdai-to-10000-dai => 9198.753133685380130125-sdai-to-10000-usdt}/main.har (81%) delete mode 100644 packages/app/src/test/e2e/hars/sdai-to-1000-usdc/65c95f5defdcdb3b4eb38a99380d1dab9e3a0760.json delete mode 100644 packages/app/src/test/e2e/hars/sdai-to-1000-usdc/b1dfeefe4b7416525e0fd30ecf598222298a6f2a.json delete mode 100644 packages/app/src/test/e2e/hars/sdai-to-1000-usdc/main.har diff --git a/packages/app/.env.playwright b/packages/app/.env.playwright index cba53b4f3..d15e13d12 100644 --- a/packages/app/.env.playwright +++ b/packages/app/.env.playwright @@ -5,7 +5,7 @@ VITE_FEATURE_CONFIGURABLE_SLIPPAGE=1 # development VITE_DEV_DAI_NATIVE_ROUTES=1 -VITE_DEV_USDC_NATIVE_ROUTES=0 +VITE_DEV_USDC_NATIVE_ROUTES=1 VITE_WALLET_CONNECT_ID='bd1843f2419f5d4c758366c55f9a556c' VITE_BLOCK_ANALITICA_API_URL=https://spark-api.blockanalitica.com/api diff --git a/packages/app/src/features/dialogs/savings/common/e2e/SavingsDialog.PageObject.ts b/packages/app/src/features/dialogs/savings/common/e2e/SavingsDialog.PageObject.ts index 719f41869..b1362e280 100644 --- a/packages/app/src/features/dialogs/savings/common/e2e/SavingsDialog.PageObject.ts +++ b/packages/app/src/features/dialogs/savings/common/e2e/SavingsDialog.PageObject.ts @@ -74,13 +74,7 @@ export class SavingsDialogPageObject extends DialogPageObject { await expect(outcome).toContainText(transactionOverview.outcome) } - async expectToUseNativeSDaiAction({ - asset, - amount, - }: { - asset: string - amount: number - }): Promise { + async expectToUseNativeSDaiAction({ asset }: { asset: string }): Promise { const actionsContainer = new ActionsPageObject(this.locatePanelByHeader('Actions')) if (this.type === 'deposit') { await actionsContainer.expectActions([ @@ -92,6 +86,21 @@ export class SavingsDialogPageObject extends DialogPageObject { } } + async expectToUsePSMActionsAction({ asset }: { asset: string }): Promise { + const actionsContainer = new ActionsPageObject(this.locatePanelByHeader('Actions')) + if (this.type === 'deposit') { + await actionsContainer.expectActions([ + { type: 'approve', asset }, + { type: 'nativeSDaiDeposit', asset }, + ]) + } else { + await actionsContainer.expectActions([ + { type: 'approve', asset: 'sDAI' }, + { type: 'nativeSDaiWithdraw', asset }, + ]) + } + } + async expectToUseLifiSwap(lifiSwapParams: LifiSwapParams): Promise { const exchangeRow = this.locatePanelByHeader('Actions').getByTestId( testIds.actions.flavours.exchangeActionRow.wrapper, diff --git a/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts index 96e5cb7fe..a6d67f195 100644 --- a/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts @@ -1,6 +1,5 @@ import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' import { SavingsPageObject } from '@/pages/Savings.PageObject' -import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' import { LIFI_TEST_USER_PRIVATE_KEY, overrideLiFiRouteWithHAR } from '@/test/e2e/lifi' import { setup } from '@/test/e2e/setup' import { setupFork } from '@/test/e2e/setupFork' @@ -12,37 +11,6 @@ test.describe('Savings deposit dialog', () => { // The tests here are not independent. // My guess is that reverting to snapshots in tenderly does not work properly - but for now couldn't debug that. // For now tests use different forks. - test.describe('DAI', () => { - const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id }) - - test('wraps DAI', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - DAI: 100, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickStartSavingButtonAction() - - const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) - await depositDialog.fillAmountAction(100) - - const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(2) - await depositDialog.clickBackToSavingsButton() - - await savingsPage.expectCurrentWorth('100') - }) - }) - test.describe('xDAI', () => { // Block number has to be as close as possible to the block number when query was executed const blockNumber = 34227645n @@ -79,42 +47,6 @@ test.describe('Savings deposit dialog', () => { }) }) - test.describe('USDC', () => { - const blockNumber = 19990683n - const fork = setupFork({ blockNumber, chainId: mainnet.id }) - - test('wraps USDC', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - USDC: 100, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - await overrideLiFiRouteWithHAR({ - page, - key: '100-usdc-to-sdai', - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickDepositButtonAction('USDC') - - const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) - await depositDialog.fillAmountAction(100) - - const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(2) - await depositDialog.clickBackToSavingsButton() - - await savingsPage.expectCurrentWorth('99.85') - }) - }) - test.describe('USDC on Gnosis', () => { // Block number has to be as close as possible to the block number when query was executed const blockNumber = 34227645n @@ -153,7 +85,7 @@ test.describe('Savings deposit dialog', () => { }) test.describe('Slippage', () => { - const blockNumber = 19519583n + const blockNumber = 20089938n const fork = setupFork({ blockNumber, chainId: mainnet.id }) test('default', async ({ page }) => { @@ -163,7 +95,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -172,12 +104,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.001', + key: '100-usdt-to-sdai-slippage-0.001', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -195,7 +127,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -204,12 +136,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.005', + key: '100-usdt-to-sdai-slippage-0.005', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -227,7 +159,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -236,12 +168,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.007', + key: '100-usdt-to-sdai-slippage-0.007', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -260,7 +192,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -270,12 +202,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.001', + key: '100-usdt-to-sdai-slippage-0.001', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -299,7 +231,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -309,12 +241,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.001', + key: '100-usdt-to-sdai-slippage-0.001', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -338,7 +270,7 @@ test.describe('Savings deposit dialog', () => { type: 'connected', assetBalances: { ETH: 1, - USDC: 100, + USDT: 100, }, privateKey: LIFI_TEST_USER_PRIVATE_KEY, }, @@ -347,12 +279,12 @@ test.describe('Savings deposit dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '100-usdc-to-sdai-slippage-0.001', + key: '100-usdt-to-sdai-slippage-0.001', }) const savingsPage = new SavingsPageObject(page) - await savingsPage.clickDepositButtonAction('USDC') + await savingsPage.clickDepositButtonAction('USDT') const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) @@ -482,7 +414,7 @@ test.describe('Savings deposit dialog', () => { await actionsContainer.expectNextActionEnabled() await actionsContainer.expectActions([ { type: 'approve', asset: 'USDC' }, - { type: 'exchange', inputAsset: 'USDC', outputAsset: 'sDAI' }, + { type: 'nativeSDaiDeposit', asset: 'USDC' }, ]) await depositDialog.selectAssetAction('USDT') diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/DepositDAI.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/DepositDAI.test-e2e.ts index 82db68f55..861c6f326 100644 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/DepositDAI.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/DepositDAI.test-e2e.ts @@ -32,7 +32,7 @@ test.describe('Deposit DAI on Mainnet', () => { }) test('uses native sDai deposit', async () => { - await depositDialog.expectToUseNativeSDaiAction({ asset: 'DAI', amount: 10_000 }) + await depositDialog.expectToUseNativeSDaiAction({ asset: 'DAI' }) }) test('displays transaction overview', async () => { diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/DepositUSDC.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/DepositUSDC.test-e2e.ts new file mode 100644 index 000000000..de1fd2c35 --- /dev/null +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/DepositUSDC.test-e2e.ts @@ -0,0 +1,76 @@ +import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { PSM_ACTIONS_DEPLOYED, PSM_ACTIONS_DEPLOYED_DATE } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { setupFork } from '@/test/e2e/setupFork' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../common/e2e/SavingsDialog.PageObject' + +test.describe('Deposit USDC on Mainnet', () => { + const fork = setupFork({ + blockNumber: PSM_ACTIONS_DEPLOYED, + simulationDateOverride: PSM_ACTIONS_DEPLOYED_DATE, + chainId: mainnet.id, + }) + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject + + test.beforeEach(async ({ page }) => { + await setup(page, fork, { + initialPage: 'savings', + account: { + type: 'connected', + assetBalances: { + ETH: 1, + USDC: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(page) + await savingsPage.clickDepositButtonAction('USDC') + + depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) + await depositDialog.fillAmountAction(10_000) + }) + + test('uses PSM actions native deposit', async () => { + await depositDialog.expectToUsePSMActionsAction({ asset: 'USDC' }) + }) + + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '8.00%', + description: '~800.00 DAI per year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 USDC', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '10,000.00 DAI', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '9,196.30 sDAI', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '9,196.30 sDAI worth $10,000.00', + }) + }) + + test('executes deposit', async () => { + const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) + await actionsContainer.acceptAllActionsAction(2) + + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsBalance({ sDaiBalance: '9,196.30 sDAI', estimatedDaiValue: '10,000' }) + await savingsPage.expectCashInWalletAssetBalance('USDC', '-') + }) +}) diff --git a/packages/app/src/features/dialogs/savings/withdraw/SavingsWithdrawDialog.test-e2e.ts b/packages/app/src/features/dialogs/savings/withdraw/SavingsWithdrawDialog.test-e2e.ts index c440506ac..093109fa9 100644 --- a/packages/app/src/features/dialogs/savings/withdraw/SavingsWithdrawDialog.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/withdraw/SavingsWithdrawDialog.test-e2e.ts @@ -1,6 +1,5 @@ import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' import { SavingsPageObject } from '@/pages/Savings.PageObject' -import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' import { LIFI_TEST_USER_PRIVATE_KEY, overrideLiFiRouteWithHAR } from '@/test/e2e/lifi' import { setup } from '@/test/e2e/setup' import { setupFork } from '@/test/e2e/setupFork' @@ -9,70 +8,6 @@ import { gnosis, mainnet } from 'viem/chains' import { SavingsDialogPageObject } from '../common/e2e/SavingsDialog.PageObject' test.describe('Savings withdraw dialog', () => { - test.describe('DAI', () => { - const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id }) - - test('unwraps sDAI to DAI', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - sDAI: 1000, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickWithdrawButtonAction() - - const withdrawDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await withdrawDialog.fillAmountAction(1000) - - const actionsContainer = new ActionsPageObject(withdrawDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(1) - await withdrawDialog.clickBackToSavingsButton() - - await savingsPage.expectCurrentWorth('71.5') - await savingsPage.expectCashInWalletAssetBalance('DAI', '1,000.00') - }) - }) - - test.describe('Max DAI', () => { - const blockNumber = 19990836n - const fork = setupFork({ blockNumber, chainId: mainnet.id }) - - test('unwraps all sDAI to DAI', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - sDAI: 1000, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickWithdrawButtonAction() - - const withdrawDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await withdrawDialog.clickMaxAmountAction() - - const actionsContainer = new ActionsPageObject(withdrawDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(1) - await withdrawDialog.clickBackToSavingsButton() - - await savingsPage.expectCashInWalletAssetBalance('DAI', '1,086.94') - }) - }) - test.describe('xDAI', () => { const blockNumber = 34227971n const fork = setupFork({ blockNumber, chainId: gnosis.id }) @@ -110,81 +45,6 @@ test.describe('Savings withdraw dialog', () => { }) }) - test.describe('USDC', () => { - const blockNumber = 19990874n - const fork = setupFork({ blockNumber, chainId: mainnet.id }) - - test('unwraps sDAI to USDC', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - sDAI: 1000, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - await overrideLiFiRouteWithHAR({ - page, - key: 'sdai-to-1000-usdc', - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickWithdrawButtonAction() - - const withdrawDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await withdrawDialog.selectAssetAction('USDC') - await withdrawDialog.fillAmountAction(1000) - - const actionsContainer = new ActionsPageObject(withdrawDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(2) - await withdrawDialog.clickBackToSavingsButton() - - await savingsPage.expectCurrentWorth('83.04') - await savingsPage.expectCashInWalletAssetBalance('USDC', '1,002.30') - }) - }) - - test.describe('Max USDC', () => { - const blockNumber = 19990888n - const fork = setupFork({ blockNumber, chainId: mainnet.id }) - - test('unwraps all sDAI to USDC', async ({ page }) => { - await setup(page, fork, { - initialPage: 'savings', - account: { - type: 'connected', - assetBalances: { - ETH: 1, - sDAI: 1000, - }, - privateKey: LIFI_TEST_USER_PRIVATE_KEY, - }, - }) - await overrideLiFiRouteWithHAR({ - page, - key: '1000-sdai-to-usdc', - }) - - const savingsPage = new SavingsPageObject(page) - - await savingsPage.clickWithdrawButtonAction() - - const withdrawDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await withdrawDialog.selectAssetAction('USDC') - await withdrawDialog.clickMaxAmountAction() - - const actionsContainer = new ActionsPageObject(withdrawDialog.locatePanelByHeader('Actions')) - await actionsContainer.acceptAllActionsAction(2) - await withdrawDialog.clickBackToSavingsButton() - - await savingsPage.expectCashInWalletAssetBalance('USDC', '1,085.21') - }) - }) - test.describe('USDC on Gnosis', () => { const blockNumber = 34228121n const fork = setupFork({ blockNumber, chainId: gnosis.id }) @@ -224,7 +84,7 @@ test.describe('Savings withdraw dialog', () => { }) test.describe('Risk warning', () => { - const blockNumber = 20073952n + const blockNumber = 20090065n const fork = setupFork({ blockNumber, chainId: mainnet.id, @@ -246,7 +106,7 @@ test.describe('Savings withdraw dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '9198.753133685380130125-sdai-to-10000-usdc', + key: '9198.753133685380130125-sdai-to-10000-usdt', }) const savingsPage = new SavingsPageObject(page) @@ -254,10 +114,10 @@ test.describe('Savings withdraw dialog', () => { await savingsPage.clickWithdrawButtonAction() const depositDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await depositDialog.selectAssetAction('USDC') + await depositDialog.selectAssetAction('USDT') await depositDialog.fillAmountAction(10000) - await depositDialog.expectDiscrepancyWarning('189.30 DAI') + await depositDialog.expectDiscrepancyWarning('198.82 DAI') }) test('actions stay disabled until risk is acknowledged', async ({ page }) => { @@ -275,7 +135,7 @@ test.describe('Savings withdraw dialog', () => { await overrideLiFiRouteWithHAR({ page, - key: '9198.753133685380130125-sdai-to-10000-usdc', + key: '9198.753133685380130125-sdai-to-10000-usdt', }) const savingsPage = new SavingsPageObject(page) @@ -283,7 +143,7 @@ test.describe('Savings withdraw dialog', () => { await savingsPage.clickWithdrawButtonAction() const depositDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) - await depositDialog.selectAssetAction('USDC') + await depositDialog.selectAssetAction('USDT') await depositDialog.fillAmountAction(10000) await depositDialog.expectTransactionOverviewToBeVisible() // wait for lifi to load @@ -333,7 +193,7 @@ test.describe('Savings withdraw dialog', () => { await actionsContainer.expectNextActionEnabled() await actionsContainer.expectActions([ { type: 'approve', asset: 'sDAI' }, - { type: 'exchange', inputAsset: 'sDAI', outputAsset: 'USDC' }, + { type: 'nativeSDaiWithdraw', asset: 'USDC' }, ]) await depositDialog.selectAssetAction('USDT') diff --git a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawDAI.test-e2e.ts b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawDAI.test-e2e.ts index 4a74afc7d..b294d0dc7 100644 --- a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawDAI.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawDAI.test-e2e.ts @@ -32,7 +32,7 @@ test.describe('Withdraw DAI on Mainnet', () => { }) test('uses native sDai withdrawal', async () => { - await withdrawalDialog.expectToUseNativeSDaiAction({ asset: 'DAI', amount: 7000 }) + await withdrawalDialog.expectToUseNativeSDaiAction({ asset: 'DAI' }) }) test('displays transaction overview', async () => { diff --git a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxDAI.test-e2e.ts b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxDAI.test-e2e.ts index abe47977b..45654d03d 100644 --- a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxDAI.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxDAI.test-e2e.ts @@ -32,7 +32,7 @@ test.describe('Withdraw max DAI on Mainnet', () => { }) test('uses native sDai withdrawal', async () => { - await withdrawalDialog.expectToUseNativeSDaiAction({ asset: 'DAI', amount: 10_715.05 }) + await withdrawalDialog.expectToUseNativeSDaiAction({ asset: 'DAI' }) }) test('displays transaction overview', async () => { diff --git a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxUSDC.test-e2e.ts b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxUSDC.test-e2e.ts new file mode 100644 index 000000000..17765809d --- /dev/null +++ b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawMaxUSDC.test-e2e.ts @@ -0,0 +1,78 @@ +import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { PSM_ACTIONS_DEPLOYED, PSM_ACTIONS_DEPLOYED_DATE } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { setupFork } from '@/test/e2e/setupFork' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../common/e2e/SavingsDialog.PageObject' + +test.describe('Withdraw max USDC on Mainnet', () => { + const fork = setupFork({ + blockNumber: PSM_ACTIONS_DEPLOYED, + simulationDateOverride: PSM_ACTIONS_DEPLOYED_DATE, + chainId: mainnet.id, + }) + let savingsPage: SavingsPageObject + let withdrawalDialog: SavingsDialogPageObject + + test.beforeEach(async ({ page }) => { + await setup(page, fork, { + initialPage: 'savings', + account: { + type: 'connected', + assetBalances: { + ETH: 1, + sDAI: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(page) + await savingsPage.clickWithdrawButtonAction() + + withdrawalDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) + await withdrawalDialog.selectAssetAction('USDC') + await withdrawalDialog.clickMaxAmountAction() + }) + + test('uses PSM actions native withdrawal', async () => { + await withdrawalDialog.expectToUsePSMActionsAction({ asset: 'USDC' }) + }) + + test('displays transaction overview', async () => { + await withdrawalDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '8.00%', + description: '~869.91 DAI per year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 sDAI', + tokenUsdValue: '$10,873.93', + }, + { + tokenAmount: '10,873.93 DAI', + tokenUsdValue: '$10,873.93', + }, + { + tokenAmount: '10,873.93 USDC', + tokenUsdValue: '$10,873.93', + }, + ], + outcome: '10,873.93 USDC worth $10,873.93', + }) + }) + + test('executes max withdrawal', async () => { + const actionsContainer = new ActionsPageObject(withdrawalDialog.locatePanelByHeader('Actions')) + await actionsContainer.acceptAllActionsAction(2) + + await withdrawalDialog.expectSuccessPage() + await withdrawalDialog.clickBackToSavingsButton() + + await savingsPage.expectPotentialProjection('$69.00', '30-day') + await savingsPage.expectPotentialProjection('$869.92', '1-year') + await savingsPage.expectCashInWalletAssetBalance('USDC', '10,873.94') + }) +}) diff --git a/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawUSDC.test-e2e.ts b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawUSDC.test-e2e.ts new file mode 100644 index 000000000..ee81e2ab8 --- /dev/null +++ b/packages/app/src/features/dialogs/savings/withdraw/e2e/WithdrawUSDC.test-e2e.ts @@ -0,0 +1,77 @@ +import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { PSM_ACTIONS_DEPLOYED, PSM_ACTIONS_DEPLOYED_DATE } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { setupFork } from '@/test/e2e/setupFork' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../common/e2e/SavingsDialog.PageObject' + +test.describe('Withdraw USDC on Mainnet', () => { + const fork = setupFork({ + blockNumber: PSM_ACTIONS_DEPLOYED, + simulationDateOverride: PSM_ACTIONS_DEPLOYED_DATE, + chainId: mainnet.id, + }) + let savingsPage: SavingsPageObject + let withdrawalDialog: SavingsDialogPageObject + + test.beforeEach(async ({ page }) => { + await setup(page, fork, { + initialPage: 'savings', + account: { + type: 'connected', + assetBalances: { + ETH: 1, + sDAI: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(page) + await savingsPage.clickWithdrawButtonAction() + + withdrawalDialog = new SavingsDialogPageObject({ page, type: 'withdraw' }) + await withdrawalDialog.selectAssetAction('USDC') + await withdrawalDialog.fillAmountAction(6969) + }) + + test('uses PSM actions native withdrawal', async () => { + await withdrawalDialog.expectToUsePSMActionsAction({ asset: 'USDC' }) + }) + + test('displays transaction overview', async () => { + await withdrawalDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '8.00%', + description: '~557.52 DAI per year', + }, + routeItems: [ + { + tokenAmount: '6,408.90 sDAI', + tokenUsdValue: '$6,969.00', + }, + { + tokenAmount: '6,969.00 DAI', + tokenUsdValue: '$6,969.00', + }, + { + tokenAmount: '6,969.00 USDC', + tokenUsdValue: '$6,969.00', + }, + ], + outcome: '6,969.00 USDC worth $6,969.00', + }) + }) + + test('executes withdrawal', async () => { + const actionsContainer = new ActionsPageObject(withdrawalDialog.locatePanelByHeader('Actions')) + await actionsContainer.acceptAllActionsAction(2) + + await withdrawalDialog.expectSuccessPage() + await withdrawalDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsBalance({ sDaiBalance: '3,591.10 sDAI', estimatedDaiValue: '3,904.93' }) + await savingsPage.expectCashInWalletAssetBalance('USDC', '6,969.00') + }) +}) diff --git a/packages/app/src/test/e2e/constants.ts b/packages/app/src/test/e2e/constants.ts index 859f27444..0390d6fcf 100644 --- a/packages/app/src/test/e2e/constants.ts +++ b/packages/app/src/test/e2e/constants.ts @@ -86,6 +86,9 @@ export type AssetsInTests = 'ETH' | 'XDAI' | NonNativeTokens // GNO is offboarded export const DEFAULT_BLOCK_NUMBER = 19092430n +export const PSM_ACTIONS_DEPLOYED = 20026000n +export const PSM_ACTIONS_DEPLOYED_DATE = new Date('2024-06-06T10:10:10Z') + export const WBTC_SUPPLY_CAP_REACHED_BLOCK_NUMBER = 19034436n export const GNO_ACTIVE_BLOCK_NUMBER = 18365842n diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/22356d762ecf69e0ab62dfae379cb900a8777a20.json b/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/22356d762ecf69e0ab62dfae379cb900a8777a20.json deleted file mode 100644 index 62b6cd698..000000000 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/22356d762ecf69e0ab62dfae379cb900a8777a20.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "8eb7b69d-46aa-416f-a982-e1334bbb0b50", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromAmount": "100000000", - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "91769819263841943811", - "toAmount": "91861680944786730542", - "fromAmount": "100000000", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "29986852900", - "estimate": "478020", - "limit": "621426", - "amount": "14334315423258000", - "amountUSD": "54.08", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3772.75" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "100.00", - "toAmountUSD": "99.75" - }, - "includedSteps": [ - { - "id": "ed784ece-3424-4777-9980-9d8f320967e0", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "100000000", - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "toChainId": 1, - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "100000000", - "toAmount": "91861680944786730542", - "toAmountMin": "91769819263841943811", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "29986852900", - "estimate": "178602", - "limit": "232183", - "amount": "5355711901645800", - "amountUSD": "20.21", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3772.75" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a492c2b90b57fc2220697cfb93bfa7682ec966ae2d36972dbd9d3be9fdc074592800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004f98fe467331941030000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004f98f6704dc71e7eb00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004fb792f275a25ee4a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001e9c8227db4065f000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000da51198faebde260747c2da6d3b36715000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x6fb5b1024", - "gasLimit": "0x97b72", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/8cc0959e71d0a39bbf3fd4644c4c574c4cd627d9.json b/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/8cc0959e71d0a39bbf3fd4644c4c574c4cd627d9.json deleted file mode 100644 index 0b4047cf7..000000000 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/8cc0959e71d0a39bbf3fd4644c4c574c4cd627d9.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "aba13170-6669-4873-a21d-34bba3839765", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromAmount": "100000000", - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.005, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "91401766148214735540", - "toAmount": "91861071505743452804", - "fromAmount": "100000000", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "30152269626", - "estimate": "478020", - "limit": "621426", - "amount": "14413387926620520", - "amountUSD": "54.45", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3777.7" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "100.00", - "toAmountUSD": "99.75" - }, - "includedSteps": [ - { - "id": "5fb8ef72-ec7c-43e2-a89a-c4eeb9bf9e7f", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "100000000", - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "toChainId": 1, - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "slippage": 0.005, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "100000000", - "toAmount": "91861071505743452804", - "toAmountMin": "91401766148214735540", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "30152269626", - "estimate": "178602", - "limit": "232183", - "amount": "5385255659742852", - "amountUSD": "20.34", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3777.7" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a479f79a119c53d63224fcdd878a0c9362a751df04701df3efaa00ce8ba79d151e00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004f4744e0b63a9c2b40000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004f471dda453c63b8500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004f659ae28bd87d821000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001e7d08469c19c9c000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed70000000000000000000000000000000067d9248eab1a52cfca4349f60d360a00000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x705371f3a", - "gasLimit": "0x97b72", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/main.har b/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/main.har deleted file mode 100644 index ff9116065..000000000 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.005/main.har +++ /dev/null @@ -1,122 +0,0 @@ -{ - "log": { - "version": "1.2", - "creator": { - "name": "Playwright", - "version": "1.43.0" - }, - "browser": { - "name": "chromium", - "version": "124.0.6367.29" - }, - "entries": [ - { - "startedDateTime": "2024-05-31T15:13:36.086Z", - "time": 0.689, - "request": { - "method": "GET", - "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.005&maxPriceImpact=0.005", - "httpVersion": "h3", - "cookies": [], - "headers": [ - { "name": ":authority", "value": "li.quest" }, - { "name": ":method", "value": "GET" }, - { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.005&maxPriceImpact=0.005" }, - { "name": ":scheme", "value": "https" }, - { "name": "accept", "value": "*/*" }, - { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, - { "name": "accept-language", "value": "en-US" }, - { "name": "origin", "value": "http://localhost:4000" }, - { "name": "priority", "value": "u=1, i" }, - { "name": "referer", "value": "http://localhost:4000/" }, - { "name": "sec-ch-ua", "value": "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"" }, - { "name": "sec-ch-ua-mobile", "value": "?0" }, - { "name": "sec-ch-ua-platform", "value": "\"Windows\"" }, - { "name": "sec-fetch-dest", "value": "empty" }, - { "name": "sec-fetch-mode", "value": "cors" }, - { "name": "sec-fetch-site", "value": "cross-site" }, - { "name": "user-agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.29 Safari/537.36" } - ], - "queryString": [ - { - "name": "fromChain", - "value": "1" - }, - { - "name": "toChain", - "value": "1" - }, - { - "name": "fromAddress", - "value": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - { - "name": "fromToken", - "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" - }, - { - "name": "fromAmount", - "value": "100000000" - }, - { - "name": "toToken", - "value": "0x83F20F44975D03b1b09e64809B757c47f942BEeA" - }, - { - "name": "integrator", - "value": "spark_waivefee" - }, - { - "name": "fee", - "value": "0" - }, - { - "name": "slippage", - "value": "0.005" - }, - { - "name": "maxPriceImpact", - "value": "0.005" - } - ], - "headersSize": -1, - "bodySize": -1 - }, - "response": { - "status": 200, - "statusText": "", - "httpVersion": "h3", - "cookies": [], - "headers": [ - { "name": "access-control-allow-origin", "value": "*" }, - { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, - { "name": "cache-control", "value": "no-store" }, - { "name": "cf-cache-status", "value": "BYPASS" }, - { "name": "cf-ray", "value": "88c7e8a95e0bb17c-WAW" }, - { "name": "content-encoding", "value": "gzip" }, - { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 15:13:37 GMT" }, - { "name": "ratelimit-limit", "value": "100" }, - { "name": "ratelimit-remaining", "value": "92" }, - { "name": "ratelimit-reset", "value": "5834" }, - { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dKUnVc3rr4z4k; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 14:13:37 GMT; HttpOnly" }, - { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, - { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "52be504e-f21f-49e8-885d-7a5b8521d9ae" } - ], - "content": { - "size": -1, - "mimeType": "application/json", - "_file": "8cc0959e71d0a39bbf3fd4644c4c574c4cd627d9.json" - }, - "headersSize": -1, - "bodySize": -1, - "redirectURL": "" - }, - "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 0.689 } - } - ] - } -} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/bd4155e5dde14a0877c54dcb05e822ace907b4b7.json b/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/bd4155e5dde14a0877c54dcb05e822ace907b4b7.json deleted file mode 100644 index b4da2a6dc..000000000 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/bd4155e5dde14a0877c54dcb05e822ace907b4b7.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "2ebbd837-d704-45d3-b44a-5d06754f5002", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromAmount": "100000000", - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.007, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "91218318068374547407", - "toAmount": "91861347500880712394", - "fromAmount": "100000000", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "30152269626", - "estimate": "478020", - "limit": "621426", - "amount": "14413387926620520", - "amountUSD": "54.45", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3777.7" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "100.00", - "toAmountUSD": "99.75" - }, - "includedSteps": [ - { - "id": "76d6c679-fb7c-41f4-b755-f445ea31b5ea", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "100000000", - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "toChainId": 1, - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858886947268789" - }, - "slippage": 0.007, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "100000000", - "toAmount": "91861347500880712394", - "toAmountMin": "91218318068374547407", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "30152269626", - "estimate": "178602", - "limit": "232183", - "amount": "5385255659742852", - "amountUSD": "20.34", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3777.7" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a443980f1c3d6cce37fba591bad3d44b4fb64eb65c29f0ce974bf924140bb3456e00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004f1e890fce20fabcf0000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004f1e52894d129676500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004f3cbfe151acd4bbb000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001e6d58049a3e456000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed70000000000000000000000000000000061bcf5d4f515537bbae27abb183accc6000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x705371f3a", - "gasLimit": "0x97b72", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai/23e67e285cfd50caaeae07dee4731e7ce533ac95.json b/packages/app/src/test/e2e/hars/100-usdc-to-sdai/23e67e285cfd50caaeae07dee4731e7ce533ac95.json deleted file mode 100644 index cd0693cd4..000000000 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai/23e67e285cfd50caaeae07dee4731e7ce533ac95.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "5cbf7fa9-123a-4281-a211-16f4fc9aa23c", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromAmount": "100000000", - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "91843063720286380695", - "toAmount": "91934998719005386081", - "fromAmount": "100000000", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "28000000000", - "estimate": "478021", - "limit": "621427", - "amount": "13384588000000000", - "amountUSD": "50.46", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3770.16" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "100.00", - "toAmountUSD": "99.83" - }, - "includedSteps": [ - { - "id": "94f76165-69d3-4b20-836e-23d85daa0310", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "100000000", - "fromToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "toChainId": 1, - "toToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "100000000", - "toAmount": "91934998719005386081", - "toAmountMin": "91843063720286380695", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "28000000000", - "estimate": "178604", - "limit": "232185", - "amount": "5000912000000000", - "amountUSD": "18.85", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3770.16" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a4248c8c041b9e0fd761ebdfdb787a8fa20ea3e693ab82a2e33c94fb98d19af43200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004fa941bd9233c62970000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004fa939e5d2e30910500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000004fc7dca92645b3304000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001ea2c35362aa1ff000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed70000000000000000000000000000000022065a591a009bb907d8cf29559fb8d1000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x684ee1800", - "gasLimit": "0x97b73", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/23c6b8174dad7d5ba7830afca072267f65d1db78.json b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/23c6b8174dad7d5ba7830afca072267f65d1db78.json new file mode 100644 index 000000000..27d285cd5 --- /dev/null +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/23c6b8174dad7d5ba7830afca072267f65d1db78.json @@ -0,0 +1,253 @@ +{ + "type": "lifi", + "id": "f6e6a3f4-6a40-40e2-bbb6-c471041f9cfe", + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + }, + "action": { + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "fromAmount": "100000000", + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "fromChainId": 1, + "toChainId": 1, + "slippage": 0.001, + "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" + }, + "estimate": { + "tool": "0x", + "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAmountMin": "90463259317855050093", + "toAmount": "90553813130986036129", + "fromAmount": "100000000", + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "gasCosts": [ + { + "type": "SEND", + "price": "7306595529", + "estimate": "578161", + "limit": "751609", + "amount": "4224388577642169", + "amountUSD": "14.85", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "executionDuration": 30, + "fromAmountUSD": "99.92", + "toAmountUSD": "98.62" + }, + "includedSteps": [ + { + "id": "494043c1-d9d1-4dbc-8625-988bbfd4893d", + "type": "protocol", + "action": { + "fromChainId": 1, + "fromAmount": "100000000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "slippage": 0.001, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "fromAmount": "100000000", + "toAmount": "99800000", + "toAmountMin": "99800000", + "tool": "feeCollection", + "approvalAddress": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9", + "gasCosts": [ + { + "type": "SEND", + "price": "7306595529", + "estimate": "130000", + "limit": "169000", + "amount": "949857418770000", + "amountUSD": "3.34", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "executionDuration": 0 + }, + "tool": "feeCollection", + "toolDetails": { + "key": "feeCollection", + "name": "Integrator Fee", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/protocols/feeCollection.png" + } + }, + { + "id": "f8d462d4-40e8-4727-900e-9e00ea2a1dec", + "type": "swap", + "action": { + "fromChainId": 1, + "fromAmount": "99800000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "slippage": 0.001, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "tool": "0x", + "fromAmount": "99800000", + "toAmount": "90553813130986036129", + "toAmountMin": "90463259317855050093", + "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + "executionDuration": 30, + "feeCosts": [], + "gasCosts": [ + { + "type": "SEND", + "price": "7306595529", + "estimate": "178546", + "limit": "232110", + "amount": "1304563405320834", + "amountUSD": "4.59", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ] + }, + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + } + } + ], + "integrator": "spark_fee", + "transactionRequest": { + "data": "0x4630a0d8cc315d6959eba3fe6c92ba8ebb611e764dded2d7924e2a92ef2e8718d635371700000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004e76e0f0e00cbd96d00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000009737061726b5f6665650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a307830303030303030303030303030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000084eedd56e1000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004e76d9374a903fdf500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004e95062738db549b7000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042dac17f958d2ee523a2206206994597c13d831ec70001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001e2cefee4b14bc2000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed7000000000000000000000000000000000000000078ee329b2896bfcdd7a4ff11000000000000000000000000000000000000000000000000", + "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "value": "0x0", + "gasPrice": "0x1b381ccc9", + "gasLimit": "0xb77f9", + "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "chainId": 1 + } +} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/main.har b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/main.har similarity index 76% rename from packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/main.har rename to packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/main.har index a97f3ec66..d51ef66fd 100644 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.001/main.har +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.001/main.har @@ -11,17 +11,17 @@ }, "entries": [ { - "startedDateTime": "2024-05-31T15:14:06.878Z", - "time": 0.797, + "startedDateTime": "2024-06-14T12:17:11.516Z", + "time": 0.903, "request": { "method": "GET", - "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005", + "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.001", "httpVersion": "h3", "cookies": [], "headers": [ { "name": ":authority", "value": "li.quest" }, { "name": ":method", "value": "GET" }, - { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005" }, + { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.001" }, { "name": ":scheme", "value": "https" }, { "name": "accept", "value": "*/*" }, { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, @@ -52,7 +52,7 @@ }, { "name": "fromToken", - "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + "value": "0xdAC17F958D2ee523a2206206994597C13D831ec7" }, { "name": "fromAmount", @@ -64,19 +64,15 @@ }, { "name": "integrator", - "value": "spark_waivefee" + "value": "spark_fee" }, { "name": "fee", - "value": "0" + "value": "0.002" }, { "name": "slippage", "value": "0.001" - }, - { - "name": "maxPriceImpact", - "value": "0.005" } ], "headersSize": -1, @@ -92,30 +88,30 @@ { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, { "name": "cache-control", "value": "no-store" }, { "name": "cf-cache-status", "value": "BYPASS" }, - { "name": "cf-ray", "value": "88c7e969ba33bf3a-WAW" }, - { "name": "content-encoding", "value": "gzip" }, + { "name": "cf-ray", "value": "893a417f7ab4bf80-WAW" }, + { "name": "content-encoding", "value": "br" }, { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 15:14:08 GMT" }, + { "name": "date", "value": "Fri, 14 Jun 2024 12:17:13 GMT" }, { "name": "ratelimit-limit", "value": "100" }, - { "name": "ratelimit-remaining", "value": "88" }, - { "name": "ratelimit-reset", "value": "5803" }, + { "name": "ratelimit-remaining", "value": "98" }, + { "name": "ratelimit-reset", "value": "2856" }, { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1diNBdnVyESZFa; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 14:14:08 GMT; HttpOnly" }, + { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dpLYqyPjrawR6; SameSite=Lax; path=/; expires=Sat, 15-Jun-24 11:17:13 GMT; HttpOnly" }, { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "dcef20b0-42f4-446f-900a-ef57adec4a26" } + { "name": "x-lifi-requestid", "value": "8fa9bdea-b12c-41f8-b4cf-463f01691fb7" } ], "content": { "size": -1, "mimeType": "application/json", - "_file": "22356d762ecf69e0ab62dfae379cb900a8777a20.json" + "_file": "23c6b8174dad7d5ba7830afca072267f65d1db78.json" }, "headersSize": -1, "bodySize": -1, "redirectURL": "" }, "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 0.797 } + "timings": { "send": -1, "wait": -1, "receive": 0.903 } } ] } diff --git a/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/20965f9053b80a3f86ceb5753a74266fc008e321.json b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/20965f9053b80a3f86ceb5753a74266fc008e321.json new file mode 100644 index 000000000..efc6d35fd --- /dev/null +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/20965f9053b80a3f86ceb5753a74266fc008e321.json @@ -0,0 +1,253 @@ +{ + "type": "lifi", + "id": "f394ab4e-f6be-4931-aaf0-2a7ad54223e8", + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + }, + "action": { + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "fromAmount": "100000000", + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "fromChainId": 1, + "toChainId": 1, + "slippage": 0.005, + "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" + }, + "estimate": { + "tool": "0x", + "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAmountMin": "90100844043935607058", + "toAmount": "90553612104457896541", + "fromAmount": "100000000", + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "gasCosts": [ + { + "type": "SEND", + "price": "7234852235", + "estimate": "578161", + "limit": "751609", + "amount": "4182909403039835", + "amountUSD": "14.71", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "executionDuration": 30, + "fromAmountUSD": "99.92", + "toAmountUSD": "98.62" + }, + "includedSteps": [ + { + "id": "05eb369d-f593-4542-88a4-71b2dea25633", + "type": "protocol", + "action": { + "fromChainId": 1, + "fromAmount": "100000000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "slippage": 0.005, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "fromAmount": "100000000", + "toAmount": "99800000", + "toAmountMin": "99800000", + "tool": "feeCollection", + "approvalAddress": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9", + "gasCosts": [ + { + "type": "SEND", + "price": "7234852235", + "estimate": "130000", + "limit": "169000", + "amount": "940530790550000", + "amountUSD": "3.31", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "executionDuration": 0 + }, + "tool": "feeCollection", + "toolDetails": { + "key": "feeCollection", + "name": "Integrator Fee", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/protocols/feeCollection.png" + } + }, + { + "id": "2dea0654-7052-4471-8363-9b3d8fcff98d", + "type": "swap", + "action": { + "fromChainId": 1, + "fromAmount": "99800000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "slippage": 0.005, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "tool": "0x", + "fromAmount": "99800000", + "toAmount": "90553612104457896541", + "toAmountMin": "90100844043935607058", + "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + "executionDuration": 30, + "feeCosts": [], + "gasCosts": [ + { + "type": "SEND", + "price": "7234852235", + "estimate": "178546", + "limit": "232110", + "amount": "1291753927150310", + "amountUSD": "4.54", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ] + }, + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + } + } + ], + "integrator": "spark_fee", + "transactionRequest": { + "data": "0x4630a0d8b4bbbc0da98ae5b003d7518aacba002505a8fe6390ad8ca8365b50aadef13b0500000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004e266804881a6e91200000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000009737061726b5f6665650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a307830303030303030303030303030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000084eedd56e1000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004e26418c48c88d29b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004e444f7dc0c0a5fce000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042dac17f958d2ee523a2206206994597c13d831ec70001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001e0df177f818d33000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed70000000000000000000000000000000000000000ceeecc84925311b404173683000000000000000000000000000000000000000000000000", + "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "value": "0x0", + "gasPrice": "0x1af3b158b", + "gasLimit": "0xb77f9", + "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "chainId": 1 + } +} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/main.har b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/main.har similarity index 76% rename from packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/main.har rename to packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/main.har index 16f4b4ce7..1aa691cea 100644 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai-slippage-0.007/main.har +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.005/main.har @@ -11,17 +11,17 @@ }, "entries": [ { - "startedDateTime": "2024-05-31T15:13:43.706Z", - "time": 0.769, + "startedDateTime": "2024-06-14T12:18:15.064Z", + "time": 1.495, "request": { "method": "GET", - "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.007&maxPriceImpact=0.005", + "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.005", "httpVersion": "h3", "cookies": [], "headers": [ { "name": ":authority", "value": "li.quest" }, { "name": ":method", "value": "GET" }, - { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.007&maxPriceImpact=0.005" }, + { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.005" }, { "name": ":scheme", "value": "https" }, { "name": "accept", "value": "*/*" }, { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, @@ -52,7 +52,7 @@ }, { "name": "fromToken", - "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + "value": "0xdAC17F958D2ee523a2206206994597C13D831ec7" }, { "name": "fromAmount", @@ -64,18 +64,14 @@ }, { "name": "integrator", - "value": "spark_waivefee" + "value": "spark_fee" }, { "name": "fee", - "value": "0" + "value": "0.002" }, { "name": "slippage", - "value": "0.007" - }, - { - "name": "maxPriceImpact", "value": "0.005" } ], @@ -92,30 +88,30 @@ { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, { "name": "cache-control", "value": "no-store" }, { "name": "cf-cache-status", "value": "BYPASS" }, - { "name": "cf-ray", "value": "88c7e8d8eebbb1ee-WAW" }, - { "name": "content-encoding", "value": "gzip" }, + { "name": "cf-ray", "value": "893a430cb81a3bd2-WAW" }, + { "name": "content-encoding", "value": "br" }, { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 15:13:45 GMT" }, + { "name": "date", "value": "Fri, 14 Jun 2024 12:18:16 GMT" }, { "name": "ratelimit-limit", "value": "100" }, - { "name": "ratelimit-remaining", "value": "91" }, - { "name": "ratelimit-reset", "value": "5827" }, + { "name": "ratelimit-remaining", "value": "97" }, + { "name": "ratelimit-reset", "value": "2792" }, { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dQeX8zzQDxdVe; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 14:13:45 GMT; HttpOnly" }, + { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1edazAjRFssQma; SameSite=Lax; path=/; expires=Sat, 15-Jun-24 11:18:16 GMT; HttpOnly" }, { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "9837c648-a4ef-47b8-a518-ba57c1d7fb1a" } + { "name": "x-lifi-requestid", "value": "ebc8a3ef-a5db-4893-a93c-93bd20e51eb6" } ], "content": { "size": -1, "mimeType": "application/json", - "_file": "bd4155e5dde14a0877c54dcb05e822ace907b4b7.json" + "_file": "20965f9053b80a3f86ceb5753a74266fc008e321.json" }, "headersSize": -1, "bodySize": -1, "redirectURL": "" }, "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 0.769 } + "timings": { "send": -1, "wait": -1, "receive": 1.495 } } ] } diff --git a/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/1aac1244d91a29a4f53881c97be18fe79e0c0288.json b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/1aac1244d91a29a4f53881c97be18fe79e0c0288.json new file mode 100644 index 000000000..ac2b5cab2 --- /dev/null +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/1aac1244d91a29a4f53881c97be18fe79e0c0288.json @@ -0,0 +1,253 @@ +{ + "type": "lifi", + "id": "70a65dd4-59e4-4924-a671-85a44e5f38c7", + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + }, + "action": { + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "fromAmount": "100000000", + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "fromChainId": 1, + "toChainId": 1, + "slippage": 0.007, + "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" + }, + "estimate": { + "tool": "0x", + "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAmountMin": "89902240079145349493", + "toAmount": "90535992023308509056", + "fromAmount": "100000000", + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "gasCosts": [ + { + "type": "SEND", + "price": "7226305541", + "estimate": "578229", + "limit": "751698", + "amount": "4178459426666889", + "amountUSD": "14.69", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "executionDuration": 30, + "fromAmountUSD": "99.92", + "toAmountUSD": "98.61" + }, + "includedSteps": [ + { + "id": "9087bfeb-7b9e-4f19-8481-de0fa73d9554", + "type": "protocol", + "action": { + "fromChainId": 1, + "fromAmount": "100000000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "slippage": 0.007, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "fromAmount": "100000000", + "toAmount": "99800000", + "toAmountMin": "99800000", + "tool": "feeCollection", + "approvalAddress": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9", + "gasCosts": [ + { + "type": "SEND", + "price": "7226305541", + "estimate": "130000", + "limit": "169000", + "amount": "939419720330000", + "amountUSD": "3.30", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ], + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "amount": "200000", + "amountUSD": "0.20", + "percentage": "0.0020", + "included": true + } + ], + "executionDuration": 0 + }, + "tool": "feeCollection", + "toolDetails": { + "key": "feeCollection", + "name": "Integrator Fee", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/protocols/feeCollection.png" + } + }, + { + "id": "c90fc6ed-5e09-44d6-98fd-7a1a00be6797", + "type": "swap", + "action": { + "fromChainId": 1, + "fromAmount": "99800000", + "fromToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99923" + }, + "toChainId": 1, + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "slippage": 0.007, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "tool": "0x", + "fromAmount": "99800000", + "toAmount": "90535992023308509056", + "toAmountMin": "89902240079145349493", + "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + "executionDuration": 30, + "feeCosts": [], + "gasCosts": [ + { + "type": "SEND", + "price": "7226305541", + "estimate": "178682", + "limit": "232287", + "amount": "1291210726676962", + "amountUSD": "4.54", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3516.4" + } + } + ] + }, + "tool": "0x", + "toolDetails": { + "key": "0x", + "name": "0x", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" + } + } + ], + "integrator": "spark_fee", + "transactionRequest": { + "data": "0x4630a0d87d174e4dd5158205fc66f3249e91580d84fe36b575948e228a80d04ffabc39fa00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000004dfa4eb078d58317500000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000009737061726b5f6665650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a307830303030303030303030303030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000084eedd56e1000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030d4000000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000788415565b0000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004dfa18f35baea932400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000054000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000000000000005f2d3c0000000000000000000000000000000000000000000000004e1815e95713aeb4d000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000042dac17f958d2ee523a2206206994597c13d831ec70001f4c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f483f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000000000000000000000000000001dfcf5fb6505829000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000000000006d6fcd8e3e136f66a4b7561a000000000000000000000000000000000000000000000000", + "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "value": "0x0", + "gasPrice": "0x1aeb8ac05", + "gasLimit": "0xb7852", + "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "chainId": 1 + } +} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/100-usdc-to-sdai/main.har b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/main.har similarity index 75% rename from packages/app/src/test/e2e/hars/100-usdc-to-sdai/main.har rename to packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/main.har index 8d4e48132..5811a1848 100644 --- a/packages/app/src/test/e2e/hars/100-usdc-to-sdai/main.har +++ b/packages/app/src/test/e2e/hars/100-usdt-to-sdai-slippage-0.007/main.har @@ -11,17 +11,17 @@ }, "entries": [ { - "startedDateTime": "2024-05-31T15:32:36.520Z", - "time": 0.849, + "startedDateTime": "2024-06-14T12:19:06.707Z", + "time": 0.852, "request": { "method": "GET", - "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005", + "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.007", "httpVersion": "h3", "cookies": [], "headers": [ { "name": ":authority", "value": "li.quest" }, { "name": ":method", "value": "GET" }, - { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005" }, + { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0xdAC17F958D2ee523a2206206994597C13D831ec7&fromAmount=100000000&toToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&integrator=spark_fee&fee=0.002&slippage=0.007" }, { "name": ":scheme", "value": "https" }, { "name": "accept", "value": "*/*" }, { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, @@ -52,7 +52,7 @@ }, { "name": "fromToken", - "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + "value": "0xdAC17F958D2ee523a2206206994597C13D831ec7" }, { "name": "fromAmount", @@ -64,19 +64,15 @@ }, { "name": "integrator", - "value": "spark_waivefee" + "value": "spark_fee" }, { "name": "fee", - "value": "0" + "value": "0.002" }, { "name": "slippage", - "value": "0.001" - }, - { - "name": "maxPriceImpact", - "value": "0.005" + "value": "0.007" } ], "headersSize": -1, @@ -92,30 +88,30 @@ { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, { "name": "cache-control", "value": "no-store" }, { "name": "cf-cache-status", "value": "BYPASS" }, - { "name": "cf-ray", "value": "88c804810f0ebfdc-WAW" }, - { "name": "content-encoding", "value": "gzip" }, + { "name": "cf-ray", "value": "893a444f7e52c045-WAW" }, + { "name": "content-encoding", "value": "br" }, { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 15:32:38 GMT" }, + { "name": "date", "value": "Fri, 14 Jun 2024 12:19:08 GMT" }, { "name": "ratelimit-limit", "value": "100" }, - { "name": "ratelimit-remaining", "value": "83" }, - { "name": "ratelimit-reset", "value": "4694" }, + { "name": "ratelimit-remaining", "value": "96" }, + { "name": "ratelimit-reset", "value": "2741" }, { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dAeTZGRLiGVbS; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 14:32:38 GMT; HttpOnly" }, + { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dek4n467YZvKE; SameSite=Lax; path=/; expires=Sat, 15-Jun-24 11:19:08 GMT; HttpOnly" }, { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "0d4783ff-51a4-47fe-bb02-28e2859bba16" } + { "name": "x-lifi-requestid", "value": "591c08eb-45a3-45bd-b7de-60ab111a14ae" } ], "content": { "size": -1, "mimeType": "application/json", - "_file": "23e67e285cfd50caaeae07dee4731e7ce533ac95.json" + "_file": "1aac1244d91a29a4f53881c97be18fe79e0c0288.json" }, "headersSize": -1, "bodySize": -1, "redirectURL": "" }, "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 0.849 } + "timings": { "send": -1, "wait": -1, "receive": 0.852 } } ] } diff --git a/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/fb3901124ee2dcf5dd127308b640cf338233af6d.json b/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/fb3901124ee2dcf5dd127308b640cf338233af6d.json deleted file mode 100644 index df53b7779..000000000 --- a/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/fb3901124ee2dcf5dd127308b640cf338233af6d.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "4229b4eb-9693-445b-ace1-7c6e9b35d358", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "fromAmount": "1000000000000000000000", - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "1083264376", - "toAmount": "1084348725", - "fromAmount": "1000000000000000000000", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "628000", - "limit": "816400", - "amount": "15893635087128000", - "amountUSD": "59.81", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "1085.90", - "toAmountUSD": "1084.35" - }, - "includedSteps": [ - { - "id": "d953e67e-e55e-439d-8209-99c56ebb5cfe", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "1000000000000000000000", - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "toChainId": 1, - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "1000000000000000000000", - "toAmount": "1084348725", - "toAmountMin": "1083264376", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "385000", - "limit": "500500", - "amount": "9743709408510000", - "amountUSD": "36.67", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a4cda4d48766c32ddb664401f4d56667b7015300dd6347992e3c0e3bb9437e91d800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f314390000000000000000000000000000000000000000000000000000000040914d780000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000948415565b000000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000003635c9adc5dea00000000000000000000000000000000000000000000000000000000000004091471c00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004c000000000000000000000000000000000000000000000003635c9adc5dea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000001942616c616e636572563200000000000000000000000000000000000000000000000000000000003635c9adc5dea000000000000000000000000000000000000000000000000000000000000040aa1be3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e02191df821c198600499aa1f0031b1a7514d7a7d90002000000000000000006390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140c2aa60465bffa1a88f5ba471a59ca0435c3ec5c100020000000000000000062c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000e07f9d810a48ab5c3c914ba3ca53af14e4491e8a000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000018d4c7000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000ce40a06b030ca0eb7e16d03321558e74000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x5e47e8ffe", - "gasLimit": "0xc7510", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/main.har b/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/main.har deleted file mode 100644 index 05ccd25a1..000000000 --- a/packages/app/src/test/e2e/hars/1000-sdai-to-usdc/main.har +++ /dev/null @@ -1,122 +0,0 @@ -{ - "log": { - "version": "1.2", - "creator": { - "name": "Playwright", - "version": "1.43.0" - }, - "browser": { - "name": "chromium", - "version": "124.0.6367.29" - }, - "entries": [ - { - "startedDateTime": "2024-05-31T16:07:11.326Z", - "time": 0.807, - "request": { - "method": "GET", - "url": "https://li.quest/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&fromAmount=1000000000000000000000&toToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": ":authority", "value": "li.quest" }, - { "name": ":method", "value": "GET" }, - { "name": ":path", "value": "/v1/quote?fromChain=1&toChain=1&fromAddress=0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439&fromToken=0x83F20F44975D03b1b09e64809B757c47f942BEeA&fromAmount=1000000000000000000000&toToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&integrator=spark_waivefee&fee=0&slippage=0.001&maxPriceImpact=0.005" }, - { "name": ":scheme", "value": "https" }, - { "name": "accept", "value": "*/*" }, - { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, - { "name": "accept-language", "value": "en-US" }, - { "name": "origin", "value": "http://localhost:4000" }, - { "name": "priority", "value": "u=1, i" }, - { "name": "referer", "value": "http://localhost:4000/" }, - { "name": "sec-ch-ua", "value": "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"" }, - { "name": "sec-ch-ua-mobile", "value": "?0" }, - { "name": "sec-ch-ua-platform", "value": "\"Windows\"" }, - { "name": "sec-fetch-dest", "value": "empty" }, - { "name": "sec-fetch-mode", "value": "cors" }, - { "name": "sec-fetch-site", "value": "cross-site" }, - { "name": "user-agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.29 Safari/537.36" } - ], - "queryString": [ - { - "name": "fromChain", - "value": "1" - }, - { - "name": "toChain", - "value": "1" - }, - { - "name": "fromAddress", - "value": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - { - "name": "fromToken", - "value": "0x83F20F44975D03b1b09e64809B757c47f942BEeA" - }, - { - "name": "fromAmount", - "value": "1000000000000000000000" - }, - { - "name": "toToken", - "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" - }, - { - "name": "integrator", - "value": "spark_waivefee" - }, - { - "name": "fee", - "value": "0" - }, - { - "name": "slippage", - "value": "0.001" - }, - { - "name": "maxPriceImpact", - "value": "0.005" - } - ], - "headersSize": -1, - "bodySize": -1 - }, - "response": { - "status": 200, - "statusText": "", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": "access-control-allow-origin", "value": "*" }, - { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, - { "name": "cache-control", "value": "no-store" }, - { "name": "cf-cache-status", "value": "BYPASS" }, - { "name": "cf-ray", "value": "88c83728bdba34b2-WAW" }, - { "name": "content-encoding", "value": "gzip" }, - { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 16:07:12 GMT" }, - { "name": "ratelimit-limit", "value": "100" }, - { "name": "ratelimit-remaining", "value": "77" }, - { "name": "ratelimit-reset", "value": "2619" }, - { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1dWdFqQqmhT96t; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 15:07:12 GMT; HttpOnly" }, - { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, - { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "ba01fd5b-5187-42e5-a52a-331396791fd8" } - ], - "content": { - "size": -1, - "mimeType": "application/json", - "_file": "fb3901124ee2dcf5dd127308b640cf338233af6d.json" - }, - "headersSize": -1, - "bodySize": -1, - "redirectURL": "" - }, - "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 0.807 } - } - ] - } -} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/6762b6c153510dc5089118d027d6d0902c7ff65f.json b/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/6762b6c153510dc5089118d027d6d0902c7ff65f.json deleted file mode 100644 index 4a8ef2e57..000000000 --- a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/6762b6c153510dc5089118d027d6d0902c7ff65f.json +++ /dev/null @@ -1 +0,0 @@ -{"fromChain":"1","toChain":"1","fromAddress":"0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439","fromToken":"0x83F20F44975D03b1b09e64809B757c47f942BEeA","toToken":"0x6B175474E89094C44Da98b954EedeAC495271d0F","toAmount":"10000000000000000000000","integrator":"spark_waivefee","fee":"0","slippage":"0.001","maxPriceImpact":"0.005","contractCalls":[]} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/899957599eb9ea538338b7ffaac11d275f00bb25.json b/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/899957599eb9ea538338b7ffaac11d275f00bb25.json deleted file mode 100644 index 8fee944ef..000000000 --- a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/899957599eb9ea538338b7ffaac11d275f00bb25.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "647b6316-df74-45bb-b227-1d12ff30c699", - "tool": "enso", - "toolDetails": { - "key": "enso", - "name": "Enso", - "logoURI": "https://www.enso.finance/favicon.ico" - }, - "action": { - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "fromAmount": "9221273283291359763118", - "toToken": { - "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "chainId": 1, - "symbol": "DAI", - "decimals": 18, - "name": "DAI Stablecoin", - "coinKey": "DAI", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png", - "priceUSD": "1.00005" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "enso", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "10004999999999999999920", - "toAmount": "11116666666666666666578", - "fromAmount": "10277276260680656857010", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "456494", - "limit": "593442", - "amount": "11553103591502244", - "amountUSD": "43.48", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "10013.36", - "toAmountUSD": "10015.52" - }, - "includedSteps": [ - { - "id": "14da352b-302b-4b98-be58-43a8372eac80", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "9221273283291359763118", - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "toChainId": 1, - "toToken": { - "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "chainId": 1, - "symbol": "DAI", - "decimals": 18, - "name": "DAI Stablecoin", - "coinKey": "DAI", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png", - "priceUSD": "1.00005" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "enso", - "fromAmount": "9221273283291359763118", - "toAmount": "10015015015015015015017", - "toAmountMin": "10005000000000000000002", - "approvalAddress": "0x80EbA3855878739F4710233A8a19d89Bdd2ffB8E", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "213494", - "limit": "277542", - "amount": "5403177912884244", - "amountUSD": "20.33", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ] - }, - "tool": "enso", - "toolDetails": { - "key": "enso", - "name": "Enso", - "logoURI": "https://www.enso.finance/favicon.ico" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a47df7392d9137d2f36519ea2646e91e0b1cc09ee99ab4ee6508f8c853199c265100000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f3143900000000000000000000000000000000000000000000021e5f445b3cf73400020000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a3078303030303030303030303030303030303030303030303030303030303030303030303030303030300000000000000000000000000000000000000000000000000000000000000000000080eba3855878739f4710233a8a19d89bdd2ffb8e00000000000000000000000080eba3855878739f4710233a8a19d89bdd2ffb8e00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000001f3e2dfbac0f5805aae00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a4b35d7e7300000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000001f3e2dfbac0f5805aae000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000003ba08765201000102ffffff0283f20f44975d03b1b09e64809b757c47f942beea6e7a43a3010203ffffffff027e7d64d987cab6eed08a191c4c2459daf2f8ed0b241c59120102ffffffffffff7e7d64d987cab6eed08a191c4c2459daf2f8ed0b0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000001f3e2dfbac0f5805aae00000000000000000000000000000000000000000000000000000000000000200000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000200000000000000000000000007d585b0e27bbb3d981b7757115ec11f47c476994000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000021e5f445b3cf734000100000000000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x5e47e8ffe", - "gasLimit": "0x90e22", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/3cb20df16681f730f54fd1a653477cf5772418e2.json b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/3cb20df16681f730f54fd1a653477cf5772418e2.json deleted file mode 100644 index 2f82032f5..000000000 --- a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/3cb20df16681f730f54fd1a653477cf5772418e2.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "87d2df09-f373-45d3-8b77-5d872b2f99f8", - "tool": "odos", - "toolDetails": { - "key": "odos", - "name": "Odos", - "logoURI": "https://www.odos.xyz/favicon.ico" - }, - "action": { - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0885063790087515" - }, - "fromAmount": "9198747476590881834940", - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "odos", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "10005000000", - "toAmount": "10015015015", - "fromAmount": "9198747476590881834940", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "5848222325", - "estimate": "747656", - "limit": "971953", - "amount": "4372458510620200", - "amountUSD": "15.38", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3518" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "10012.90", - "toAmountUSD": "10015.02" - }, - "includedSteps": [ - { - "id": "cb5354be-c238-4ed7-a99e-1096efde1f53", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "9198747476590881834940", - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0885063790087515" - }, - "toChainId": 1, - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "odos", - "fromAmount": "9198747476590881834940", - "toAmount": "10015015015", - "toAmountMin": "10005000000", - "approvalAddress": "0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "5848222325", - "estimate": "504656", - "limit": "656053", - "amount": "2951340485645200", - "amountUSD": "10.38", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3518" - } - } - ] - }, - "tool": "odos", - "toolDetails": { - "key": "odos", - "name": "Odos", - "logoURI": "https://www.odos.xyz/favicon.ico" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a4dc2dd5bf0f3c1f8dd69d2998f558ac09b4fc59005477ecbfa721b4e77249cd9100000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f314390000000000000000000000000000000000000000000000000000000254582f400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000cf5540fffcdc3d510b18bfca6d2b9987b0772559000000000000000000000000cf5540fffcdc3d510b18bfca6d2b9987b077255900000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000001f2aa43fce8106687bc00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000011783bd37f9000183f20f44975d03b1b09e64809b757c47f942beea0001a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480a01f2aa43fce8106687bc050254f10067004189000128104d4f703ee5b5011cefe106f54efd56f33f95000000011231deb6f5749ef6ce6943a275a1d3e7486f4eae59725ade0501020600460100010203000219000104030500ff00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea83f20f44975d03b1b09e64809b757c47f942beea6b175474e89094c44da98b954eedeac495271d0f89b78cfa322f6c5de0abceecab66aee45393cc5aa0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x15c94ca75", - "gasLimit": "0xed4b1", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/69b62047922d7aeb444f22d3e905d6250de938fd.json b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/69b62047922d7aeb444f22d3e905d6250de938fd.json deleted file mode 100644 index 27c4f7c51..000000000 --- a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/69b62047922d7aeb444f22d3e905d6250de938fd.json +++ /dev/null @@ -1 +0,0 @@ -{"fromChain":"1","toChain":"1","fromAddress":"0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439","fromToken":"0x83F20F44975D03b1b09e64809B757c47f942BEeA","toToken":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","toAmount":"10000000000","integrator":"spark_waivefee","fee":"0","slippage":"0.001","maxPriceImpact":"0.005","contractCalls":[]} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/main.har b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/main.har deleted file mode 100644 index 89a5286db..000000000 --- a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdc/main.har +++ /dev/null @@ -1,89 +0,0 @@ -{ - "log": { - "version": "1.2", - "creator": { - "name": "Playwright", - "version": "1.43.0" - }, - "browser": { - "name": "chromium", - "version": "124.0.6367.29" - }, - "entries": [ - { - "startedDateTime": "2024-06-12T06:42:39.213Z", - "time": 78.697, - "request": { - "method": "POST", - "url": "https://li.quest/v1/quote/contractCalls", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": ":authority", "value": "li.quest" }, - { "name": ":method", "value": "POST" }, - { "name": ":path", "value": "/v1/quote/contractCalls" }, - { "name": ":scheme", "value": "https" }, - { "name": "accept", "value": "application/json" }, - { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, - { "name": "accept-language", "value": "en-US" }, - { "name": "content-length", "value": "330" }, - { "name": "content-type", "value": "application/json" }, - { "name": "origin", "value": "http://localhost:4000" }, - { "name": "priority", "value": "u=1, i" }, - { "name": "referer", "value": "http://localhost:4000/" }, - { "name": "sec-ch-ua", "value": "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"" }, - { "name": "sec-ch-ua-mobile", "value": "?0" }, - { "name": "sec-ch-ua-platform", "value": "\"Windows\"" }, - { "name": "sec-fetch-dest", "value": "empty" }, - { "name": "sec-fetch-mode", "value": "cors" }, - { "name": "sec-fetch-site", "value": "cross-site" }, - { "name": "user-agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.29 Safari/537.36" } - ], - "queryString": [], - "headersSize": -1, - "bodySize": -1, - "postData": { - "mimeType": "application/json", - "text": "", - "params": [], - "_file": "69b62047922d7aeb444f22d3e905d6250de938fd.json" - } - }, - "response": { - "status": 200, - "statusText": "", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": "access-control-allow-origin", "value": "*" }, - { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, - { "name": "cache-control", "value": "no-store" }, - { "name": "cf-cache-status", "value": "DYNAMIC" }, - { "name": "cf-ray", "value": "8927dcb40dfe3552-WAW" }, - { "name": "content-encoding", "value": "br" }, - { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Wed, 12 Jun 2024 06:42:45 GMT" }, - { "name": "ratelimit-limit", "value": "20" }, - { "name": "ratelimit-remaining", "value": "19" }, - { "name": "ratelimit-reset", "value": "60" }, - { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1e7meVzEpX9azx; SameSite=Lax; path=/; expires=Thu, 13-Jun-24 05:42:45 GMT; HttpOnly" }, - { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, - { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "3e1850c1-1882-42e3-99a1-81ad011c98ec" } - ], - "content": { - "size": -1, - "mimeType": "application/json", - "_file": "3cb20df16681f730f54fd1a653477cf5772418e2.json" - }, - "headersSize": -1, - "bodySize": -1, - "redirectURL": "" - }, - "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 78.697 } - } - ] - } -} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2289ee000aac55bb9248cc28a4a7bdcb52116c62.json b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2289ee000aac55bb9248cc28a4a7bdcb52116c62.json new file mode 100644 index 000000000..45b71bbbc --- /dev/null +++ b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2289ee000aac55bb9248cc28a4a7bdcb52116c62.json @@ -0,0 +1,253 @@ +{ + "type": "lifi", + "id": "1a407460-a671-436f-a1e8-679b1c2c7ab7", + "tool": "1inch", + "toolDetails": { + "key": "1inch", + "name": "1inch", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.png" + }, + "action": { + "fromToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "fromAmount": "9207335935117642165696", + "toToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99938" + }, + "fromChainId": 1, + "toChainId": 1, + "slippage": 0.001, + "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" + }, + "estimate": { + "tool": "1inch", + "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAmountMin": "10004999630", + "toAmount": "10015014645", + "fromAmount": "9207335935117642165696", + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "amount": "18414671870235284331", + "amountUSD": "20.06", + "percentage": "0.0020", + "included": true + } + ], + "gasCosts": [ + { + "type": "SEND", + "price": "7759391188", + "estimate": "773000", + "limit": "1004900", + "amount": "5998009388324000", + "amountUSD": "21.14", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3524.06" + } + } + ], + "executionDuration": 30, + "fromAmountUSD": "10027.96", + "toAmountUSD": "10008.81" + }, + "includedSteps": [ + { + "id": "13c87488-ea6a-449d-a1ab-5e65ac32bae8", + "type": "protocol", + "action": { + "fromChainId": 1, + "fromAmount": "9207335935117642165696", + "fromToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "toChainId": 1, + "toToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "slippage": 0.001, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "fromAmount": "9207335935117642165696", + "toAmount": "9188921263247406881365", + "toAmountMin": "9188921263247406881365", + "tool": "feeCollection", + "approvalAddress": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9", + "gasCosts": [ + { + "type": "SEND", + "price": "7759391188", + "estimate": "130000", + "limit": "169000", + "amount": "1008720854440000", + "amountUSD": "3.55", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3524.06" + } + } + ], + "feeCosts": [ + { + "name": "LIFI Fixed Fee", + "description": "Fixed LIFI fee, independent of any other fee", + "token": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "amount": "18414671870235284331", + "amountUSD": "20.06", + "percentage": "0.0020", + "included": true + } + ], + "executionDuration": 0 + }, + "tool": "feeCollection", + "toolDetails": { + "key": "feeCollection", + "name": "Integrator Fee", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/protocols/feeCollection.png" + } + }, + { + "id": "47f750d8-b09a-4b36-826a-cf3bd309d5d0", + "type": "swap", + "action": { + "fromChainId": 1, + "fromAmount": "9188921263247406881365", + "fromToken": { + "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + "chainId": 1, + "symbol": "sDAI", + "decimals": 18, + "name": "Savings Dai", + "coinKey": "sDAI", + "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", + "priceUSD": "1.089126760607722" + }, + "toChainId": 1, + "toToken": { + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "chainId": 1, + "symbol": "USDT", + "decimals": 6, + "name": "USDT", + "coinKey": "USDT", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", + "priceUSD": "0.99938" + }, + "slippage": 0.001, + "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" + }, + "estimate": { + "tool": "1inch", + "fromAmount": "9188921263247406881365", + "toAmount": "10015014645", + "toAmountMin": "10004999630", + "approvalAddress": "0x111111125421ca6dc452d289314280a0f8842a65", + "executionDuration": 30, + "feeCosts": [], + "gasCosts": [ + { + "type": "SEND", + "price": "7759391188", + "estimate": "300000", + "limit": "390000", + "amount": "2327817356400000", + "amountUSD": "8.20", + "token": { + "address": "0x0000000000000000000000000000000000000000", + "chainId": 1, + "symbol": "ETH", + "decimals": 18, + "name": "ETH", + "coinKey": "ETH", + "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", + "priceUSD": "3524.06" + } + } + ] + }, + "tool": "1inch", + "toolDetails": { + "key": "1inch", + "name": "1inch", + "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.png" + } + } + ], + "integrator": "spark_fee", + "transactionRequest": { + "data": "0x4630a0d80f89c38701cd3ca7907dd3b8ae7ca2e5ea0878e3ce387d0e25841d4bc4e0378f00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f314390000000000000000000000000000000000000000000000000000000254582dce00000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000009737061726b5f6665650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a307830303030303030303030303030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea9000000000000000000000000bd6c7b0d2f68c2b7805d88388319cfb6ecb50ea900000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000001f32174526ed81fedc000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000084eedd56e100000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff8e0e8038c0936b00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed700000000000000000000000000000000000000000000000000000000000000000000000000000000111111125421ca6dc452d289314280a0f8842a65000000000000000000000000111111125421ca6dc452d289314280a0f8842a6500000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000001f221e643ee9f5f5a5500000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e807ed2379000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd090000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000001f221e643ee9f5f5a550000000000000000000000000000000000000000000000000000000254582dce00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000019e0000000000000000000000000000000000000001800001520001240000da00a007e5c0d20000000000000000000000000000000000000000000000000000b600007c412083f20f44975d03b1b09e64809b757c47f942beea0004ba08765200000000000000000000000000000000000000000000000000000000000000000000000000000000000000003058ef90929cb8180174d74c507176cca6835d73000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0940203058ef90929cb8180174d74c507176cca6835d73bd6015b4000000000000000000000000e37e799d5077682fa0a244d46e5649f71457bd0900a0f2fa6b66dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000254f0fef5000000000000000000000000004c556980a06c4eca27dac17f958d2ee523a2206206994597c13d831ec7111111125421ca6dc452d289314280a0f8842a650020d6bdbf78dac17f958d2ee523a2206206994597c13d831ec7111111125421ca6dc452d289314280a0f8842a6500002a94d114000000000000000000000000000000000000000000000000", + "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", + "value": "0x0", + "gasPrice": "0x1ce7ee9d4", + "gasLimit": "0xf5564", + "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", + "chainId": 1 + } +} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2ca33cb37b4d3c754235c6d093ed160243c6a1c8.json b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2ca33cb37b4d3c754235c6d093ed160243c6a1c8.json new file mode 100644 index 000000000..0fa6033cd --- /dev/null +++ b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/2ca33cb37b4d3c754235c6d093ed160243c6a1c8.json @@ -0,0 +1 @@ +{"fromChain":"1","toChain":"1","fromAddress":"0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439","fromToken":"0x83F20F44975D03b1b09e64809B757c47f942BEeA","toToken":"0xdAC17F958D2ee523a2206206994597C13D831ec7","toAmount":"10000000000","integrator":"spark_fee","fee":"0.002","slippage":"0.001","contractCalls":[]} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/main.har b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/main.har similarity index 81% rename from packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/main.har rename to packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/main.har index 9e0929a22..21c7c78f1 100644 --- a/packages/app/src/test/e2e/hars/10277.276260680656857010-sdai-to-10000-dai/main.har +++ b/packages/app/src/test/e2e/hars/9198.753133685380130125-sdai-to-10000-usdt/main.har @@ -11,8 +11,8 @@ }, "entries": [ { - "startedDateTime": "2024-05-31T16:18:30.968Z", - "time": 88.823, + "startedDateTime": "2024-06-14T12:39:40.962Z", + "time": 96.442, "request": { "method": "POST", "url": "https://li.quest/v1/quote/contractCalls", @@ -26,7 +26,7 @@ { "name": "accept", "value": "application/json" }, { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, { "name": "accept-language", "value": "en-US" }, - { "name": "content-length", "value": "342" }, + { "name": "content-length", "value": "304" }, { "name": "content-type", "value": "application/json" }, { "name": "origin", "value": "http://localhost:4000" }, { "name": "priority", "value": "u=1, i" }, @@ -46,7 +46,7 @@ "mimeType": "application/json", "text": "", "params": [], - "_file": "6762b6c153510dc5089118d027d6d0902c7ff65f.json" + "_file": "2ca33cb37b4d3c754235c6d093ed160243c6a1c8.json" } }, "response": { @@ -59,30 +59,30 @@ { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, { "name": "cache-control", "value": "no-store" }, { "name": "cf-cache-status", "value": "DYNAMIC" }, - { "name": "cf-ray", "value": "88c847c08b14b179-WAW" }, - { "name": "content-encoding", "value": "gzip" }, + { "name": "cf-ray", "value": "893a6271ea6cc045-WAW" }, + { "name": "content-encoding", "value": "br" }, { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 16:18:37 GMT" }, + { "name": "date", "value": "Fri, 14 Jun 2024 12:39:45 GMT" }, { "name": "ratelimit-limit", "value": "20" }, { "name": "ratelimit-remaining", "value": "19" }, { "name": "ratelimit-reset", "value": "60" }, { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1e2AsAkRkoij32; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 15:18:37 GMT; HttpOnly" }, + { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1ei3aJewDpRUPE; SameSite=Lax; path=/; expires=Sat, 15-Jun-24 11:39:45 GMT; HttpOnly" }, { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "8bf0df06-c20d-46d1-9367-8ba2f4d5a4c9" } + { "name": "x-lifi-requestid", "value": "cce9d7fc-b8cb-4c3d-a7b5-86255f0cc8f1" } ], "content": { "size": -1, "mimeType": "application/json", - "_file": "899957599eb9ea538338b7ffaac11d275f00bb25.json" + "_file": "2289ee000aac55bb9248cc28a4a7bdcb52116c62.json" }, "headersSize": -1, "bodySize": -1, "redirectURL": "" }, "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 88.823 } + "timings": { "send": -1, "wait": -1, "receive": 96.442 } } ] } diff --git a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/65c95f5defdcdb3b4eb38a99380d1dab9e3a0760.json b/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/65c95f5defdcdb3b4eb38a99380d1dab9e3a0760.json deleted file mode 100644 index 862c53276..000000000 --- a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/65c95f5defdcdb3b4eb38a99380d1dab9e3a0760.json +++ /dev/null @@ -1 +0,0 @@ -{"fromChain":"1","toChain":"1","fromAddress":"0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439","fromToken":"0x83F20F44975D03b1b09e64809B757c47f942BEeA","toToken":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","toAmount":"1000000000","integrator":"spark_waivefee","fee":"0","slippage":"0.001","maxPriceImpact":"0.005","contractCalls":[]} \ No newline at end of file diff --git a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/b1dfeefe4b7416525e0fd30ecf598222298a6f2a.json b/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/b1dfeefe4b7416525e0fd30ecf598222298a6f2a.json deleted file mode 100644 index 887263d30..000000000 --- a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/b1dfeefe4b7416525e0fd30ecf598222298a6f2a.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "lifi", - "id": "a1acaa3d-e728-479b-849d-7c31684c7025", - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - }, - "action": { - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "fromAmount": "923597666422892735105", - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "fromChainId": 1, - "toChainId": 1, - "slippage": 0.001, - "fromAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "toAddress": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439" - }, - "estimate": { - "tool": "0x", - "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAmountMin": "1000499999", - "toAmount": "1001501500", - "fromAmount": "923597666422892735105", - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "628000", - "limit": "816400", - "amount": "15893635087128000", - "amountUSD": "59.81", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ], - "executionDuration": 30, - "fromAmountUSD": "1002.93", - "toAmountUSD": "1001.50" - }, - "includedSteps": [ - { - "id": "c0b3f058-15b6-42bc-99c6-9f0f50903435", - "type": "swap", - "action": { - "fromChainId": 1, - "fromAmount": "923597666422892735105", - "fromToken": { - "address": "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "chainId": 1, - "symbol": "sDAI", - "decimals": 18, - "name": "Savings Dai", - "coinKey": "sDAI", - "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x83f20f44975d03b1b09e64809b757c47f942beea/ba710cd443d1995d6b4781ee6d5904c0.png", - "priceUSD": "1.0858976942421905" - }, - "toChainId": 1, - "toToken": { - "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", - "chainId": 1, - "symbol": "USDC", - "decimals": 6, - "name": "USD Coin", - "coinKey": "USDC", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", - "priceUSD": "1" - }, - "slippage": 0.001, - "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" - }, - "estimate": { - "tool": "0x", - "fromAmount": "923597666422892735105", - "toAmount": "1001501500", - "toAmountMin": "1000499999", - "approvalAddress": "0xdef1c0ded9bec7f1a1670819833240f027b25eff", - "executionDuration": 30, - "feeCosts": [], - "gasCosts": [ - { - "type": "SEND", - "price": "25308336126", - "estimate": "385000", - "limit": "500500", - "amount": "9743709408510000", - "amountUSD": "36.67", - "token": { - "address": "0x0000000000000000000000000000000000000000", - "chainId": 1, - "symbol": "ETH", - "decimals": 18, - "name": "ETH", - "coinKey": "ETH", - "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", - "priceUSD": "3763.29" - } - } - ] - }, - "tool": "0x", - "toolDetails": { - "key": "0x", - "name": "0x", - "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.png" - } - } - ], - "integrator": "spark_waivefee", - "transactionRequest": { - "data": "0x878863a49944a21405bb13434f2156c7e8be5f1c1adde16a698c2c7b4ee6847b28beb20400000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000bf7cd9ce9068bca77c190f2a767513e8b8f31439000000000000000000000000000000000000000000000000000000003ba26b1f0000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000e737061726b5f7761697665666565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff00000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000032117e102e743f2a8100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000948415565b000000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000032117e102e743f2a81000000000000000000000000000000000000000000000000000000003ba2653f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000004c0000000000000000000000000000000000000000000000032117e102e743f2a8100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000001942616c616e6365725632000000000000000000000000000000000000000000000000000000000032117e102e743f2a81000000000000000000000000000000000000000000000000000000003bb95459000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e02191df821c198600499aa1f0031b1a7514d7a7d90002000000000000000006390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140c2aa60465bffa1a88f5ba471a59ca0435c3ec5c100020000000000000000062c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000e07f9d810a48ab5c3c914ba3ca53af14e4491e8a000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000016ef1a000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000083f20f44975d03b1b09e64809b757c47f942beea000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed7000000000000000000000000000000009a21e887be129047a30191c3f30192f4000000000000000000000000000000000000000000000000", - "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", - "value": "0x0", - "gasPrice": "0x5e47e8ffe", - "gasLimit": "0xc7510", - "from": "0xbf7cD9cE9068BcA77C190F2A767513e8b8F31439", - "chainId": 1 - } -} diff --git a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/main.har b/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/main.har deleted file mode 100644 index 1d03f929f..000000000 --- a/packages/app/src/test/e2e/hars/sdai-to-1000-usdc/main.har +++ /dev/null @@ -1,89 +0,0 @@ -{ - "log": { - "version": "1.2", - "creator": { - "name": "Playwright", - "version": "1.43.0" - }, - "browser": { - "name": "chromium", - "version": "124.0.6367.29" - }, - "entries": [ - { - "startedDateTime": "2024-05-31T16:03:44.539Z", - "time": 97.01, - "request": { - "method": "POST", - "url": "https://li.quest/v1/quote/contractCalls", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": ":authority", "value": "li.quest" }, - { "name": ":method", "value": "POST" }, - { "name": ":path", "value": "/v1/quote/contractCalls" }, - { "name": ":scheme", "value": "https" }, - { "name": "accept", "value": "application/json" }, - { "name": "accept-encoding", "value": "gzip, deflate, br, zstd" }, - { "name": "accept-language", "value": "en-US" }, - { "name": "content-length", "value": "329" }, - { "name": "content-type", "value": "application/json" }, - { "name": "origin", "value": "http://localhost:4000" }, - { "name": "priority", "value": "u=1, i" }, - { "name": "referer", "value": "http://localhost:4000/" }, - { "name": "sec-ch-ua", "value": "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"" }, - { "name": "sec-ch-ua-mobile", "value": "?0" }, - { "name": "sec-ch-ua-platform", "value": "\"Windows\"" }, - { "name": "sec-fetch-dest", "value": "empty" }, - { "name": "sec-fetch-mode", "value": "cors" }, - { "name": "sec-fetch-site", "value": "cross-site" }, - { "name": "user-agent", "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.29 Safari/537.36" } - ], - "queryString": [], - "headersSize": -1, - "bodySize": -1, - "postData": { - "mimeType": "application/json", - "text": "", - "params": [], - "_file": "65c95f5defdcdb3b4eb38a99380d1dab9e3a0760.json" - } - }, - "response": { - "status": 200, - "statusText": "", - "httpVersion": "HTTP/2.0", - "cookies": [], - "headers": [ - { "name": "access-control-allow-origin", "value": "*" }, - { "name": "alt-svc", "value": "h3=\":443\"; ma=86400" }, - { "name": "cache-control", "value": "no-store" }, - { "name": "cf-cache-status", "value": "DYNAMIC" }, - { "name": "cf-ray", "value": "88c8321ca8bd34f4-WAW" }, - { "name": "content-encoding", "value": "gzip" }, - { "name": "content-type", "value": "application/json" }, - { "name": "date", "value": "Fri, 31 May 2024 16:03:46 GMT" }, - { "name": "ratelimit-limit", "value": "20" }, - { "name": "ratelimit-remaining", "value": "19" }, - { "name": "ratelimit-reset", "value": "60" }, - { "name": "server", "value": "cloudflare" }, - { "name": "set-cookie", "value": "__cflb=0H28vpfYNLnbmLmb6rwYJDc4Ubvwr1e8o4wqPwhhSa8; SameSite=Lax; path=/; expires=Sat, 01-Jun-24 15:03:46 GMT; HttpOnly" }, - { "name": "strict-transport-security", "value": "max-age=31536000; includeSubDomains" }, - { "name": "vary", "value": "Accept-Encoding" }, - { "name": "x-lifi-requestid", "value": "e7818434-4158-4bdc-ab75-ce8b87787139" } - ], - "content": { - "size": -1, - "mimeType": "application/json", - "_file": "b1dfeefe4b7416525e0fd30ecf598222298a6f2a.json" - }, - "headersSize": -1, - "bodySize": -1, - "redirectURL": "" - }, - "cache": {}, - "timings": { "send": -1, "wait": -1, "receive": 97.01 } - } - ] - } -} \ No newline at end of file