keeper

package
v0.0.0-...-4a5ca1c Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyFirstIssueDenom = []byte("firstIssueDenom")
	KeyLastIssueDenom  = []byte("lastIssueDenom")
	KeyLastIssueId     = []byte("lastIssueId")
	KeyDelimiter       = ":"
)

Key for getting a the next available proposalID from the store

Functions

func KeyAddressDenoms

func KeyAddressDenoms(addr string) []byte

Key for getting a specific address from the store

func KeyAllowance

func KeyAllowance(denom string, owner sdk.AccAddress, spender sdk.AccAddress) []byte

Key for getting a specific allowed from the store

func KeyAllowances

func KeyAllowances(denom string, owner sdk.AccAddress) []byte

Key for getting a specific allowed from the store

func KeyFreeze

func KeyFreeze(denom string, accAddress sdk.AccAddress) []byte

func KeyIdDenom

func KeyIdDenom(id uint64) []byte

func KeyIssuer

func KeyIssuer(denom string) []byte

Key for getting a specific issuer from the store

func KeySymbolDenom

func KeySymbolDenom(symbol string) []byte

func ParamKeyTable

func ParamKeyTable() params.KeyTable

type declaration for parameters

func PrefixFreeze

func PrefixFreeze(denom string) []byte

Types

type BankHooks

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

func NewBankHooks

func NewBankHooks(issueHooks Hooks) BankHooks

func (BankHooks) CanSend

func (bankHooks BankHooks) CanSend(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) (bool, sdk.Error)

nolint

type Hooks

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

func (Hooks) CanSend

func (h Hooks) CanSend(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) (bool, sdk.Error)

type Keeper

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

IssueKeeper encodes/decodes accounts using the go-amino (binary) encoding/decoding library.

func NewKeeper

func NewKeeper(
	cdc *codec.Codec,
	key sdk.StoreKey,
	ak types.AccountKeeper,
	ck types.CoinKeeper,
	sk types.SupplyKeeper,
	feeCollectorName string,
	paramsKeeper params.Keeper,
	paramSpace params.Subspace) Keeper

NewAccountKeeper returns a new sdk.AccountKeeper that uses go-amino to (binary) encode and decode concrete sdk.Accounts. nolint

func (*Keeper) AddIssue

func (k *Keeper) AddIssue(ctx sdk.Context, issue *types.CoinIssue)

func (*Keeper) Allowance

func (k *Keeper) Allowance(ctx sdk.Context, owner sdk.AccAddress, spender sdk.AccAddress, denom string) sdk.Coin

func (*Keeper) Allowances

func (k *Keeper) Allowances(ctx sdk.Context, owner sdk.AccAddress, denom string) types.Allowances

func (*Keeper) Approve

func (k *Keeper) Approve(ctx sdk.Context, owner, spender sdk.AccAddress, coins sdk.Coins) sdk.Error

func (*Keeper) Burn

func (k *Keeper) Burn(ctx sdk.Context, burner sdk.AccAddress, coins sdk.Coins) sdk.Error

func (Keeper) BurnFee

func (k Keeper) BurnFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) BurnFrom

func (k *Keeper) BurnFrom(ctx sdk.Context, burner, from sdk.AccAddress, coins sdk.Coins) sdk.Error

func (Keeper) BurnFromFee

func (k Keeper) BurnFromFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) ChangeDescription

func (k *Keeper) ChangeDescription(ctx sdk.Context, owner sdk.AccAddress, denom string, description string) sdk.Error

func (*Keeper) ChangeFeatures

func (k *Keeper) ChangeFeatures(ctx sdk.Context, owner sdk.AccAddress, denom string, features *types.IssueFeatures) sdk.Error

func (*Keeper) ChargeFee

func (k *Keeper) ChargeFee(ctx sdk.Context, sender sdk.AccAddress, fee sdk.Coin) sdk.Error

func (*Keeper) CheckFreeze

func (k *Keeper) CheckFreeze(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, denom string) sdk.Error

func (*Keeper) CreateIssue

func (k *Keeper) CreateIssue(ctx sdk.Context, owner, issuer sdk.AccAddress, params *types.IssueParams) *types.CoinIssue

func (*Keeper) DecreaseAllowance

func (k *Keeper) DecreaseAllowance(ctx sdk.Context, owner, spender sdk.AccAddress, coins sdk.Coins) sdk.Error

func (*Keeper) Freeze

func (k *Keeper) Freeze(ctx sdk.Context, freezer, holder sdk.AccAddress, denom, op string) sdk.Error

func (Keeper) FreezeFee

func (k Keeper) FreezeFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) GetCodec

func (k *Keeper) GetCodec() *codec.Codec

func (*Keeper) GetFreeze

func (k *Keeper) GetFreeze(ctx sdk.Context, denom string, holder sdk.AccAddress) *types.Freeze

func (*Keeper) GetFreezes

func (k *Keeper) GetFreezes(ctx sdk.Context, denom string) []*types.AddressFreeze

func (*Keeper) GetIssue

func (k *Keeper) GetIssue(ctx sdk.Context, denom string) (*types.CoinIssue, sdk.Error)

func (*Keeper) GetLastId

func (k *Keeper) GetLastId(ctx sdk.Context) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Create new box hooks

func (*Keeper) IncreaseAllowance

func (k *Keeper) IncreaseAllowance(ctx sdk.Context, owner, spender sdk.AccAddress, coins sdk.Coins) sdk.Error

func (*Keeper) Issue

func (k *Keeper) Issue(ctx sdk.Context, issue *types.CoinIssue) sdk.Error

func (Keeper) IssueFee

func (k Keeper) IssueFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) List

func (k *Keeper) List(ctx sdk.Context, params types.IssuesParams) types.CoinIssues

func (*Keeper) ListAll

func (k *Keeper) ListAll(ctx sdk.Context) types.CoinIssues

func (*Keeper) Mint

func (k *Keeper) Mint(ctx sdk.Context, minter, to sdk.AccAddress, coins sdk.Coins) sdk.Error

func (Keeper) MintFee

func (k Keeper) MintFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) SetLastId

func (k *Keeper) SetLastId(ctx sdk.Context, id uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

set the params

func (*Keeper) Transfer

func (k *Keeper) Transfer(ctx sdk.Context, from, to sdk.AccAddress, coins sdk.Coins) sdk.Error

func (*Keeper) TransferFrom

func (k *Keeper) TransferFrom(ctx sdk.Context, sender, from, to sdk.AccAddress, coins sdk.Coins) sdk.Error

func (Keeper) TransferOwnerFee

func (k Keeper) TransferOwnerFee(ctx sdk.Context) (res sdk.Coin)

func (*Keeper) TransferOwnership

func (k *Keeper) TransferOwnership(ctx sdk.Context, owner, to sdk.AccAddress, denom string) sdk.Error

func (*Keeper) Unfreeze

func (k *Keeper) Unfreeze(ctx sdk.Context, freezer, holder sdk.AccAddress, denom, op string) sdk.Error

func (Keeper) UnfreezeFee

func (k Keeper) UnfreezeFee(ctx sdk.Context) (res sdk.Coin)

Jump to

Keyboard shortcuts

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