Documentation
¶
Index ¶
- Constants
- Variables
- func AddTestAddrs(app *app.App, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress
- func AddTestAddrsIncremental(app *app.App, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress
- func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ...) (sdk.Tx, error)
- func GenerateRandomString(length int) string
- func GenerateRandomStringWithCharset(length int, charset string) string
- func GenerateRandomTestAccounts(accNum int) []sdk.AccAddress
- func NewDefaultGenesisState(cdc codec.JSONCodec) app.GenesisState
- func RandInBetween(min, max int) int
- func SetKeeperTestParamsAndDefaultValues(app *app.App, ctx sdk.Context)
- func Setup(isCheckTx bool) *app.App
- func TestAddr(addr string, bech string) (sdk.AccAddress, error)
- type EmptyAppOptions
- type GenerateAccountStrategy
Constants ¶
View Source
const ( TestDenomination = sdk.DefaultBondDenom SimAppChainID = "simulation-app" TestDefaultStorage = 200 TestMaxStorage = 300 )
SimAppChainID hardcoded chainID for simulation
Variables ¶
View Source
var ( DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, } EncodingConfig = params.EncodingConfig{} )
DefaultConsensusParams defines the default Tendermint consensus params used in app.App testing.
Functions ¶
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func AddTestAddrsIncremental ¶
func AddTestAddrsIncremental(app *app.App, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func GenTx ¶
func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error)
GenTx generates a signed mock transaction.
func GenerateRandomString ¶
GenerateRandomString generates a random string given a length, based on a set character set
func GenerateRandomTestAccounts ¶
func GenerateRandomTestAccounts(accNum int) []sdk.AccAddress
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) app.GenesisState
NewDefaultGenesisState generates the default state for the application.
func RandInBetween ¶
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 GenerateAccountStrategy ¶
type GenerateAccountStrategy func(int) []sdk.AccAddress
Click to show internal directories.
Click to hide internal directories.