Documentation ¶
Overview ¶
nolint
Index ¶
- Variables
- func ExportParamsToJSON(params simulation.Params, path string) error
- func ExportStateToJSON(app *SimApp, path string) error
- func GetSimulationLog(storeName string, sdr sdk.StoreDecoderRegistry, cdc *codec.Codec, ...) (log string)
- func MakeCodec() *codec.Codec
- func SimulationOperations(app *SimApp, cdc *codec.Codec, config simulation.Config) []simulation.WeightedOperation
- type GenesisState
- type SimApp
- func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *SimApp) BlacklistedAccAddrs() map[string]bool
- func (app *SimApp) Codec() *codec.Codec
- func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *SimApp) ExportAppStateAndValidators(forZeroHeight bool, jailWhiteList []string) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *SimApp) LoadHeight(height int64) error
- func (app *SimApp) ModuleAccountAddrs() map[string]bool
- func (app *SimApp) Name() string
- func (app *SimApp) SimulationManager() *module.SimulationManager
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultCLIHome represents the default home directory for the application CLI DefaultCLIHome = os.ExpandEnv("$HOME/.bondscli") // DefaultNodeHome sets the folder where the application data and configuration will be stored DefaultNodeHome = os.ExpandEnv("$HOME/.bondsd") // ModuleBasics is in charge of setting up basic module elements ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, upgrade.AppModuleBasic{}, supply.AppModuleBasic{}, evidence.AppModuleBasic{}, bonds.AppModuleBasic{}, ) )
Functions ¶
func ExportParamsToJSON ¶
func ExportParamsToJSON(params simulation.Params, path string) error
ExportParamsToJSON util function to export the simulation parameters to JSON
func ExportStateToJSON ¶
ExportStateToJSON util function to export the app state to JSON
func GetSimulationLog ¶
func GetSimulationLog(storeName string, sdr sdk.StoreDecoderRegistry, cdc *codec.Codec, kvAs, kvBs []tmkv.Pair) (log string)
GetSimulationLog unmarshals the KVPair's Value to the corresponding type based on the each's module store key and the prefix bytes of the KVPair's key.
func SimulationOperations ¶
func SimulationOperations(app *SimApp, cdc *codec.Codec, config simulation.Config) []simulation.WeightedOperation
SimulationOperations retrieves the simulation params from the provided file path and returns all the modules weighted operations
Types ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state 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() GenesisState
NewDefaultGenesisState generates the default state for the application.
type SimApp ¶
type SimApp struct { *bam.BaseApp // keepers AccountKeeper auth.AccountKeeper BankKeeper bank.Keeper SupplyKeeper supply.Keeper StakingKeeper staking.Keeper CrisisKeeper crisis.Keeper BondsKeeper bonds.Keeper // contains filtered or unexported fields }
Extended ABCI application
func NewSimApp ¶
func NewSimApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp), ) *SimApp
NewSimApp returns a reference to an initialized SimApp.
func (*SimApp) BeginBlocker ¶
func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*SimApp) BlacklistedAccAddrs ¶
BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.
func (*SimApp) EndBlocker ¶
func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*SimApp) ExportAppStateAndValidators ¶
func (app *SimApp) ExportAppStateAndValidators( forZeroHeight bool, jailWhiteList []string, ) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
export the state of bonds module app for a genesis file
func (*SimApp) InitChainer ¶
func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*SimApp) LoadHeight ¶
LoadHeight loads a particular height
func (*SimApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*SimApp) SimulationManager ¶
func (app *SimApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface