Documentation
¶
Index ¶
Constants ¶
View Source
const ( AddressLength = 42 LogsBloomZore = "" /* 514-byte string literal not displayed */ )
View Source
const NetworkID = "xuperchain"
Variables ¶
View Source
var FilterMap = make(map[string]*types.Filter)
View Source
var ZeroAddress = make([]byte, 20)
Functions ¶
func NewRPCCodec ¶
Types ¶
type EthService ¶
type EthService interface {
GetCode(r *http.Request, arg *string, reply *string) error
//Call(r *http.Request, args *types.EthArgs, reply *string) error
//SendTransaction(r *http.Request, args *types.EthArgs, reply *string) error
//GetTransactionReceipt(r *http.Request, arg *string, reply *types.TxReceipt) error
//Accounts(r *http.Request, arg *string, reply *[]string) error
EstimateGas(r *http.Request, args *types.EthArgs, reply *string) error
GetBalance(r *http.Request, p *[]string, reply *string) error
GetBlockByNumber(r *http.Request, p *[]interface{}, reply *types.Block) error
GetBlockByHash(r *http.Request, p *[]interface{}, reply *types.Block) error
BlockNumber(r *http.Request, _ *interface{}, reply *string) error
GetTransactionByHash(r *http.Request, txID *string, reply *types.Transaction) error
//GetTransactionCount(r *http.Request, _ *interface{}, reply *string) error
GetLogs(*http.Request, *types.GetLogsArgs, *[]types.Log) error
NewFilter(*http.Request, *types.GetLogsArgs, *string) error
GetFilterLogs(*http.Request, *string, *[]types.Log) error
UninstallFilter(*http.Request, *string, *bool) error
GetFilter(*http.Request, *string, *types.Filter) error
}
EthService is the rpc server implementation. Each function is an implementation of one ethereum json-rpc https://github.com/ethereum/wiki/wiki/JSON-RPC
Arguments and return values are formatted as HEX value encoding https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding
gorilla RPC is the receiver of these functions, they must all take three pointers, and return a single error
see godoc for RegisterService(receiver interface{}, name string) error
func NewEthService ¶
func NewEthService(xchainClient pb.XchainClient, eventClient pb.EventServiceClient, logger *zap.SugaredLogger) EthService
type EthereumProxy ¶
func NewEthereumProxy ¶
func NewEthereumProxy(service EthService, port int) *EthereumProxy
func (*EthereumProxy) Shutdown ¶
func (p *EthereumProxy) Shutdown() error
func (*EthereumProxy) Start ¶
func (p *EthereumProxy) Start() error
type NetService ¶
type NetService struct {
}
NetService returns data about the network the client is connected to.
Click to show internal directories.
Click to hide internal directories.