Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): fix two occasional errors when running bridge tests #305

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions packages/protocol/test/bridge/Bridge.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { expect } from "chai"
import { AddressManager, Bridge, EtherVault } from "../../typechain"
import { ethers } from "hardhat"
import { BigNumber, Signer } from "ethers"
import { ethers } from "hardhat"
import RLP from "rlp"
import { AddressManager, Bridge, EtherVault } from "../../typechain"
import { Message } from "../utils/message"
import { Block, BlockHeader, EthGetProofResponse } from "../utils/rpc"
// import { getSlot, MessageStatus } from "../../tasks/utils"
import RLP from "rlp"
// const helpers = require("@nomicfoundation/hardhat-network-helpers")

async function deployBridge(
signer: Signer,
Expand Down Expand Up @@ -860,7 +858,7 @@ describe("integration:Bridge", function () {
const storageValue = await ethers.provider.getStorageAt(
l1Bridge.address,
key,
block.hash
block.number
)
// make sure it equals 1 so our proof will pass
expect(storageValue).to.be.eq(
Expand Down Expand Up @@ -984,7 +982,7 @@ describe("integration:Bridge", function () {
const storageValue = await ethers.provider.getStorageAt(
l1Bridge.address,
key,
block.hash
block.number
)
// make sure it equals 1 so our proof will pass
expect(storageValue).to.be.eq(
Expand Down
1 change: 0 additions & 1 deletion packages/protocol/test/bridge/libs/LibBridgeInvoke.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { expect } from "chai"
import { expect } from "chai"
import { ethers } from "hardhat"
import { Message } from "../../utils/message"
Expand Down
10 changes: 5 additions & 5 deletions packages/protocol/test/bridge/libs/LibBridgeProcess.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as helpers from "@nomicfoundation/hardhat-network-helpers"
import { expect } from "chai"
import hre, { ethers } from "hardhat"
import { Message } from "../../utils/message"
import { AddressManager, Bridge } from "../../../typechain"
import { getSlot } from "../../../tasks/utils"
import * as fs from "fs"
import hre, { ethers } from "hardhat"
import * as path from "path"
const helpers = require("@nomicfoundation/hardhat-network-helpers")
import { getSlot } from "../../../tasks/utils"
import { AddressManager, Bridge } from "../../../typechain"
import { Message } from "../../utils/message"

describe("LibBridgeProcess", function () {
function getStateSlot() {
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol/test/bridge/libs/LibBridgeRetry.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as helpers from "@nomicfoundation/hardhat-network-helpers"
import { expect } from "chai"
import hre, { ethers } from "hardhat"
import { decode, getSlot } from "../../../tasks/utils"
import { Message } from "../../utils/message"
import { getSlot, decode } from "../../../tasks/utils"
const helpers = require("@nomicfoundation/hardhat-network-helpers")

describe("LibBridgeRetry", function () {
async function deployLibBridgeRetryFixture() {
Expand Down