Documentation
¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func SetAddressConfig()
- func VerifyAddressFormat(bz []byte) error
- type CosmosApp
- type EmptyAppOptions
- type GenesisState
- type HiloApp
- func (app *HiloApp) AppCodec() codec.Codec
- func (app *HiloApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *HiloApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *HiloApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *HiloApp) GetBaseApp() *baseapp.BaseApp
- func (app *HiloApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *HiloApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *HiloApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *HiloApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *HiloApp) GetStakingKeeper() stakingkeeper.Keeper
- func (app *HiloApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *HiloApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *HiloApp) GetTxConfig() client.TxConfig
- func (app *HiloApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *HiloApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *HiloApp) LegacyAmino() *codec.LegacyAmino
- func (app *HiloApp) LoadHeight(height int64) error
- func (app *HiloApp) ModuleAccountAddrs() map[string]bool
- func (app *HiloApp) Name() string
- func (app *HiloApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *HiloApp) RegisterTendermintService(clientCtx client.Context)
- func (app *HiloApp) RegisterTxService(clientCtx client.Context)
Constants ¶
const ( // Name defines the application name of the Hilo network. Name = "hilo" // BondDenom defines the native staking token denomination. BondDenom = "uhilo" // MaxAddrLen is the maximum allowed length (in bytes) for an address. // // NOTE: In the SDK, the default value is 255. MaxAddrLen = 20 )
const AccountAddressPrefix = "hilo"
AccountAddressPrefix defines the Hilo network's Bech32 address prefix.
Variables ¶
var ( // DefaultNodeHome defines the default home directory for the application // daemon. DefaultNodeHome string // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bankModule{}, capability.AppModuleBasic{}, stakingModule{}, mintModule{}, distr.AppModuleBasic{}, govModule{AppModuleBasic: gov.NewAppModuleBasic(getGovProposalHandlers()...)}, params.AppModuleBasic{}, crisisModule{}, slashingModule{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, vesting.AppModuleBasic{}, leverage.AppModuleBasic{}, peggy.AppModuleBasic{}, ) )
var ( AccountPubKeyPrefix = AccountAddressPrefix + "pub" ValidatorAddressPrefix = AccountAddressPrefix + "valoper" ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" )
Account specific Bech32 prefixes.
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in HiloApp testing.
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a deep copy of the module account permissions.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func VerifyAddressFormat ¶
Types ¶
type CosmosApp ¶
type CosmosApp interface { // The assigned name of the app. Name() string // The application legacy Amino codec. // // NOTE: This should be sealed before being returned. LegacyAmino() *codec.LegacyAmino // Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // Loads the app at a given height. LoadHeight(height int64) error // Exports the state of the application for a genesis file. ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (types.ExportedApp, error) // All the registered module account addresses. ModuleAccountAddrs() map[string]bool }
CosmosApp defines the common methods for a Cosmos SDK-based application-specific blockchain.
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
func (EmptyAppOptions) Get ¶
func (EmptyAppOptions) Get(o string) interface{}
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(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type HiloApp ¶
type HiloApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper uibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper LeverageKeeper leveragekeeper.Keeper PeggyKeeper peggykeeper.Keeper // make scoped keepers public for testing purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // contains filtered or unexported fields }
HiloApp defines the ABCI application for the Hilo network as an extension of the Cosmos SDK's BaseApp.
func (*HiloApp) AppCodec ¶
AppCodec returns Hilo's app codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*HiloApp) BeginBlocker ¶
func (app *HiloApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker implements Hilo's BeginBlock ABCI method.
func (*HiloApp) EndBlocker ¶
func (app *HiloApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker implements Hilo's EndBlock ABCI method.
func (*HiloApp) ExportAppStateAndValidators ¶
func (app *HiloApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*HiloApp) GetBaseApp ¶
GetBaseApp is used solely for testing purposes.
func (*HiloApp) GetIBCKeeper ¶
GetIBCKeeper is used solely for testing purposes.
func (*HiloApp) GetKey ¶
func (app *HiloApp) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*HiloApp) GetMemKey ¶
func (app *HiloApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*HiloApp) GetScopedIBCKeeper ¶
func (app *HiloApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper is used solely for testing purposes.
func (*HiloApp) GetStakingKeeper ¶
func (app *HiloApp) GetStakingKeeper() stakingkeeper.Keeper
GetStakingKeeper is used solely for testing purposes.
func (*HiloApp) GetSubspace ¶
func (app *HiloApp) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*HiloApp) GetTKey ¶
func (app *HiloApp) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*HiloApp) GetTxConfig ¶
GetTxConfig is used solely for testing purposes.
func (*HiloApp) InitChainer ¶
func (app *HiloApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer implements Hilo's InitChain ABCI method.
func (*HiloApp) InterfaceRegistry ¶
func (app *HiloApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Hilo's InterfaceRegistry.
func (*HiloApp) LegacyAmino ¶
func (app *HiloApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Hilo's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.
func (*HiloApp) LoadHeight ¶
LoadHeight loads a particular height via Hilo's BaseApp.
func (*HiloApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all of Hilo's module account addresses.
func (*HiloApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*HiloApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*HiloApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.