eth

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prec, _ = new(big.Float).SetString(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil).String())
View Source
var ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")

Functions

func IsNonceTooLow

func IsNonceTooLow(err error) bool

func WrapError

func WrapError(err error) error

WrapError 转换错误

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(url string) *Client

func NewWithLogger

func NewWithLogger(core zapcore.Core, url string) *Client

func (*Client) CheckHash

func (c *Client) CheckHash(hash string) (status int, blocknumber int, err error)

func (*Client) EthBlockNumber

func (c *Client) EthBlockNumber() (id int, err error)

func (*Client) EthGasPrice

func (c *Client) EthGasPrice() (gasPrice big.Int, err error)

func (*Client) EthGetBalance

func (c *Client) EthGetBalance(address, block string) (balance big.Int, err error)

func (*Client) EthGetBlockByNumber

func (c *Client) EthGetBlockByNumber(number int, withTransactions bool) (block *ethrpc.Block, err error)

func (*Client) EthGetTransactionByHash

func (c *Client) EthGetTransactionByHash(hash string) (tx *ethrpc.Transaction, err error)

func (*Client) EthGetTransactionCount

func (c *Client) EthGetTransactionCount(address, block string) (no int, err error)

func (*Client) EthGetTransactionReceipt

func (c *Client) EthGetTransactionReceipt(hash string) (tx *ethrpc.TransactionReceipt, err error)

func (*Client) EthSendRawTransaction

func (c *Client) EthSendRawTransaction(sign string) (hash string, err error)

func (*Client) EthSendTransaction

func (c *Client) EthSendTransaction(transaction ethrpc.T) (hash string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL