prism

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAssetInfoFactory

func NewAssetInfoFactory() terra.AssetInfoFactory

func NewRouter

func NewRouter(ctx context.Context, lcd *terra.LCDClient) (terra.Router, error)

Types

type Amps

type Amps struct {
	*terra.Contract
}

func NewAmps

func NewAmps(lcd *terra.LCDClient) (*Amps, error)

func (*Amps) GetBoost

func (a *Amps) GetBoost(ctx context.Context, address string) (BoostInfo, error)

func (*Amps) NewBondMessage

func (a *Amps) NewBondMessage(amount decimal.Decimal) (msg.Msg, error)

func (*Amps) NewUnbondMessage

func (a *Amps) NewUnbondMessage(amount decimal.Decimal) (msg.Msg, error)

type BoostInfo

type BoostInfo struct {
	AmountBonded          decimal.Decimal
	Boost                 decimal.Decimal
	LastUpdatedTime       time.Time
	BoostAccrualStartTime time.Time
}

type Farm

type Farm struct {
	*terra.Contract
}

func NewFarm

func NewFarm(lcd *terra.LCDClient) (*Farm, error)

func (*Farm) NewActivateBoostMessage

func (f *Farm) NewActivateBoostMessage() (msg.Msg, error)

func (*Farm) NewBondMessage

func (f *Farm) NewBondMessage(amount decimal.Decimal) (msg.Msg, error)

func (*Farm) NewUnBondMessage

func (f *Farm) NewUnBondMessage(amount decimal.Decimal) (msg.Msg, error)

type Pair

type Pair struct {
	*terra.BasePair
}

func NewPair

func NewPair(ctx context.Context, lcd *terra.LCDClient, contractAddress string, token1 terra.Token, token2 terra.Token, lpToken terra.Cw20Token) (*Pair, error)

type Prism added in v0.14.0

type Prism struct {
	Amps         *Amps
	YLUNAStaking *YLUNAStaking
	Farm         *Farm
}

func NewPrism added in v0.14.0

func NewPrism(lcd *terra.LCDClient) (*Prism, error)

type PrismAssetInfo

type PrismAssetInfo struct {
	Token       string `json:"cw20,omitempty"`
	NativeToken string `json:"native,omitempty"`
}

func (PrismAssetInfo) Id

func (ai PrismAssetInfo) Id() string

func (PrismAssetInfo) IsNative

func (ai PrismAssetInfo) IsNative() bool

type RewardInfo

type RewardInfo struct {
	StakedAmount decimal.Decimal
	Rewards      map[string]decimal.Decimal
}

type Router

type Router struct {
	*terra.BaseRouter
}

func (Router) String

func (r Router) String() string

type YLUNAStaking added in v0.14.0

type YLUNAStaking struct {
	*terra.Contract
}

func NewYLUNAStaking added in v0.14.0

func NewYLUNAStaking(lcd *terra.LCDClient) (*YLUNAStaking, error)

func (*YLUNAStaking) GetRewardInfo added in v0.14.0

func (y *YLUNAStaking) GetRewardInfo(ctx context.Context, address string) (RewardInfo, error)

func (*YLUNAStaking) NewClaimAndConvertRewardMessage added in v0.14.0

func (y *YLUNAStaking) NewClaimAndConvertRewardMessage(claimToken terra.Cw20Token) (msg.Msg, error)

Jump to

Keyboard shortcuts

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