Skip to content

Commit

Permalink
Fixes for hardhat tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Jun 12, 2024
1 parent 94dffd9 commit 71f6456
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions contracts/config/networks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"localGeth": {
"url": "http://127.0.0.1:28000",
"url": "http://127.0.0.1:17000",
"deploy": [
"deployment_scripts/core/layer1/",
"deployment_scripts/testnet/layer1/",
Expand All @@ -19,8 +19,6 @@
"layer1" : "localGeth"
},
"deploy": [
"deployment_scripts/core/",
"deployment_scripts/funding/layer1",
"deployment_scripts/messenger/layer1",
"deployment_scripts/messenger/layer2",
"deployment_scripts/bridge/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}
});


console.log(`Management Contract address ${mgmtContractAddress}`);
// get management contract and write the cross chain messenger address to it
const mgmtContract = (await hre.ethers.getContractFactory('ManagementContract')).attach(mgmtContractAddress)
const tx = await mgmtContract.getFunction("SetImportantContractAddress").populateTransaction("L1CrossChainMessenger", crossChainDeployment.address);
Expand Down
8 changes: 4 additions & 4 deletions contracts/test/bridge-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe("Bridge", function () {

const eventSignature = "LogMessagePublished(address,uint64,uint32,uint32,bytes,uint8)";
const topic = ethers.id(eventSignature)
let eventIface = new ethers.Interface([ `event ${eventSignature}`]);
let eventIface = new ethers.Interface([ `event LogMessagePublished(address indexed,uint64,uint32,uint32,bytes,uint8)`]);

const receipt = (await tx.wait())!!;

Expand All @@ -93,10 +93,10 @@ describe("Bridge", function () {

const promises = events.map(async (event) => {
const decodedEvent = eventIface.parseLog({
topics: event!.topics!.map((v)=>v),
topics: event!.topics!,
data: event!.data
})!!;

const xchainMessage = {
sender: decodedEvent.args[0],
sequence: decodedEvent.args[1],
Expand Down Expand Up @@ -283,7 +283,7 @@ describe("Bridge", function () {

await expect(event).to.not.be.undefined;

let eventIface = new ethers.Interface([ `event ${eventSignature}`]);
let eventIface = new ethers.Interface([ `event LogMessagePublished(address indexed,uint64,uint32,uint32,bytes,uint8)`]);

const decodedEvent = eventIface.parseLog({
topics: event!.topics!.map((v)=>v),
Expand Down

0 comments on commit 71f6456

Please sign in to comment.