Documentation
¶
Index ¶
Constants ¶
View Source
const NetworkID = "fabevm"
Variables ¶
View Source
var ZeroAddress = make([]byte, 20)
Functions ¶
func NewRPCCodec ¶
func NewRPCCodec() rpc.Codec
Types ¶
type ChannelClient ¶
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
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
}
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(channelClient ChannelClient, ledgerClient LedgerClient, channelID string, ccid string, logger *zap.SugaredLogger) EthService
type LedgerClient ¶
type LedgerClient interface {
QueryInfo(options ...ledger.RequestOption) (*fab.BlockchainInfoResponse, error)
QueryBlock(blockNumber uint64, options ...ledger.RequestOption) (*common.Block, error)
QueryBlockByTxID(txid fab.TransactionID, options ...ledger.RequestOption) (*common.Block, error)
QueryBlockByHash(blockHash []byte, options ...ledger.RequestOption) (*common.Block, 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.