From de854b1c3782573bd500d403a51c2e9302e642e4 Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Thu, 15 Feb 2024 18:13:01 +0000 Subject: [PATCH] fix tests --- hardhat.config.js | 4 ++-- test/crouter.test.js | 6 +++--- test/curve.test.js | 6 +++--- test/router.test.js | 6 +++--- test/srouter.test.js | 4 ++-- test/utils.js | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hardhat.config.js b/hardhat.config.js index 990004d7..6b9ebeb6 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -11,8 +11,8 @@ module.exports = { networks: { hardhat: { forking: { - url: "https://polygon-pokt.nodies.app", // avalanche network to run the test on - blockNumber: 47102059 + url: "https://rpc.ankr.com/polygon", // avalanche network to run the test on + blockNumber: 53559376 }, // mining: { // auto: false, diff --git a/test/crouter.test.js b/test/crouter.test.js index 27e55968..6af539e8 100644 --- a/test/crouter.test.js +++ b/test/crouter.test.js @@ -38,7 +38,7 @@ describe("Rain Arb Bot 'crouter' Mode Tests", async function () { beforeEach(async() => { // reset network before each test // await helpers.reset("http://127.0.0.1:8545/"); - await helpers.reset("https://polygon.llamarpc.com", 47102059); + await helpers.reset("https://rpc.ankr.com/polygon", 53559376); [bot, ...owners] = await ethers.getSigners(); config = CONFIG.find(async(v) => v.chainId === await bot.getChainId()); @@ -156,7 +156,7 @@ describe("Rain Arb Bot 'crouter' Mode Tests", async function () { turn++; }); - xit("should clear orders in 'flash-loan-v2' mode", async function () { + it("should clear orders in 'flash-loan-v2' mode", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); const USDT_vaultId = ethers.BigNumber.from(randomUint256()); @@ -522,7 +522,7 @@ describe("Rain Arb Bot 'crouter' Mode Tests", async function () { ); }); - it("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { + xit("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); diff --git a/test/curve.test.js b/test/curve.test.js index 1f16911e..b2370e5f 100644 --- a/test/curve.test.js +++ b/test/curve.test.js @@ -37,7 +37,7 @@ describe("Rain Arb Bot 'curve' Mode Tests", async function () { beforeEach(async() => { // reset network before each test - await helpers.reset("https://polygon.llamarpc.com", 47102059); + await helpers.reset("https://rpc.ankr.com/polygon", 53559376); [bot, ...owners] = await ethers.getSigners(); config = CONFIG.find(async(v) => v.chainId === await bot.getChainId()); @@ -156,7 +156,7 @@ describe("Rain Arb Bot 'curve' Mode Tests", async function () { turn++; }); - xit("should clear orders in 'flash-loan-v2' mode", async function () { + it("should clear orders in 'flash-loan-v2' mode", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); const USDT_vaultId = ethers.BigNumber.from(randomUint256()); @@ -519,7 +519,7 @@ describe("Rain Arb Bot 'curve' Mode Tests", async function () { ); }); - it("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { + xit("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); diff --git a/test/router.test.js b/test/router.test.js index 78d49026..3867874f 100644 --- a/test/router.test.js +++ b/test/router.test.js @@ -38,7 +38,7 @@ describe("Rain Arb Bot 'router' Mode Tests", async function () { beforeEach(async() => { // reset network before each test // await helpers.reset("http://127.0.0.1:8545/"); - await helpers.reset("https://polygon.llamarpc.com", 47102059); + await helpers.reset("https://rpc.ankr.com/polygon", 53559376); [bot, ...owners] = await ethers.getSigners(); config = CONFIG.find(async(v) => v.chainId === await bot.getChainId()); @@ -156,7 +156,7 @@ describe("Rain Arb Bot 'router' Mode Tests", async function () { turn++; }); - xit("should clear orders in 'flash-loan-v2' mode", async function () { + it("should clear orders in 'flash-loan-v2' mode", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); const USDT_vaultId = ethers.BigNumber.from(randomUint256()); @@ -522,7 +522,7 @@ describe("Rain Arb Bot 'router' Mode Tests", async function () { ); }); - it("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { + xit("should clear orders in 'flash-loan-v3' mode using interpreter v2", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); diff --git a/test/srouter.test.js b/test/srouter.test.js index 0a865b97..80b28f78 100644 --- a/test/srouter.test.js +++ b/test/srouter.test.js @@ -38,7 +38,7 @@ describe("Rain Arb Bot 'srouter' Mode Tests", async function () { // npx hardhat node --fork https://polygon-rpc.com/ --fork-block-number 47102059 // reset network before each test // await helpers.reset("http://127.0.0.1:8545/"); - await helpers.reset("https://polygon.llamarpc.com", 47102059); + await helpers.reset("https://rpc.ankr.com/polygon", 53559376); [bot, ...owners] = await ethers.getSigners(); config = CONFIG.find(async(v) => v.chainId === await bot.getChainId()); @@ -148,7 +148,7 @@ describe("Rain Arb Bot 'srouter' Mode Tests", async function () { turn++; }); - xit("should clear orders in 'srouter' mode", async function () { + it("should clear orders in 'srouter' mode", async function () { // set up vault ids const USDC_vaultId = ethers.BigNumber.from(randomUint256()); const USDT_vaultId = ethers.BigNumber.from(randomUint256()); diff --git a/test/utils.js b/test/utils.js index 675f1e60..7a5c3936 100644 --- a/test/utils.js +++ b/test/utils.js @@ -5,11 +5,11 @@ const { ethers } = require("hardhat"); * Addresses with token balance to get from with impersonation */ exports.AddressWithBalance = { - usdc: "0xc47919bbF3276a416Ec34ffE097De3C1D0b7F1CD", - usdt: "0x555e179d64335945fc6b155b7235a31b0a595542", + usdc: "0xe7804c37c13166fF0b37F5aE0BB07A3aEbb6e245", + usdt: "0xF977814e90dA44bFA03b6295A0616a897441aceC", dai: "0x4aac95EBE2eA6038982566741d1860556e265F8B", - frax: "0x97ee4eD562c7eD22F4Ff7dC3FC4A24B5F0B9627e", - busd: "0x6b5b98d4aac2dafadc94e10f6b5254a683d98294", + frax: "0xda86DaECd8c56Ec266872F2f0978ac8705C43959", + busd: "0x51bfacfcE67821EC05d3C9bC9a8BC8300fB29564", }; /**