diff --git a/lib/forge-std b/lib/forge-std index aea0b26..74cfb77 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit aea0b2685bebc883c09f5554d7fb481e85d0564d +Subproject commit 74cfb77e308dd188d2f58864aaf44963ae6b88b1 diff --git a/src/DssTest.sol b/src/DssTest.sol index 9afeabe..bd00932 100644 --- a/src/DssTest.sol +++ b/src/DssTest.sol @@ -425,9 +425,9 @@ abstract contract DssTest is Test { function checkModifier(address _base, string memory _revertMsg, bytes4[] memory _fsigs) internal { for (uint256 i = 0; i < _fsigs.length; i++) { bytes4 fsig = _fsigs[i]; - uint256 p = 0; + uint256[] memory p = new uint256[](20); // Pad the abi call with 0s to fill all the args (it's okay to supply more than the function requires) - assertRevert(_base, abi.encodePacked(fsig, p, p, p, p, p, p), _revertMsg); + assertRevert(_base, abi.encodePacked(fsig, p), _revertMsg); } } function checkModifier(address _base, string memory _revertMsg, bytes4[1] memory _fsigs) internal { diff --git a/src/domains/Domain.sol b/src/domains/Domain.sol index 4b921f2..d045edc 100644 --- a/src/domains/Domain.sol +++ b/src/domains/Domain.sol @@ -39,23 +39,23 @@ contract Domain { vm.makePersistent(address(this)); } - function readConfigString(string memory key) public view returns (string memory) { + function readConfigString(string memory key) public returns (string memory) { return config.readString(string.concat(".domains.", _details.chainAlias, ".", key)); } - function readConfigAddress(string memory key) public view returns (address) { + function readConfigAddress(string memory key) public returns (address) { return config.readAddress(string.concat(".domains.", _details.chainAlias, ".", key)); } - function readConfigUint(string memory key) public view returns (uint256) { + function readConfigUint(string memory key) public returns (uint256) { return config.readUint(string.concat(".domains.", _details.chainAlias, ".", key)); } - function readConfigInt(string memory key) public view returns (int256) { + function readConfigInt(string memory key) public returns (int256) { return config.readInt(string.concat(".domains.", _details.chainAlias, ".", key)); } - function readConfigBytes32(string memory key) public view returns (bytes32) { + function readConfigBytes32(string memory key) public returns (bytes32) { return config.readBytes32(string.concat(".domains.", _details.chainAlias, ".", key)); } @@ -67,7 +67,7 @@ contract Domain { return out; } - function readConfigBytes32FromString(string memory key) public view returns (bytes32) { + function readConfigBytes32FromString(string memory key) public returns (bytes32) { return bytesToBytes32(bytes(readConfigString(key))); } diff --git a/src/domains/OptimismDomain.sol b/src/domains/OptimismDomain.sol index 1c035e8..9687dde 100644 --- a/src/domains/OptimismDomain.sol +++ b/src/domains/OptimismDomain.sol @@ -27,15 +27,6 @@ interface MessengerLike { bytes memory message, uint32 gasLimit ) external; - function relayMessage( - address _target, - address _sender, - bytes memory _message, - uint256 _messageNonce - ) external; -} - -interface BedrockMessengerLike { function relayMessage( uint256 _nonce, address _sender, @@ -81,14 +72,8 @@ contract OptimismDomain is BridgedDomain { if (log.topics[0] == SENT_MESSAGE_TOPIC && log.emitter == address(l1Messenger)) { address target = address(uint160(uint256(log.topics[1]))); (address sender, bytes memory message, uint256 nonce, uint256 gasLimit) = abi.decode(log.data, (address, bytes, uint256, uint256)); - vm.startPrank(malias); - if (isGoerli()) { - // Goerli has been upgraded to bedrock which has a new relay interface - BedrockMessengerLike(address(l2Messenger)).relayMessage(nonce, sender, target, 0, gasLimit, message); - } else { - l2Messenger.relayMessage(target, sender, message, nonce); - } - vm.stopPrank(); + vm.prank(malias); + l2Messenger.relayMessage(nonce, sender, target, 0, gasLimit, message); } } diff --git a/test.sh b/test.sh index d32c94f..e09d9c5 100755 --- a/test.sh +++ b/test.sh @@ -22,5 +22,5 @@ export FOUNDRY_ROOT_CHAINID if [[ -z "$1" ]]; then forge test else - forge test --match "$1" -vvvvv + forge test --match-test "$1" -vvvvv fi