Documentation
¶
Index ¶
- Variables
- func NewQueryRouter() *queryrouter
- func NewRouter() *router
- type Protocol
- type ProtocolBase
- type ProtocolEngine
- func (pe *ProtocolEngine) Activate(version uint64) bool
- func (pe *ProtocolEngine) Add(p Protocol) Protocol
- func (pe *ProtocolEngine) GetByVersion(v uint64) (Protocol, bool)
- func (pe *ProtocolEngine) GetCurrentProtocol() Protocol
- func (pe *ProtocolEngine) GetCurrentProtocolVersionByStore(kvStore sdk.KVStore) uint64
- func (pe *ProtocolEngine) GetCurrentVersion() uint64
- func (pe *ProtocolEngine) GetKVStoreKeys() []*sdk.KVStoreKey
- func (pe *ProtocolEngine) GetKeyMain() *sdk.KVStoreKey
- func (pe *ProtocolEngine) GetTransientStoreKeys() []*sdk.TransientStoreKey
- func (pe *ProtocolEngine) GetUpgradeConfigByStore(kvStore sdk.KVStore) (protocolKeeper.UpgradeConfig, bool)
- func (pe *ProtocolEngine) LoadCurrentProtocol(kvStore sdk.KVStore)
- type QueryRouter
- type Router
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyMain = sdk.NewKVStoreKey("main") KeyProtocol = sdk.NewKVStoreKey("protocol") KeyAccount = sdk.NewKVStoreKey("acc") KeyStake = sdk.NewKVStoreKey("stake") TkeyStake = sdk.NewTransientStoreKey("transient_stake") KeyMint = sdk.NewKVStoreKey("mint") KeyDistr = sdk.NewKVStoreKey("distr") TkeyDistr = sdk.NewTransientStoreKey("transient_distr") KeySlashing = sdk.NewKVStoreKey("slashing") KeyGov = sdk.NewKVStoreKey("gov") KeyRecord = sdk.NewKVStoreKey("record") KeyFeeCollection = sdk.NewKVStoreKey("fee") KeyParams = sdk.NewKVStoreKey("params") TkeyParams = sdk.NewTransientStoreKey("transient_params") KeyService = sdk.NewKVStoreKey("service") KeyGuardian = sdk.NewKVStoreKey("guardian") KeyUpgrade = sdk.NewKVStoreKey("upgrade") )
Functions ¶
func NewQueryRouter ¶
func NewQueryRouter() *queryrouter
nolint NewRouter - create new router TODO either make Function unexported or make return type (router) Exported
Types ¶
type Protocol ¶
type Protocol interface {
GetDefinition() common.ProtocolDefinition
GetRouter() Router
GetQueryRouter() QueryRouter
GetAnteHandler() sdk.AnteHandler // ante handler for fee and auth
GetFeeRefundHandler() sdk.FeeRefundHandler // fee handler for fee refund
GetFeePreprocessHandler() sdk.FeePreprocessHandler // fee handler for fee preprocessor
ExportAppStateAndValidators(ctx sdk.Context, forZeroHeight bool) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
// may be nil
GetInitChainer() sdk.InitChainer1 // initialize state with validators and state blob
GetBeginBlocker() sdk.BeginBlocker // logic to run before any txs
GetEndBlocker() sdk.EndBlocker // logic to run after all txs, and to determine valset changes
GetKVStoreKeyList() []*sdk.KVStoreKey
Load(protocolKeeper.Keeper)
Init()
}
type ProtocolBase ¶
type ProtocolBase struct {
Definition common.ProtocolDefinition
}
func (ProtocolBase) GetDefinition ¶
func (pb ProtocolBase) GetDefinition() common.ProtocolDefinition
type ProtocolEngine ¶
type ProtocolEngine struct {
// contains filtered or unexported fields
}
func (pb *ProtocolBase) GetEngine() *ProtocolEngine {
return pb.engine
}
func NewProtocolEngine ¶
func NewProtocolEngine(cdc *codec.Codec) ProtocolEngine
func (*ProtocolEngine) Activate ¶
func (pe *ProtocolEngine) Activate(version uint64) bool
To be used for Protocol with version > 0
func (*ProtocolEngine) Add ¶
func (pe *ProtocolEngine) Add(p Protocol) Protocol
func (*ProtocolEngine) GetByVersion ¶
func (pe *ProtocolEngine) GetByVersion(v uint64) (Protocol, bool)
func (*ProtocolEngine) GetCurrentProtocol ¶
func (pe *ProtocolEngine) GetCurrentProtocol() Protocol
func (*ProtocolEngine) GetCurrentProtocolVersionByStore ¶
func (pe *ProtocolEngine) GetCurrentProtocolVersionByStore(kvStore sdk.KVStore) uint64
func (*ProtocolEngine) GetCurrentVersion ¶
func (pe *ProtocolEngine) GetCurrentVersion() uint64
func (*ProtocolEngine) GetKVStoreKeys ¶
func (pe *ProtocolEngine) GetKVStoreKeys() []*sdk.KVStoreKey
func (*ProtocolEngine) GetKeyMain ¶
func (pe *ProtocolEngine) GetKeyMain() *sdk.KVStoreKey
func (*ProtocolEngine) GetTransientStoreKeys ¶
func (pe *ProtocolEngine) GetTransientStoreKeys() []*sdk.TransientStoreKey
func (*ProtocolEngine) GetUpgradeConfigByStore ¶
func (pe *ProtocolEngine) GetUpgradeConfigByStore(kvStore sdk.KVStore) (protocolKeeper.UpgradeConfig, bool)
func (*ProtocolEngine) LoadCurrentProtocol ¶
func (pe *ProtocolEngine) LoadCurrentProtocol(kvStore sdk.KVStore)
type QueryRouter ¶
type QueryRouter interface {
AddRoute(r string, h sdk.Querier) (rtr QueryRouter)
Route(path string) (h sdk.Querier)
}
QueryRouter provides queryables for each query path.
Click to show internal directories.
Click to hide internal directories.