Skip to content

Commit 314c8c4

Browse files
committed
feat: extend ReferenceAdapter to include minimum peg-in and dust threshold, and add bridge() check in DifferentialBase
1 parent 9bb7195 commit 314c8c4

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/differential/base/DifferentialBase.sol

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ abstract contract DifferentialBase is Test {
7373
harness.candidateDiscoveryTarget = targets.discovery;
7474

7575
harness.referenceAdapter = IDifferentialAdapter(
76-
address(new ReferenceAdapter(harness.referenceTarget))
76+
address(
77+
new ReferenceAdapter(
78+
harness.referenceTarget,
79+
flyoverCfg.minimumPegIn,
80+
flyoverCfg.dustThreshold
81+
)
82+
)
7783
);
7884
harness.candidateAdapter = IDifferentialAdapter(
7985
address(
@@ -129,6 +135,14 @@ abstract contract DifferentialBase is Test {
129135
abi.encodeWithSignature("version()")
130136
);
131137
require(ok && data.length > 0, "Reference must expose version()");
138+
139+
(bool okBridge, bytes memory bridgeData) = referenceTarget.staticcall(
140+
abi.encodeWithSignature("bridge()")
141+
);
142+
require(
143+
okBridge && bridgeData.length > 0,
144+
"Reference must expose bridge()"
145+
);
132146
}
133147

134148
function _deploySplitCandidateFromReference(

0 commit comments

Comments
 (0)