Skip to content

Commit

Permalink
chore: Restore v2 functions for relayer test (#470)
Browse files Browse the repository at this point in the history
The relayer repository requires these functions to be available for use
in test, effectively as a protection against regressions. In the long
run this will be a pain to retain, but for now it's necessary to permit
onchain v2 functions to be removed.
  • Loading branch information
pxrl authored Mar 15, 2024
1 parent 0b88f4f commit a8fbfb8
Show file tree
Hide file tree
Showing 7 changed files with 738 additions and 5 deletions.
10 changes: 10 additions & 0 deletions contracts/test/MerkleLibTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity ^0.8.0;
import "../MerkleLib.sol";
import "../interfaces/HubPoolInterface.sol";
import "../interfaces/SpokePoolInterface.sol";
import "./interfaces/MockV2SpokePoolInterface.sol";
import "./V2MerkleLib.sol";

/**
* @notice Contract to test the MerkleLib.
Expand All @@ -29,6 +31,14 @@ contract MerkleLibTest {
return MerkleLib.verifyRelayerRefund(root, refund, proof);
}

function verifySlowRelayFulfillment(
bytes32 root,
MockV2SpokePoolInterface.SlowFill memory slowFill,
bytes32[] memory proof
) public pure returns (bool) {
return V2MerkleLib.verifySlowRelayFulfillment(root, slowFill, proof);
}

function verifyV3SlowRelayFulfillment(
bytes32 root,
V3SpokePoolInterface.V3SlowFill memory slowFill,
Expand Down
Loading

0 comments on commit a8fbfb8

Please sign in to comment.