state

package
v0.0.0-...-5fc2af4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abond

type Abond struct {
	Principal  *big.Int
	Gain       *big.Int
	MaturesAt  *big.Int
	IssuedAt   *big.Int
	Liquidated bool
}

type State

type State struct {
	PoolAddress string

	TotalLiquidity  decimal.Decimal
	JuniorLiquidity decimal.Decimal
	JTokenPrice     decimal.Decimal

	AbondAPY         float64
	SeniorAPY        float64
	JuniorAPY        float64
	OriginatorApy    float64
	OriginatorNetApy float64

	Abond Abond
}

type Storable

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

func New

func New(block *globalTypes.Block, state *state.Manager) *Storable

func (*Storable) Execute

func (s *Storable) Execute(ctx context.Context) error

func (*Storable) ID

func (s *Storable) ID() string

func (*Storable) Result

func (s *Storable) Result() interface{}

func (*Storable) Rollback

func (s *Storable) Rollback(ctx context.Context, tx pgx.Tx) error

func (*Storable) SaveToDatabase

func (s *Storable) SaveToDatabase(ctx context.Context, tx pgx.Tx) error

Jump to

Keyboard shortcuts

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