mint

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const StoreKey = "mint"

StoreKey is string representation of the store key for mint

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper is an instance of the Mint keeper module. Adds / subtracts balances from accounts and maintains a global state of issuance of currencies on the Terra network.

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, sk staking.Keeper, bk bank.Keeper, ak auth.AccountKeeper) Keeper

NewKeeper creates a new instance of the mint module.

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, payer sdk.AccAddress, coin sdk.Coin) (err sdk.Error)

Burn deducts {coin} from the {payer} account, and reflects the decrease in issuance

func (Keeper) ChangeIssuance added in v0.2.0

func (k Keeper) ChangeIssuance(ctx sdk.Context, denom string, delta sdk.Int) (err sdk.Error)

ChangeIssuance updates the issuance to reflect

func (Keeper) GetIssuance

func (k Keeper) GetIssuance(ctx sdk.Context, denom string, day sdk.Int) (issuance sdk.Int)

GetIssuance fetches the total issuance count of the coin matching {denom}. If the {day} applies to a previous period, fetches the last stored snapshot issuance of the coin. For virgin calls, iterates through the accountkeeper and computes the genesis issuance.

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, recipient sdk.AccAddress, coin sdk.Coin) (err sdk.Error)

Mint credits {coin} to the {recipient} account, and reflects the increase in issuance

func (Keeper) PeekEpochSeigniorage added in v0.2.0

func (k Keeper) PeekEpochSeigniorage(ctx sdk.Context, epoch sdk.Int) (epochSeigniorage sdk.Int)

PeekEpochSeigniorage retrieves the size of the seigniorage pool at epoch

Jump to

Keyboard shortcuts

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