generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(evm): adds onlyYaho within MessageRelay, refactors Sygma tests a…
…nd comments not working ones
- Loading branch information
1 parent
4f6c539
commit 1a6b206
Showing
23 changed files
with
404 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
pragma solidity ^0.8.17; | ||
|
||
import { IMessageRelay } from "../interfaces/IMessageRelay.sol"; | ||
|
||
abstract contract MessageRelay is IMessageRelay { | ||
address public immutable yaho; | ||
|
||
error NotYaho(address yaho, address expectedYaho); | ||
error UnequalArrayLengths(address emitter); | ||
|
||
constructor(address yaho_) { | ||
yaho = yaho_; | ||
} | ||
|
||
modifier onlyYaho() { | ||
if (msg.sender != yaho) revert NotYaho(msg.sender, yaho); | ||
_; | ||
} | ||
|
||
function relayMessages( | ||
uint256[] memory toChainIds, | ||
bytes32[] memory messageIds, | ||
bytes32[] calldata messageHashes, | ||
address adapter | ||
) external payable virtual returns (bytes32 receipts); | ||
} |
34 changes: 21 additions & 13 deletions
34
packages/evm/contracts/adapters/Sygma/SygmaMessageRelayer.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.