Skip to content

Commit

Permalink
chore(evm): adds missing payable and rm a comment within Yaho
Browse files Browse the repository at this point in the history
  • Loading branch information
allemanfredi committed Jan 23, 2024
1 parent 3d8adec commit 7effd40
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/evm/contracts/Yaho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
);
Expand Down Expand Up @@ -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]];
Expand Down

0 comments on commit 7effd40

Please sign in to comment.