From fe96ae931af5704f5d1175ba56bff548947a4a33 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Thu, 14 Dec 2023 17:14:38 +0000 Subject: [PATCH] test: adjusting existing tests --- test/CM.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/CM.js b/test/CM.js index 9ee53dd..ab9cfb6 100644 --- a/test/CM.js +++ b/test/CM.js @@ -18,6 +18,8 @@ describe("Community Multisig", function () { let governor; let signers; let deployer; + let l1BridgeMediators; + let l2BridgeMediators; const AddressZero = "0x" + "0".repeat(40); const Bytes32Zero = "0x" + "0".repeat(64); const Bytes4Zero = "0x" + "0".repeat(8); @@ -87,8 +89,11 @@ describe("Community Multisig", function () { initialProposalThreshold, quorum); await governor.deployed(); + l1BridgeMediators = [signers[1].address, signers[2].address]; + l2BridgeMediators = [signers[3].address, signers[4].address]; const GuardCM = await ethers.getContractFactory("GuardCM"); - guard = await GuardCM.deploy(timelock.address, multisig.address, governor.address); + guard = await GuardCM.deploy(timelock.address, multisig.address, governor.address, l1BridgeMediators, + l2BridgeMediators, [100, 137]); await guard.deployed(); }); @@ -373,6 +378,11 @@ describe("Community Multisig", function () { // Take a snapshot of the current state of the blockchain const snapshot = await helpers.takeSnapshot(); + // Change the proposal Id to a known one + payload = guard.interface.encodeFunctionData("changeGovernorCheckProposalId", + ["62151151991217526951504761219057817227643973118811130641152828658327965685127"]); + await timelock.execute(guard.address, payload); + // Setting the CM guard let nonce = await multisig.nonce(); let txHashData = await safeContracts.buildContractCall(multisig, "setGuard", [guard.address], nonce, 0, 0);