Skip to content

Commit

Permalink
fix(test): fix two occasional errors when running bridge tests (#305)
Browse files Browse the repository at this point in the history
* fix(test): fix two occasional errors when running bridge tests

* style: remove some unused comments
  • Loading branch information
davidtaikocha authored Nov 22, 2022
1 parent 96572d8 commit fb91e0d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
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

0 comments on commit fb91e0d

Please sign in to comment.