server

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2022 License: LGPL-3.0 Imports: 53 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ServiceName = "EVMIndexerService"

	NewBlockWaitTimeout = 60 * time.Second
)

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(
	rootCmd *cobra.Command,
	defaultNodeHome string,
	appCreator types.AppCreator,
	appExport types.AppExporter,
	addStartFlags types.ModuleInitFlags,
)

AddCommands adds server commands

func ConnectTmWS

func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger tmlog.Logger) *rpcclient.WSClient

func Listen added in v0.1.4

func Listen(addr string, config *config.Config) (net.Listener, error)

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 MountGRPCWebServices

func MountGRPCWebServices(
	router *mux.Router,
	grpcWeb *grpcweb.WrappedGrpcServer,
	grpcResources []string,
	logger tmlog.Logger,
)

func NewIndexTxCmd added in v0.1.4

func NewIndexTxCmd() *cobra.Command

func OpenIndexerDB added in v0.1.4

func OpenIndexerDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error)

OpenIndexerDB opens the custom eth indexer db, using the same db backend as the main app

func StartCmd

func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command

StartCmd runs the service passed in, either stand-alone or in-process with Tendermint.

func StartJSONRPC

func StartJSONRPC(ctx *server.Context,
	clientCtx client.Context,
	tmRPCAddr,
	tmEndpoint string,
	config *config.Config,
	indexer ethermint.EVMTxIndexer,
) (*http.Server, chan struct{}, error)

StartJSONRPC starts the JSON-RPC server

Types

type EVMIndexerService added in v0.1.4

type EVMIndexerService struct {
	service.BaseService
	// contains filtered or unexported fields
}

EVMIndexerService indexes transactions for json-rpc service.

func NewEVMIndexerService added in v0.1.4

func NewEVMIndexerService(
	txIdxr ethermint.EVMTxIndexer,
	client rpcclient.Client,
) *EVMIndexerService

NewEVMIndexerService returns a new service instance.

func (*EVMIndexerService) OnStart added in v0.1.4

func (eis *EVMIndexerService) OnStart() error

OnStart implements service.Service by subscribing for new blocks and indexing them by events.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL