web3

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(
	logger *log.Logger, node *consensus.Node,
	feePool *fees.Store, nodeContext *node.Context, cfg *config.Server,
	chainstate *storage.ChainState, currencies *balance.CurrencySet,
) rpctypes.Web3Context

NewContext Initializing context with properties

func RegisterApis

func RegisterApis(src *rpc.Server, apis map[string]rpctypes.Web3Service) error

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context set up for service processing

func (*Context) GetAccountKeeper

func (ctx *Context) GetAccountKeeper() balance.AccountKeeper

func (*Context) GetBlockStore

func (ctx *Context) GetBlockStore() *store.BlockStore

func (*Context) GetConfig

func (ctx *Context) GetConfig() *config.Server

func (*Context) GetConsensusReactor

func (ctx *Context) GetConsensusReactor() *cs.Reactor

func (*Context) GetContractStore

func (ctx *Context) GetContractStore() *evm.ContractStore

func (*Context) GetEventBus

func (ctx *Context) GetEventBus() *types.EventBus

func (*Context) GetFeePool

func (ctx *Context) GetFeePool() *fees.Store

func (*Context) GetGenesisDoc

func (ctx *Context) GetGenesisDoc() *types.GenesisDoc

func (*Context) GetLogger

func (ctx *Context) GetLogger() *log.Logger

func (*Context) GetMempool

func (ctx *Context) GetMempool() mempool.Mempool

func (*Context) GetNode

func (ctx *Context) GetNode() *consensus.Node

func (*Context) GetNodeContext

func (ctx *Context) GetNodeContext() *node.Context

func (*Context) GetSwitch

func (ctx *Context) GetSwitch() *p2p.Switch

func (*Context) GetTxIndexer

func (ctx *Context) GetTxIndexer() txindex.TxIndexer

func (*Context) RegisterService

func (ctx *Context) RegisterService(name string, service rpctypes.Web3Service)

RegisterService used to register service. NOTE: Must be called by service

func (*Context) ServiceList

func (ctx *Context) ServiceList() map[string]rpctypes.Web3Service

ServiceList represents a cuurent list of registered servises

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds an RPC server that is served over HTTP

func NewServer

func NewServer(config *config.Server) *Server

func (*Server) StartHTTP

func (s *Server) StartHTTP(apis map[string]rpctypes.Web3Service) error

func (*Server) StartWS

func (s *Server) StartWS(apis map[string]rpctypes.Web3Service) error

Directories

Path Synopsis
eth

Jump to

Keyboard shortcuts

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