app

package
v0.0.0-...-607fb14 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	Bech32MainPrefix = "hsc"
	Bip44CoinType    = 532 // see https://github.com/satoshilabs/slips/blob/master/slip-0044.md
)
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"
	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 (
	// default home directories for hscli
	DefaultCLIHome = os.ExpandEnv("$HOME/.hscli")

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

	// The module BasicManager 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{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},
	)
)

Functions

func MakeCodec

func MakeCodec() *codec.Codec

custom tx codec

func SetBech32AddressPrefixes

func SetBech32AddressPrefixes(config *sdk.Config)

SetBech32AddressPrefixes sets the global prefix to be used when serializing addresses to bech32 strings.

func SetBip44CoinType

func SetBip44CoinType(config *sdk.Config)

SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets.

Types

type App

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

Extended ABCI application

func NewApp

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

NewApp returns a reference to an initialized App.

func NewAppUNSAFE

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

NewAppUNSAFE is used for debugging purposes only.

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

func (*App) BeginBlocker

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

application updates every begin block

func (*App) EndBlocker

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

application updates every end block

func (*App) ExportAppStateAndValidators

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

export the state of hschain for a genesis file

func (*App) InitChainer

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

application update at chain initialization

func (*App) LoadHeight

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

load a particular height

func (*App) ModuleAccountAddrs

func (app *App) 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