bonds

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRequiredCollateral

func CalculateRequiredCollateral(ctx context.Context, contract BondContract, blockHash common.Hash, claims []faultTypes.Claim) (*big.Int, error)

CalculateRequiredCollateral determines the minimum balance required for a fault dispute game contract in order to pay the outstanding bonds and credits. It returns the sum of unpaid bonds from claims, plus the sum of allocated but unclaimed credits.

Types

type BondContract

type BondContract interface {
	GetCredits(ctx context.Context, block batching.Block, recipients ...common.Address) ([]*big.Int, error)
}

Jump to

Keyboard shortcuts

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