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
a1371125
Unverified
Commit
a1371125
authored
Jun 30, 2023
by
mergify[bot]
Committed by
GitHub
Jun 30, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into aj/report-hive-tests
parents
6f51ab6d
c264ed2f
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
207 additions
and
112 deletions
+207
-112
config.yml
.circleci/config.yml
+4
-0
canonicalize.go
op-bindings/ast/canonicalize.go
+6
-2
faultdisputegame.go
op-bindings/bindings/faultdisputegame.go
+2
-2
faultdisputegame_more.go
op-bindings/bindings/faultdisputegame_more.go
+2
-2
l2outputoracle_more.go
op-bindings/bindings/l2outputoracle_more.go
+1
-1
optimismportal_more.go
op-bindings/bindings/optimismportal_more.go
+1
-1
systemconfig_more.go
op-bindings/bindings/systemconfig_more.go
+1
-1
waits.go
op-e2e/e2eutils/waits.go
+21
-0
system_tob_test.go
op-e2e/system_tob_test.go
+2
-2
withdrawal_helper.go
op-e2e/withdrawal_helper.go
+4
-3
utils.go
op-node/withdrawals/utils.go
+45
-73
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+17
-15
FaultDisputeGame.sol
.../contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
+21
-8
DisputeErrors.sol
...s/contracts-bedrock/contracts/libraries/DisputeErrors.sol
+3
-0
FaultDisputeGame.t.sol
...s/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
+77
-2
No files found.
.circleci/config.yml
View file @
a1371125
...
...
@@ -685,6 +685,10 @@ jobs:
image
:
ubuntu-2204:2022.07.1
steps
:
-
checkout
-
run
:
name
:
Install pnpm package manager
command
:
|
npm i pnpm --global
-
run
:
name
:
Lint check
command
:
|
...
...
op-bindings/ast/canonicalize.go
View file @
a1371125
...
...
@@ -10,6 +10,7 @@ import (
)
var
remapTypeRe
=
regexp
.
MustCompile
(
`^(t_[\w_]+\([\w]+\))([\d]+)(_[\w]+)?$`
)
var
remapAstIdStorage
=
regexp
.
MustCompile
(
`(t_(struct|userDefinedValueType))\(([\w]+)\)([\d]+)_storage`
)
// typeRemapping represents a mapping between an a type generated by solc
// and a canonicalized type. This is because solc inserts the ast id into
...
...
@@ -63,8 +64,11 @@ func CanonicalizeASTIDs(in *solc.StorageLayout) *solc.StorageLayout {
// The storage types include the size when its a fixed size.
// This is subject to breaking in the future if a type with
// an ast id is added in a fixed storage type
if
strings
.
Contains
(
oldType
,
"storage"
)
{
// an ast id is added in a fixed storage type. We don't want
// to skip a type with `_storage` in it if it has a subtype
// with an ast id or it has an astid itself.
skip
:=
len
(
remapAstIdStorage
.
FindAllStringSubmatch
(
oldType
,
-
1
))
==
0
if
strings
.
Contains
(
oldType
,
"storage"
)
&&
skip
{
continue
}
...
...
op-bindings/bindings/faultdisputegame.go
View file @
a1371125
...
...
@@ -30,8 +30,8 @@ var (
// FaultDisputeGameMetaData contains all meta data concerning the FaultDisputeGame contract.
var
FaultDisputeGameMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_absolutePrestate
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_maxGameDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"
_vm
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
CannotDefendRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyExists
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClockTimeExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameDepthExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameNotInProgress
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidParent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidPrestate
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ValidStep
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
claimant
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
Move
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Resolved
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ABSOLUTE_PRESTATE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MAX_GAME_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
VM
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
attack
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
bondManager
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBondManager
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
claimData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
countered
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
Position
\"
,
\"
name
\"
:
\"
position
\"
,
\"
type
\"
:
\"
uint128
\"
},{
\"
internalType
\"
:
\"
Clock
\"
,
\"
name
\"
:
\"
clock
\"
,
\"
type
\"
:
\"
uint128
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
claimDataLen
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
len_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
createdAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"
createdAt_
\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
defend
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
extraData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameStart
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameType
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l2BlockNumber
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
l2BlockNumber_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_challengeIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
name
\"
:
\"
move
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
rootClaim
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
status
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_stateIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_stateData
\"
,
\"
type
\"
:
\"
bytes
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_proof
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
step
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
Bin
:
"0x61014060405234801561001157600080fd5b506040516
1204c38038061204c8339810160408190526100309161005b565b6000608081905260a052600260c05260e092909252610100526001600160a01b0316610120526100a1565b60008060006060848603121561007057600080fd5b83516020850151604086015191945092506001600160a01b038116811461009657600080fd5b809150509250925092565b60805160a05160c05160e0516101005161012051611f2b610121600039600081816103aa01526114c30152600081816102c20152818161062a01528181610a7e015281816110e30152818161138f01526113d40152600081816101bd0152611217015260006108660152600061083d015260006108140152611f2b6000f3fe60806040526004361061016a5760003560e01c80638129fc1c116100cb578063bcef3b551161007f578063cf09e0d011610059578063cf09e0d01461049c578063e4c290c4146104bb578063fa24f743146104db57600080fd5b8063bcef3b55146103e8578063c55cd0c714610425578063c6f0308c1461043857600080fd5b80638b85902b116100b05780638b85902b146103585780639293129814610398578063bbdc02db146103cc57600080fd5b80638129fc1c1461032e5780638980e0cc1461034357600080fd5b8063363cc4271161012257806354fd4d501161010757806354fd4d50146102e4578063609d333414610306578063632247ea1461031b57600080fd5b8063363cc427146102515780634778efe8146102b057600080fd5b80632810e1d6116101535780632810e1d6146101ed5780633218b99d1461020257806335fef5671461023c57600080fd5b8063200d2ed21461016f578063266198f9146101ab575b600080fd5b34801561017b57600080fd5b506000546101959068010000000000000000900460ff1681565b6040516101a291906119ff565b60405180910390f35b3480156101b757600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101a2565b3480156101f957600080fd5b506101956104ff565b34801561020e57600080fd5b506000546102239067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a2565b61024f61024a366004611a40565b6107fd565b005b34801561025d57600080fd5b5060005461028b906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a2565b3480156102bc57600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102f057600080fd5b506102f961080d565b6040516101a29190611adc565b34801561031257600080fd5b506102f96108b0565b61024f610329366004611b0b565b6108c2565b34801561033a57600080fd5b5061024f610e7c565b34801561034f57600080fd5b506001546101df565b34801561036457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101df565b3480156103a457600080fd5b5061028b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d857600080fd5b50604051600081526020016101a2565b3480156103f457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101df565b61024f610433366004611a40565b610fbd565b34801561044457600080fd5b50610458610453366004611b40565b610fc9565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101a2565b3480156104a857600080fd5b5060005467ffffffffffffffff16610223565b3480156104c757600080fd5b5061024f6104d6366004611ba2565b61103a565b3480156104e757600080fd5b506104f06115b3565b6040516101a293929190611c36565b60008060005468010000000000000000900460ff166002811115610525576105256119d0565b1461055c576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805460009161056c91611c90565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff81101561066a576000600182815481106105a6576105a6611ca7565b60009182526020909120600390910201600281015481547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94909401939192506fffffffffffffffffffffffffffffffff1690640100000000900460ff1615610610575050610581565b600061064e6fffffffffffffffffffffffffffffffff83167f00000000000000000000000000000000000000000000000000000000000000006115f1565b905084811015610662578094508360010195505b505050610581565b50600261072f6001848154811061068357610683611ca7565b60009182526020909120600260039092020101546fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6107399190611d05565b67ffffffffffffffff1615801561076057506fffffffffffffffffffffffffffffffff8114155b1561076e5760029250610773565b600192505b600080548491907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000008360028111156107b8576107b86119d0565b02179055508260028111156107cf576107cf6119d0565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505090565b610809828260006108c2565b5050565b60606108387f00000000000000000000000000000000000000000000000000000000000000006116a6565b6108617f00000000000000000000000000000000000000000000000000000000000000006116a6565b61088a7f00000000000000000000000000000000000000000000000000000000000000006116a6565b60405160200161089c93929190611d2c565b604051602081830303815290604052905090565b60606108bd6020806117e3565b905090565b6000805468010000000000000000900460ff1660028111156108e6576108e66119d0565b1461091d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610929575080155b15610960576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001848154811061097557610975611ca7565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610a1057610a10611ca7565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610a7a906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610b39826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b7b576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610bdb576001836000015163ffffffff1681548110610baa57610baa611ca7565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c14846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c289190611da2565b610c329190611c90565b905062049d4067ffffffffffffffff82161115610c7b576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610c9c888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610ce8576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600191908101610f017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b610809828260016108c2565b60018181548110610fd957600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff16600281111561105e5761105e6119d0565b14611095576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600187815481106110aa576110aa611ca7565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506111097f00000000000000000000000000000000000000000000000000000000000000006001611da2565b6111a5826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146111e6576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611204836fffffffffffffffffffffffffffffffff1661187a565b67ffffffffffffffff16600003611264577f0000000000000000000000000000000000000000000000000000000000000000915060018b8154811061124b5761124b611ca7565b9060005260206000209060030201600101549050611484565b6000808b156112e65760018e8154811061128057611280611ca7565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16915060018e815481106112c3576112c3611ca7565b906000526020600020906003020160010154935085905086600101549250611375565b600287015460018089015481549096506fffffffffffffffffffffffffffffffff9092169350908f90811061131d5761131d611ca7565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16905060018e8154811061136057611360611ca7565b90600052602060002090600302016001015492505b60016113b36fffffffffffffffffffffffffffffffff83167f0000000000000000000000000000000000000000000000000000000000000000611920565b6113bd9190611dba565b6fffffffffffffffffffffffffffffffff166114147f0000000000000000000000000000000000000000000000000000000000000000846fffffffffffffffffffffffffffffffff1661192090919063ffffffff16565b6fffffffffffffffffffffffffffffffff1614158061144a5750838b8b60405161143f929190611deb565b604051809103902014155b15611481576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b6040517ff8e0cb96000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f8e0cb96906114fe908d908d908d908d90600401611e44565b6020604051808303816000875af115801561151d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115419190611e76565b03611578576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000017909255505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560606115ea6108b0565b9050909192565b60008061167e847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b6060816000036116e957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561171357806116fd81611e8f565b915061170c9050600a83611ec7565b91506116ed565b60008167ffffffffffffffff81111561172e5761172e611edb565b6040519080825280601f01601f191660200182016040528015611758576020820181803683370190505b5090505b84156117db5761176d600183611c90565b915061177a600a86611f0a565b611785906030611da2565b60f81b81838151811061179a5761179a611ca7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506117d4600a86611ec7565b945061175c565b949350505050565b6060600061181a84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611da2565b90508267ffffffffffffffff1667ffffffffffffffff81111561183f5761183f611edb565b6040519080825280601f01601f191660200182016040528015611869576020820181803683370190505b509150828160208401375092915050565b600080611907837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806119ad847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b60005b83811015611a7d578181015183820152602001611a65565b83811115611a8c576000848401525b50505050565b60008151808452611aaa816020860160208601611a62565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611aef6020830184611a92565b9392505050565b80358015158114611b0657600080fd5b919050565b600080600060608486031215611b2057600080fd5b8335925060208401359150611b3760408501611af6565b90509250925092565b600060208284031215611b5257600080fd5b5035919050565b60008083601f840112611b6b57600080fd5b50813567ffffffffffffffff811115611b8357600080fd5b602083019150836020828501011115611b9b57600080fd5b9250929050565b600080600080600080600060a0888a031215611bbd57600080fd5b8735965060208801359550611bd460408901611af6565b9450606088013567ffffffffffffffff80821115611bf157600080fd5b611bfd8b838c01611b59565b909650945060808a0135915080821115611c1657600080fd5b50611c238a828b01611b59565b989b979a50959850939692959293505050565b60ff84168152826020820152606060408201526000611c586060830184611a92565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611ca257611ca2611c61565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611d2057611d20611cd6565b92169190910692915050565b60008451611d3e818460208901611a62565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611d7a816001850160208a01611a62565b60019201918201528351611d95816002840160208801611a62565b0160020195945050505050565b60008219821115611db557611db5611c61565b500190565b60006fffffffffffffffffffffffffffffffff83811690831681811015611de357611de3611c61565b039392505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611e58604083018688611dfb565b8281036020840152611e6b818587611dfb565b979650505050505050565b600060208284031215611e8857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ec057611ec0611c61565b5060010190565b600082611ed657611ed6611cd6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082611f1957611f19611cd6
565b50069056fea164736f6c634300080f000a"
,
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_absolutePrestate
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_maxGameDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"
_vm
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
CannotDefendRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyExists
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
Clock
NotExpired
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
Clock
TimeExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameDepthExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameNotInProgress
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidParent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidPrestate
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ValidStep
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
claimant
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
Move
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Resolved
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ABSOLUTE_PRESTATE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MAX_GAME_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
VM
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
attack
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
bondManager
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBondManager
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
claimData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
countered
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
Position
\"
,
\"
name
\"
:
\"
position
\"
,
\"
type
\"
:
\"
uint128
\"
},{
\"
internalType
\"
:
\"
Clock
\"
,
\"
name
\"
:
\"
clock
\"
,
\"
type
\"
:
\"
uint128
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
claimDataLen
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
len_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
createdAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"
createdAt_
\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
defend
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
extraData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameStart
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameType
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l2BlockNumber
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
l2BlockNumber_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_challengeIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_pivot
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
name
\"
:
\"
move
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
rootClaim
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
status
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_stateIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_stateData
\"
,
\"
type
\"
:
\"
bytes
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_proof
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
step
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
Bin
:
"0x61014060405234801561001157600080fd5b506040516
2002148380380620021488339810160408190526100329161005d565b6000608081905260a052600260c05260e092909252610100526001600160a01b0316610120526100a3565b60008060006060848603121561007257600080fd5b83516020850151604086015191945092506001600160a01b038116811461009857600080fd5b809150509250925092565b60805160a05160c05160e051610100516101205161202462000124600039600081816103aa01526115bc0152600081816102c20152818161061701528181610b77015281816111dc0152818161148801526114cd0152600081816101bd01526113100152600061095f015260006109360152600061090d01526120246000f3fe60806040526004361061016a5760003560e01c80638129fc1c116100cb578063bcef3b551161007f578063cf09e0d011610059578063cf09e0d01461049c578063e4c290c4146104bb578063fa24f743146104db57600080fd5b8063bcef3b55146103e8578063c55cd0c714610425578063c6f0308c1461043857600080fd5b80638b85902b116100b05780638b85902b146103585780639293129814610398578063bbdc02db146103cc57600080fd5b80638129fc1c1461032e5780638980e0cc1461034357600080fd5b8063363cc4271161012257806354fd4d501161010757806354fd4d50146102e4578063609d333414610306578063632247ea1461031b57600080fd5b8063363cc427146102515780634778efe8146102b057600080fd5b80632810e1d6116101535780632810e1d6146101ed5780633218b99d1461020257806335fef5671461023c57600080fd5b8063200d2ed21461016f578063266198f9146101ab575b600080fd5b34801561017b57600080fd5b506000546101959068010000000000000000900460ff1681565b6040516101a29190611af8565b60405180910390f35b3480156101b757600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101a2565b3480156101f957600080fd5b506101956104ff565b34801561020e57600080fd5b506000546102239067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a2565b61024f61024a366004611b39565b6108f6565b005b34801561025d57600080fd5b5060005461028b906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a2565b3480156102bc57600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102f057600080fd5b506102f9610906565b6040516101a29190611bd5565b34801561031257600080fd5b506102f96109a9565b61024f610329366004611c04565b6109bb565b34801561033a57600080fd5b5061024f610f75565b34801561034f57600080fd5b506001546101df565b34801561036457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101df565b3480156103a457600080fd5b5061028b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d857600080fd5b50604051600081526020016101a2565b3480156103f457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101df565b61024f610433366004611b39565b6110b6565b34801561044457600080fd5b50610458610453366004611c39565b6110c2565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101a2565b3480156104a857600080fd5b5060005467ffffffffffffffff16610223565b3480156104c757600080fd5b5061024f6104d6366004611c9b565b611133565b3480156104e757600080fd5b506104f06116ac565b6040516101a293929190611d2f565b60008060005468010000000000000000900460ff16600281111561052557610525611ac9565b1461055c576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805460009161056c91611d89565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610656576000600182815481106105a6576105a6611da0565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff64010000000090910416156105f75750610581565b600281015460009061063b906fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000006116ea565b90508381101561064f578093508260010194505b5050610581565b5060006001838154811061066c5761066c611da0565b600091825260208220600390910201805490925063ffffffff908116919082146106d657600182815481106106a3576106a3611da0565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610702565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b905062049d4061071c67ffffffffffffffff831642611d89565b610738836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff1661074c9190611dcf565b11610783576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600283810154610825906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61082f9190611e16565b67ffffffffffffffff1615801561085657506fffffffffffffffffffffffffffffffff8414155b156108645760029550610869565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000008360028111156108ae576108ae611ac9565b02179055508560028111156108c5576108c5611ac9565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b610902828260006109bb565b5050565b60606109317f000000000000000000000000000000000000000000000000000000000000000061179f565b61095a7f000000000000000000000000000000000000000000000000000000000000000061179f565b6109837f000000000000000000000000000000000000000000000000000000000000000061179f565b60405160200161099593929190611e3d565b604051602081830303815290604052905090565b60606109b66020806118dc565b905090565b6000805468010000000000000000900460ff1660028111156109df576109df611ac9565b14610a16576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610a22575080155b15610a59576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018481548110610a6e57610a6e611da0565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610b0957610b09611da0565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610b73906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610c32826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610c74576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610cd4576001836000015163ffffffff1681548110610ca357610ca3611da0565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610d0d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d219190611dcf565b610d2b9190611d89565b905062049d4067ffffffffffffffff82161115610d74576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610d95888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610de1576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600191908101610ffa7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b610902828260016109bb565b600181815481106110d257600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff16600281111561115757611157611ac9565b1461118e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600187815481106111a3576111a3611da0565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112027f00000000000000000000000000000000000000000000000000000000000000006001611dcf565b61129e826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112df576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806112fd836fffffffffffffffffffffffffffffffff16611973565b67ffffffffffffffff1660000361135d577f0000000000000000000000000000000000000000000000000000000000000000915060018b8154811061134457611344611da0565b906000526020600020906003020160010154905061157d565b6000808b156113df5760018e8154811061137957611379611da0565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16915060018e815481106113bc576113bc611da0565b90600052602060002090600302016001015493508590508660010154925061146e565b600287015460018089015481549096506fffffffffffffffffffffffffffffffff9092169350908f90811061141657611416611da0565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16905060018e8154811061145957611459611da0565b90600052602060002090600302016001015492505b60016114ac6fffffffffffffffffffffffffffffffff83167f0000000000000000000000000000000000000000000000000000000000000000611a19565b6114b69190611eb3565b6fffffffffffffffffffffffffffffffff1661150d7f0000000000000000000000000000000000000000000000000000000000000000846fffffffffffffffffffffffffffffffff16611a1990919063ffffffff16565b6fffffffffffffffffffffffffffffffff161415806115435750838b8b604051611538929190611ee4565b604051809103902014155b1561157a576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b6040517ff8e0cb96000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f8e0cb96906115f7908d908d908d908d90600401611f3d565b6020604051808303816000875af1158015611616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163a9190611f6f565b03611671576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000017909255505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560606116e36109a9565b9050909192565b600080611777847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b6060816000036117e257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561180c57806117f681611f88565b91506118059050600a83611fc0565b91506117e6565b60008167ffffffffffffffff81111561182757611827611fd4565b6040519080825280601f01601f191660200182016040528015611851576020820181803683370190505b5090505b84156118d457611866600183611d89565b9150611873600a86612003565b61187e906030611dcf565b60f81b81838151811061189357611893611da0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cd600a86611fc0565b9450611855565b949350505050565b6060600061191384367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611dcf565b90508267ffffffffffffffff1667ffffffffffffffff81111561193857611938611fd4565b6040519080825280601f01601f191660200182016040528015611962576020820181803683370190505b509150828160208401375092915050565b600080611a00837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080611aa6847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611b33577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611b4c57600080fd5b50508035926020909101359150565b60005b83811015611b76578181015183820152602001611b5e565b83811115611b85576000848401525b50505050565b60008151808452611ba3816020860160208601611b5b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611be86020830184611b8b565b9392505050565b80358015158114611bff57600080fd5b919050565b600080600060608486031215611c1957600080fd5b8335925060208401359150611c3060408501611bef565b90509250925092565b600060208284031215611c4b57600080fd5b5035919050565b60008083601f840112611c6457600080fd5b50813567ffffffffffffffff811115611c7c57600080fd5b602083019150836020828501011115611c9457600080fd5b9250929050565b600080600080600080600060a0888a031215611cb657600080fd5b8735965060208801359550611ccd60408901611bef565b9450606088013567ffffffffffffffff80821115611cea57600080fd5b611cf68b838c01611c52565b909650945060808a0135915080821115611d0f57600080fd5b50611d1c8a828b01611c52565b989b979a50959850939692959293505050565b60ff84168152826020820152606060408201526000611d516060830184611b8b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611d9b57611d9b611d5a565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115611de257611de2611d5a565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611e3157611e31611de7565b92169190910692915050565b60008451611e4f818460208901611b5b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611e8b816001850160208a01611b5b565b60019201918201528351611ea6816002840160208801611b5b565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015611edc57611edc611d5a565b039392505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611f51604083018688611ef4565b8281036020840152611f64818587611ef4565b979650505050505050565b600060208284031215611f8157600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611fb957611fb9611d5a565b5060010190565b600082611fcf57611fcf611de7565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261201257612012611de7
565b50069056fea164736f6c634300080f000a"
,
}
// FaultDisputeGameABI is the input ABI used to generate the binding from.
...
...
op-bindings/bindings/faultdisputegame_more.go
View file @
a1371125
...
...
@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
FaultDisputeGameStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
gameStart
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_userDefinedValueType(Timestamp)101
1
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
status
\"
,
\"
offset
\"
:8,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_enum(GameStatus)1006
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
bondManager
\"
,
\"
offset
\"
:9,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_contract(IBondManager)1005
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
claimData
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_struct(ClaimData)38805_storage)dyn_storage
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
claims
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)
\"
}],
\"
types
\"
:{
\"
t_array(t_struct(ClaimData)38805_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct IFaultDisputeGame.ClaimData[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
base
\"
:
\"
t_struct(ClaimData)38805_storage
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_contract(IBondManager)1005
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
contract IBondManager
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_enum(GameStatus)1006
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
enum GameStatus
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_userDefinedValueType(ClaimHash)1008,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(ClaimHash =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_userDefinedValueType(ClaimHash)1008
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_struct(ClaimData)38805_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct IFaultDisputeGame.ClaimData
\"
,
\"
numberOfBytes
\"
:
\"
96
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
},
\"
t_userDefinedValueType(Claim)1007
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Claim
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_userDefinedValueType(ClaimHash)1008
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
ClaimHash
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_userDefinedValueType(Clock)1009
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Clock
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_userDefinedValueType(Position)1010
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Position
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_userDefinedValueType(Timestamp)1011
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Timestamp
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
}}}"
const
FaultDisputeGameStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
gameStart
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_userDefinedValueType(Timestamp)101
2
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
status
\"
,
\"
offset
\"
:8,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_enum(GameStatus)1006
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
bondManager
\"
,
\"
offset
\"
:9,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_contract(IBondManager)1005
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
claimData
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_struct(ClaimData)1007_storage)dyn_storage
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/dispute/FaultDisputeGame.sol:FaultDisputeGame
\"
,
\"
label
\"
:
\"
claims
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_mapping(t_userDefinedValueType(ClaimHash)1009,t_bool)
\"
}],
\"
types
\"
:{
\"
t_array(t_struct(ClaimData)1007_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct IFaultDisputeGame.ClaimData[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
base
\"
:
\"
t_struct(ClaimData)1007_storage
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_contract(IBondManager)1005
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
contract IBondManager
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_enum(GameStatus)1006
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
enum GameStatus
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_mapping(t_userDefinedValueType(ClaimHash)1009,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(ClaimHash =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_userDefinedValueType(ClaimHash)1009
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_struct(ClaimData)1007_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct IFaultDisputeGame.ClaimData
\"
,
\"
numberOfBytes
\"
:
\"
96
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
},
\"
t_userDefinedValueType(Claim)1008
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Claim
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_userDefinedValueType(ClaimHash)1009
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
ClaimHash
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_userDefinedValueType(Clock)1010
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Clock
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_userDefinedValueType(Position)1011
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Position
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_userDefinedValueType(Timestamp)1012
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
Timestamp
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
}}}"
var
FaultDisputeGameStorageLayout
=
new
(
solc
.
StorageLayout
)
var
FaultDisputeGameDeployedBin
=
"0x60806040526004361061016a5760003560e01c80638129fc1c116100cb578063bcef3b551161007f578063cf09e0d011610059578063cf09e0d01461049c578063e4c290c4146104bb578063fa24f743146104db57600080fd5b8063bcef3b55146103e8578063c55cd0c714610425578063c6f0308c1461043857600080fd5b80638b85902b116100b05780638b85902b146103585780639293129814610398578063bbdc02db146103cc57600080fd5b80638129fc1c1461032e5780638980e0cc1461034357600080fd5b8063363cc4271161012257806354fd4d501161010757806354fd4d50146102e4578063609d333414610306578063632247ea1461031b57600080fd5b8063363cc427146102515780634778efe8146102b057600080fd5b80632810e1d6116101535780632810e1d6146101ed5780633218b99d1461020257806335fef5671461023c57600080fd5b8063200d2ed21461016f578063266198f9146101ab575b600080fd5b34801561017b57600080fd5b506000546101959068010000000000000000900460ff1681565b6040516101a29190611
9ff565b60405180910390f35b3480156101b757600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101a2565b3480156101f957600080fd5b506101956104ff565b34801561020e57600080fd5b506000546102239067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a2565b61024f61024a366004611a40565b6107fd565b005b34801561025d57600080fd5b5060005461028b906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a2565b3480156102bc57600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102f057600080fd5b506102f961080d565b6040516101a29190611adc565b34801561031257600080fd5b506102f96108b0565b61024f610329366004611b0b565b6108c2565b34801561033a57600080fd5b5061024f610e7c565b34801561034f57600080fd5b506001546101df565b34801561036457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101df565b3480156103a457600080fd5b5061028b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d857600080fd5b50604051600081526020016101a2565b3480156103f457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101df565b61024f610433366004611a40565b610fbd565b34801561044457600080fd5b50610458610453366004611b40565b610fc9565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101a2565b3480156104a857600080fd5b5060005467ffffffffffffffff16610223565b3480156104c757600080fd5b5061024f6104d6366004611ba2565b61103a565b3480156104e757600080fd5b506104f06115b3565b6040516101a293929190611c36565b60008060005468010000000000000000900460ff166002811115610525576105256119d0565b1461055c576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805460009161056c91611c90565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff81101561066a576000600182815481106105a6576105a6611ca7565b60009182526020909120600390910201600281015481547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff94909401939192506fffffffffffffffffffffffffffffffff1690640100000000900460ff1615610610575050610581565b600061064e6fffffffffffffffffffffffffffffffff83167f00000000000000000000000000000000000000000000000000000000000000006115f1565b905084811015610662578094508360010195505b505050610581565b50600261072f6001848154811061068357610683611ca7565b60009182526020909120600260039092020101546fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6107399190611d05565b67ffffffffffffffff1615801561076057506fffffffffffffffffffffffffffffffff8114155b1561076e5760029250610773565b600192505b600080548491907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000008360028111156107b8576107b86119d0565b02179055508260028111156107cf576107cf6119d0565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505090565b610809828260006108c2565b5050565b60606108387f00000000000000000000000000000000000000000000000000000000000000006116a6565b6108617f00000000000000000000000000000000000000000000000000000000000000006116a6565b61088a7f00000000000000000000000000000000000000000000000000000000000000006116a6565b60405160200161089c93929190611d2c565b604051602081830303815290604052905090565b60606108bd6020806117e3565b905090565b6000805468010000000000000000900460ff1660028111156108e6576108e66119d0565b1461091d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610929575080155b15610960576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001848154811061097557610975611ca7565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610a1057610a10611ca7565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610a7a906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610b39826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b7b576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610bdb576001836000015163ffffffff1681548110610baa57610baa611ca7565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c14846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c289190611da2565b610c329190611c90565b905062049d4067ffffffffffffffff82161115610c7b576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610c9c888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610ce8576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600191908101610f017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b610809828260016108c2565b60018181548110610fd957600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff16600281111561105e5761105e6119d0565b14611095576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600187815481106110aa576110aa611ca7565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506111097f00000000000000000000000000000000000000000000000000000000000000006001611da2565b6111a5826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146111e6576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611204836fffffffffffffffffffffffffffffffff1661187a565b67ffffffffffffffff16600003611264577f0000000000000000000000000000000000000000000000000000000000000000915060018b8154811061124b5761124b611ca7565b9060005260206000209060030201600101549050611484565b6000808b156112e65760018e8154811061128057611280611ca7565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16915060018e815481106112c3576112c3611ca7565b906000526020600020906003020160010154935085905086600101549250611375565b600287015460018089015481549096506fffffffffffffffffffffffffffffffff9092169350908f90811061131d5761131d611ca7565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16905060018e8154811061136057611360611ca7565b90600052602060002090600302016001015492505b60016113b36fffffffffffffffffffffffffffffffff83167f0000000000000000000000000000000000000000000000000000000000000000611920565b6113bd9190611dba565b6fffffffffffffffffffffffffffffffff166114147f0000000000000000000000000000000000000000000000000000000000000000846fffffffffffffffffffffffffffffffff1661192090919063ffffffff16565b6fffffffffffffffffffffffffffffffff1614158061144a5750838b8b60405161143f929190611deb565b604051809103902014155b15611481576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b6040517ff8e0cb96000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f8e0cb96906114fe908d908d908d908d90600401611e44565b6020604051808303816000875af115801561151d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115419190611e76565b03611578576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000017909255505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560606115ea6108b0565b9050909192565b60008061167e847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b6060816000036116e957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561171357806116fd81611e8f565b915061170c9050600a83611ec7565b91506116ed565b60008167ffffffffffffffff81111561172e5761172e611edb565b6040519080825280601f01601f191660200182016040528015611758576020820181803683370190505b5090505b84156117db5761176d600183611c90565b915061177a600a86611f0a565b611785906030611da2565b60f81b81838151811061179a5761179a611ca7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506117d4600a86611ec7565b945061175c565b949350505050565b6060600061181a84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611da2565b90508267ffffffffffffffff1667ffffffffffffffff81111561183f5761183f611edb565b6040519080825280601f01601f191660200182016040528015611869576020820181803683370190505b509150828160208401375092915050565b600080611907837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806119ad847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b60005b83811015611a7d578181015183820152602001611a65565b83811115611a8c576000848401525b50505050565b60008151808452611aaa816020860160208601611a62565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611aef6020830184611a92565b9392505050565b80358015158114611b0657600080fd5b919050565b600080600060608486031215611b2057600080fd5b8335925060208401359150611b3760408501611af6565b90509250925092565b600060208284031215611b5257600080fd5b5035919050565b60008083601f840112611b6b57600080fd5b50813567ffffffffffffffff811115611b8357600080fd5b602083019150836020828501011115611b9b57600080fd5b9250929050565b600080600080600080600060a0888a031215611bbd57600080fd5b8735965060208801359550611bd460408901611af6565b9450606088013567ffffffffffffffff80821115611bf157600080fd5b611bfd8b838c01611b59565b909650945060808a0135915080821115611c1657600080fd5b50611c238a828b01611b59565b989b979a50959850939692959293505050565b60ff84168152826020820152606060408201526000611c586060830184611a92565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611ca257611ca2611c61565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611d2057611d20611cd6565b92169190910692915050565b60008451611d3e818460208901611a62565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611d7a816001850160208a01611a62565b60019201918201528351611d95816002840160208801611a62565b0160020195945050505050565b60008219821115611db557611db5611c61565b500190565b60006fffffffffffffffffffffffffffffffff83811690831681811015611de357611de3611c61565b039392505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611e58604083018688611dfb565b8281036020840152611e6b818587611dfb565b979650505050505050565b600060208284031215611e8857600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ec057611ec0611c61565b5060010190565b600082611ed657611ed6611cd6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082611f1957611f19611cd6
565b50069056fea164736f6c634300080f000a"
var
FaultDisputeGameDeployedBin
=
"0x60806040526004361061016a5760003560e01c80638129fc1c116100cb578063bcef3b551161007f578063cf09e0d011610059578063cf09e0d01461049c578063e4c290c4146104bb578063fa24f743146104db57600080fd5b8063bcef3b55146103e8578063c55cd0c714610425578063c6f0308c1461043857600080fd5b80638b85902b116100b05780638b85902b146103585780639293129814610398578063bbdc02db146103cc57600080fd5b80638129fc1c1461032e5780638980e0cc1461034357600080fd5b8063363cc4271161012257806354fd4d501161010757806354fd4d50146102e4578063609d333414610306578063632247ea1461031b57600080fd5b8063363cc427146102515780634778efe8146102b057600080fd5b80632810e1d6116101535780632810e1d6146101ed5780633218b99d1461020257806335fef5671461023c57600080fd5b8063200d2ed21461016f578063266198f9146101ab575b600080fd5b34801561017b57600080fd5b506000546101959068010000000000000000900460ff1681565b6040516101a29190611
af8565b60405180910390f35b3480156101b757600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101a2565b3480156101f957600080fd5b506101956104ff565b34801561020e57600080fd5b506000546102239067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a2565b61024f61024a366004611b39565b6108f6565b005b34801561025d57600080fd5b5060005461028b906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101a2565b3480156102bc57600080fd5b506101df7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102f057600080fd5b506102f9610906565b6040516101a29190611bd5565b34801561031257600080fd5b506102f96109a9565b61024f610329366004611c04565b6109bb565b34801561033a57600080fd5b5061024f610f75565b34801561034f57600080fd5b506001546101df565b34801561036457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101df565b3480156103a457600080fd5b5061028b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d857600080fd5b50604051600081526020016101a2565b3480156103f457600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101df565b61024f610433366004611b39565b6110b6565b34801561044457600080fd5b50610458610453366004611c39565b6110c2565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101a2565b3480156104a857600080fd5b5060005467ffffffffffffffff16610223565b3480156104c757600080fd5b5061024f6104d6366004611c9b565b611133565b3480156104e757600080fd5b506104f06116ac565b6040516101a293929190611d2f565b60008060005468010000000000000000900460ff16600281111561052557610525611ac9565b1461055c576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805460009161056c91611d89565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610656576000600182815481106105a6576105a6611da0565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff64010000000090910416156105f75750610581565b600281015460009061063b906fffffffffffffffffffffffffffffffff167f00000000000000000000000000000000000000000000000000000000000000006116ea565b90508381101561064f578093508260010194505b5050610581565b5060006001838154811061066c5761066c611da0565b600091825260208220600390910201805490925063ffffffff908116919082146106d657600182815481106106a3576106a3611da0565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610702565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b905062049d4061071c67ffffffffffffffff831642611d89565b610738836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff1661074c9190611dcf565b11610783576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600283810154610825906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61082f9190611e16565b67ffffffffffffffff1615801561085657506fffffffffffffffffffffffffffffffff8414155b156108645760029550610869565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000008360028111156108ae576108ae611ac9565b02179055508560028111156108c5576108c5611ac9565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b610902828260006109bb565b5050565b60606109317f000000000000000000000000000000000000000000000000000000000000000061179f565b61095a7f000000000000000000000000000000000000000000000000000000000000000061179f565b6109837f000000000000000000000000000000000000000000000000000000000000000061179f565b60405160200161099593929190611e3d565b604051602081830303815290604052905090565b60606109b66020806118dc565b905090565b6000805468010000000000000000900460ff1660028111156109df576109df611ac9565b14610a16576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610a22575080155b15610a59576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018481548110610a6e57610a6e611da0565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610b0957610b09611da0565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610b73906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610c32826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610c74576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610cd4576001836000015163ffffffff1681548110610ca357610ca3611da0565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610d0d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d219190611dcf565b610d2b9190611d89565b905062049d4067ffffffffffffffff82161115610d74576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610d95888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610de1576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600191908101610ffa7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b610902828260016109bb565b600181815481106110d257600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff16600281111561115757611157611ac9565b1461118e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600187815481106111a3576111a3611da0565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112027f00000000000000000000000000000000000000000000000000000000000000006001611dcf565b61129e826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112df576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806112fd836fffffffffffffffffffffffffffffffff16611973565b67ffffffffffffffff1660000361135d577f0000000000000000000000000000000000000000000000000000000000000000915060018b8154811061134457611344611da0565b906000526020600020906003020160010154905061157d565b6000808b156113df5760018e8154811061137957611379611da0565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16915060018e815481106113bc576113bc611da0565b90600052602060002090600302016001015493508590508660010154925061146e565b600287015460018089015481549096506fffffffffffffffffffffffffffffffff9092169350908f90811061141657611416611da0565b906000526020600020906003020160020160009054906101000a90046fffffffffffffffffffffffffffffffff16905060018e8154811061145957611459611da0565b90600052602060002090600302016001015492505b60016114ac6fffffffffffffffffffffffffffffffff83167f0000000000000000000000000000000000000000000000000000000000000000611a19565b6114b69190611eb3565b6fffffffffffffffffffffffffffffffff1661150d7f0000000000000000000000000000000000000000000000000000000000000000846fffffffffffffffffffffffffffffffff16611a1990919063ffffffff16565b6fffffffffffffffffffffffffffffffff161415806115435750838b8b604051611538929190611ee4565b604051809103902014155b1561157a576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b6040517ff8e0cb96000000000000000000000000000000000000000000000000000000008152819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063f8e0cb96906115f7908d908d908d908d90600401611f3d565b6020604051808303816000875af1158015611616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163a9190611f6f565b03611671576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000017909255505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560606116e36109a9565b9050909192565b600080611777847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b6060816000036117e257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561180c57806117f681611f88565b91506118059050600a83611fc0565b91506117e6565b60008167ffffffffffffffff81111561182757611827611fd4565b6040519080825280601f01601f191660200182016040528015611851576020820181803683370190505b5090505b84156118d457611866600183611d89565b9150611873600a86612003565b61187e906030611dcf565b60f81b81838151811061189357611893611da0565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506118cd600a86611fc0565b9450611855565b949350505050565b6060600061191384367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611dcf565b90508267ffffffffffffffff1667ffffffffffffffff81111561193857611938611fd4565b6040519080825280601f01601f191660200182016040528015611962576020820181803683370190505b509150828160208401375092915050565b600080611a00837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080611aa6847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611b33577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611b4c57600080fd5b50508035926020909101359150565b60005b83811015611b76578181015183820152602001611b5e565b83811115611b85576000848401525b50505050565b60008151808452611ba3816020860160208601611b5b565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611be86020830184611b8b565b9392505050565b80358015158114611bff57600080fd5b919050565b600080600060608486031215611c1957600080fd5b8335925060208401359150611c3060408501611bef565b90509250925092565b600060208284031215611c4b57600080fd5b5035919050565b60008083601f840112611c6457600080fd5b50813567ffffffffffffffff811115611c7c57600080fd5b602083019150836020828501011115611c9457600080fd5b9250929050565b600080600080600080600060a0888a031215611cb657600080fd5b8735965060208801359550611ccd60408901611bef565b9450606088013567ffffffffffffffff80821115611cea57600080fd5b611cf68b838c01611c52565b909650945060808a0135915080821115611d0f57600080fd5b50611d1c8a828b01611c52565b989b979a50959850939692959293505050565b60ff84168152826020820152606060408201526000611d516060830184611b8b565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611d9b57611d9b611d5a565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115611de257611de2611d5a565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611e3157611e31611de7565b92169190910692915050565b60008451611e4f818460208901611b5b565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611e8b816001850160208a01611b5b565b60019201918201528351611ea6816002840160208801611b5b565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015611edc57611edc611d5a565b039392505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611f51604083018688611ef4565b8281036020840152611f64818587611ef4565b979650505050505050565b600060208284031215611f8157600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611fb957611fb9611d5a565b5060010190565b600082611fcf57611fcf611de7565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261201257612012611de7
565b50069056fea164736f6c634300080f000a"
func
init
()
{
if
err
:=
json
.
Unmarshal
([]
byte
(
FaultDisputeGameStorageLayoutJSON
),
FaultDisputeGameStorageLayout
);
err
!=
nil
{
...
...
op-bindings/bindings/l2outputoracle_more.go
View file @
a1371125
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
L2OutputOracleStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
startingBlockNumber
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
startingTimestamp
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
l2Outputs
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_array(t_struct(OutputProposal)
42701_storage)dyn_storage
\"
}],
\"
types
\"
:{
\"
t_array(t_struct(OutputProposal)42701_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct Types.OutputProposal[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
base
\"
:
\"
t_struct(OutputProposal)42701_storage
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(OutputProposal)42701
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct Types.OutputProposal
\"
,
\"
numberOfBytes
\"
:
\"
64
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
L2OutputOracleStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
startingBlockNumber
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
startingTimestamp
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/L2OutputOracle.sol:L2OutputOracle
\"
,
\"
label
\"
:
\"
l2Outputs
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
3
\"
,
\"
type
\"
:
\"
t_array(t_struct(OutputProposal)
1005_storage)dyn_storage
\"
}],
\"
types
\"
:{
\"
t_array(t_struct(OutputProposal)1005_storage)dyn_storage
\"
:{
\"
encoding
\"
:
\"
dynamic_array
\"
,
\"
label
\"
:
\"
struct Types.OutputProposal[]
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
base
\"
:
\"
t_struct(OutputProposal)1005_storage
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(OutputProposal)1005
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct Types.OutputProposal
\"
,
\"
numberOfBytes
\"
:
\"
64
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
L2OutputOracleStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/optimismportal_more.go
View file @
a1371125
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
OptimismPortalStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
params
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_struct(ResourceParams)
34941_storage
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_array(t_uint256)48_storage
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
l2Sender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
50
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1005,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
finalizedWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:1006,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
provenWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)
\"
},{
\"
astId
\"
:1007,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
53
\"
,
\"
type
\"
:
\"
t_bool
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)48_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[48]
\"
,
\"
numberOfBytes
\"
:
\"
1536
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_mapping(t_bytes32,t_struct(ProvenWithdrawal)34280_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
struct OptimismPortal.ProvenWithdrawal)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_struct(ProvenWithdrawal)34280_storage
\"
},
\"
t_struct(ProvenWithdrawal)34280_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct OptimismPortal.ProvenWithdrawal
\"
,
\"
numberOfBytes
\"
:
\"
64
\"
},
\"
t_struct(ResourceParams)34941
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceParams
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
OptimismPortalStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
params
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_struct(ResourceParams)
1009_storage
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
2
\"
,
\"
type
\"
:
\"
t_array(t_uint256)48_storage
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
l2Sender
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
50
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1005,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
finalizedWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_bool)
\"
},{
\"
astId
\"
:1006,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
provenWithdrawals
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1008_storage)
\"
},{
\"
astId
\"
:1007,
\"
contract
\"
:
\"
contracts/L1/OptimismPortal.sol:OptimismPortal
\"
,
\"
label
\"
:
\"
paused
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
53
\"
,
\"
type
\"
:
\"
t_bool
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)48_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[48]
\"
,
\"
numberOfBytes
\"
:
\"
1536
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_mapping(t_bytes32,t_bool)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
bool)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_bool
\"
},
\"
t_mapping(t_bytes32,t_struct(ProvenWithdrawal)1008_storage)
\"
:{
\"
encoding
\"
:
\"
mapping
\"
,
\"
label
\"
:
\"
mapping(bytes32 =
\u003e
struct OptimismPortal.ProvenWithdrawal)
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
,
\"
key
\"
:
\"
t_bytes32
\"
,
\"
value
\"
:
\"
t_struct(ProvenWithdrawal)1008_storage
\"
},
\"
t_struct(ProvenWithdrawal)1008_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct OptimismPortal.ProvenWithdrawal
\"
,
\"
numberOfBytes
\"
:
\"
64
\"
},
\"
t_struct(ResourceParams)1009
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceParams
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
OptimismPortalStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-bindings/bindings/systemconfig_more.go
View file @
a1371125
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const
SystemConfigStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:1005,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
overhead
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1006,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
scalar
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1007,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
batcherHash
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
103
\"
,
\"
type
\"
:
\"
t_bytes32
\"
},{
\"
astId
\"
:1008,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
gasLimit
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
104
\"
,
\"
type
\"
:
\"
t_uint64
\"
},{
\"
astId
\"
:1009,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_resourceConfig
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
105
\"
,
\"
type
\"
:
\"
t_struct(ResourceConfig)
34954_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(ResourceConfig)34954
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceConfig
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
const
SystemConfigStorageLayoutJSON
=
"{
\"
storage
\"
:[{
\"
astId
\"
:1000,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_initialized
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_uint8
\"
},{
\"
astId
\"
:1001,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_initializing
\"
,
\"
offset
\"
:1,
\"
slot
\"
:
\"
0
\"
,
\"
type
\"
:
\"
t_bool
\"
},{
\"
astId
\"
:1002,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
1
\"
,
\"
type
\"
:
\"
t_array(t_uint256)50_storage
\"
},{
\"
astId
\"
:1003,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_owner
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
51
\"
,
\"
type
\"
:
\"
t_address
\"
},{
\"
astId
\"
:1004,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
__gap
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
52
\"
,
\"
type
\"
:
\"
t_array(t_uint256)49_storage
\"
},{
\"
astId
\"
:1005,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
overhead
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
101
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1006,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
scalar
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
102
\"
,
\"
type
\"
:
\"
t_uint256
\"
},{
\"
astId
\"
:1007,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
batcherHash
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
103
\"
,
\"
type
\"
:
\"
t_bytes32
\"
},{
\"
astId
\"
:1008,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
gasLimit
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
104
\"
,
\"
type
\"
:
\"
t_uint64
\"
},{
\"
astId
\"
:1009,
\"
contract
\"
:
\"
contracts/L1/SystemConfig.sol:SystemConfig
\"
,
\"
label
\"
:
\"
_resourceConfig
\"
,
\"
offset
\"
:0,
\"
slot
\"
:
\"
105
\"
,
\"
type
\"
:
\"
t_struct(ResourceConfig)
1010_storage
\"
}],
\"
types
\"
:{
\"
t_address
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
address
\"
,
\"
numberOfBytes
\"
:
\"
20
\"
},
\"
t_array(t_uint256)49_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[49]
\"
,
\"
numberOfBytes
\"
:
\"
1568
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_array(t_uint256)50_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256[50]
\"
,
\"
numberOfBytes
\"
:
\"
1600
\"
,
\"
base
\"
:
\"
t_uint256
\"
},
\"
t_bool
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bool
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
},
\"
t_bytes32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
bytes32
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_struct(ResourceConfig)1010
_storage
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
struct ResourceMetering.ResourceConfig
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint128
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint128
\"
,
\"
numberOfBytes
\"
:
\"
16
\"
},
\"
t_uint256
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint256
\"
,
\"
numberOfBytes
\"
:
\"
32
\"
},
\"
t_uint32
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint32
\"
,
\"
numberOfBytes
\"
:
\"
4
\"
},
\"
t_uint64
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint64
\"
,
\"
numberOfBytes
\"
:
\"
8
\"
},
\"
t_uint8
\"
:{
\"
encoding
\"
:
\"
inplace
\"
,
\"
label
\"
:
\"
uint8
\"
,
\"
numberOfBytes
\"
:
\"
1
\"
}}}"
var
SystemConfigStorageLayout
=
new
(
solc
.
StorageLayout
)
...
...
op-e2e/e2eutils/waits.go
View file @
a1371125
...
...
@@ -78,3 +78,24 @@ func WaitFor(ctx context.Context, rate time.Duration, cb func() (bool, error)) e
}
}
}
func
WaitAndGet
[
T
interface
{}](
ctx
context
.
Context
,
pollRate
time
.
Duration
,
get
func
()
(
T
,
error
),
predicate
func
(
T
)
bool
)
(
T
,
error
)
{
tick
:=
time
.
NewTicker
(
pollRate
)
defer
tick
.
Stop
()
var
nilT
T
for
{
select
{
case
<-
ctx
.
Done
()
:
return
nilT
,
ctx
.
Err
()
case
<-
tick
.
C
:
val
,
err
:=
get
()
if
err
!=
nil
{
return
nilT
,
err
}
if
predicate
(
val
)
{
return
val
,
nil
}
}
}
}
op-e2e/system_tob_test.go
View file @
a1371125
...
...
@@ -511,7 +511,7 @@ func TestMixedWithdrawalValidity(t *testing.T) {
// Wait for the finalization period, then we can finalize this withdrawal.
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
40
*
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
blockNumber
,
err
:=
withdrawals
.
WaitFor
FinalizationPerio
d
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
receipt
.
BlockNumber
)
blockNumber
,
err
:=
withdrawals
.
WaitFor
OutputRootPublishe
d
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
receipt
.
BlockNumber
)
cancel
()
require
.
Nil
(
t
,
err
)
...
...
@@ -642,7 +642,7 @@ func TestMixedWithdrawalValidity(t *testing.T) {
// Wait for finalization and then create the Finalized Withdrawal Transaction
ctx
,
cancel
=
context
.
WithTimeout
(
context
.
Background
(),
45
*
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
defer
cancel
()
_
,
err
=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
header
.
Number
)
err
=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
header
.
Number
)
require
.
Nil
(
t
,
err
)
// Finalize withdrawal
...
...
op-e2e/withdrawal_helper.go
View file @
a1371125
...
...
@@ -79,7 +79,7 @@ func defaultWithdrawalTxOpts() *WithdrawalTxOpts {
func
ProveAndFinalizeWithdrawal
(
t
*
testing
.
T
,
cfg
SystemConfig
,
l1Client
*
ethclient
.
Client
,
l2Node
*
node
.
Node
,
ethPrivKey
*
ecdsa
.
PrivateKey
,
l2WithdrawalReceipt
*
types
.
Receipt
)
(
*
types
.
Receipt
,
*
types
.
Receipt
)
{
params
,
proveReceipt
:=
ProveWithdrawal
(
t
,
cfg
,
l1Client
,
l2Node
,
ethPrivKey
,
l2WithdrawalReceipt
)
finalizeReceipt
:=
FinalizeWithdrawal
(
t
,
cfg
,
l1Client
,
ethPrivKey
,
l2Withdrawal
Receipt
,
params
)
finalizeReceipt
:=
FinalizeWithdrawal
(
t
,
cfg
,
l1Client
,
ethPrivKey
,
prove
Receipt
,
params
)
return
proveReceipt
,
finalizeReceipt
}
...
...
@@ -87,7 +87,8 @@ func ProveWithdrawal(t *testing.T, cfg SystemConfig, l1Client *ethclient.Client,
// Get l2BlockNumber for proof generation
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
40
*
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
defer
cancel
()
blockNumber
,
err
:=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
l2WithdrawalReceipt
.
BlockNumber
)
blockNumber
,
err
:=
withdrawals
.
WaitForOutputRootPublished
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
l2WithdrawalReceipt
.
BlockNumber
)
require
.
Nil
(
t
,
err
)
rpcClient
,
err
:=
rpc
.
Dial
(
l2Node
.
WSEndpoint
())
...
...
@@ -142,7 +143,7 @@ func FinalizeWithdrawal(t *testing.T, cfg SystemConfig, l1Client *ethclient.Clie
// Wait for finalization and then create the Finalized Withdrawal Transaction
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
30
*
time
.
Duration
(
cfg
.
DeployConfig
.
L1BlockTime
)
*
time
.
Second
)
defer
cancel
()
_
,
err
:=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
withdrawalReceipt
.
BlockNumber
)
err
:=
withdrawals
.
WaitForFinalizationPeriod
(
ctx
,
l1Client
,
predeploys
.
DevOptimismPortalAddr
,
withdrawalReceipt
.
BlockNumber
)
require
.
Nil
(
t
,
err
)
opts
,
err
:=
bind
.
NewKeyedTransactorWithChainID
(
privKey
,
cfg
.
L1ChainIDBig
())
...
...
op-node/withdrawals/utils.go
View file @
a1371125
...
...
@@ -8,6 +8,7 @@ import (
"math/big"
"time"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
...
...
@@ -22,103 +23,74 @@ import (
var
MessagePassedTopic
=
crypto
.
Keccak256Hash
([]
byte
(
"MessagePassed(uint256,address,address,uint256,uint256,bytes,bytes32)"
))
// WaitForFinalizationPeriod waits until there is OutputProof for an L2 block number larger than the supplied l2BlockNumber
// and that the output is finalized.
// This functions polls and can block for a very long time if used on mainnet.
// This returns the block number to use for the proof generation.
func
WaitForFinalizationPeriod
(
ctx
context
.
Context
,
client
*
ethclient
.
Client
,
portalAddr
common
.
Address
,
l2BlockNumber
*
big
.
Int
)
(
uint64
,
error
)
{
// WaitForOutputRootPublished waits until there is an output published for an L2 block number larger than the supplied l2BlockNumber
// This function polls and can block for a very long time if used on mainnet.
// This returns the block number to use for proof generation.
func
WaitForOutputRootPublished
(
ctx
context
.
Context
,
client
*
ethclient
.
Client
,
portalAddr
common
.
Address
,
l2BlockNumber
*
big
.
Int
)
(
uint64
,
error
)
{
l2BlockNumber
=
new
(
big
.
Int
)
.
Set
(
l2BlockNumber
)
// Don't clobber caller owned l2BlockNumber
opts
:=
&
bind
.
CallOpts
{
Context
:
ctx
}
portal
,
err
:=
bindings
.
NewOptimismPortalCaller
(
portalAddr
,
client
)
if
err
!=
nil
{
return
0
,
err
}
l2OOAddress
,
err
:=
portal
.
L2ORACLE
(
opts
)
l2OO
,
err
:=
createL2OOCaller
(
ctx
,
client
,
portalAddr
)
if
err
!=
nil
{
return
0
,
err
}
l2OO
,
err
:=
bindings
.
NewL2OutputOracleCaller
(
l2OOAddress
,
client
)
getL2BlockFromLatestOutput
:=
func
()
(
*
big
.
Int
,
error
)
{
return
l2OO
.
LatestBlockNumber
(
opts
)
}
outputBlockNum
,
err
:=
e2eutils
.
WaitAndGet
[
*
big
.
Int
](
ctx
,
time
.
Second
,
getL2BlockFromLatestOutput
,
func
(
latest
*
big
.
Int
)
bool
{
return
latest
.
Cmp
(
l2BlockNumber
)
>=
0
})
if
err
!=
nil
{
return
0
,
err
}
submissionInterval
,
err
:=
l2OO
.
SUBMISSIONINTERVAL
(
opts
)
return
outputBlockNum
.
Uint64
(),
nil
}
// WaitForFinalizationPeriod waits until the L1 chain has progressed far enough that l1ProvingBlockNum has completed
// the finalization period.
// This functions polls and can block for a very long time if used on mainnet.
func
WaitForFinalizationPeriod
(
ctx
context
.
Context
,
client
*
ethclient
.
Client
,
portalAddr
common
.
Address
,
l1ProvingBlockNum
*
big
.
Int
)
error
{
l1ProvingBlockNum
=
new
(
big
.
Int
)
.
Set
(
l1ProvingBlockNum
)
// Don't clobber caller owned l1ProvingBlockNum
opts
:=
&
bind
.
CallOpts
{
Context
:
ctx
}
// Load finalization period
l2OO
,
err
:=
createL2OOCaller
(
ctx
,
client
,
portalAddr
)
if
err
!=
nil
{
return
0
,
err
}
// Convert blockNumber to submission interval boundary
rem
:=
new
(
big
.
Int
)
l2BlockNumber
,
rem
=
l2BlockNumber
.
DivMod
(
l2BlockNumber
,
submissionInterval
,
rem
)
if
rem
.
Cmp
(
common
.
Big0
)
!=
0
{
l2BlockNumber
=
l2BlockNumber
.
Add
(
l2BlockNumber
,
common
.
Big1
)
return
fmt
.
Errorf
(
"create L2OOCaller: %w"
,
err
)
}
l2BlockNumber
=
l2BlockNumber
.
Mul
(
l2BlockNumber
,
submissionInterval
)
finalizationPeriod
,
err
:=
l2OO
.
FINALIZATIONPERIODSECONDS
(
opts
)
if
err
!=
nil
{
return
0
,
err
return
fmt
.
Errorf
(
"get finalization period: %w"
,
err
)
}
latest
,
err
:=
l2OO
.
LatestBlockNumber
(
opts
)
provingHeader
,
err
:=
client
.
HeaderByNumber
(
ctx
,
l1ProvingBlockNum
)
if
err
!=
nil
{
return
0
,
err
return
fmt
.
Errorf
(
"retrieve proving header: %w"
,
err
)
}
// Now poll for the output to be submitted on chain
var
ticker
*
time
.
Ticker
diff
:=
new
(
big
.
Int
)
.
Sub
(
l2BlockNumber
,
latest
)
if
diff
.
Cmp
(
big
.
NewInt
(
10
))
>
0
{
ticker
=
time
.
NewTicker
(
time
.
Minute
)
}
else
{
ticker
=
time
.
NewTicker
(
time
.
Second
)
}
loop
:
for
{
select
{
case
<-
ticker
.
C
:
latest
,
err
=
l2OO
.
LatestBlockNumber
(
opts
)
if
err
!=
nil
{
return
0
,
err
}
// Already passed the submitted block (likely just equals rather than >= here).
if
latest
.
Cmp
(
l2BlockNumber
)
>=
0
{
break
loop
}
case
<-
ctx
.
Done
()
:
return
0
,
ctx
.
Err
()
}
}
// Now wait for it to be finalized
output
,
err
:=
l2OO
.
GetL2OutputAfter
(
opts
,
l2BlockNumber
)
if
err
!=
nil
{
return
0
,
err
}
if
output
.
OutputRoot
==
[
32
]
byte
{}
{
return
0
,
errors
.
New
(
"empty output root. likely no proposal at timestamp"
)
}
targetTimestamp
:=
new
(
big
.
Int
)
.
Add
(
output
.
Timestamp
,
finalizationPeriod
)
targetTimestamp
:=
new
(
big
.
Int
)
.
Add
(
new
(
big
.
Int
)
.
SetUint64
(
provingHeader
.
Time
),
finalizationPeriod
)
targetTime
:=
time
.
Unix
(
targetTimestamp
.
Int64
(),
0
)
// Assume clock is relatively correct
time
.
Sleep
(
time
.
Until
(
targetTime
))
// Poll for L1 Block to have a time greater than the target time
ticker
=
time
.
NewTicker
(
time
.
Second
)
for
{
select
{
case
<-
ticker
.
C
:
header
,
err
:=
client
.
HeaderByNumber
(
ctx
,
nil
)
if
err
!=
nil
{
return
0
,
err
}
if
header
.
Time
>
targetTimestamp
.
Uint64
()
{
return
l2BlockNumber
.
Uint64
(),
nil
}
case
<-
ctx
.
Done
()
:
return
0
,
ctx
.
Err
()
return
e2eutils
.
WaitFor
(
ctx
,
time
.
Second
,
func
()
(
bool
,
error
)
{
header
,
err
:=
client
.
HeaderByNumber
(
ctx
,
nil
)
if
err
!=
nil
{
return
false
,
fmt
.
Errorf
(
"retrieve latest header: %w"
,
err
)
}
}
return
header
.
Time
>
targetTimestamp
.
Uint64
(),
nil
})
}
func
createL2OOCaller
(
ctx
context
.
Context
,
client
*
ethclient
.
Client
,
portalAddr
common
.
Address
)
(
*
bindings
.
L2OutputOracleCaller
,
error
)
{
portal
,
err
:=
bindings
.
NewOptimismPortalCaller
(
portalAddr
,
client
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"create OptimismPortalCaller: %w"
,
err
)
}
l2OOAddress
,
err
:=
portal
.
L2ORACLE
(
&
bind
.
CallOpts
{
Context
:
ctx
})
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"create L2ORACLE: %w"
,
err
)
}
return
bindings
.
NewL2OutputOracleCaller
(
l2OOAddress
,
client
)
}
type
ProofClient
interface
{
...
...
packages/contracts-bedrock/.gas-snapshot
View file @
a1371125
...
...
@@ -32,30 +32,32 @@ DisputeGameFactory_SetImplementation_Test:test_setImplementation_notOwner_revert
DisputeGameFactory_SetImplementation_Test:test_setImplementation_succeeds() (gas: 44243)
DisputeGameFactory_TransferOwnership_Test:test_transferOwnership_notOwner_reverts() (gas: 15950)
DisputeGameFactory_TransferOwnership_Test:test_transferOwnership_succeeds() (gas: 18642)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 498826)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 500705)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot:test_resolvesCorrectly_succeeds() (gas: 488169)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 497701)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 499580)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot:test_resolvesCorrectly_succeeds() (gas: 487044)
FaultDisputeGame_Test:test_defendRoot_invalidMove_reverts() (gas: 13294)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 502174)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 504053)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot:test_resolvesCorrectly_succeeds() (gas: 491517)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 500937)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 502816)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot:test_resolvesCorrectly_succeeds() (gas: 490280)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17426)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17917)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 8282)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17691)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17669)
FaultDisputeGame_Test:test_move_clockCorrectness_succeeds() (gas: 415981)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 26387)
FaultDisputeGame_Test:test_move_defendRoot_reverts() (gas: 13360)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 103230)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 408100)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 109
23
)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 109
68
)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 24655)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 221201)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 9679)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 106068)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 23692)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 391875)
FaultDisputeGame_Test:test_move_simpleAttack_succeeds() (gas: 107344)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 224789)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 9657)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 109754)
FaultDisputeGame_Test:test_resolve_rootUncontestedClockNotExpired_succeeds() (gas: 21422)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 27256)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 395447)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 8181)
FaultDisputeGame_Test:test_simpleAttack_succeeds() (gas: 107388)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352113)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2950320)
...
...
packages/contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
View file @
a1371125
...
...
@@ -34,7 +34,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
IBigStepper public immutable VM;
/// @notice The duration of the game.
/// @dev TODO: Account for resolution buffer. (?)
Duration internal constant GAME_DURATION = Duration.wrap(7 days);
/// @notice The root claim's position is always at gindex 1.
...
...
@@ -275,10 +274,8 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
/// @inheritdoc IDisputeGame
function resolve() external returns (GameStatus status_) {
// TODO: Do not allow resolution before clocks run out.
// If the game is not in progress, it cannot be resolved.
if (status != GameStatus.IN_PROGRESS) {
// If the game is not in progress, it cannot be resolved.
revert GameNotInProgress();
}
...
...
@@ -298,7 +295,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
// If the claim is not a dangling node above the bottom of the tree,
// we can skip over it. These nodes are not relevant to the game resolution.
Position claimPos = claim.position;
if (claim.countered) {
continue;
}
...
...
@@ -306,7 +302,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
// If the claim is a dangling node, we can check if it is the left-most
// dangling node we've come across so far. If it is, we can update the
// left-most trace index.
uint256 traceIndex = claim
Pos
.traceIndex(MAX_GAME_DEPTH);
uint256 traceIndex = claim
.position
.traceIndex(MAX_GAME_DEPTH);
if (traceIndex < leftMostTraceIndex) {
leftMostTraceIndex = traceIndex;
unchecked {
...
...
@@ -315,12 +311,29 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
}
}
// Create a reference to the left most uncontested claim and its parent.
ClaimData storage leftMostUncontested = claimData[leftMostIndex];
// If the left most uncontested claim's parent has not expired their clock, the game
// cannot be resolved. If the left most uncontested claim is the root, no nodes qualified,
// and we check if 3.5 days has passed since the root claim's creation.
uint256 parentIndex = leftMostUncontested.parentIndex;
Clock opposingClock = parentIndex == type(uint32).max
? leftMostUncontested.clock
: claimData[parentIndex].clock;
if (
Duration.unwrap(opposingClock.duration()) +
(block.timestamp - Timestamp.unwrap(opposingClock.timestamp())) <=
Duration.unwrap(GAME_DURATION) >> 1
) {
revert ClockNotExpired();
}
// If the left-most dangling node is at an even depth, the defender wins.
// Otherwise, the challenger wins and the root claim is deemed invalid.
if (
// slither-disable-next-line weak-prng
claimData[leftMostIndex].position.depth() % 2 == 0 &&
leftMostTraceIndex != type(uint128).max
leftMostUncontested.position.depth() % 2 == 0 && leftMostTraceIndex != type(uint128).max
) {
status_ = GameStatus.DEFENDER_WINS;
} else {
...
...
packages/contracts-bedrock/contracts/libraries/DisputeErrors.sol
View file @
a1371125
...
...
@@ -39,6 +39,9 @@ error GameNotInProgress();
/// @notice Thrown when a move is attempted to be made after the clock has timed out.
error ClockTimeExceeded();
/// @notice Thrown when the game is attempted to be resolved too early.
error ClockNotExpired();
/// @notice Thrown when a move is attempted to be made at or greater than the max depth of the game.
error GameDepthExceeded();
...
...
packages/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
View file @
a1371125
...
...
@@ -130,7 +130,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
/// @dev Tests that an attempt to defend the root claim reverts with the `CannotDefendRootClaim` error.
function test_
defendRoot_invalidMove
_reverts() public {
function test_
move_defendRoot
_reverts() public {
vm.expectRevert(CannotDefendRootClaim.selector);
gameProxy.defend(0, Claim.wrap(bytes32(uint256(5))));
}
...
...
@@ -175,6 +175,49 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
}
/// @notice Static unit test for the correctness of the chess clock incrementation.
function test_move_clockCorrectness_succeeds() public {
(, , , , Clock clock) = gameProxy.claimData(0);
assertEq(
Clock.unwrap(clock),
Clock.unwrap(LibClock.wrap(Duration.wrap(0), Timestamp.wrap(uint64(block.timestamp))))
);
Claim claim = Claim.wrap(bytes32(uint256(5)));
vm.warp(block.timestamp + 15);
gameProxy.attack(0, claim);
(, , , , clock) = gameProxy.claimData(1);
assertEq(
Clock.unwrap(clock),
Clock.unwrap(LibClock.wrap(Duration.wrap(15), Timestamp.wrap(uint64(block.timestamp))))
);
vm.warp(block.timestamp + 10);
gameProxy.attack(1, claim);
(, , , , clock) = gameProxy.claimData(2);
assertEq(
Clock.unwrap(clock),
Clock.unwrap(LibClock.wrap(Duration.wrap(10), Timestamp.wrap(uint64(block.timestamp))))
);
vm.warp(block.timestamp + 10);
gameProxy.attack(2, claim);
(, , , , clock) = gameProxy.claimData(3);
assertEq(
Clock.unwrap(clock),
Clock.unwrap(LibClock.wrap(Duration.wrap(25), Timestamp.wrap(uint64(block.timestamp))))
);
vm.warp(block.timestamp + 10);
gameProxy.attack(3, claim);
(, , , , clock) = gameProxy.claimData(4);
assertEq(
Clock.unwrap(clock),
Clock.unwrap(LibClock.wrap(Duration.wrap(20), Timestamp.wrap(uint64(block.timestamp))))
);
}
/// @dev Tests that an identical claim cannot be made twice. The duplicate claim attempt should
/// revert with the `ClaimAlreadyExists` error.
function test_move_duplicateClaim_reverts() public {
...
...
@@ -189,7 +232,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
}
/// @dev Static unit test for the correctness of an opening attack.
function test_simpleAttack_succeeds() public {
function test_
move_
simpleAttack_succeeds() public {
// Warp ahead 5 seconds.
vm.warp(block.timestamp + 5);
...
...
@@ -237,11 +280,19 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
/// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontested_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
GameStatus status = gameProxy.resolve();
assertEq(uint8(status), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.DEFENDER_WINS));
}
/// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontestedClockNotExpired_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours);
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolve();
}
/// @dev Static unit test asserting that resolve reverts when the game state is
/// not in progress.
function test_resolve_notInProgress_reverts() public {
...
...
@@ -263,6 +314,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
function test_resolve_rootContested_succeeds() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
GameStatus status = gameProxy.resolve();
assertEq(uint8(status), uint8(GameStatus.CHALLENGER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.CHALLENGER_WINS));
...
...
@@ -273,6 +326,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
GameStatus status = gameProxy.resolve();
assertEq(uint8(status), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.DEFENDER_WINS));
...
...
@@ -285,6 +340,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6))));
gameProxy.defend(1, Claim.wrap(bytes32(uint256(7))));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
GameStatus status = gameProxy.resolve();
assertEq(uint8(status), uint8(GameStatus.CHALLENGER_WINS));
assertEq(uint8(gameProxy.status()), uint8(GameStatus.CHALLENGER_WINS));
...
...
@@ -499,6 +556,9 @@ contract FaultDisputeGame_ResolvesCorrectly_IncorrectRoot is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the honest player challenged the root
// claim successfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
...
...
@@ -517,6 +577,9 @@ contract FaultDisputeGame_ResolvesCorrectly_CorrectRoot is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the dishonest player challenged the root
// claim unsuccessfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
...
...
@@ -535,6 +598,9 @@ contract FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2 is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the honest player challenged the root
// claim successfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
...
...
@@ -553,6 +619,9 @@ contract FaultDisputeGame_ResolvesCorrectly_CorrectRoot2 is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the dishonest player challenged the root
// claim unsuccessfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
...
...
@@ -571,6 +640,9 @@ contract FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3 is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the honest player challenged the root
// claim successfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
...
...
@@ -589,6 +661,9 @@ contract FaultDisputeGame_ResolvesCorrectly_CorrectRoot3 is OneVsOne_Arena {
// Play the game until a step is forced.
challenger.play(0);
// Warp ahead to expire the other player's clock.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve the game and assert that the dishonest player challenged the root
// claim unsuccessfully.
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
...
...
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