payout

package
v2.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DelegateEarnings

type DelegateEarnings struct {
	Address string
	Fees    *big.Int
	Share   float64
	Rewards *big.Int
	Net     *big.Int
}

DelegateEarnings -

type DelegationEarning

type DelegationEarning struct {
	Address      string
	Fee          *big.Int
	GrossRewards *big.Int
	NetRewards   *big.Int
	Share        float64
}

DelegationEarning -

type DelegationEarnings

type DelegationEarnings []DelegationEarning

DelegationEarnings contains list of DelegationEarning and implements sort.

func (DelegationEarnings) Len

func (d DelegationEarnings) Len() int

func (DelegationEarnings) Less

func (d DelegationEarnings) Less(i, j int) bool

func (DelegationEarnings) Swap

func (d DelegationEarnings) Swap(i, j int)

type NewPayoutInput

type NewPayoutInput struct {
	GoTezos    gotezos.IFace
	Cycle      int
	Delegate   string
	BakerFee   float64
	Wallet     gotezos.Wallet
	MinPayment int
	BlackList  []string
	Inject     bool // If false, nothing will be injected.
	NetworkFee int
	GasLimit   int
	BatchSize  int
	Verbose    bool
}

NewPayoutInput is the input for NewPayout

type Payout

type Payout struct {
	// contains filtered or unexported fields
}

Payout represents a payout and payout operations.

func NewPayout

func NewPayout(input NewPayoutInput) *Payout

NewPayout returns a pointer to a new Baker

func (*Payout) Execute

func (p *Payout) Execute() (Report, error)

Execute will execute a payout based off the Payout configuration

type Report

type Report struct {
	DelegationEarnings DelegationEarnings `json:"delegaions"`
	DelegateEarnings   DelegateEarnings   `json:"delegate"`
	CycleHash          string             `json:"cycle_hash"`
	Cycle              int                `json:"cycle"`
	FrozenBalance      *big.Int           `json:"rewards"`
	StakingBalance     *big.Int           `json:"staking_balance"`
	Operations         []string           `json:"operation"`
	OperationsLink     []string           `json:"operation_link"`
}

Report contains all needed information for a payout

Jump to

Keyboard shortcuts

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