Documentation ¶
Index ¶
- Variables
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options AnteHandlerOptions) (sdk.AnteHandler, error)
- type AnteHandlerOptions
- type App
- type GenesisState
- type THORChainApp
- func (app *THORChainApp) AppCodec() codec.Codec
- 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)
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome = func() 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{}, mint.AppModuleBasic{}, params.AppModuleBasic{}, upgrade.AppModuleBasic{}, thorchain.AppModuleBasic{}, ) )
Functions ¶
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
func NewAnteHandler ¶
func NewAnteHandler(options AnteHandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
Types ¶
type AnteHandlerOptions ¶
type AnteHandlerOptions struct { AccountKeeper ante.AccountKeeper BankKeeper types.BankKeeper FeegrantKeeper ante.FeegrantKeeper SignModeHandler authsigning.SignModeHandler SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error THORChainKeeper keeper.Keeper }
AnteHandlerOptions are the options required for constructing a default SDK AnteHandler.
type App ¶
type App interface { // Name the assigned name of the app. Name() string // LegacyAmino The application types codec. // NOTE: This should 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 addresses. 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.
type THORChainApp ¶
type THORChainApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper stakingkeeper.Keeper MintKeeper mintkeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper // 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, telemetryEnabled bool, baseAppOptions ...func(*baseapp.BaseApp), ) *THORChainApp
New returns a reference to an initialized thornode application.
func (*THORChainApp) AppCodec ¶
func (app *THORChainApp) AppCodec() codec.Codec
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 the app'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.