mock

package
v0.19.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBalance

func CheckBalance(t *testing.T, app *App, addr sdk.Address, exp sdk.Coins)

check an account balance

func GenTx

func GenTx(msg sdk.Msg, accnums []int64, seq []int64, priv ...crypto.PrivKeyEd25519) auth.StdTx

generate a signed transaction

func SetGenesis

func SetGenesis(app *App, accs []auth.Account)

set the mock app genesis

func SignCheck

func SignCheck(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, accnums []int64, seq []int64, priv ...crypto.PrivKeyEd25519) sdk.Result

check a transaction result

func SignCheckDeliver

func SignCheckDeliver(t *testing.T, app *baseapp.BaseApp, msg sdk.Msg, accnums []int64, seq []int64, expPass bool, priv ...crypto.PrivKeyEd25519)

simulate a block

Types

type App

type App struct {
	*bam.BaseApp
	Cdc        *wire.Codec // public since the codec is passed into the module anyways.
	KeyMain    *sdk.KVStoreKey
	KeyAccount *sdk.KVStoreKey

	// TODO: Abstract this out from not needing to be auth specifically
	AccountMapper       auth.AccountMapper
	FeeCollectionKeeper auth.FeeCollectionKeeper

	GenesisAccounts []auth.Account
}

Extended ABCI application

func NewApp

func NewApp() *App

partially construct a new app on the memstore for module and genesis testing

func (*App) CompleteSetup

func (app *App) CompleteSetup(t *testing.T, newKeys []*sdk.KVStoreKey)

complete the application setup after the routes have been registered

func (*App) InitChainer

func (app *App) InitChainer(ctx sdk.Context, _ abci.RequestInitChain) abci.ResponseInitChain

custom logic for initialization

Jump to

Keyboard shortcuts

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