Documentation ¶
Index ¶
- Constants
- func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
- func BuildNetworkConfig(appGenesis GenesisState) cli.Config
- func NewTestNibiruApp(shouldUseDefaultGenesis bool) *app.NibiruApp
- func NewTestNibiruAppAndContext(shouldUseDefaultGenesis bool) (*app.NibiruApp, sdk.Context)
- func NewTestNibiruAppWithGenesis(gen GenesisState) *app.NibiruApp
- type GenesisState
Constants ¶
const (
GenOracleAddress = "nibi1zuxt7fvuxgj69mjxu3auca96zemqef5u2yemly"
)
Variables ¶
This section is empty.
Functions ¶
func AppStateFromGenesisFileFn ¶
func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account)
AppStateFromGenesisFileFn util function to generate the genesis AppState from a genesis.json file.
func BuildNetworkConfig ¶
func BuildNetworkConfig(appGenesis GenesisState) cli.Config
BuildNetworkConfig returns a configuration for a local in-testing network
func NewTestNibiruApp ¶
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 ¶
NewTestNibiruAppAndContext creates an 'app.NibiruApp' instance with an in-memory 'tmdb.MemDB' and fresh 'sdk.Context'.
func NewTestNibiruAppWithGenesis ¶
func NewTestNibiruAppWithGenesis(gen 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 ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.
func NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec, inGenState GenesisState, ) (testGenState 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 ¶
func NewTestGenesisStateFromDefault() 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.