Documentation
¶
Index ¶
- func FirstBlockProposer(chain *app.NibiruApp, ctx sdk.Context) (proposerAddr sdk.ConsAddress)
- func FundAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, ...) error
- func FundFeeCollector(bk bankkeeper.Keeper, ctx sdk.Context, amount sdkmath.Int) error
- func FundModuleAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, recipientMod string, ...) error
- func GenesisStateWithSingleValidator(codec codec.Codec, genesisState app.GenesisState) (app.GenesisState, error)
- func IncreaseBlockNumberBy(nibiru *app.NibiruApp, ctx sdk.Context, numBlocks int64) sdk.Context
- func IncreaseBlockTimeBy(ctx sdk.Context, blockDuration time.Duration) sdk.Context
- func MoveToNextBlock(nibiru *app.NibiruApp, ctx sdk.Context) sdk.Context
- func MoveToNextBlockWithDuration(nibiru *app.NibiruApp, ctx sdk.Context, blockDuration time.Duration) sdk.Context
- func MoveToNextBlockWithTime(nibiru *app.NibiruApp, ctx sdk.Context, blockTime time.Time) sdk.Context
- func NewContext(nibiru *app.NibiruApp) sdk.Context
- func NewNibiruTestApp(customGenesisOverride app.GenesisState) (nibiruApp *app.NibiruApp, gen app.GenesisState)
- func NewNibiruTestAppAndContext() (*app.NibiruApp, sdk.Context)
- func SetBlockNumber(ctx sdk.Context, blockNumber int64) sdk.Context
- func SetBlockTime(ctx sdk.Context, blockTime time.Time) sdk.Context
- func SetDefaultSudoGenesis(gen app.GenesisState)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstBlockProposer ¶
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 ¶
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 app.GenesisState) (app.GenesisState, error)
GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts that also act as delegators.
func IncreaseBlockNumberBy ¶
IncreaseBlockNumberBy runs EndBlocker for the current height and returns a context advanced by numBlocks.
func IncreaseBlockTimeBy ¶
IncreaseBlockTimeBy returns a context advanced by blockDuration.
func MoveToNextBlock ¶
MoveToNextBlock advances the app by one block using the historical default five-second block duration from the old action helper.
func MoveToNextBlockWithDuration ¶
func MoveToNextBlockWithDuration( nibiru *app.NibiruApp, ctx sdk.Context, blockDuration time.Duration, ) sdk.Context
MoveToNextBlockWithDuration commits the current block, begins the next block, and returns a fresh context for the new block.
func MoveToNextBlockWithTime ¶
func MoveToNextBlockWithTime( nibiru *app.NibiruApp, ctx sdk.Context, blockTime time.Time, ) sdk.Context
MoveToNextBlockWithTime commits the current block, begins the next block at blockTime, and returns a fresh context for the new block.
func NewContext ¶
NewContext: Returns a fresh sdk.Context corresponding to the given NibiruApp.
func NewNibiruTestApp ¶
func NewNibiruTestApp(customGenesisOverride app.GenesisState) ( nibiruApp *app.NibiruApp, gen app.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 ¶
NewNibiruTestAppAndContext creates an 'app.NibiruApp' instance with an in-memory 'tmdb.MemDB' and fresh 'sdk.Context'.
func SetBlockNumber ¶
SetBlockNumber returns a context with blockNumber as the current block height.
func SetBlockTime ¶
SetBlockTime returns a context with blockTime as the current block time.
func SetDefaultSudoGenesis ¶
func SetDefaultSudoGenesis(gen app.GenesisState)
SetDefaultSudoGenesis: Sets the sudo module genesis state to a valid default. See "DefaultSudoers".
Types ¶
This section is empty.