payout

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigMapV1

type BigMapV1 struct {
	Prim string          `json:"prim"`
	Args json.RawMessage `json:"args"`
}

BigMapV1 represents a big_map for ExchangeContractV1

type ExchangeContractV1

type ExchangeContractV1 struct {
	Prim string `json:"prim"`
	Args []struct {
		Int  int    `json:"int,string,omitempty"`
		Prim string `json:"prim,omitempty"`
		Args []struct {
			Prim string `json:"prim"`
			Args []struct {
				Prim string `json:"prim"`
				Args []struct {
					Prim string `json:"prim,omitempty"`
					Int  int    `json:"int,string,omitempty"`
				} `json:"args,omitempty"`
			} `json:"args"`
		} `json:"args,omitempty"`
	} `json:"args"`
}

ExchangeContractV1 represents a liquidity pool contract

storage (pair (big_map %accounts (address :owner)

                   (pair (nat :balance)
                         (map (address :spender)
                              (nat :allowance))))
(pair (pair (bool :selfIsUpdatingTokenPool)
            (pair (bool :freezeBaker)
                  (nat :lqtTotal)))
      (pair (pair (address :manager)
                  (address :tokenAddress))
            (pair (nat :tokenPool)
                  (mutez :xtzPool)))));

type IFace

type IFace interface {
	Execute() (tzkt.RewardsSplit, error)
}

IFace for testing things that consume Payout

type Payout

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

Payout represents a payout and payout operations.

func New

func New(config config.Config, cycle int, inject, verbose bool) (*Payout, error)

New returns a pointer to a new Baker

func (*Payout) Execute

func (p *Payout) Execute() (tzkt.RewardsSplit, error)

Execute will execute a payout based off the Payout configuration

type Queue

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

func NewQueue

func NewQueue(notifier *notifier.PayoutNotifier) *Queue

func (*Queue) Dequeue

func (q *Queue) Dequeue() error

func (*Queue) Empty

func (q *Queue) Empty() bool

func (*Queue) Enqueue

func (q *Queue) Enqueue(p Payout)

func (*Queue) Front

func (q *Queue) Front() (Payout, error)

func (*Queue) Size

func (q *Queue) Size() int

func (*Queue) Start

func (q *Queue) Start()

Jump to

Keyboard shortcuts

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