Documentation ¶
Index ¶
- type Client
- func (c *Client) ContractCall(origin string, contractAddr string, callInput, value string) (string, string, error)
- func (c *Client) GetBalance(from string) (uint64, error)
- func (c *Client) GetBlockByHash(hash string) (*block.Block, error)
- func (c *Client) GetBlockByNumber(num uint64) (*block.Block, error)
- func (c *Client) GetCode(contractAddr string) string
- func (c *Client) GetLogs(address string, fromB, toB uint64, topics []string, blockH string) []*types.Log
- func (c *Client) GetMaxBlockNumber() (uint64, error)
- func (c *Client) GetNonce(from string) (uint64, error)
- func (c *Client) GetStorageAt(addr, hash string) string
- func (c *Client) GetTransactionByHash(hash string) (*transaction.FinishedTransaction, error)
- func (c *Client) GetTransactionReceipt(hash string) (*transaction.FinishedTransaction, error)
- func (c *Client) SendRawTransaction(rawTx string) (string, error)
- type Clients
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Bc blockchain.Blockchains Tp *txpool.Pool Cfg *config.CfgInfo }
func New ¶
func New(bc blockchain.Blockchains, tp *txpool.Pool, cfg *config.CfgInfo) *Client
new Client
func (*Client) ContractCall ¶
func (c *Client) ContractCall(origin string, contractAddr string, callInput, value string) (string, string, error)
cal contract
func (*Client) GetBalance ¶
Get from Balance
func (*Client) GetBlockByHash ¶
get block by hash
func (*Client) GetBlockByNumber ¶
get block by Number
func (*Client) GetLogs ¶
func (c *Client) GetLogs(address string, fromB, toB uint64, topics []string, blockH string) []*types.Log
get Logs
func (*Client) GetMaxBlockNumber ¶
Get Max BlockNumber
func (*Client) GetTransactionByHash ¶
func (c *Client) GetTransactionByHash(hash string) (*transaction.FinishedTransaction, error)
Get Transaction By Hash
func (*Client) GetTransactionReceipt ¶
func (c *Client) GetTransactionReceipt(hash string) (*transaction.FinishedTransaction, error)
Get Transaction Receipt by hash
type Clients ¶
type Clients interface { //call contract ContractCall(origin string, contractAddr string, callInput, value string) (string, string, error) //get balance by from GetBalance(from string) (uint64, error) //get block by hash GetBlockByHash(hash string) (*block.Block, error) //get block by number GetBlockByNumber(num uint64) (*block.Block, error) //get code by contract address GetCode(contractAddr string) string //get nonce by address GetNonce(addr string) (uint64, error) //get transaction by hash GetTransactionByHash(hash string) (*transaction.FinishedTransaction, error) //send signed transaction SendRawTransaction(rawTx string) (string, error) //get transaction receipt GetTransactionReceipt(hash string) (*transaction.FinishedTransaction, error) //get Storage by address and hash GetStorageAt(addr, hash string) string //get logs GetLogs(address string, fromB, toB uint64, topics []string, blockH string) []*types.Log //get max block number GetMaxBlockNumber() (uint64, error) }
Click to show internal directories.
Click to hide internal directories.