Skip to content

Commit

Permalink
refactor(evm): rn a couple of comments and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
allemanfredi committed Jun 19, 2024
1 parent f64d173 commit efd21e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/evm/contracts/interfaces/IYaho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface IYaho is IMessageHashCalculator, IMessageIdCalculator {
* @param reporters - An array of `IReporter` contracts (not actively used in this step).
* @param adapters - An array of `IAdapter` contracts (for later validation use).
* @return messageId A unique identifier for the dispatched message, used for tracking and subsequent validation.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as a zk adapter), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as an adapter that uses a light client), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
*
*/
function dispatchMessage(
Expand All @@ -57,7 +57,7 @@ interface IYaho is IMessageHashCalculator, IMessageIdCalculator {
* @param reporters - An array of `IReporter` contracts (not actively used in this step).
* @param adapters - An array of `IAdapter` contracts (for later validation use).
* @return (messageId, result) A unique identifier for the dispatched message and an array of byte arrays, where each element is the result of dispatching a respective message to the corresponding Reporter.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as a zk adapter), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as an adapter that uses a light client), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
*/
function dispatchMessageToAdapters(
uint256 targetChainId,
Expand All @@ -77,7 +77,7 @@ interface IYaho is IMessageHashCalculator, IMessageIdCalculator {
* @param reporters - An array of `IReporter` contracts for reporting the status of each message.
* @param adapters - An array of `IAdapter` contracts used for the validation of each message.
* @return (messageIds, result) An array of unique identifiers for the dispatched messages and an array of bytes32 arrays, where each element is the result of dispatching a respective message to the corresponding Reporter.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as a zk adapter), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
* @notice If you plan to use an Adapter that does not have a corresponding Reporter (such as an adapter that uses a light client), you need to specify only the adapter and use address(0) as the reporter, since the adapter will verify the MessageDispatched event emitted by Yaho.
*/
function dispatchMessagesToAdapters(
uint256 targetChainId,
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/test/03_Yaho.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe("Yaho", () => {
.withArgs(3, 2)
})

it("should dispatch a single message without calling the reporter because a zk adapter is used", async () => {
it("should dispatch a single message without calling the reporter because an adapter that doesn't need a reporter is used", async () => {
const threshold = 2
const tx = await yaho.dispatchMessage(
Chains.Gnosis,
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/test/04_Yaru.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe("Yaru", () => {
})
}

it(`should be able to execute a message using 2 zk adapters`, async () => {
it(`should be able to execute a message using 2 adapters that don't need the corresponding reporters`, async () => {
const threshold = 4
const tx = await yaho.dispatchMessagesToAdapters(
Chains.Hardhat,
Expand Down

0 comments on commit efd21e8

Please sign in to comment.