testing

package
v0.0.0-...-143fca7 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMockApp

func MakeMockApp(accounts []sdk.AccAddress, balances []banktypes.Balance, operators []sdk.AccAddress, communityPool sdk.Coins) *marsapp.MarsApp

MakeMockApp create a mockup `AIApp` instance for testing purposes.

Parameters:

  • accounts: Addresses of base accounts to be registered in the auth module. Do not include module accounts. Do include validator operators.
  • balances: Coin balances. DO NOT include the community pool and staking pools; their balances will be populated automatically for your convenience. DO include balances of other module accounts if necessary, such as the incentives and safety fund modules.
  • operators: Addresses of validator operators. Consensus pubkeys will be generated randomly. Each validator does a self-bond of 1_000_000 umars.
  • communityPool: Initial balance of the community pool.

func MakeRandomAccounts

func MakeRandomAccounts(numAccts int) []sdk.AccAddress

MakeRandomAccounts returns a list of randomly generated AccAddresses. forked from https://github.com/osmosis-labs/osmosis/blob/v9.0.0-rc0/app/apptesting/test_suite.go#L276

func MakeRandomConsensusPubkeys

func MakeRandomConsensusPubkeys(numPks int) []*codectypes.Any

MakeRandomAccounts returns a list of randonly generated consensus pubkeys.

func MakeSimpleMockApp

func MakeSimpleMockApp() *aiapp.AIApp

MakeSimpleMockApp is a shorthand for MakeMockApp that takes no argument. This creates a mock app with only one validator and no other accounts. Useful for very simple tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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