Skip to content

Commit

Permalink
chore: add domain check in leaf deployscript (#220)
Browse files Browse the repository at this point in the history
* chore: add domain check in leaf deployscript
  • Loading branch information
airtoonricardo authored Jan 15, 2025
1 parent 719b0b4 commit 8896f5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions script/01_DeployBaseFixture.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity >=0.8.19 <0.9.0;
import "./DeployFixture.sol";

import {IInterchainSecurityModule} from "@hyperlane/core/contracts/interfaces/IInterchainSecurityModule.sol";
import {Mailbox} from "@hyperlane/core/contracts/Mailbox.sol";

import {VotingRewardsFactory} from "src/rewards/VotingRewardsFactory.sol";
import {LeafGaugeFactory} from "src/gauges/LeafGaugeFactory.sol";
Expand Down Expand Up @@ -245,6 +246,13 @@ abstract contract DeployBaseFixture is DeployFixture {

console.log("ism: ", address(ism));
console.log("leafRouter: ", address(leafRouter));

uint32 mailboxDomain = Mailbox(_params.mailbox).localDomain();
if (mailboxDomain != block.chainid) {
console.log("====================================================");
console.log("WARNING: Mailbox Domain should be set to %d.", mailboxDomain);
console.log("====================================================");
}
}

function logOutput() internal override {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/concrete/deploy/bob/deployBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract BobDeployBaseTest is BaseFixture {
VotingRewardsFactory public leafVotingRewardsFactory;

function setUp() public override {
vm.createSelectFork({urlOrAlias: "bob", blockNumber: 1323496});
vm.createSelectFork({urlOrAlias: "bob", blockNumber: 3225130});

deploy = new DeployBase();
// this runs automatically when you run the script, but must be called manually in the test
Expand Down

0 comments on commit 8896f5a

Please sign in to comment.