Documentation ¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func MakeCodec() *codec.Codec
- func MakePulp() *authTypes.Pulp
- type GenesisState
- type HeimdallApp
- func (app *HeimdallApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *HeimdallApp) Codec() *codec.Codec
- func (app *HeimdallApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *HeimdallApp) ExportAppStateAndValidators() (appState json.RawMessage, validators []tmTypes.GenesisValidator, err error)
- func (app *HeimdallApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *HeimdallApp) GetSubspace(moduleName string) subspace.Subspace
- func (app *HeimdallApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *HeimdallApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *HeimdallApp) LoadHeight(height int64) error
- func (app *HeimdallApp) ModuleAccountAddrs() map[string]bool
- func (app *HeimdallApp) Name() string
- type ModuleCommunicator
- func (d ModuleCommunicator) AddFeeToDividendAccount(ctx sdk.Context, valID types.ValidatorID, fee *big.Int) sdk.Error
- func (d ModuleCommunicator) GetACKCount(ctx sdk.Context) uint64
- func (d ModuleCommunicator) GetCoins(ctx sdk.Context, addr types.HeimdallAddress) types.Coins
- func (d ModuleCommunicator) GetValidatorFromValID(ctx sdk.Context, valID types.ValidatorID) (validator types.Validator, ok bool)
- func (d ModuleCommunicator) IsCurrentValidatorByAddress(ctx sdk.Context, address []byte) bool
- func (d ModuleCommunicator) SendCoins(ctx sdk.Context, fromAddr types.HeimdallAddress, toAddr types.HeimdallAddress, ...) sdk.Error
- func (d ModuleCommunicator) SetCoins(ctx sdk.Context, addr types.HeimdallAddress, amt types.Coins) sdk.Error
Constants ¶
const ( // AppName denotes app name AppName = "Heimdall" // ABCIPubKeyTypeSecp256k1 denotes pub key type ABCIPubKeyTypeSecp256k1 = "secp256k1" )
Variables ¶
var ( // 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( params.AppModuleBasic{}, auth.AppModuleBasic{}, bank.AppModuleBasic{}, supply.AppModuleBasic{}, staking.AppModuleBasic{}, checkpoint.AppModuleBasic{}, bor.AppModuleBasic{}, clerk.AppModuleBasic{}, topup.AppModuleBasic{}, gov.NewAppModuleBasic(paramsClient.ProposalHandler), ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
Types ¶
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState the genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type HeimdallApp ¶
type HeimdallApp struct { *bam.BaseApp // keepers AccountKeeper auth.AccountKeeper BankKeeper bank.Keeper SupplyKeeper supply.Keeper GovKeeper gov.Keeper CheckpointKeeper checkpoint.Keeper StakingKeeper staking.Keeper BorKeeper bor.Keeper ClerkKeeper clerk.Keeper TopupKeeper topup.Keeper // param keeper ParamsKeeper params.Keeper // total coins supply TotalCoinsSupply types.Coins // contains filtered or unexported fields }
HeimdallApp main heimdall app
func NewHeimdallApp ¶
func NewHeimdallApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.BaseApp)) *HeimdallApp
NewHeimdallApp creates heimdall app
func (*HeimdallApp) BeginBlocker ¶
func (app *HeimdallApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*HeimdallApp) Codec ¶
func (app *HeimdallApp) Codec() *codec.Codec
Codec returns HeimdallApp's 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 (*HeimdallApp) EndBlocker ¶
func (app *HeimdallApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker executes on each end block
func (*HeimdallApp) ExportAppStateAndValidators ¶
func (app *HeimdallApp) ExportAppStateAndValidators() ( appState json.RawMessage, validators []tmTypes.GenesisValidator, err error, )
ExportAppStateAndValidators exports the state of heimdall for a genesis file
func (*HeimdallApp) GetKey ¶
func (app *HeimdallApp) 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 (*HeimdallApp) GetSubspace ¶
func (app *HeimdallApp) GetSubspace(moduleName string) subspace.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*HeimdallApp) GetTKey ¶
func (app *HeimdallApp) 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 (*HeimdallApp) InitChainer ¶
func (app *HeimdallApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer initializes chain
func (*HeimdallApp) LoadHeight ¶
func (app *HeimdallApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*HeimdallApp) ModuleAccountAddrs ¶
func (app *HeimdallApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
type ModuleCommunicator ¶
type ModuleCommunicator struct {
App *HeimdallApp
}
ModuleCommunicator retriever
func (ModuleCommunicator) AddFeeToDividendAccount ¶
func (d ModuleCommunicator) AddFeeToDividendAccount(ctx sdk.Context, valID types.ValidatorID, fee *big.Int) sdk.Error
AddFeeToDividendAccount add fee to dividend account
func (ModuleCommunicator) GetACKCount ¶
func (d ModuleCommunicator) GetACKCount(ctx sdk.Context) uint64
GetACKCount returns ack count
func (ModuleCommunicator) GetCoins ¶
func (d ModuleCommunicator) GetCoins(ctx sdk.Context, addr types.HeimdallAddress) types.Coins
GetCoins gets coins
func (ModuleCommunicator) GetValidatorFromValID ¶
func (d ModuleCommunicator) GetValidatorFromValID(ctx sdk.Context, valID types.ValidatorID) (validator types.Validator, ok bool)
GetValidatorFromValID get validator from validator id
func (ModuleCommunicator) IsCurrentValidatorByAddress ¶
func (d ModuleCommunicator) IsCurrentValidatorByAddress(ctx sdk.Context, address []byte) bool
IsCurrentValidatorByAddress check if validator is current validator
func (ModuleCommunicator) SendCoins ¶
func (d ModuleCommunicator) SendCoins(ctx sdk.Context, fromAddr types.HeimdallAddress, toAddr types.HeimdallAddress, amt types.Coins) sdk.Error
SendCoins transfers coins