Documentation ¶
Index ¶
- func ReadBigint(source string) (*big.Int, error)
- type Block
- type CallSite
- type Client
- func (client *Client) BlockNumber() (uint64, error)
- func (client *Client) BlockPerSecond() (val float64, err error)
- func (client *Client) Call(callsite *CallSite) (val string, err error)
- func (client *Client) EstimateGas(from, to, value, data string) (*big.Int, error)
- func (client *Client) GetBalance(address string) (value *ethgo.Value, err error)
- func (client *Client) GetBlockByNumber(number uint64) (val *Block, err error)
- func (client *Client) GetTokenBalance(token string, address string) (val *big.Int, err error)
- func (client *Client) GetTokenDecimals(token string) (val *big.Int, err error)
- func (client *Client) GetTransactionByHash(tx string) (val *Transaction, err error)
- func (client *Client) GetTransactionReceipt(tx string) (val *TransactionReceipt, err error)
- func (client *Client) Nonce(address string) (uint64, error)
- func (client *Client) SendRawTransaction(tx []byte) (val string, err error)
- func (client *Client) SuggestGasPrice() (*big.Int, error)
- type Transaction
- type TransactionReceipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct { Number string `json:"number"` Hash string `json:"hash"` Parent string `json:"parentHash"` Nonce string `json:"nonce"` SHA3Uncles string `json:"sha3Uncles"` LogsBloom string `json:"logsBloom"` TransactionsRoot string `json:"transactionsRoot"` StateRoot string `json:"stateRoot"` ReceiptsRoot string `json:"receiptsRoot"` Miner string `json:"miner"` Difficulty string `json:"difficulty"` TotalDifficulty string `json:"totalDifficulty"` ExtraData string `json:"extraData"` Size string `json:"size"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Timestamp string `json:"timestamp"` Transactions []*Transaction `json:"transactions"` Uncles []string `json:"uncles"` }
Block eth block object
type CallSite ¶
type CallSite struct { From string `json:"from,omitempty"` To string `json:"to,omitempty"` Value string `json:"value,omitempty"` GasPrice string `json:"gasPrice,omitempty"` Gas string `json:"gas,omitempty"` Data string `json:"data,omitempty"` }
CallSite .
type Client ¶
Client neo jsonrpc 2.0 client
func (*Client) BlockNumber ¶
BlockNumber get geth last block number
func (*Client) BlockPerSecond ¶
BlockPerSecond get geth last block number
func (*Client) EstimateGas ¶
func (*Client) GetBalance ¶
GetBalance get balance of eth address
func (*Client) GetBlockByNumber ¶
GetBlockByNumber get geth last block number
func (*Client) GetTokenBalance ¶
GetTokenBalance .
func (*Client) GetTokenDecimals ¶
GetTokenDecimals .
func (*Client) GetTransactionByHash ¶
func (client *Client) GetTransactionByHash(tx string) (val *Transaction, err error)
GetTransactionByHash get geth last block number
func (*Client) GetTransactionReceipt ¶
func (client *Client) GetTransactionReceipt(tx string) (val *TransactionReceipt, err error)
GetTransactionReceipt ...
func (*Client) SendRawTransaction ¶
SendRawTransaction .
type Transaction ¶
type Transaction struct { Hash string `json:"hash"` Nonce string `json:"nonce"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` TransactionIndex string `json:"transactionIndex"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` GasPrice string `json:"gasPrice"` Gas string `json:"gas"` Input string `json:"input"` }
Transaction .
type TransactionReceipt ¶
type TransactionReceipt struct { Hash string `json:"transactionHash"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` TransactionIndex string `json:"transactionIndex"` CumulativeGasUsed string `json:"cumulativeGasUsed"` GasUsed string `json:"gasUsed"` ContractAddress string `json:"contractAddress"` Logs []interface{} `json:"logs"` LogsBloom string `json:"logsBloom"` Status string `json:"status"` }
TransactionReceipt .
Click to show internal directories.
Click to hide internal directories.