app

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StakePerAccount                                        = "stake_per_account"
	InitiallyBondedValidators                              = "initially_bonded_validators"
	OpWeightDeductFee                                      = "op_weight_deduct_fee"
	OpWeightMsgSend                                        = "op_weight_msg_send"
	OpWeightSingleInputMsgMultiSend                        = "op_weight_single_input_msg_multisend"
	OpWeightMsgSetWithdrawAddress                          = "op_weight_msg_set_withdraw_address"
	OpWeightMsgWithdrawDelegationReward                    = "op_weight_msg_withdraw_delegation_reward"
	OpWeightMsgWithdrawValidatorCommission                 = "op_weight_msg_withdraw_validator_commission"
	OpWeightSubmitVotingSlashingTextProposal               = "op_weight_submit_voting_slashing_text_proposal"
	OpWeightSubmitVotingSlashingCommunitySpendProposal     = "op_weight_submit_voting_slashing_community_spend_proposal"
	OpWeightSubmitVotingSlashingParamChangeProposal        = "op_weight_submit_voting_slashing_param_change_proposal"
	OpWeightSubmitVotingSlashingTaxRateUpdateProposal      = "op_weight_submit_voting_slashing_tax_rate_update_proposal"
	OpWeightSubmitVotingSlashingRewardWeightUpdateProposal = "op_weight_submit_voting_slashing_reward_weight_update_proposal"
	OpWeightMsgDeposit                                     = "op_weight_msg_deposit"
	OpWeightMsgCreateValidator                             = "op_weight_msg_create_validator"
	OpWeightMsgEditValidator                               = "op_weight_msg_edit_validator"
	OpWeightMsgDelegate                                    = "op_weight_msg_delegate"
	OpWeightMsgUndelegate                                  = "op_weight_msg_undelegate"
	OpWeightMsgBeginRedelegate                             = "op_weight_msg_begin_redelegate"
	OpWeightMsgUnjail                                      = "op_weight_msg_unjail"
)

Simulation parameter constants

Variables

View Source
var (
	// DefaultCLIHome defines default home directories for terracli
	DefaultCLIHome = os.ExpandEnv("$HOME/.terracli")

	// DefaultNodeHome defines default home directories for terrad
	DefaultNodeHome = os.ExpandEnv("$HOME/.terrad")

	// ModuleBasics = The ModuleBasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		genaccounts.AppModuleBasic{},
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(paramsclient.ProposalHandler, distrclient.ProposalHandler, treasuryclient.TaxRateUpdateProposalHandler, treasuryclient.RewardWeightUpdateProposalHandler),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},
		oracle.AppModuleBasic{},
		market.AppModuleBasic{},
		treasury.AppModuleBasic{},
	)
)

Functions

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec builds application codec

Types

type TerraApp

type TerraApp struct {
	*bam.BaseApp
	// contains filtered or unexported fields
}

TerraApp is Extended ABCI application

func NewTerraApp

func NewTerraApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp)) *TerraApp

NewTerraApp returns a reference to an initialized TerraApp.

func NewTerraAppUNSAFE added in v0.3.0

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

NewTerraAppUNSAFE is used for debugging purposes only.

NOTE: to not use this function with non-test code

func (*TerraApp) BeginBlocker

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

BeginBlocker defines application updates at every begin block

func (*TerraApp) EndBlocker

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

EndBlocker defines application updates at every end block

func (*TerraApp) ExportAppStateAndValidators

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

ExportAppStateAndValidators exports the state of terra for a genesis file

func (*TerraApp) InitChainer added in v0.3.0

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

InitChainer defines application update at chain initialization

func (*TerraApp) LoadHeight

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

LoadHeight loads a particular height

func (*TerraApp) ModuleAccountAddrs added in v0.3.0

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

ModuleAccountAddrs returns all the app's module account addresses.

Jump to

Keyboard shortcuts

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