Documentation ¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func ModuleAccountAddrs() map[string]bool
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetZerologDatadogErrorTrackingFormat()
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *App) Close() error
- func (app *App) Commiter(ctx sdk.Context)
- func (app *App) DefaultGenesis() map[string]json.RawMessage
- func (app *App) DisableHealthMonitorForTesting()
- func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)deprecated
- func (app *App) GetBaseApp() *baseapp.BaseApp
- func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *App) InterfaceRegistry() types.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterDaemonWithHealthMonitor(healthCheckableDaemon daemontypes.HealthCheckable, ...)
- func (app *App) RegisterNodeService(clientCtx client.Context)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- func (app *App) SimulationManager() *module.SimulationManager
- func (app *App) TxConfig() client.TxConfig
- type DatadogErrorTrackingObject
- type EncodingConfig
- type GenesisState
- type HandlerOptions
Constants ¶
const ( AppName = "jinxprotocol" AppDaemonName = AppName + "d" ServiceName = "validator" )
Variables ¶
var ( // `Upgrades` defines the upgrade handlers and store loaders for the application. // New upgrades should be added to this slice after they are implemented. Upgrades = []upgrades.Upgrade{ v3_0_0.Upgrade, } Forks = []upgrades.Fork{} )
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string )
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, deducts fees from the first signer, and handles in-memory clob messages.
Link to default `AnteHandler` used by cosmos sdk: https://github.com/cosmos/cosmos-sdk/blob/3bb27795742dab2451b232bab02b82566d1a0192/x/auth/ante/ante.go#L25
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SetZerologDatadogErrorTrackingFormat ¶
func SetZerologDatadogErrorTrackingFormat()
SetZerologDatadogErrorTrackingFormat sets custom error formatting for log tag values that are errors for the zerolog library. Converts them to a format that is compatible with datadog error tracking.
Types ¶
type App ¶
type App struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper *govkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly IBCKeeper *ibckeeper.Keeper ICAHostKeeper icahostkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper RatelimitKeeper ratelimitmodulekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper PricesKeeper pricesmodulekeeper.Keeper AssetsKeeper assetsmodulekeeper.Keeper BlockTimeKeeper blocktimemodulekeeper.Keeper BridgeKeeper bridgemodulekeeper.Keeper DelayMsgKeeper delaymsgmodulekeeper.Keeper FeeTiersKeeper feetiersmodulekeeper.Keeper PerpetualsKeeper *perpetualsmodulekeeper.Keeper VestKeeper vestmodulekeeper.Keeper RewardsKeeper rewardsmodulekeeper.Keeper StatsKeeper statsmodulekeeper.Keeper SubaccountsKeeper subaccountsmodulekeeper.Keeper ClobKeeper *clobmodulekeeper.Keeper SendingKeeper sendingmodulekeeper.Keeper EpochsKeeper epochsmodulekeeper.Keeper ModuleManager *module.Manager IndexerEventManager indexer_manager.IndexerEventManager Server *daemonserver.Server PriceFeedClient *pricefeedclient.Client LiquidationsClient *liquidationclient.Client BridgeClient *bridgeclient.Client DaemonHealthMonitor *daemonservertypes.HealthMonitor // contains filtered or unexported fields }
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func New ¶
func New( logger log.Logger, db dbm.DB, snapshotDB dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized blockchain app
func (*App) AppCodec ¶
AppCodec returns an 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 (*App) BeginBlocker ¶
func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*App) DefaultGenesis ¶
func (app *App) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*App) DisableHealthMonitorForTesting ¶
func (app *App) DisableHealthMonitorForTesting()
DisableHealthMonitorForTesting disables the health monitor for testing.
func (*App) EndBlocker ¶
func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*App) ExportAppStateAndValidators
deprecated
func (app *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
Deprecated: This is a legacy feature of cosmos that is known to be unstable, so we explicitly do not support its usage.
func (*App) GetBaseApp ¶
GetBaseApp returns the base app of the application
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns an InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *App) 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 (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterDaemonWithHealthMonitor ¶
func (app *App) RegisterDaemonWithHealthMonitor( healthCheckableDaemon daemontypes.HealthCheckable, maxDaemonUnhealthyDuration time.Duration, )
RegisterDaemonWithHealthMonitor registers a daemon service with the update monitor, which will commence monitoring the health of the daemon. If the daemon does not register, the method will panic.
func (*App) RegisterNodeService ¶
RegisterNodeService registers the node service.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
SimulationManager always returns nil.
type DatadogErrorTrackingObject ¶
func (DatadogErrorTrackingObject) MarshalZerologObject ¶
func (obj DatadogErrorTrackingObject) MarshalZerologObject(e *zerolog.Event)
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
func GetEncodingConfig ¶
func GetEncodingConfig() EncodingConfig
GetEncodingConfig returns the EncodingConfig.
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(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions ClobKeeper clobtypes.ClobKeeper }
HandlerOptions are the options required for constructing an SDK AnteHandler. Note: This struct is defined here in order to add `ClobKeeper`. We use struct embedding to include the normal cosmos-sdk `HandlerOptions`.