testapp

package
v1.0.0-post.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureNibiruPrefix added in v0.21.8

func EnsureNibiruPrefix()

EnsureNibiruPrefix sets the account address prefix to Nibiru's rather than the default from the Cosmos-SDK, guaranteeing that tests will work with nibi addresses rather than cosmos ones (for Gaia).

func FundAccount added in v0.21.0

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 FundModuleAccount added in v0.21.0

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 added in v0.21.0

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 added in v1.0.0

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

func NewNibiruTestApp added in v0.19.1

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

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 added in v0.19.1

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

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

func NewNibiruTestAppAndContextAtTime added in v1.0.0

func NewNibiruTestAppAndContextAtTime(startTime time.Time) (*app.NibiruApp, sdk.Context)

NewNibiruTestAppAndZeroTimeCtx: Runs NewNibiruTestAppAndZeroTimeCtx with the block time set to time zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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