Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
8a775d76
Commit
8a775d76
authored
Jun 20, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `ABSOLUTE_PRESTATE` immutable
parent
1c4213a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
FaultDisputeGame.sol
.../contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
+13
-0
FaultDisputeGame.t.sol
...s/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
+1
-1
No files found.
packages/contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
View file @
8a775d76
...
@@ -45,6 +45,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
...
@@ -45,6 +45,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
*/
*/
Position internal constant ROOT_POSITION = Position.wrap(1);
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
* @notice The starting timestamp of the game
*/
*/
...
@@ -70,6 +76,13 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
...
@@ -70,6 +76,13 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone {
*/
*/
mapping(ClaimHash => bool) internal claims;
mapping(ClaimHash => bool) internal claims;
/**
* @param _absolutePrestate The absolute prestate of the instruction trace.
*/
constructor(Claim _absolutePrestate) {
ABSOLUTE_PRESTATE = _absolutePrestate;
}
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// External Logic //
// External Logic //
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
...
...
packages/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
View file @
8a775d76
...
@@ -43,7 +43,7 @@ contract FaultDisputeGame_Test is DisputeGameFactory_Init {
...
@@ -43,7 +43,7 @@ contract FaultDisputeGame_Test is DisputeGameFactory_Init {
function setUp() public override {
function setUp() public override {
super.setUp();
super.setUp();
// Deploy an implementation of the fault game
// 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.
// Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl);
factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game.
// Create a new game.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment