simapp

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenOracleAddress = "nibi1zuxt7fvuxgj69mjxu3auca96zemqef5u2yemly"
)

Variables

This section is empty.

Functions

func AppStateFn

func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn

AppStateFn returns the initial application state using a genesis or the simulation parameters. It panics if the user provides files for both of them. If a file is not given for the genesis or the sim params, it creates a randomized one.

func AppStateRandomizedFn

func AppStateRandomizedFn(
	simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec,
	accs []simtypes.Account, genesisTimestamp time.Time, appParams simtypes.AppParams,
) (json.RawMessage, []simtypes.Account)

AppStateRandomizedFn creates calls each module's GenesisState generator function and creates the simulation params.

func NewTestGenesisState added in v0.13.0

func NewTestGenesisState(codec codec.Codec, inGenState app.GenesisState,
) (testGenState app.GenesisState)

NewTestGenesisState transforms 'inGenState' to add genesis parameter changes that are well suited to integration testing, then returns the transformed genesis. The blockchain genesis state is represented as a map from module identifier strings to raw json messages.

Args: - codec: Serializer for the module genesis state proto.Messages - inGenState: Input genesis state before the custom test setup is applied

func NewTestGenesisStateFromDefault added in v0.13.0

func NewTestGenesisStateFromDefault() app.GenesisState
NewTestGenesisStateFromDefault returns 'NewGenesisState' using the default

genesis as input. The blockchain genesis state is represented as a map from module identifier strings to raw json messages.

func NewTestNibiruApp added in v0.13.0

func NewTestNibiruApp(shouldUseDefaultGenesis bool) *app.NibiruApp

NewTestNibiruApp creates an application instance ('app.NibiruApp') with an in-memory database ('tmdb.MemDB') and disabled logging. It either uses the application's default genesis state or a blank one.

func NewTestNibiruAppAndContext added in v0.13.0

func NewTestNibiruAppAndContext(shouldUseDefaultGenesis bool) (*app.NibiruApp, sdk.Context)

NewTestNibiruAppAndContext creates an 'app.NibiruApp' instance with an in-memory 'tmdb.MemDB' and fresh 'sdk.Context'.

func NewTestNibiruAppWithGenesis added in v0.13.0

func NewTestNibiruAppWithGenesis(gen app.GenesisState) *app.NibiruApp

NewTestNibiruAppWithGenesis initializes a chain with the given genesis state to creates an application instance ('app.NibiruApp'). This app uses an in-memory database ('tmdb.MemDB') and has logging disabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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