Documentation ¶
Index ¶
- Variables
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- type App
- type GenesisState
- type THORChainApp
- func (app *THORChainApp) AppCodec() codec.Marshaler
- func (app *THORChainApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *THORChainApp) BlockedAddrs() map[string]bool
- func (app *THORChainApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *THORChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *THORChainApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *THORChainApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *THORChainApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *THORChainApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *THORChainApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *THORChainApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *THORChainApp) LegacyAmino() *codec.LegacyAmino
- func (app *THORChainApp) LoadHeight(height int64) error
- func (app *THORChainApp) ModuleAccountAddrs() map[string]bool
- func (app *THORChainApp) Name() string
- func (app *THORChainApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *THORChainApp) RegisterTendermintService(ctx client.Context)
- func (app *THORChainApp) RegisterTxService(ctx client.Context)
- type ThornodeLogWrapper
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome = func(appName string) string { return os.ExpandEnv("$HOME/.thornode") } // 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{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, mint.AppModuleBasic{}, params.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, transfer.AppModuleBasic{}, thorchain.AppModuleBasic{}, ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
Types ¶
type App ¶
type App interface { // Name the assigned name of the app. Name() string // LegacyAmino The application types codec. // NOTE: This shoult be sealed before being returned. LegacyAmino() *codec.LegacyAmino // BeginBlocker Application updates every begin block. BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // EndBlocker Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock // InitChainer Application update at chain (i.e app) initialization. InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain // LoadHeight Loads the app at a given height. LoadHeight(height int64) error // ExportAppStateAndValidators Exports the state of the application for a genesis file. ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error) // ModuleAccountAddrs All the registered module account addreses. ModuleAccountAddrs() map[string]bool }
App implements the common methods for a Cosmos SDK-based application specific blockchain.
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() GenesisState
NewDefaultGenesisState generates the default state for the application.
type THORChainApp ¶
type THORChainApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper MintKeeper mintkeeper.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 TransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // contains filtered or unexported fields }
THORChainApp extends an ABCI application
func New ¶
func New( appName string, logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig appparams.EncodingConfig, baseAppOptions ...func(*baseapp.BaseApp), ) *THORChainApp
New returns a reference to an initialized thornode application. NewSimApp returns a reference to an initialized SimApp.
func (*THORChainApp) AppCodec ¶
func (app *THORChainApp) AppCodec() codec.Marshaler
AppCodec returns 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 (*THORChainApp) BeginBlocker ¶
func (app *THORChainApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*THORChainApp) BlockedAddrs ¶
func (app *THORChainApp) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*THORChainApp) EndBlocker ¶
func (app *THORChainApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*THORChainApp) ExportAppStateAndValidators ¶
func (app *THORChainApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*THORChainApp) GetKey ¶
func (app *THORChainApp) 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 (*THORChainApp) GetMemKey ¶
func (app *THORChainApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*THORChainApp) GetSubspace ¶
func (app *THORChainApp) 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 (*THORChainApp) GetTKey ¶
func (app *THORChainApp) 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 (*THORChainApp) InitChainer ¶
func (app *THORChainApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*THORChainApp) InterfaceRegistry ¶
func (app *THORChainApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns InterfaceRegistry
func (*THORChainApp) LegacyAmino ¶
func (app *THORChainApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp'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 (*THORChainApp) LoadHeight ¶
func (app *THORChainApp) LoadHeight(height int64) error
LoadHeight loads a particular height
func (*THORChainApp) ModuleAccountAddrs ¶
func (app *THORChainApp) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*THORChainApp) RegisterAPIRoutes ¶
func (app *THORChainApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*THORChainApp) RegisterTendermintService ¶
func (app *THORChainApp) RegisterTendermintService(ctx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*THORChainApp) RegisterTxService ¶
func (app *THORChainApp) RegisterTxService(ctx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
type ThornodeLogWrapper ¶
ThornodeLogWrapper provides a wrapper around a zerolog.Logger instance. It implements Tendermint's Logger interface.
func (ThornodeLogWrapper) Debug ¶
func (z ThornodeLogWrapper) Debug(msg string, keyVals ...interface{})
Debug implements Tendermint's Logger interface and logs with level DEBUG. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.
func (ThornodeLogWrapper) Error ¶
func (z ThornodeLogWrapper) Error(msg string, keyVals ...interface{})
Error implements Tendermint's Logger interface and logs with level ERR. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.
func (ThornodeLogWrapper) Info ¶
func (z ThornodeLogWrapper) Info(msg string, keyVals ...interface{})
Info implements Tendermint's Logger interface and logs with level INFO. A set of key/value tuples may be provided to add context to the log. The number of tuples must be even and the key of the tuple must be a string.
func (ThornodeLogWrapper) With ¶
func (z ThornodeLogWrapper) With(keyVals ...interface{}) tmlog.Logger
With returns a new wrapped logger with additional context provided by a set of key/value tuples. The number of tuples must be even and the key of the tuple must be a string.