Commit 8a775d76 authored by clabby's avatar clabby

Add `ABSOLUTE_PRESTATE` immutable

parent 1c4213a3
......@@ -45,6 +45,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
*/
Position internal constant ROOT_POSITION = Position.wrap(1);
/**
* @notice The absolute prestate of the instruction trace. This is a constant that is defined
* by the program that is being used to execute the trace, in this case, Cannon.
*/
Claim public immutable ABSOLUTE_PRESTATE;
/**
* @notice The starting timestamp of the game
*/
......@@ -70,6 +76,13 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
*/
mapping(ClaimHash => bool) internal claims;
/**
* @param _absolutePrestate The absolute prestate of the instruction trace.
*/
constructor(Claim _absolutePrestate) {
ABSOLUTE_PRESTATE = _absolutePrestate;
}
////////////////////////////////////////////////////////////////
// External Logic //
////////////////////////////////////////////////////////////////
......
......@@ -43,7 +43,7 @@ contract FaultDisputeGame_Test is DisputeGameFactory_Init {
function setUp() public override {
super.setUp();
// Deploy an implementation of the fault game
gameImpl = new FaultDisputeGame();
gameImpl = new FaultDisputeGame(Claim.wrap(bytes32(uint256(5))));
// Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment