vesting

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModuleCdc *codec.Codec

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type ManualVestingAccount

type ManualVestingAccount struct {
	*vesttypes.BaseVestingAccount

	VestedCoins sdk.Coins      `json:"vested_coins" yaml:"vested_coins"`
	Unlocker    sdk.AccAddress `json:"unlocker" yaml:"unlocker"`
}

ManualVestingAccount implements the VestingAccount interface.

func NewManualVestingAccount

func NewManualVestingAccount(baseAcc *authtypes.BaseAccount, vestedCoins sdk.Coins, unlocker sdk.AccAddress) *ManualVestingAccount

func NewManualVestingAccountRaw

func NewManualVestingAccountRaw(bva *vesttypes.BaseVestingAccount, vestedCoins sdk.Coins, unlocker sdk.AccAddress) *ManualVestingAccount

NewManualVestingAccountRaw creates a new ManualVestingAccount object from BaseVestingAccount.

func (ManualVestingAccount) GetStartTime

func (mva ManualVestingAccount) GetStartTime() int64

GetStartTime returns zero since a manual vesting account has no start time.

func (ManualVestingAccount) GetVestedCoins

func (mva ManualVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins

Returns the total number of vested coins. If no coins are vested, nil is returned.

func (ManualVestingAccount) GetVestingCoins

func (mva ManualVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins

Returns the total number of vesting coins. If no coins are vesting, nil is returned.

func (ManualVestingAccount) MarshalJSON

func (mva ManualVestingAccount) MarshalJSON() ([]byte, error)

func (ManualVestingAccount) MarshalYAML

func (mva ManualVestingAccount) MarshalYAML() (interface{}, error)

func (ManualVestingAccount) SpendableCoins

func (mva ManualVestingAccount) SpendableCoins(blockTime time.Time) sdk.Coins

SpendableCoins returns the total number of spendable coins per denom.

func (ManualVestingAccount) String

func (mva ManualVestingAccount) String() string

func (*ManualVestingAccount) TrackDelegation

func (mva *ManualVestingAccount) TrackDelegation(blockTime time.Time, amount sdk.Coins)

TrackDelegation tracks a desired delegation amount by setting the appropriate values for the amount of delegated vesting, delegated free, and reducing the overall amount of base coins.

func (*ManualVestingAccount) UnmarshalJSON

func (mva *ManualVestingAccount) UnmarshalJSON(bz []byte) error

func (ManualVestingAccount) Validate

func (mva ManualVestingAccount) Validate() error

Validate checks for errors on the account fields.

Jump to

Keyboard shortcuts

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