Documentation
¶
Index ¶
- type ArtifactBytecode
- type ArtifactJSON
- type Claim
- func (c *Claim) Attack(eoa *dsl.EOA, newClaim common.Hash) *Claim
- func (c *Claim) Claimant() common.Address
- func (c *Claim) Depth() uint64
- func (c *Claim) String() string
- func (c *Claim) Value() common.Hash
- func (c *Claim) VerifyNoCounterClaim()
- func (c *Claim) WaitForCounterClaim(ignoreClaims ...*Claim) *Claim
- type DisputeGameFactory
- func (f *DisputeGameFactory) Address() common.Address
- func (f *DisputeGameFactory) CreateHelperEOA(eoa *dsl.EOA) *GameHelperEOA
- func (f *DisputeGameFactory) GameAtIndex(idx int64) *FaultDisputeGame
- func (f *DisputeGameFactory) GameCount() int64
- func (f *DisputeGameFactory) StartSuperCannonGame(eoa *dsl.EOA, opts ...GameOpt) *SuperFaultDisputeGame
- func (f *DisputeGameFactory) WaitForGame() *FaultDisputeGame
- type FaultDisputeGame
- func (g *FaultDisputeGame) Attack(eoa *dsl.EOA, claimIdx uint64, newClaim common.Hash)
- func (g *FaultDisputeGame) ClaimAtIndex(claimIndex uint64) *Claim
- func (g *FaultDisputeGame) GameData() string
- func (g *FaultDisputeGame) L2SequenceNumber() *big.Int
- func (g *FaultDisputeGame) LogGameData()
- func (g *FaultDisputeGame) MaxDepth() challengerTypes.Depth
- func (g *FaultDisputeGame) PerformMoves(eoa *dsl.EOA, moves ...GameHelperMove) []*Claim
- func (g *FaultDisputeGame) RootClaim() *Claim
- func (g *FaultDisputeGame) SplitDepth() uint64
- type GameCfg
- type GameHelper
- func (gs *GameHelper) AuthEOA(eoa *dsl.EOA) *GameHelper
- func (gs *GameHelper) CreateGameWithClaims(eoa *dsl.EOA, factory *DisputeGameFactory, gameType challengerTypes.GameType, ...) common.Address
- func (gs *GameHelper) PerformMoves(eoa *dsl.EOA, game *FaultDisputeGame, moves []GameHelperMove) []*Claim
- type GameHelperEOA
- type GameHelperMove
- type GameOpt
- type SuperFaultDisputeGame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactBytecode ¶
type ArtifactBytecode struct {
Object string `json:"object"`
}
type ArtifactJSON ¶
type ArtifactJSON struct {
Bytecode ArtifactBytecode `json:"bytecode"`
ABI json.RawMessage `json:"abi"`
}
type Claim ¶
type Claim struct {
Index uint64
// contains filtered or unexported fields
}
func (*Claim) VerifyNoCounterClaim ¶
func (c *Claim) VerifyNoCounterClaim()
func (*Claim) WaitForCounterClaim ¶
WaitForCounterClaim waits for the claim to be countered by another claim being posted. Return the new claim that counters this claim.
type DisputeGameFactory ¶
type DisputeGameFactory struct {
// contains filtered or unexported fields
}
func NewDisputeGameFactory ¶
func (*DisputeGameFactory) Address ¶
func (f *DisputeGameFactory) Address() common.Address
func (*DisputeGameFactory) CreateHelperEOA ¶
func (f *DisputeGameFactory) CreateHelperEOA(eoa *dsl.EOA) *GameHelperEOA
func (*DisputeGameFactory) GameAtIndex ¶
func (f *DisputeGameFactory) GameAtIndex(idx int64) *FaultDisputeGame
func (*DisputeGameFactory) GameCount ¶
func (f *DisputeGameFactory) GameCount() int64
func (*DisputeGameFactory) StartSuperCannonGame ¶ added in v1.13.5
func (f *DisputeGameFactory) StartSuperCannonGame(eoa *dsl.EOA, opts ...GameOpt) *SuperFaultDisputeGame
func (*DisputeGameFactory) WaitForGame ¶
func (f *DisputeGameFactory) WaitForGame() *FaultDisputeGame
type FaultDisputeGame ¶
func NewFaultDisputeGame ¶
func NewFaultDisputeGame(t devtest.T, require *require.Assertions, addr common.Address, helperProvider gameHelperProvider, game *bindings.FaultDisputeGame) *FaultDisputeGame
func (*FaultDisputeGame) ClaimAtIndex ¶
func (g *FaultDisputeGame) ClaimAtIndex(claimIndex uint64) *Claim
func (*FaultDisputeGame) GameData ¶
func (g *FaultDisputeGame) GameData() string
func (*FaultDisputeGame) L2SequenceNumber ¶
func (g *FaultDisputeGame) L2SequenceNumber() *big.Int
func (*FaultDisputeGame) LogGameData ¶
func (g *FaultDisputeGame) LogGameData()
func (*FaultDisputeGame) MaxDepth ¶
func (g *FaultDisputeGame) MaxDepth() challengerTypes.Depth
func (*FaultDisputeGame) PerformMoves ¶
func (g *FaultDisputeGame) PerformMoves(eoa *dsl.EOA, moves ...GameHelperMove) []*Claim
func (*FaultDisputeGame) RootClaim ¶
func (g *FaultDisputeGame) RootClaim() *Claim
func (*FaultDisputeGame) SplitDepth ¶
func (g *FaultDisputeGame) SplitDepth() uint64
type GameHelper ¶
type GameHelper struct {
// contains filtered or unexported fields
}
func DeployGameHelper ¶
func DeployGameHelper(t devtest.T, deployer *dsl.EOA) *GameHelper
func (*GameHelper) AuthEOA ¶
func (gs *GameHelper) AuthEOA(eoa *dsl.EOA) *GameHelper
func (*GameHelper) CreateGameWithClaims ¶
func (gs *GameHelper) CreateGameWithClaims( eoa *dsl.EOA, factory *DisputeGameFactory, gameType challengerTypes.GameType, rootClaim common.Hash, extraData []byte, moves []GameHelperMove, ) common.Address
func (*GameHelper) PerformMoves ¶
func (gs *GameHelper) PerformMoves(eoa *dsl.EOA, game *FaultDisputeGame, moves []GameHelperMove) []*Claim
type GameHelperEOA ¶
func (*GameHelperEOA) Address ¶
func (a *GameHelperEOA) Address() common.Address
func (*GameHelperEOA) PerformMoves ¶
func (a *GameHelperEOA) PerformMoves(game *FaultDisputeGame, moves ...GameHelperMove) []*Claim
type GameHelperMove ¶
type GameOpt ¶
type GameOpt interface {
Apply(cfg *GameCfg)
}
func WithFutureProposal ¶
func WithFutureProposal() GameOpt
func WithRootClaim ¶
func WithUnsafeProposal ¶
func WithUnsafeProposal() GameOpt
type SuperFaultDisputeGame ¶
type SuperFaultDisputeGame struct {
*FaultDisputeGame
}
func NewSuperFaultDisputeGame ¶
func NewSuperFaultDisputeGame(t devtest.T, require *require.Assertions, addr common.Address, helperProvider gameHelperProvider, game *bindings.FaultDisputeGame) *SuperFaultDisputeGame
Click to show internal directories.
Click to hide internal directories.