github.com/ethereum-optimism/optimism@v1.7.2/packages/contracts-bedrock/src/dispute/interfaces/IAnchorStateRegistry.sol (about) 1 // SPDX-License-Identifier: MIT 2 pragma solidity ^0.8.0; 3 4 import { IDisputeGameFactory } from "src/dispute/interfaces/IDisputeGameFactory.sol"; 5 6 import "src/libraries/DisputeTypes.sol"; 7 8 /// @title IAnchorStateRegistry 9 /// @notice Describes a contract that stores the anchor state for each game type. 10 interface IAnchorStateRegistry { 11 /// @notice Returns the anchor state for the given game type. 12 /// @param _gameType The game type to get the anchor state for. 13 /// @return The anchor state for the given game type. 14 function anchors(GameType _gameType) external view returns (Hash, uint256); 15 16 /// @notice Returns the DisputeGameFactory address. 17 /// @return DisputeGameFactory address. 18 function disputeGameFactory() external view returns (IDisputeGameFactory); 19 20 /// @notice Callable by FaultDisputeGame contracts to update the anchor state. Pulls the anchor state directly from 21 /// the FaultDisputeGame contract and stores it in the registry if the new anchor state is valid and the 22 /// state is newer than the current anchor state. 23 function tryUpdateAnchorState() external; 24 }