Documentation ¶
Overview ¶
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE
Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.
The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/Helios-Chain-Labs/ethermint/blob/main/LICENSE
Index ¶
- Constants
- func AddCommands(rootCmd *cobra.Command, opts StartOptions, appExport types.AppExporter, ...)
- func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error)
- func Listen(addr string, config *config.Config) (net.Listener, error)
- func ListenForQuitSignals(g *errgroup.Group, block bool, cancelFn context.CancelFunc, ...)
- func MountGRPCWebServices(router *mux.Router, grpcWeb *grpcweb.WrappedGrpcServer, grpcResources []string, ...)
- func NewIndexTxCmd() *cobra.Command
- func OpenIndexerDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error)
- func StartCmd(opts StartOptions) *cobra.Command
- func StartJSONRPC(srvCtx *server.Context, clientCtx client.Context, g *errgroup.Group, ...) (*http.Server, chan struct{}, error)
- type AppWithPendingTxStream
- type DBOpener
- type EVMIndexerService
- type StartOptions
- type WrappedSdkLogger
Constants ¶
const ( ServiceName = "EVMIndexerService" NewBlockWaitTimeout = 60 * time.Second // https://github.com/cometbft/cometbft/blob/v0.37.4/rpc/core/env.go#L193 NotFoundErr = "is not available" ErrorBackoffDuration = 1 * time.Second )
const ( ServerStartTime = 5 * time.Second MaxRetry = 6 )
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands( rootCmd *cobra.Command, opts StartOptions, appExport types.AppExporter, addStartFlags types.ModuleInitFlags, )
AddCommands adds server commands
func GenDocProvider ¶
func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error)
returns a function which returns the genesis doc from the genesis file.
func Listen ¶
Listen starts a net.Listener on the tcp network on the given address. If there is a specified MaxOpenConnections in the config, it will also set the limitListener.
func ListenForQuitSignals ¶
func ListenForQuitSignals(g *errgroup.Group, block bool, cancelFn context.CancelFunc, logger tmlog.Logger)
ListenForQuitSignals listens for SIGINT and SIGTERM. When a signal is received, the cleanup function is called, indicating the caller can gracefully exit or return.
Note, the blocking behavior of this depends on the block argument. The caller must ensure the corresponding context derived from the cancelFn is used correctly.
func MountGRPCWebServices ¶
func NewIndexTxCmd ¶
func OpenIndexerDB ¶
OpenIndexerDB opens the custom eth indexer db, using the same db backend as the main app
func StartCmd ¶
func StartCmd(opts StartOptions) *cobra.Command
StartCmd runs the service passed in, either stand-alone or in-process with CometBFT.
Types ¶
type AppWithPendingTxStream ¶
type AppWithPendingTxStream interface {
RegisterPendingTxListener(listener ante.PendingTxListener)
}
type DBOpener ¶
type DBOpener func(opts types.AppOptions, rootDir string, backend dbm.BackendType) (dbm.DB, error)
DBOpener is a function to open `application.db`, potentially with customized options.
type EVMIndexerService ¶
type EVMIndexerService struct { service.BaseService // contains filtered or unexported fields }
EVMIndexerService indexes transactions for json-rpc service.
func NewEVMIndexerService ¶
func NewEVMIndexerService( txIdxr ethermint.EVMTxIndexer, client rpcclient.Client, allowGap bool, ) *EVMIndexerService
NewEVMIndexerService returns a new service instance.
func (*EVMIndexerService) OnStart ¶
func (eis *EVMIndexerService) OnStart() error
OnStart implements service.Service by subscribing for new blocks and indexing them by events.
type StartOptions ¶
type StartOptions struct { AppCreator types.AppCreator DefaultNodeHome string DBOpener DBOpener }
StartOptions defines options that can be customized in `StartCmd`
func NewDefaultStartOptions ¶
func NewDefaultStartOptions(appCreator types.AppCreator, defaultNodeHome string) StartOptions
NewDefaultStartOptions use the default db opener provided in tm-db.
type WrappedSdkLogger ¶
type WrappedSdkLogger struct {
// contains filtered or unexported fields
}
func NewWrappedSdkLogger ¶
func NewWrappedSdkLogger(logger sdklog.Logger) *WrappedSdkLogger