From 86071c14ad791ff6bc757e0de1e47f507685568e Mon Sep 17 00:00:00 2001 From: Ermyas Abebe Date: Wed, 13 Sep 2023 16:56:03 +1000 Subject: [PATCH] Fix build failure --- src/interfaces/IMultiMessageReceiver.sol | 4 +++- test/Setup.t.sol | 4 ++-- test/unit-tests/GovernanceTimelock.t.sol | 4 ++-- test/unit-tests/MultiMessageReceiver.t.sol | 6 ++++-- test/unit-tests/adapters/BaseSenderAdapter.t.sol | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/interfaces/IMultiMessageReceiver.sol b/src/interfaces/IMultiMessageReceiver.sol index fadf2cb..a6ea876 100644 --- a/src/interfaces/IMultiMessageReceiver.sol +++ b/src/interfaces/IMultiMessageReceiver.sol @@ -23,7 +23,9 @@ interface IMultiMessageReceiver { event SingleBridgeMsgReceived( bytes32 indexed msgId, string indexed bridgeName, uint256 nonce, address receiverAdapter ); - event MessageExecuted(bytes32 indexed msgId, address indexed target, uint256 nativeValue, uint256 nonce, bytes callData); + event MessageExecuted( + bytes32 indexed msgId, address indexed target, uint256 nativeValue, uint256 nonce, bytes callData + ); /*///////////////////////////////////////////////////////////////// EXTERNAL FUNCTIONS diff --git a/test/Setup.t.sol b/test/Setup.t.sol index dd78998..4191be7 100644 --- a/test/Setup.t.sol +++ b/test/Setup.t.sol @@ -463,9 +463,9 @@ abstract contract Setup is Test { for (uint256 j; j < logs.length; j++) { if (logs[j].topics[0] == keccak256("TransactionScheduled(uint256,address,uint256,bytes,uint256)")) { txId = uint256(logs[j].topics[1]); - + finalTarget = abi.decode(bytes.concat(logs[j].topics[2]), (address)); encodedArgs = logs[j].data; - (finalTarget, value, data, eta) = abi.decode(encodedArgs, (address, uint256, bytes, uint256)); + (value, data, eta) = abi.decode(encodedArgs, (uint256, bytes, uint256)); } } } diff --git a/test/unit-tests/GovernanceTimelock.t.sol b/test/unit-tests/GovernanceTimelock.t.sol index 1f3ebe5..9717d94 100644 --- a/test/unit-tests/GovernanceTimelock.t.sol +++ b/test/unit-tests/GovernanceTimelock.t.sol @@ -10,8 +10,8 @@ import "src/libraries/Error.sol"; import {GovernanceTimelock} from "src/controllers/GovernanceTimelock.sol"; contract GovernanceTimelockTest is Setup { - event TransactionScheduled(uint256 indexed txId, address target, uint256 value, bytes data, uint256 eta); - event TransactionExecuted(uint256 indexed txId, address target, uint256 value, bytes data, uint256 eta); + event TransactionScheduled(uint256 indexed txId, address indexed target, uint256 value, bytes data, uint256 eta); + event TransactionExecuted(uint256 indexed txId, address indexed target, uint256 value, bytes data, uint256 eta); event ExecutionPeriodUpdated(uint256 oldPeriod, uint256 newPeriod); event DelayUpdated(uint256 oldDelay, uint256 newDelay); diff --git a/test/unit-tests/MultiMessageReceiver.t.sol b/test/unit-tests/MultiMessageReceiver.t.sol index cae70db..04d3053 100644 --- a/test/unit-tests/MultiMessageReceiver.t.sol +++ b/test/unit-tests/MultiMessageReceiver.t.sol @@ -12,12 +12,14 @@ import "src/libraries/Message.sol"; import {MultiMessageReceiver} from "src/MultiMessageReceiver.sol"; contract MultiMessageReceiverTest is Setup { - event ReceiverAdapterUpdated(address receiverAdapter, bool add); + event ReceiverAdapterUpdated(address indexed receiverAdapter, bool add); event QuorumUpdated(uint64 oldValue, uint64 newValue); event SingleBridgeMsgReceived( bytes32 indexed msgId, string indexed bridgeName, uint256 nonce, address receiverAdapter ); - event MessageExecuted(bytes32 indexed msgId, address target, uint256 nativeValue, uint256 nonce, bytes callData); + event MessageExecuted( + bytes32 indexed msgId, address indexed target, uint256 nativeValue, uint256 nonce, bytes callData + ); MultiMessageReceiver receiver; address wormholeAdapterAddr; diff --git a/test/unit-tests/adapters/BaseSenderAdapter.t.sol b/test/unit-tests/adapters/BaseSenderAdapter.t.sol index 80c7ba3..f157c7e 100644 --- a/test/unit-tests/adapters/BaseSenderAdapter.t.sol +++ b/test/unit-tests/adapters/BaseSenderAdapter.t.sol @@ -10,7 +10,7 @@ import "src/libraries/Error.sol"; import {AxelarSenderAdapter} from "src/adapters/axelar/AxelarSenderAdapter.sol"; contract AxelarSenderAdapterTest is Setup { - event ReceiverAdapterUpdated(uint256 dstChainId, address receiverAdapter); + event ReceiverAdapterUpdated(uint256 indexed dstChainId, address indexed receiverAdapter); // Test base contract with Axelar adapter AxelarSenderAdapter adapter;