From 7effd4031d4d7ea361972289590b40978dbe70e3 Mon Sep 17 00:00:00 2001 From: Alessandro Manfredi Date: Tue, 23 Jan 2024 18:47:29 +0100 Subject: [PATCH] chore(evm): adds missing payable and rm a comment within Yaho --- packages/evm/contracts/Yaho.sol | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/evm/contracts/Yaho.sol b/packages/evm/contracts/Yaho.sol index e9644da5..65407b00 100644 --- a/packages/evm/contracts/Yaho.sol +++ b/packages/evm/contracts/Yaho.sol @@ -33,7 +33,7 @@ contract Yaho is IYaho, MessageIdCalculator, MessageHashCalculator { bytes calldata data, IReporter[] calldata reporters, IOracleAdapter[] calldata adapters - ) external returns (uint256, bytes32[] memory) { + ) external payable returns (uint256, bytes32[] memory) { _checkReportersAndAdapters(threshold, reporters, adapters); (uint256 messageId, bytes32 messageHash) = _dispatchMessage( toChainId, @@ -97,8 +97,6 @@ contract Yaho is IYaho, MessageIdCalculator, MessageHashCalculator { function relayMessagesToAdapters(Message[] calldata messages) external payable returns (bytes32[] memory) { if (messages.length == 0) revert NoMessagesGiven(); - // NOTE: In order to be able to aggregate messages within the reporter, - // it's mandatory that all messages have the same toChainId, reporters and adapters. bytes32 expectedParams = keccak256( abi.encode(messages[0].toChainId, messages[0].reporters, messages[0].adapters) ); @@ -188,12 +186,7 @@ contract Yaho is IYaho, MessageIdCalculator, MessageHashCalculator { bytes32[] memory reportersReceipts = new bytes32[](reporters.length); for (uint256 i = 0; i < reporters.length; ) { - reportersReceipts[i] = reporters[i].dispatchMessages( - toChainId, - adapters[i], - messageIds, - messageHashes - ); + reportersReceipts[i] = reporters[i].dispatchMessages(toChainId, adapters[i], messageIds, messageHashes); for (uint256 j = 0; j < messageIds.length; ) { delete _pendingMessageHashes[messageIds[j]];