funds

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0, 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 DealFunds

type DealFunds interface {
	// returns the current amount tracked
	Get() abi.TokenAmount

	// Reserve is used to mark funds as "in-use" for a deal
	// returns the new amount tracked
	Reserve(amount abi.TokenAmount) (abi.TokenAmount, error)

	// Release releases reserved committed funds back to the available pool
	// returns total amount reserved afterwards
	Release(amount abi.TokenAmount) (abi.TokenAmount, error)
}

DealFunds is used to track funds needed for (possibly multiple) deals in progress

func NewDealFunds

func NewDealFunds(ds datastore.Batching, key datastore.Key) (DealFunds, error)

Jump to

Keyboard shortcuts

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