tests

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const BondDenom = "uaura"

Variables

View Source
var DefaultConsensusParams = &tmproto.ConsensusParams{
	Block: &tmproto.BlockParams{
		MaxBytes: 200000,
		MaxGas:   2000000,
	},
	Evidence: &tmproto.EvidenceParams{
		MaxAgeNumBlocks: 302400,
		MaxAgeDuration:  504 * time.Hour,
		MaxBytes:        10000,
	},
	Validator: &tmproto.ValidatorParams{
		PubKeyTypes: []string{
			cmtypes.ABCIPubKeyTypeEd25519,
		},
	},
}

Functions

func DefaultContext

func DefaultContext(key storetypes.StoreKey, tkey storetypes.StoreKey) sdk.Context

DefaultContext creates a sdk.Context with a fresh MemDB that can be used in tests.

func GetParamsKeeper

func GetParamsKeeper() paramskeeper.Keeper

func Setup

func Setup(t *testing.T, isCheckTx bool) *app.App

Types

type EmptyAppOptions

type EmptyAppOptions struct{}

EmptyAppOptions is a stub implementing AppOptions

func (EmptyAppOptions) Get

func (ao EmptyAppOptions) Get(o string) interface{}

Get implements AppOptions

type TestContext

type TestContext struct {
	Ctx sdk.Context
	DB  *dbm.MemDB
	CMS store.CommitMultiStore
}

func DefaultContextWithDB

func DefaultContextWithDB(t *testing.T, key storetypes.StoreKey, tkey storetypes.StoreKey) TestContext

type TestEncodingConfig

type TestEncodingConfig struct {
	InterfaceRegistry types.InterfaceRegistry
	Codec             codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

TestEncodingConfig defines an encoding configuration that is used for testing purposes. Note, MakeTestEncodingConfig takes a series of AppModuleBasic types which should only contain the relevant module being tested and any potential dependencies.

func MakeTestEncodingConfig

func MakeTestEncodingConfig(modules ...module.AppModuleBasic) TestEncodingConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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