Skip to content

Commit

Permalink
Set block number individually in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoopmann committed Dec 18, 2023
1 parent b093269 commit a8d67aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "module-alias/register";

import { Address, Account } from "@utils/types";
import { increaseTimeAsync } from "@utils/test";
import { setBlockNumber } from "@utils/test/testingUtils";
import { ADDRESS_ZERO, ZERO } from "@utils/constants";
import { OptimisticAuctionRebalanceExtension } from "@utils/contracts/index";
import {
Expand Down Expand Up @@ -89,6 +90,9 @@ if (process.env.INTEGRATIONTEST) {
let weth: IWETH;
let minimumBond: BigNumber;

setBlockNumber(18789000);


before(async () => {
[owner, methodologist] = await getAccounts();

Expand Down Expand Up @@ -225,7 +229,6 @@ if (process.env.INTEGRATIONTEST) {
.parseEther("1000")
.add(effectiveBond)
.toHexString();
console.log("quantity", quantity);
// set operator balance to effective bond
await ethers.provider.send("hardhat_setBalance", [
await subjectCaller.getAddress(),
Expand Down Expand Up @@ -469,7 +472,6 @@ if (process.env.INTEGRATIONTEST) {
const proposalAfter = await auctionRebalanceExtension
.connect(subjectCaller)
.proposedProduct(utils.formatBytes32String("win"));
console.log("proposalAfter", proposalAfter);
expect(proposalAfter.product).to.eq(ADDRESS_ZERO);
});
it("should delete the proposal on a disputed callback from currently set oracle", async () => {
Expand Down
2 changes: 1 addition & 1 deletion utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const optimismForkingConfig = {

export const mainnetForkingConfig = {
url: "https://eth-mainnet.alchemyapi.io/v2/" + process.env.ALCHEMY_TOKEN,
blockNumber: process.env.LATESTBLOCK ? undefined : 18789000,
blockNumber: process.env.LATESTBLOCK ? undefined : 17895372,
};

export const forkingConfig =
Expand Down

0 comments on commit a8d67aa

Please sign in to comment.