prism

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT 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(querier *terra.Querier) (terra.Router, error)

Types

type Amps

type Amps struct {
	*terra.Contract
}

func NewAmps

func NewAmps(querier *terra.Querier) (*Amps, error)

func (*Amps) GetBoost

func (a *Amps) GetBoost(ctx context.Context, user cosmos.AccAddress) (BoostInfo, error)

func (*Amps) NewBondMessage

func (a *Amps) NewBondMessage(sender cosmos.AccAddress, amount decimal.Decimal) (cosmos.Msg, error)

func (*Amps) NewUnbondMessage

func (a *Amps) NewUnbondMessage(sender cosmos.AccAddress, amount decimal.Decimal) (cosmos.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(querier *terra.Querier) (*Farm, error)

func (*Farm) NewActivateBoostMessage

func (f *Farm) NewActivateBoostMessage(sender cosmos.AccAddress) (cosmos.Msg, error)

func (*Farm) NewBondMessage

func (f *Farm) NewBondMessage(sender cosmos.AccAddress, amount decimal.Decimal) (cosmos.Msg, error)

func (*Farm) NewClaimAndPledgeWithdrawnRewardsMessage

func (f *Farm) NewClaimAndPledgeWithdrawnRewardsMessage(sender cosmos.AccAddress) (cosmos.Msg, error)

func (*Farm) NewClaimWithdrawnRewardsMessage

func (f *Farm) NewClaimWithdrawnRewardsMessage(sender cosmos.AccAddress) (cosmos.Msg, error)

func (*Farm) NewUnBondMessage

func (f *Farm) NewUnBondMessage(sender cosmos.AccAddress, amount decimal.Decimal) (cosmos.Msg, error)

type Pair

type Pair struct {
	*terra.BasePair
}

func NewPair

func NewPair(querier *terra.Querier, contractAddress string, token1 terra.Token, token2 terra.Token, lpToken terra.Cw20Token) (*Pair, error)

type Prism

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

func NewPrism

func NewPrism(querier *terra.Querier) (*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

type YLUNAStaking struct {
	*terra.Contract
}

func NewYLUNAStaking

func NewYLUNAStaking(querier *terra.Querier) (*YLUNAStaking, error)

func (*YLUNAStaking) GetRewardInfo

func (y *YLUNAStaking) GetRewardInfo(ctx context.Context, stakerAddress cosmos.AccAddress) (RewardInfo, error)

func (*YLUNAStaking) NewClaimAndConvertRewardMessage

func (y *YLUNAStaking) NewClaimAndConvertRewardMessage(sender cosmos.AccAddress, claimToken terra.Cw20Token) (cosmos.Msg, error)

Jump to

Keyboard shortcuts

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