app

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	StakePerAccount                        = "stake_per_account"
	InitiallyBondedValidators              = "initially_bonded_validators"
	OpWeightDeductFee                      = "op_weight_deduct_fee"
	OpWeightMsgSend                        = "op_weight_msg_send"
	OpWeightMsgMultiSend                   = "op_weight_msg_multisend"
	OpWeightMsgSetWithdrawAddress          = "op_weight_msg_set_withdraw_address"
	OpWeightMsgWithdrawDelegationReward    = "op_weight_msg_withdraw_delegation_reward"
	OpWeightMsgWithdrawValidatorCommission = "op_weight_msg_withdraw_validator_commission"
	OpWeightSubmitTextProposal             = "op_weight_submit_text_proposal"
	OpWeightSubmitCommunitySpendProposal   = "op_weight_submit_community_spend_proposal"
	OpWeightSubmitParamChangeProposal      = "op_weight_submit_param_change_proposal"
	OpWeightMsgDeposit                     = "op_weight_msg_deposit"
	OpWeightMsgVote                        = "op_weight_msg_vote"
	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 xarcli
	DefaultCLIHome = os.ExpandEnv("$HOME/.xarcli")
	// default home directories for xard
	DefaultNodeHome = os.ExpandEnv("$HOME/.xard")

	// ModuleBasics The module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		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{},
		evidence.AppModuleBasic{},

		issue.AppModuleBasic{},
		nft.AppModuleBasic{},
		auction.AppModuleBasic{},
		csdt.AppModuleBasic{},
		liquidator.AppModuleBasic{},
		oracle.AppModuleBasic{},
		record.AppModuleBasic{},

		denominations.AppModuleBasic{},

		market.AppModuleBasic{},
		order.AppModuleBasic{},
	)
)

Functions

func ExportStateToJSON

func ExportStateToJSON(app *XarApp, path string) error

ExportStateToJSON util function to export the app state to JSON

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a mapping of the application's module account permissions.

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec creates the application codec. The codec is sealed before it is returned.

Types

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState defines a type alias for the Xar genesis application state.

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

NewDefaultGenesisState generates the default state for the application.

type XarApp

type XarApp struct {
	*bam.BaseApp

	NFTKeeper nft.Keeper
	// contains filtered or unexported fields
}

xarApp extended ABCI application

func NewXarApp

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

NewXarApp returns a reference to an initialized xarApp.

func NewXarAppUNSAFE

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

NewxarAppUNSAFE is used for debugging purposes only.

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

func (*XarApp) BankKeeper

func (app *XarApp) BankKeeper() bank.Keeper

func (*XarApp) BeginBlocker

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

application updates every begin block

func (*XarApp) Codec

func (app *XarApp) Codec() *codec.Codec

Codec returns the application's sealed codec.

func (*XarApp) EndBlocker

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

application updates every end block

func (*XarApp) ExecKeeper

func (app *XarApp) ExecKeeper() execution.Keeper

func (*XarApp) ExportAppStateAndValidators

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

ExportAppStateAndValidators export the state of xar for a genesis file

func (*XarApp) InitChainer

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

application update at chain initialization

func (*XarApp) LoadHeight

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

load a particular height

func (*XarApp) MM

func (app *XarApp) MM() *module.Manager

Module Manager returns the application's module manager

func (*XarApp) MQ

func (app *XarApp) MQ() types.Backend

func (*XarApp) MarketKeeper

func (app *XarApp) MarketKeeper() market.Keeper

func (*XarApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*XarApp) OrderKeeper

func (app *XarApp) OrderKeeper() order.Keeper

func (*XarApp) SupplyKeeper

func (app *XarApp) SupplyKeeper() supply.Keeper

Jump to

Keyboard shortcuts

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