keeper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryListWallets      = "listWallets"
	QueryGetWallet        = "getWallet"
	QueryListTransactions = "listTransactions"
	QueryGetTransaction   = "getTransaction"
)

Query endpoints supported by the multisig querier.

Variables

View Source
var (
	Addrs = createTestAddrs(500)
)

Functions

func MakeTestCodec

func MakeTestCodec() *codec.Codec

create a codec used only for testing

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for multisig clients.

func TestAddr

func TestAddr(addr string, bech string) sdk.AccAddress

for incode address generation

Types

type Keeper

type Keeper struct {
	AccountKeeper auth.AccountKeeper
	CoinKeeper    coin.Keeper
	BankKeeper    bank.Keeper
	// contains filtered or unexported fields
}

Keeper of the multisig store

func CreateTestInput

func CreateTestInput(t *testing.T, isCheckTx bool) (sdk.Context, Keeper, coin.Keeper, auth.AccountKeeper, bank.Keeper)

Hogpodge of all sorts of input required for testing. `initPower` is converted to an amount of tokens. If `initPower` is 0, no addrs get created.

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramspace types.ParamSubspace, accountKeeper auth.AccountKeeper, coinKeeper coin.Keeper, bankKeeper bank.Keeper) Keeper

NewKeeper creates a multisig keeper

func (Keeper) GetIterator

func (k Keeper) GetIterator(ctx sdk.Context, prefix string) sdk.Iterator

GetIterator returns iterator over KVStore with specified prefix.

func (Keeper) GetTransaction

func (k Keeper) GetTransaction(ctx sdk.Context, txID string) types.Transaction

GetTransaction returns multisig wallet transaction metadata with specified address transaction ID.

func (Keeper) GetWallet

func (k Keeper) GetWallet(ctx sdk.Context, address string) types.Wallet

GetWallet returns multisig wallet metadata struct with specified address.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) SetTransaction

func (k Keeper) SetTransaction(ctx sdk.Context, transaction types.Transaction)

SetTransaction sets the entire multisig wallet transaction metadata struct for a multisig wallet.

func (Keeper) SetWallet

func (k Keeper) SetWallet(ctx sdk.Context, wallet types.Wallet)

SetWallet sets the entire wallet metadata struct for a multisig wallet.

Jump to

Keyboard shortcuts

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