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
5047b63b
Commit
5047b63b
authored
Nov 30, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to use `CommonBase`
parent
7f4278da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
OutputBisectionActors.sol
...s/contracts-bedrock/test/actors/OutputBisectionActors.sol
+4
-7
No files found.
packages/contracts-bedrock/test/actors/OutputBisectionActors.sol
View file @
5047b63b
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import {
Vm } from "forge-std/Vm
.sol";
import {
CommonBase } from "forge-std/Base
.sol";
import { OutputBisectionGame } from "src/dispute/OutputBisectionGame.sol";
import { IOutputBisectionGame } from "src/dispute/interfaces/IOutputBisectionGame.sol";
...
...
@@ -13,9 +13,7 @@ import "src/libraries/DisputeTypes.sol";
/// moves for a given `OutputBisectionGame` contract, from the eyes of an honest
/// actor. The `GameSolver` does not implement functionality for acting on the `Move`s
/// it suggests.
abstract contract GameSolver {
/// @notice The HEVM cheatcode address.
Vm internal immutable VM;
abstract contract GameSolver is CommonBase {
/// @notice The `OutputBisectionGame` proxy that the `GameSolver` will be solving.
OutputBisectionGame public immutable GAME;
/// @notice The maximum length of the execution trace, in bytes. Enforced by the depth of the
...
...
@@ -50,8 +48,7 @@ abstract contract GameSolver {
bytes data;
}
constructor(Vm _vm, OutputBisectionGame _gameProxy, bytes memory _trace) {
VM = _vm;
constructor(OutputBisectionGame _gameProxy, bytes memory _trace) {
GAME = _gameProxy;
MAX_TRACE_LENGTH = 2 ** (_gameProxy.MAX_GAME_DEPTH() - _gameProxy.SPLIT_DEPTH());
trace = _trace;
...
...
@@ -75,7 +72,7 @@ contract HonestGameSolver is GameSolver {
Noop
}
constructor(
Vm _vm, OutputBisectionGame _gameProxy, bytes memory _trace) GameSolver(_vm,
_gameProxy, _trace) {
constructor(
OutputBisectionGame _gameProxy, bytes memory _trace) GameSolver(
_gameProxy, _trace) {
// Mark agreement with the root claim if the local opinion of the root claim is the same as the
// observed root claim.
if (Claim.unwrap(outputAt(MAX_TRACE_LENGTH)) == Claim.unwrap(_gameProxy.rootClaim())) {
...
...
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