Documentation
¶
Index ¶
- func BlockByNumber(c Client, blockNum uint64) (types.RawBlock, error)
- func CallBalanceOfERC20(c Client, contract types.Address, holder types.Address, blockNum uint64) (types.HexData, error)
- func CallEIP165(c Client, address types.Address, interfaceId []byte, blockNum uint64) (bool, error)
- func Consensus(c Client) (string, error)
- func CurrentBlock(c Client) (uint64, error)
- func CurrentBlockQuery() string
- func DumpAddress(c Client, address types.Address, blockNumber uint64) (*types.AccountState, error)
- func GetCode(c Client, address types.Address, blockNumber uint64) (types.HexData, error)
- func StorageRoot(c Client, account types.Address, blockNum uint64) (types.Hash, error)
- func TraceTransaction(c Client, txHash types.Hash) (types.RawOuterCall, error)
- func TransactionDetailQuery(hash types.Hash) string
- type Address
- type Block
- type Client
- type CurrentBlockResult
- type Event
- type QuorumClient
- func (qc *QuorumClient) ExecuteGraphQLQuery(result interface{}, query string) error
- func (qc *QuorumClient) RPCCall(result interface{}, method string, args ...interface{}) error
- func (qc *QuorumClient) RPCCallWithTimeout(timeout time.Duration, result interface{}, method string, args ...interface{}) error
- func (qc *QuorumClient) Stop()
- func (qc *QuorumClient) SubscribeChainHead(ch chan<- types.RawHeader) error
- type StubQuorumClient
- type Transaction
- type TransactionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallBalanceOfERC20 ¶
func CallEIP165 ¶
func CurrentBlock ¶
func CurrentBlockQuery ¶
func CurrentBlockQuery() string
func DumpAddress ¶
func StorageRoot ¶
func TraceTransaction ¶
func TransactionDetailQuery ¶
Types ¶
type Client ¶
type Client interface {
// SubscribeChainHead subscribes to new chain header
SubscribeChainHead(chan<- types.RawHeader) error
// ExecuteGraphQLQuery performs a fully constructed query against the Geth
// GraphQL server
ExecuteGraphQLQuery(interface{}, string) error
// RPCCall makes a JSON RPC call to the Geth RPC server
RPCCall(interface{}, string, ...interface{}) error
// Stop quorum client connection
Stop()
}
type CurrentBlockResult ¶
type CurrentBlockResult struct {
Block Block
}
type QuorumClient ¶
type QuorumClient struct {
// contains filtered or unexported fields
}
QuorumClient provides access to quorum blockchain node.
func NewQuorumClient ¶
func NewQuorumClient(rawUrl string) (*QuorumClient, error)
func NewQuorumGraphQLClient ¶
func NewQuorumGraphQLClient(rawUrl, qgUrl string) (*QuorumClient, error)
func (*QuorumClient) ExecuteGraphQLQuery ¶
func (qc *QuorumClient) ExecuteGraphQLQuery(result interface{}, query string) error
Execute customized graphql query.
func (*QuorumClient) RPCCall ¶
func (qc *QuorumClient) RPCCall(result interface{}, method string, args ...interface{}) error
Execute customized rpc call.
func (*QuorumClient) RPCCallWithTimeout ¶
func (qc *QuorumClient) RPCCallWithTimeout(timeout time.Duration, result interface{}, method string, args ...interface{}) error
func (*QuorumClient) Stop ¶
func (qc *QuorumClient) Stop()
func (*QuorumClient) SubscribeChainHead ¶
func (qc *QuorumClient) SubscribeChainHead(ch chan<- types.RawHeader) error
Subscribe to chain head event.
type StubQuorumClient ¶
type StubQuorumClient struct {
// contains filtered or unexported fields
}
StubQuorumClient is used for unit test.
func NewStubQuorumClient ¶
func NewStubQuorumClient(mockGraphQL map[string]map[string]interface{}, mockRPC map[string]interface{}) *StubQuorumClient
func (*StubQuorumClient) ExecuteGraphQLQuery ¶
func (qc *StubQuorumClient) ExecuteGraphQLQuery(result interface{}, query string) error
func (*StubQuorumClient) RPCCall ¶
func (qc *StubQuorumClient) RPCCall(result interface{}, method string, args ...interface{}) error
func (*StubQuorumClient) Stop ¶
func (qc *StubQuorumClient) Stop()
func (*StubQuorumClient) SubscribeChainHead ¶
func (qc *StubQuorumClient) SubscribeChainHead(chan<- types.RawHeader) error
type Transaction ¶
type Transaction struct {
Hash types.Hash
Status string
Index uint64
Nonce types.HexNumber
From Address
To Address
Value types.HexNumber
GasPrice types.HexNumber
Gas types.HexNumber
GasUsed types.HexNumber
CumulativeGasUsed types.HexNumber
CreatedContract Address
InputData types.HexData
PrivateInputData types.HexData
IsPrivate bool
Logs []Event
}
func TransactionWithReceipt ¶
func TransactionWithReceipt(c Client, transactionHash types.Hash) (Transaction, error)
type TransactionResult ¶
type TransactionResult struct {
Transaction Transaction
}
Click to show internal directories.
Click to hide internal directories.