Skip to content

Commit

Permalink
chore: set xdomain sender on failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDiscotech committed Aug 14, 2024
1 parent 91d378e commit 7157066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract MockL2ToL2Messenger is ITestL2ToL2CrossDomainMessenger {
}

// TODO
function sendMessage(uint256 _destination, address _target, bytes calldata _message) external payable {
function sendMessage(uint256 _destination, address _target, bytes calldata) external payable {
console.log(11);
if (_destination == block.chainid) revert MessageDestinationSameChain();
console.log(22);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ contract OptimismSuperchainERC20_SymTest is HalmosTest {
public
{
vm.assume(_to != address(0));
MESSENGER.forTest_setCurrentXDomSender(address(optimismSuperchainERC20));

vm.prank(_sender);
try optimismSuperchainERC20.relayERC20(_from, _to, _amount) {
Expand All @@ -124,10 +125,10 @@ contract OptimismSuperchainERC20_SymTest is HalmosTest {
/// @custom:property `sendERC20` with a value of zero does not modify accounting
function check_sendERC20ZeroCall(address _to, uint256 _chainId) public {
/* Precondition */
// The current chain id is 1
vm.assume(_to != address(0));
vm.assume(_chainId != CURRENT_CHAIN_ID);
vm.assume(_to != address(Predeploys.CROSS_L2_INBOX) && _to != address(MESSENGER));
MESSENGER.forTest_setCurrentXDomSender(address(optimismSuperchainERC20));

uint256 _totalSupplyBef = optimismSuperchainERC20.totalSupply();

Expand Down

0 comments on commit 7157066

Please sign in to comment.