-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add new integration test scenarios
- Loading branch information
1 parent
b30dab1
commit f79b570
Showing
6 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
test/integration-tests/failing-tests/MultiMessageSender.ZeroChainId.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
pragma solidity >=0.8.9; | ||
|
||
/// library imports | ||
import {Vm} from "forge-std/Test.sol"; | ||
|
||
/// local imports | ||
import "../Setup.t.sol"; | ||
import "../../contracts-mock/MockUniswapReceiver.sol"; | ||
|
||
import {MultiMessageSender} from "src/MultiMessageSender.sol"; | ||
import {MultiMessageReceiver} from "src/MultiMessageReceiver.sol"; | ||
import {Error} from "src/libraries/Error.sol"; | ||
import {GovernanceTimelock} from "src/controllers/GovernanceTimelock.sol"; | ||
|
||
contract ZeroChainId is Setup { | ||
MockUniswapReceiver target; | ||
|
||
/// @dev intializes the setup | ||
function setUp() public override { | ||
super.setUp(); | ||
|
||
vm.selectFork(fork[137]); | ||
target = new MockUniswapReceiver(); | ||
} | ||
|
||
/// @dev just sends a message | ||
function test_zeroChainId() public { | ||
vm.selectFork(fork[1]); | ||
vm.startPrank(caller); | ||
|
||
/// send cross-chain message using MMA infra | ||
vm.expectRevert(Error.ZERO_CHAIN_ID.selector); | ||
MultiMessageSender(contractAddress[1][bytes("MMA_SENDER")]).remoteCall{value: 2 ether}( | ||
0, address(target), abi.encode(MockUniswapReceiver.setValue.selector, ""), 0 | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters