mars

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	*terra.Contract
	// contains filtered or unexported fields
}

func NewBootstrap

func NewBootstrap(ctx context.Context, querier *terra.Querier) (*Bootstrap, error)

func (*Bootstrap) Config

func (b *Bootstrap) Config(ctx context.Context) (BootstrapConfig, error)

func (*Bootstrap) NewClaimRewardsMessage

func (b *Bootstrap) NewClaimRewardsMessage(sender cosmos.AccAddress, withDrawUnlockedShares bool) (cosmos.Msg, error)

func (*Bootstrap) RewardPair

func (b *Bootstrap) RewardPair() terra.Pair

func (*Bootstrap) UserInfo

func (b *Bootstrap) UserInfo(ctx context.Context, address cosmos.AccAddress) (BootstrapUserInfo, error)

type BootstrapConfig

type BootstrapConfig struct {
	MarsUstPoolAddress string
}

type BootstrapUserInfo

type BootstrapUserInfo struct {
	WithdrawableLpShares decimal.Decimal `json:"withdrawable_lp_shares"`
}

type Field

type Field struct {
	*terra.Contract
}

func NewANCUSTField

func NewANCUSTField(querier *terra.Querier) (*Field, error)

func NewField

func NewField(querier *terra.Querier, address string) (*Field, error)

func (*Field) Snapshot

func (f *Field) Snapshot(ctx context.Context, address string) (FieldSnapshot, error)

type FieldSnapshot

type FieldSnapshot struct {
	PositionLpValue decimal.Decimal
	DebtValue       decimal.Decimal
	Ltv             decimal.Decimal
}

type Governance

type Governance struct {
	*terra.Contract
}

func NewGovernance

func NewGovernance(querier *terra.Querier) (*Governance, error)

func (*Governance) MARSperXMARS added in v0.8.0

func (g *Governance) MARSperXMARS(ctx context.Context) (decimal.Decimal, error)

func (*Governance) NewStakeMessage

func (g *Governance) NewStakeMessage(sender cosmos.AccAddress, amount decimal.Decimal) (cosmos.Msg, error)

func (*Governance) XMARSperMARS added in v0.8.0

func (g *Governance) XMARSperMARS(ctx context.Context) (decimal.Decimal, error)

type Mars

type Mars struct {
	Governance  *Governance
	Bootstrap   *Bootstrap
	ANCUSTField *Field
}

func NewMars

func NewMars(ctx context.Context, querier *terra.Querier) (*Mars, error)

Jump to

Keyboard shortcuts

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