keeper

package
v1.5.23 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k AccountKeeper) sdk.Querier

Types

type AccountKeeper

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

func NewAccountKeeper

func NewAccountKeeper(cdc *codec.Codec, key types.StoreKey, proto func() exported.Account) AccountKeeper

func (AccountKeeper) AddBalance

func (ak AccountKeeper) AddBalance(ctx sdk.Context, addr sdk.AccAddress, amount sdk.Coins) (sdk.Coins, error)

func (AccountKeeper) ClearBalances

func (k AccountKeeper) ClearBalances(ctx sdk.Context, addr sdk.AccAddress)

func (AccountKeeper) GetAccount

func (ak AccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) exported.Account

func (AccountKeeper) GetAllAccounts

func (ak AccountKeeper) GetAllAccounts(ctx types.Context) (accounts []exported.Account)

GetAllAccounts returns all accounts in the accountKeeper.

func (AccountKeeper) GetAllBalances

func (am AccountKeeper) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (AccountKeeper) GetBalance

func (ak AccountKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (AccountKeeper) GetNextAccountNumber

func (ak AccountKeeper) GetNextAccountNumber(ctx types.Context) uint64

func (AccountKeeper) IterateAccountBalances

func (k AccountKeeper) IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(sdk.Coin) bool)

IterateAccountBalances iterates over the balances of a single account and provides the token balance to a callback. If true is returned from the callback, iteration is halted.

func (AccountKeeper) IterateAccounts

func (ak AccountKeeper) IterateAccounts(ctx types.Context, cb func(account exported.Account) (stop bool))

IterateAccounts iterates over all the stored accounts and performs a callback function

func (AccountKeeper) NewAccount

func (ak AccountKeeper) NewAccount(ctx types.Context, acc exported.Account) exported.Account

func (AccountKeeper) NewAccountWithAddress

func (ak AccountKeeper) NewAccountWithAddress(ctx types.Context, addr types.AccAddress) exported.Account

利用一个地址 新建一个账户

func (AccountKeeper) RemoveAccount

func (ak AccountKeeper) RemoveAccount(ctx types.Context, acc exported.Account)

func (AccountKeeper) SetAccount

func (ak AccountKeeper) SetAccount(ctx types.Context, acc exported.Account)

func (AccountKeeper) SetBalances

func (k AccountKeeper) SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error

func (AccountKeeper) SetCoin

func (ak AccountKeeper) SetCoin(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) error

func (AccountKeeper) SubBalance

func (ak AccountKeeper) SubBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)

func (AccountKeeper) Transfer

func (ak AccountKeeper) Transfer(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, coin sdk.Coins) error

type QueryAccountParams

type QueryAccountParams struct {
	AccountAddress sdk.AccAddress `json:"account_address"`
	Height         int64          `json:"height"`
}

func NewQueryAccountParams

func NewQueryAccountParams(accountAddress sdk.AccAddress, h int64) QueryAccountParams

Jump to

Keyboard shortcuts

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