types

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BidirectionalClaim added in v1.7.0

type BidirectionalClaim struct {
	Claim    *faultTypes.Claim
	Children []*BidirectionalClaim
}

type BidirectionalTree added in v1.7.0

type BidirectionalTree struct {
	Claims []*BidirectionalClaim
}

BidirectionalTree is a tree of claims represented as a flat list of claims. This keeps the tree structure identical to how claims are stored in the contract.

type EnrichedClaim added in v1.7.3

type EnrichedClaim struct {
	faultTypes.Claim
	Resolved bool
}

EnrichedClaim extends the faultTypes.Claim with additional context.

type EnrichedGameData

type EnrichedGameData struct {
	types.GameMetadata
	L1Head                common.Hash
	L1HeadNum             uint64
	L2BlockNumber         uint64
	RootClaim             common.Hash
	Status                types.GameStatus
	MaxClockDuration      uint64
	BlockNumberChallenged bool
	BlockNumberChallenger common.Address
	Claims                []EnrichedClaim

	AgreeWithClaim    bool
	ExpectedRootClaim common.Hash

	// Recipients maps addresses to true if they are a bond recipient in the game.
	Recipients map[common.Address]bool

	// Credits records the paid out bonds for the game, keyed by recipient.
	Credits map[common.Address]*big.Int

	// WithdrawalRequests maps recipients with withdrawal requests in DelayedWETH for this game.
	WithdrawalRequests map[common.Address]*contracts.WithdrawalRequest

	// WETHContract is the address of the DelayedWETH contract used by this game
	// The contract is potentially shared by multiple games.
	WETHContract common.Address

	// WETHDelay is the delay applied before credits can be withdrawn.
	WETHDelay time.Duration

	// ETHCollateral is the ETH balance of the (potentially shared) WETHContract
	// This ETH balance will be used to pay out any bonds required by the games
	// that use the same DelayedWETH contract.
	ETHCollateral *big.Int
}

type HonestActors added in v1.8.0

type HonestActors map[common.Address]bool // Map for efficient lookup

func NewHonestActors added in v1.8.0

func NewHonestActors(honestActors []common.Address) HonestActors

func (HonestActors) Contains added in v1.8.0

func (h HonestActors) Contains(addr common.Address) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL