From 88473042ef0b4124cc8a5cf0a7c23ccb60fc5a5b Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 27 Feb 2024 17:58:47 +0000 Subject: [PATCH] Fix VelocimeterV2 on base (looks like dex should be deprecated) --- test/helpers.js | 6 +++--- test/oracles/SolidlyOracle.js | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index 4a3eb1d7..640f1594 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -53,9 +53,9 @@ const tokens = { BEAN: '0xBEA0000029AD1c77D3d5D23Ba2D8893dB9d1Efab', '3CRV': '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', base: { - DAI: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', WETH: '0x4200000000000000000000000000000000000006', - USDC: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + DAI: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', + axlUSDC: '0xEB466342C4d449BC9f53A865D5Cb90586f405215', }, optimistic: { WETH: '0x4200000000000000000000000000000000000006', @@ -145,7 +145,7 @@ const deployParams = { initcodeHash: '0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2', fees: [100, 500, 2500, 10000], }, - VelocimieterV2: { // base network + VelocimeterV2: { // base network factory: '0xe21aac7f113bd5dc2389e4d8a8db854a87fd6951', initcodeHash: '0x0ccd005ee58d5fb11632ef5c2e0866256b240965c62c8e990c0f84a97f311879', }, diff --git a/test/oracles/SolidlyOracle.js b/test/oracles/SolidlyOracle.js index af9db15f..e3941d83 100644 --- a/test/oracles/SolidlyOracle.js +++ b/test/oracles/SolidlyOracle.js @@ -4,12 +4,12 @@ const { deployContract } = require('@1inch/solidity-utils'); const { resetHardhatNetworkFork } = require('@1inch/solidity-utils/hardhat-setup'); const { tokens, - deployParams: { VelocimieterV2, UniswapV3Base }, + deployParams: { VelocimeterV2, UniswapV3Base }, testRate, } = require('../helpers.js'); describe('SolidlyOracle', function () { - describe('VelocimieterV2', function () { + describe('VelocimeterV2', function () { before(async function () { await resetHardhatNetworkFork(network, 'base'); }); @@ -19,29 +19,29 @@ describe('SolidlyOracle', function () { }); async function initContracts () { - const velocimieterV2Oracle = await deployContract('SolidlyOracle', [VelocimieterV2.factory, VelocimieterV2.initcodeHash]); + const velocimeterV2Oracle = await deployContract('SolidlyOracle', [VelocimeterV2.factory, VelocimeterV2.initcodeHash]); const uniswapV3Oracle = await deployContract('UniswapV3LikeOracle', [UniswapV3Base.factory, UniswapV3Base.initcodeHash, UniswapV3Base.fees]); - return { velocimieterV2Oracle, uniswapV3Oracle }; + return { velocimeterV2Oracle, uniswapV3Oracle }; } - it('WETH -> USDC', async function () { - const { velocimieterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); - await testRate(tokens.base.WETH, tokens.base.USDC, tokens.NONE, velocimieterV2Oracle, uniswapV3Oracle); + it('WETH -> axlUSDC', async function () { + const { velocimeterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); + await testRate(tokens.base.WETH, tokens.base.axlUSDC, tokens.NONE, velocimeterV2Oracle, uniswapV3Oracle); }); - it('USDC -> WETH', async function () { - const { velocimieterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); - await testRate(tokens.base.USDC, tokens.base.WETH, tokens.NONE, velocimieterV2Oracle, uniswapV3Oracle); + it('axlUSDC -> WETH', async function () { + const { velocimeterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); + await testRate(tokens.base.axlUSDC, tokens.base.WETH, tokens.NONE, velocimeterV2Oracle, uniswapV3Oracle); }); it('WETH -> DAI', async function () { - const { velocimieterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); - await testRate(tokens.base.WETH, tokens.base.DAI, tokens.NONE, velocimieterV2Oracle, uniswapV3Oracle); + const { velocimeterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); + await testRate(tokens.base.WETH, tokens.base.DAI, tokens.NONE, velocimeterV2Oracle, uniswapV3Oracle, 0.1); }); it('DAI -> WETH', async function () { - const { velocimieterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); - await testRate(tokens.base.DAI, tokens.base.WETH, tokens.NONE, velocimieterV2Oracle, uniswapV3Oracle); + const { velocimeterV2Oracle, uniswapV3Oracle } = await loadFixture(initContracts); + await testRate(tokens.base.DAI, tokens.base.WETH, tokens.NONE, velocimeterV2Oracle, uniswapV3Oracle, 0.1); }); }); });