Skip to content

Commit

Permalink
fix: fork tests for all networks
Browse files Browse the repository at this point in the history
  • Loading branch information
Debugger022 committed Jun 25, 2024
1 parent f9144a9 commit 230e80e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/hardhat/Fork/borrowAndRepayTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ chai.use(smock.matchers);
const FORK = process.env.FORK === "true";
const FORKED_NETWORK = process.env.FORKED_NETWORK || "bscmainnet";

if (FORK) console.log(`fork tests are running on ${FORKED_NETWORK}`);
if (FORK) console.log(`fork tests are running on: ${FORKED_NETWORK}`);

const {
ACC1,
Expand Down
2 changes: 1 addition & 1 deletion tests/hardhat/Fork/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const contractAddresses = {
ACC1: "0xc7f050b6F465b876c764A866d6337EabBab08Cd4",
ACC2: "0xce0180B3B992649CBc3C8e1cF95b4A52Be9bA3AF",
ACC3: "0x13E0a421c17Ff1e7FFccFa05714957cF530b3aa4",
BLOCK_NUMBER: 40468900,
BLOCK_NUMBER: 58181663,
},
arbitrumone: {
ADMIN: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0",
Expand Down
1 change: 1 addition & 0 deletions tests/hardhat/Fork/liquidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ if (FORK) {
opbnbtestnet: 1000000000288189,
opbnbmainnet: 1000000008986559,
arbitrumsepolia: 1000000000046406,
arbitrumone: 1000000032216389,
};

const repayAmount = NetworkRespectiveRepayAmounts[FORKED_NETWORK];
Expand Down
2 changes: 1 addition & 1 deletion tests/hardhat/Fork/reduceReservesTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if (FORK) {
// Calculation of reserves
let currBlockOrTimestamp = await ethers.provider.getBlockNumber();

if (FORKED_NETWORK == "arbitrumsepolia") {
if (FORKED_NETWORK == "arbitrumsepolia" || FORKED_NETWORK == "arbitrumone") {
currBlockOrTimestamp = (await ethers.provider.getBlock("latest")).timestamp;
}
const blockDelta = BigNumber.from(currBlockOrTimestamp).sub(BigNumber.from(accrualBlockNumberPrior));
Expand Down

0 comments on commit 230e80e

Please sign in to comment.