Skip to content

Commit 7da973d

Browse files
authored
add missing functions to MockAnchorStateRegistry (#231)
1 parent b30b6a4 commit 7da973d

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

scripts/multiproof/mocks/MockAnchorStateRegistry.sol

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,30 @@ contract MockAnchorStateRegistry {
9292
function isGameRespected(IDisputeGame) external pure returns (bool) {
9393
return true;
9494
}
95+
96+
/// @notice Checks if a game is proper (registered, not blacklisted, not retired, not paused).
97+
/// @return Always returns true for testing.
98+
function isGameProper(IDisputeGame) external pure returns (bool) {
99+
return true;
100+
}
101+
102+
/// @notice Checks if the system is paused.
103+
/// @return Always returns false for testing.
104+
function paused() external pure returns (bool) {
105+
return false;
106+
}
107+
108+
/// @notice Checks if a game is finalized.
109+
/// @dev Mirrors the real AnchorStateRegistry: requires the game to be resolved.
110+
/// Skips the airgap delay check since this is a dev mock without a finality delay.
111+
/// @return Whether the game has been resolved.
112+
function isGameFinalized(IDisputeGame _game) external view returns (bool) {
113+
return _game.resolvedAt().raw() != 0;
114+
}
115+
116+
/// @notice Sets the anchor state from a dispute game.
117+
/// @dev No-op for testing.
118+
function setAnchorState(IDisputeGame) external {
119+
// No-op in mock
120+
}
95121
}

0 commit comments

Comments
 (0)