Documentation
¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func NewTestAppOptionsWithFlagHome(homePath string) servertypes.AppOptions
- func RegisterSwaggerAPI(rtr *mux.Router, swaggerEnabled bool) error
- type CustomWasmModule
- type GenesisState
- type HandlerOptions
- type MsgServiceRouter
- type THORChainApp
- func (app *THORChainApp) AppCodec() codec.Codec
- func (app *THORChainApp) AutoCliOpts() autocli.AppOptions
- func (app *THORChainApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (a *THORChainApp) Configurator() module.Configurator
- func (a *THORChainApp) DefaultGenesis() map[string]json.RawMessage
- func (app *THORChainApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *THORChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *THORChainApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
- func (app *THORChainApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *THORChainApp) GetStoreKeys() []storetypes.StoreKey
- func (app *THORChainApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *THORChainApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *THORChainApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *THORChainApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *THORChainApp) LegacyAmino() *codec.LegacyAmino
- func (app *THORChainApp) LoadHeight(height int64) error
- func (app *THORChainApp) MsgServiceRouter() *MsgServiceRouter
- func (app *THORChainApp) Name() string
- func (app *THORChainApp) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *THORChainApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *THORChainApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *THORChainApp) RegisterTendermintService(clientCtx client.Context)
- func (app *THORChainApp) RegisterTxService(clientCtx client.Context)
- func (app *THORChainApp) RegisterUpgradeHandlers()
- func (app *THORChainApp) SetInterfaceRegistry(registry types.InterfaceRegistry)
- func (app *THORChainApp) SimulationManager() *module.SimulationManager
- func (app *THORChainApp) TxConfig() client.TxConfig
- type WasmBankKeeper
Constants ¶
const (
NodeDir = ".thornode"
)
const (
TestApp = "testApp"
)
Variables ¶
var ( // DefaultNodeHome default home directories for appd DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir )
These constants are derived from the above variables. These are the ones we will want to use in the code, based on any overrides above
var Upgrades = []upgrades.Upgrade{ v3_4_0.NewUpgrade(), }
Upgrades list of chain upgrades
var WasmMaxSize = 2_624_000
Support slightly larger wasm files
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
NOTE: This is solely to be used for testing purposes.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler constructor
func NewTestAppOptionsWithFlagHome ¶
func NewTestAppOptionsWithFlagHome(homePath string) servertypes.AppOptions
Types ¶
type CustomWasmModule ¶ added in v3.3.0
CustomWasmModule re-exposes the underlying module's methods, but prevents Services from being registered, as these should be registered and handled in x/thorchain
func NewCustomWasmModule ¶ added in v3.3.0
func NewCustomWasmModule( module *wasm.AppModule, ) CustomWasmModule
NewCustomWasmModule creates a new CustomWasmModule object
func (CustomWasmModule) RegisterServices ¶ added in v3.3.0
func (am CustomWasmModule) RegisterServices(cfg module.Configurator)
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState 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 HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions WasmConfig *wasmtypes.WasmConfig WasmKeeper *wasmkeeper.Keeper TXCounterStoreService corestoretypes.KVStoreService BypassMinFeeMsgTypes []string THORChainKeeper keeper.Keeper }
HandlerOptions extend the SDK's AnteHandler options
type MsgServiceRouter ¶
type MsgServiceRouter struct { *baseapp.MsgServiceRouter // contains filtered or unexported fields }
MsgServiceRouter extends baseapp's MsgServiceRouter to support custom routing
func NewMsgServiceRouter ¶
func NewMsgServiceRouter(bAppMsr *baseapp.MsgServiceRouter) *MsgServiceRouter
func (*MsgServiceRouter) AddCustomRoute ¶
func (msr *MsgServiceRouter) AddCustomRoute(serviceName string, handler interface{})
func (*MsgServiceRouter) RegisterService ¶
func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{})
type THORChainApp ¶
type THORChainApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.BaseKeeper StakingKeeper *stakingkeeper.Keeper MintKeeper mintkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper ThorchainKeeper thorchainkeeper.Keeper DenomKeeper denomkeeper.Keeper WasmKeeper wasmkeeper.Keeper // the module manager ModuleManager *module.Manager BasicModuleManager module.BasicManager // contains filtered or unexported fields }
ChainApp extended ABCI application
func NewChainApp ¶
func NewChainApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *THORChainApp
NewChainApp returns a reference to an initialized ChainApp.
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) AutoCliOpts ¶
func (app *THORChainApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*THORChainApp) BeginBlocker ¶
func (app *THORChainApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
BeginBlocker application updates every begin block
func (*THORChainApp) Configurator ¶
func (a *THORChainApp) Configurator() module.Configurator
func (*THORChainApp) DefaultGenesis ¶
func (a *THORChainApp) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*THORChainApp) EndBlocker ¶
EndBlocker application updates every end block
func (*THORChainApp) ExportAppStateAndValidators ¶
func (app *THORChainApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*THORChainApp) FinalizeBlock ¶
func (app *THORChainApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
func (*THORChainApp) GetKey ¶
func (app *THORChainApp) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*THORChainApp) GetStoreKeys ¶
func (app *THORChainApp) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
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) *storetypes.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, error)
InitChainer application update at chain initialization
func (*THORChainApp) InterfaceRegistry ¶
func (app *THORChainApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns ChainApp's InterfaceRegistry
func (*THORChainApp) LegacyAmino ¶
func (app *THORChainApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns legacy 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) MsgServiceRouter ¶
func (app *THORChainApp) MsgServiceRouter() *MsgServiceRouter
MsgServiceRouter returns the MsgServiceRouter.
func (*THORChainApp) PreBlocker ¶
func (app *THORChainApp) PreBlocker(ctx sdk.Context, req *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
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) RegisterNodeService ¶
func (app *THORChainApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
func (*THORChainApp) RegisterTendermintService ¶
func (app *THORChainApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*THORChainApp) RegisterTxService ¶
func (app *THORChainApp) RegisterTxService(clientCtx client.Context)
RegisterTxService implements the Application.RegisterTxService method.
func (*THORChainApp) RegisterUpgradeHandlers ¶
func (app *THORChainApp) RegisterUpgradeHandlers()
RegisterUpgradeHandlers registers the chain upgrade handlers
func (*THORChainApp) SetInterfaceRegistry ¶
func (app *THORChainApp) SetInterfaceRegistry(registry types.InterfaceRegistry)
SetInterfaceRegistry sets the InterfaceRegistry.
func (*THORChainApp) SimulationManager ¶
func (app *THORChainApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
func (*THORChainApp) TxConfig ¶
func (app *THORChainApp) TxConfig() client.TxConfig
TxConfig returns ChainApp's TxConfig
type WasmBankKeeper ¶ added in v3.3.0
type WasmBankKeeper struct {
wasmtypes.BankKeeper
}
x/wasm uses bankkeeper.IsSendEnabledCoins to check the movement of funds when instantiating, executing, sudoing, and executing submsgs WasmBankKeeper bypasses the IsSendEnabledCoins check to allow funds to be transferred for these actions, without affecting the behaviour of x/bank MsgSend
func NewWasmBankKeeper ¶ added in v3.3.0
func NewWasmBankKeeper(keeper wasmtypes.BankKeeper) WasmBankKeeper