Skip to content

Commit

Permalink
fix: satisfy compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed May 3, 2024
1 parent 19f8b0f commit 3066c7a
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion script/BaseMultiChainDeployer.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;
pragma solidity ^0.8.22;

import "forge-std/Script.sol";

Expand Down
4 changes: 2 additions & 2 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;
pragma solidity ^0.8.22;

import "forge-std/Script.sol";
import {stdJson} from "forge-std/StdJson.sol";
Expand Down Expand Up @@ -159,7 +159,7 @@ contract DeployGeneralisedIncentives is BaseMultiChainDeployer {
}

function deployEscrow(string[] memory bridges) forEachBridge(bridges) internal {
address escrow = deployGeneralisedIncentives(incentiveVersion);
deployGeneralisedIncentives(incentiveVersion);
}

function _deploy(string[] memory bridges) internal {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/polymer/APolymerEscrow.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
pragma solidity ^0.8.22;

import {IncentivizedMessageEscrow} from "../../IncentivizedMessageEscrow.sol";
import "../../MessagePayload.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/apps/polymer/vIBCEscrow.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
pragma solidity ^0.8.22;

import { APolymerEscrow } from "./APolymerEscrow.sol";
import "../../MessagePayload.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract EscrowInformationTest is TestCommon {
IncentiveDescription storage incentive = _INCENTIVE;
incentive.refundGasTo = address(0);
vm.expectRevert();
(, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE)}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE)}(
bytes32(uint256(0x123123) + uint256(2**255)),
_DESTINATION_ADDRESS_THIS,
_MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ contract AckReentryTest is TestCommon, ICrossChainReceiver {

bool flag;

function receiveAck(bytes32 /* destinationIdentifier */, bytes32 /* messageIdentifier */, bytes calldata acknowledgement) external {
function receiveAck(bytes32 /* destinationIdentifier */, bytes32 /* messageIdentifier */, bytes calldata /* acknowledgement */) external {
vm.expectRevert(
abi.encodeWithSignature("MessageAlreadyAcked()")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract CallReentryTest is TestCommon, ICrossChainReceiver {
bool flag;

// Receive the message and reentry.
function receiveMessage(bytes32 /* sourceIdentifierbytes */, bytes32 /* messageIdentifier */, bytes calldata /* fromApplication */, bytes calldata message) external returns(bytes memory acknowledgement) {
function receiveMessage(bytes32 /* sourceIdentifierbytes */, bytes32 /* messageIdentifier */, bytes calldata /* fromApplication */, bytes calldata /* message */) external returns(bytes memory acknowledgement) {
vm.expectRevert(
abi.encodeWithSignature("MessageAlreadySpent()")
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ contract sendPacketPaymentTest is TestCommon {
IncentiveDescription storage incentive = _INCENTIVE;

vm.recordLogs();
(, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
bytes32(uint256(0x123123) + uint256(2**255)),
_DESTINATION_ADDRESS_THIS,
_MESSAGE,
Expand Down Expand Up @@ -103,7 +103,7 @@ contract sendPacketPaymentTest is TestCommon {
IncentiveDescription storage incentive = _INCENTIVE;

vm.recordLogs();
(, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
bytes32(uint256(0x123123) + uint256(2**255)),
_DESTINATION_ADDRESS_THIS,
_MESSAGE,
Expand Down Expand Up @@ -132,7 +132,7 @@ contract sendPacketPaymentTest is TestCommon {
IncentiveDescription storage incentive = _INCENTIVE;

vm.recordLogs();
(, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
bytes32(uint256(0x123123) + uint256(2**255)),
_DESTINATION_ADDRESS_THIS,
_MESSAGE,
Expand Down Expand Up @@ -180,7 +180,7 @@ contract sendPacketPaymentTest is TestCommon {
vm.warp(1000000);
IncentiveDescription storage incentive = _INCENTIVE;

(, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE) + SEND_MESSAGE_PAYMENT_COST}(
bytes32(uint256(0x123123) + uint256(2**255)),
_DESTINATION_ADDRESS_THIS,
_MESSAGE,
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion test/wormhole/(wh)messages.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// test/Messages.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;
pragma solidity ^0.8.22;

import "../../src/apps/wormhole/external/wormhole/Messages.sol";
import "../../src/apps/wormhole/external/wormhole/Setters.sol";
Expand Down
6 changes: 3 additions & 3 deletions test/wormhole/roundtrip.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// test/Messages.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;
pragma solidity ^0.8.22;

import "../../src/apps/wormhole/external/wormhole/Messages.sol";
import "../../src/apps/wormhole/external/wormhole/Setters.sol";
Expand Down Expand Up @@ -100,7 +100,7 @@ contract TestRoundtrip is Test, IMessageEscrowStructs, Bytes65 {
messages.storeGuardianSetPub(initialGuardianSet, uint32(0));
}

function makeValidVM(bytes memory payload, uint16 emitterChainid, bytes32 emitterAddress) internal returns(bytes memory validVM) {
function makeValidVM(bytes memory payload, uint16 emitterChainid, bytes32 emitterAddress) view internal returns(bytes memory validVM) {
bytes memory presigsVM = abi.encodePacked(
uint8(1), // version
uint32(0), // guardianSetIndex
Expand Down Expand Up @@ -132,7 +132,7 @@ contract TestRoundtrip is Test, IMessageEscrowStructs, Bytes65 {
IncentiveDescription storage incentive = _INCENTIVE;

vm.recordLogs();
(uint256 gasRefund, bytes32 messageIdentifier) = escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE)}(
escrow.submitMessage{value: _getTotalIncentive(_INCENTIVE)}(
_DESTINATION_IDENTIFIER,
convertEVMTo65(address(this)),
message,
Expand Down
8 changes: 4 additions & 4 deletions test/wormhole/verifyMessage2.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// test/Messages.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;
pragma solidity ^0.8.22;

import "../../src/apps/wormhole/external/wormhole/Messages.sol";
import "../../src/apps/wormhole/external/wormhole/Setters.sol";
Expand Down Expand Up @@ -129,10 +129,10 @@ contract TestMessagesC2Sigs is Test {
bytes memory invalidVM = abi.encodePacked(validVM, uint8(1));

// Confirm that the test VM is valid
(Structs.VM memory parsedInValidVm, bool valid, string memory reason) = messages.parseAndVerifyVM(invalidVM);
(, bool valid, string memory reason) = messages.parseAndVerifyVM(invalidVM);
(
SmallStructs.SmallVM memory smallVM,
bytes memory payload,
,
,
bool valid2,
string memory reason2
) = messages2.parseAndVerifyVM(invalidVM);
Expand Down
8 changes: 4 additions & 4 deletions test/wormhole/verifyMessages.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// test/Messages.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.8.0;
pragma solidity ^0.8.22;

import "../../src/apps/wormhole/external/wormhole/Messages.sol";
import "../../src/apps/wormhole/external/wormhole/Setters.sol";
Expand Down Expand Up @@ -105,10 +105,10 @@ contract TestMessagesC is Test {
bytes memory invalidVM = abi.encodePacked(validVM, uint8(1));

// Confirm that the test VM is valid
(Structs.VM memory parsedInValidVm, bool valid, string memory reason) = messages.parseAndVerifyVM(invalidVM);
(, bool valid, string memory reason) = messages.parseAndVerifyVM(invalidVM);
(
SmallStructs.SmallVM memory smallVM,
bytes memory payload,
,
,
bool valid2,
string memory reason2
) = messages2.parseAndVerifyVM(invalidVM);
Expand Down

0 comments on commit 3066c7a

Please sign in to comment.