tax

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrefixIssuance = []byte("coinsupply")
)

nolint

Functions

func GetCoinSupplyKey

func GetCoinSupplyKey(denom string) []byte

GetCoinSupplyKey is in format of PrefixElect||denom

Types

type BaseKeeper

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

BaseKeeper manages transfers between accounts. It implements the Keeper interface.

func NewBaseKeeper

func NewBaseKeeper(key sdk.StoreKey, cdc *codec.Codec, am auth.AccountKeeper, fk auth.FeeCollectionKeeper) BaseKeeper

NewBaseKeeper returns a new BaseKeeper

func (BaseKeeper) AddCoins

func (keeper BaseKeeper) AddCoins(
	ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins,
) (sdk.Coins, sdk.Tags, sdk.Error)

AddCoins adds amt to the coins at the addr.

func (BaseKeeper) GetCoins

func (keeper BaseKeeper) GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

GetCoins returns the coins at the addr.

func (BaseKeeper) GetDebtRatio

func (keeper BaseKeeper) GetDebtRatio(ctx sdk.Context) sdk.Dec

GetDebtRatio gets the current debt of the system

func (BaseKeeper) GetIssuance

func (keeper BaseKeeper) GetIssuance(ctx sdk.Context, denom string) (res sdk.Int)

GetIssuance retrieves the total issuance of the coin with {denom}

func (BaseKeeper) HasCoins

func (keeper BaseKeeper) HasCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) bool

HasCoins returns whether or not an account has at least amt coins.

func (BaseKeeper) InputOutputCoins

func (keeper BaseKeeper) InputOutputCoins(ctx sdk.Context, inputs []bank.Input, outputs []bank.Output) (sdk.Tags, sdk.Error)

InputOutputCoins handles a list of inputs and outputs

func (BaseKeeper) SendCoins

func (keeper BaseKeeper) SendCoins(
	ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins,
) (sdk.Tags, sdk.Error)

SendCoins moves coins from one account to another

func (BaseKeeper) SetCoins

func (keeper BaseKeeper) SetCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

SetCoins sets the coins at the addr.

func (BaseKeeper) SubtractCoins

func (keeper BaseKeeper) SubtractCoins(
	ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins,
) (sdk.Coins, sdk.Tags, sdk.Error)

SubtractCoins subtracts amt from the coins at the addr.

type Keeper

type Keeper interface {
	bank.Keeper
	GetIssuance(ctx sdk.Context, denom string) sdk.Int
	GetDebtRatio(ctx sdk.Context) sdk.Dec
}

Keeper defines a module interface that facilitates the transfer of coins between accounts.

Jump to

Keyboard shortcuts

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