keeper

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 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 added in v0.1.3

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 added in v0.1.3

func ParamKeyTable() params.KeyTable

type declaration for parameters

func PrefixFreeze

func PrefixFreeze(denom string) []byte

Types

type BankHooks added in v0.1.3

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

func NewBankHooks added in v0.1.3

func NewBankHooks(issueHooks Hooks) BankHooks

func (BankHooks) CanSend added in v0.1.3

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

nolint

type Hooks added in v0.1.3

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

func (Hooks) CanSend added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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

func (*Keeper) ChangeDescription added in v0.1.3

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

func (*Keeper) ChangeFeatures added in v0.1.3

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

func (*Keeper) ChargeFee added in v0.1.3

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

func (*Keeper) CheckFreeze added in v0.1.3

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 added in v0.1.3

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

func (Keeper) FreezeFee added in v0.1.3

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

func (*Keeper) GetCodec

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

func (*Keeper) GetFreeze added in v0.1.3

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

func (*Keeper) GetFreezes added in v0.1.3

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 added in v0.1.3

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

func (Keeper) GetParams added in v0.1.3

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

func (Keeper) Hooks added in v0.1.3

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 added in v0.1.3

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 added in v0.1.3

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

func (*Keeper) SetLastId added in v0.1.3

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

func (Keeper) SetParams added in v0.1.3

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 added in v0.1.3

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

func (*Keeper) TransferOwnership added in v0.1.3

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

func (*Keeper) Unfreeze added in v0.1.3

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

func (Keeper) UnfreezeFee added in v0.1.3

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