Documentation
¶
Index ¶
- Constants
- func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn
- func AppStateRandomizedFn(simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec, ...) (json.RawMessage, []simtypes.Account)
- func NewTestGenesisState(codec codec.Codec, inGenState app.GenesisState) (testGenState app.GenesisState)
- func NewTestGenesisStateFromDefault() app.GenesisState
- func NewTestNibiruApp(shouldUseDefaultGenesis bool) *app.NibiruApp
- func NewTestNibiruAppAndContext(shouldUseDefaultGenesis bool) (*app.NibiruApp, sdk.Context)
- func NewTestNibiruAppWithGenesis(gen app.GenesisState) *app.NibiruApp
Constants ¶
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
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
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.