testapp

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstBlockProposer

func FirstBlockProposer(
	chain *nibiruapp.NibiruApp, ctx sdk.Context,
) (proposerAddr sdk.ConsAddress)

func FundAccount

func FundAccount(
	bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress,
	amounts sdk.Coins,
) error

FundAccount is a utility function that funds an account by minting and sending the coins to the address. This should be used for testing purposes only!

func FundFeeCollector

func FundFeeCollector(
	bk bankkeeper.Keeper, ctx sdk.Context, amount sdkmath.Int,
) error

FundFeeCollector funds the module account that collects gas fees with some amount of "unibi", the gas token.

func FundModuleAccount

func FundModuleAccount(
	bankKeeper bankkeeper.Keeper, ctx sdk.Context,
	recipientMod string, amounts sdk.Coins,
) error

FundModuleAccount is a utility function that funds a module account by minting and sending the coins to the address. This should be used for testing purposes only!

func GenesisStateWithSingleValidator

func GenesisStateWithSingleValidator(codec codec.Codec, genesisState nibiruapp.GenesisState) (nibiruapp.GenesisState, error)

GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts that also act as delegators.

func NewContext

func NewContext(nibiru *nibiruapp.NibiruApp) sdk.Context

NewContext: Returns a fresh sdk.Context corresponding to the given NibiruApp.

func NewNibiruTestApp

func NewNibiruTestApp(customGenesisOverride nibiruapp.GenesisState) (
	nibiruApp *nibiruapp.NibiruApp, gen nibiruapp.GenesisState,
)

NewNibiruTestApp 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.

func NewNibiruTestAppAndContext

func NewNibiruTestAppAndContext() (*nibiruapp.NibiruApp, sdk.Context)

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

func SetDefaultSudoGenesis

func SetDefaultSudoGenesis(gen wasmapp.GenesisState)

SetDefaultSudoGenesis: Sets the sudo module genesis state to a valid default. See "DefaultSudoers".

Types

This section is empty.

Jump to

Keyboard shortcuts

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