transform

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRequiredCollateral added in v1.7.2

func CalculateRequiredCollateral(games []*monTypes.EnrichedGameData) map[common.Address]Collateral

CalculateRequiredCollateral determines the minimum balance required for each DelayedWETH contract used by a set of dispute games. Returns a map of DelayedWETH contract address to collateral data (required and actual amounts)

func CreateBidirectionalTree

func CreateBidirectionalTree(claims []types.Claim) *monTypes.BidirectionalTree

CreateBidirectionalTree walks backwards through the list of claims and creates a bidirectional tree of claims. The root claim must be at index 0. The tree is returned as a flat array so it can be easily traversed following the resolution process.

Types

type Collateral added in v1.7.2

type Collateral struct {
	// Required is the amount of collateral required to pay out bonds.
	Required *big.Int

	// Actual is the amount of collateral actually head by the DelayedWETH contract
	Actual *big.Int
}

Jump to

Keyboard shortcuts

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