Skip to content

Commit

Permalink
starting bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDeadCe11 committed Sep 10, 2024
1 parent ba3048a commit c551521
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"format": "forge fmt --root .",
"lint": "solhint \"src/**/*.sol\" && solhint \"test/**/*.sol\" && solhint \"script/**/*.sol\"",
"prepare": "husky",
"test": "forge test -vvv"
"test": "forge test -vvv",
"script-manager": "./script/scriptManager.sh"
}
}
}
24 changes: 24 additions & 0 deletions test/MultiChainDeployer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,28 @@ contract Test_ImmutableMultiChainDeployer is CrossChainBaseTest {
)
);
}

function test_Deploy_AlreadyDeployed_Revert() public {
vm.selectFork(arbitrumFork);

bytes32 arbitrumOFTAdapterSalt = createSalt(_deployer, "OFTAdapter");
bytes32 arbitrumOFTAdapterProxySalt = createSalt(_deployer, "OFTAdapterProxy");

RateLimiter.RateLimitConfig[] memory _rateLimitConfigs = new RateLimiter.RateLimitConfig[](1);
_rateLimitConfigs[0] = RateLimiter.RateLimitConfig({dstEid: uint32(1), limit: 1 ether, window: 1 days});

vm.expectRevert(ImmutableMultiChainDeployer.AlreadyDeployed.selector);
vm.prank(_deployer);

arbitrumDeployer.deployL2YnOFTAdapter(
arbitrumOFTAdapterSalt,
arbitrumOFTAdapterProxySalt,
address(arbitrumERC20),
address(arbitrumLzEndpoint),
_owner,
_rateLimitConfigs,
_controller,
l2YnOFTAdapterByteCode
);
}
}

0 comments on commit c551521

Please sign in to comment.