simapp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	StakePerAccount           = "stake_per_account"
	InitiallyBondedValidators = "initially_bonded_validators"

	OpWeightMsgRegisterNode      = "op_weight_msg_register_node"
	OpWeightMsgUpdateNodeInfo    = "op_weight_msg_update_node_info"
	OpWeightMsgUpdateNodeStatus  = "op_weight_msg_update_node_status"
	OpWeightMsgDeregisterNode    = "op_weight_msg_deregister_node"
	OpWeightMsgStartSubscription = "op_weight_msg_start_sub_scription"
	OpWeightMsgEndSubscription   = "op_weight_msg_end_sub_scription"
	OpWeightMsgUpdateSessionInfo = "op_weight_msg_update_session_info"
	OpWeightVpnModuleEndBlock    = "op_weight_vpn_module_end_block"
)

Variables

Functions

func AppStateFromGenesisFileFn

func AppStateFromGenesisFileFn(
	r *rand.Rand, _ []simulation.Account, _ time.Time,
) (json.RawMessage, []simulation.Account, string)

func DecodeAccountStore

func DecodeAccountStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

DecodeAccountStore unmarshals the KVPair's Value to the corresponding auth type

func DecodeDistributionStore

func DecodeDistributionStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func DecodeGovStore

func DecodeGovStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func DecodeMintStore

func DecodeMintStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func DecodeSlashingStore

func DecodeSlashingStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func DecodeStakingStore

func DecodeStakingStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func DecodeSupplyStore

func DecodeSupplyStore(cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) string

func GenAuthGenesisState

func GenAuthGenesisState(cdc *codec.Codec, r *rand.Rand, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GenBankGenesisState

func GenBankGenesisState(cdc *codec.Codec, r *rand.Rand, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GenDistrGenesisState

func GenDistrGenesisState(cdc *codec.Codec, r *rand.Rand, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GenGenesisAccounts

func GenGenesisAccounts(
	cdc *codec.Codec, r *rand.Rand, accs []simulation.Account,
	genesisTimestamp time.Time, amount, numInitiallyBonded int64,
	genesisState map[string]json.RawMessage,
)

func GenGovGenesisState

func GenGovGenesisState(cdc *codec.Codec, r *rand.Rand, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GenMintGenesisState

func GenMintGenesisState(cdc *codec.Codec, r *rand.Rand, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GenSlashingGenesisState

func GenSlashingGenesisState(
	cdc *codec.Codec, r *rand.Rand, stakingGen staking.GenesisState,
	ap simulation.AppParams, genesisState map[string]json.RawMessage,
)

func GenStakingGenesisState

func GenStakingGenesisState(
	cdc *codec.Codec, r *rand.Rand, accs []simulation.Account, amount, numAccs, numInitiallyBonded int64,
	ap simulation.AppParams, genesisState map[string]json.RawMessage,
) staking.GenesisState

func GenSupplyGenesisState

func GenSupplyGenesisState(cdc *codec.Codec, amount, numInitiallyBonded, numAccs int64, genesisState map[string]json.RawMessage)

func GenVpnGenesisState

func GenVpnGenesisState(cdc *codec.Codec, r *rand.Rand, accs []simulation.Account, ap simulation.AppParams, genesisState map[string]json.RawMessage)

func GetSimulationLog

func GetSimulationLog(storeName string, cdcA, cdcB *codec.Codec, kvA, kvB cmn.KVPair) (log string)

func MakeCodec

func MakeCodec() *codec.Codec

func SetBech32AddressPrefixes

func SetBech32AddressPrefixes(config *sdk.Config)

Types

type GenesisState

type GenesisState map[string]json.RawMessage

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

type SimApp

type SimApp struct {
	*baseapp.BaseApp
	// contains filtered or unexported fields
}

func NewSimApp

func NewSimApp(logger log.Logger, db db.DB,
	traceStore io.Writer, loadLatest bool, invCheckPeriod uint,
	baseAppOptions ...func(*baseapp.BaseApp)) *SimApp

nolint:funlen

func NewSimAppUNSAFE

func NewSimAppUNSAFE(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, baseAppOptions ...func(*baseapp.BaseApp),
) (gapp *SimApp, keyMain, keyStaking *sdk.KVStoreKey, stakingKeeper staking.Keeper)

func (*SimApp) BeginBlocker

func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

func (*SimApp) EndBlocker

func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

func (*SimApp) ExportAppStateAndValidators

func (app *SimApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailWhiteList []string,
) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

func (*SimApp) InitChainer

func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

func (*SimApp) LoadHeight

func (app *SimApp) LoadHeight(height int64) error

func (*SimApp) ModuleAccountAddrs

func (app *SimApp) ModuleAccountAddrs() map[string]bool

Jump to

Keyboard shortcuts

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