Documentation
¶
Index ¶
- Constants
- func AddCommands(rootCmd *cobra.Command, appCreator types.AppCreator, defaultNodeHome string, ...)
- func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger log.Logger) *jsonrpcclient.WSClient
- func DevNetCmd(appCreator types.AppCreator) *cobra.Command
- func DevnetCmdWithOptions(devnetAppCreator types.AppCreator, opts StartCmdOptions) *cobra.Command
- func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error)
- func Listen(addr string, config *config.Config) (net.Listener, error)
- 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(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command
- func StartCmdWithOptions(appCreator types.AppCreator, defaultNodeHome string, opts StartCmdOptions) *cobra.Command
- func StartJSONRPC(ctx *server.Context, clientCtx client.Context, tmRPCAddr, tmEndpoint string, ...) (*http.Server, chan struct{}, error)
- type CustomSlogHandler
- type EVMIndexerService
- type StartCmdOptions
Constants ¶
const ( DefaultDevnetValidatorTokes = "30000000000000000000000" // DefaultUpgradeHeighOffset is the offset used to schedule the upgrade DefaultUpgradeHeighOffset = 100 )
const ( ServiceName = "EVMIndexerService" NewBlockWaitTimeout = 60 * time.Second )
const ( // KeyIsDevnet is used to determine whether to run in devnet mode KeyIsDevnet = "is-devnet" // KeyNewChainID is the new chain ID to use in devnet mode KeyNewChainID = "new-chain-ID" // KeyOperatorAddress is the new operator address in devnet mode KeyOperatorAddress = "operator-address" // KeyUpgradeVersion is set to the upgrade version KeyUpgradeVersion = "upgrade-version" // KeyValidatorConsensusAddr is set to the validator consensus address in the devnetify function KeyValidatorConsensusAddr = "validator-consensus-address" // KeyValidatorConsensusPubkey is set to the validator consensus pubkey in the devnetify function KeyValidatorConsensusPubkey = "validator-consensus-pubkey" // KeyAppBlockHeight is set to the latest app block time in the devnetify function KeyAppBlockHeight = "app-block-height" // FlagSkipConfirmation is used to skip the confirmation prompt when running devnet mode FlagSkipConfirmation = "skip-confirmation" )
const ( // DefaultTimeoutProposeDelta How much timeout_propose increases with each round DefaultTimeoutProposeDelta = 200 * time.Millisecond // DefaultTimeoutPrevoteDelta How much the timeout_prevote increases with each round DefaultTimeoutPrevoteDelta = 200 * time.Millisecond // DefaultTimeoutPrecommitDelta How much the timeout_precommit increases with each round DefaultTimeoutPrecommitDelta = 200 * time.Millisecond FlagSkipConfigOverwrite = "skip-config-overwrite" )
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
func AddCommands( rootCmd *cobra.Command, appCreator types.AppCreator, defaultNodeHome string, appExport types.AppExporter, addStartFlags types.ModuleInitFlags, )
AddCommands adds server commands
func ConnectTmWS ¶
func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger log.Logger) *jsonrpcclient.WSClient
ConnectTmWS connects to a Tendermint WebSocket (WS) server. Parameters: - tmRPCAddr: The RPC address of the Tendermint server. - tmEndpoint: The WebSocket endpoint on the Tendermint server. - logger: A logger instance used to log debug and error messages.
func DevnetCmdWithOptions ¶
func DevnetCmdWithOptions(devnetAppCreator types.AppCreator, opts StartCmdOptions) *cobra.Command
DevnetCmdWithOptions creates a command that modifies the local state to create a devnet fork. After running this command, the network can be started with the regular start command.
func GenDocProvider ¶
func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error)
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 MountGRPCWebServices ¶
func MountGRPCWebServices( router *mux.Router, grpcWeb *grpcweb.WrappedGrpcServer, grpcResources []string, logger log.Logger, )
MountGRPCWebServices mounts gRPC-Web services on specific HTTP POST routes. Parameters: - router: The HTTP router instance to mount the routes on (using mux.Router). - grpcWeb: The wrapped gRPC-Web server that will handle incoming gRPC-Web and WebSocket requests. - grpcResources: A list of resource endpoints (URLs) that should be mounted for gRPC-Web POST requests. - logger: A logger instance used to log information about the mounted resources.
func NewIndexTxCmd ¶
NewIndexTxCmd creates a new Cobra command to index historical Ethereum transactions.
func OpenIndexerDB ¶
func StartCmd ¶
func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command
StartCmd runs the service passed in, either stand-alone or in-process with CometBFT.
func StartCmdWithOptions ¶
func StartCmdWithOptions(appCreator types.AppCreator, defaultNodeHome string, opts StartCmdOptions) *cobra.Command
func StartJSONRPC ¶
func StartJSONRPC(ctx *server.Context, clientCtx client.Context, tmRPCAddr, tmEndpoint string, config *serverconfig.Config, indexer cosmosevmtypes.EVMTxIndexer, ) (*http.Server, chan struct{}, error)
StartJSONRPC starts the JSON-RPC server
Types ¶
type CustomSlogHandler ¶
type CustomSlogHandler struct {
// contains filtered or unexported fields
}
CustomSlogHandler bridges Geth's slog logs to the existing Cosmos SDK logger.
func (*CustomSlogHandler) Handle ¶
Handle processes slog records and forwards them to your Cosmos SDK logger.
type EVMIndexerService ¶
type EVMIndexerService struct {
service.BaseService
// contains filtered or unexported fields
}
EVMIndexerService indexes transactions for json-rpc service.
func NewEVMIndexerService ¶
func NewEVMIndexerService( txIdxr cosmosevmtypes.EVMTxIndexer, client rpcclient.Client, ) *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 StartCmdOptions ¶
type StartCmdOptions struct {
DBOpener func(rootDir string, backendType dbm.BackendType) (dbm.DB, error)
PostSetup func(svrCtx *server.Context, clientCtx client.Context, ctx context.Context, g *errgroup.Group) error
PostSetupStandalone func(svrCtx *server.Context, clientCtx client.Context, ctx context.Context, g *errgroup.Group) error
AddFlags func(cmd *cobra.Command)
StartCommandHandler func(svrCtx *server.Context, clientCtx client.Context, appCreator types.AppCreator, withCmt bool, opts StartCmdOptions) error
}