Documentation ¶
Index ¶
- Constants
- type ErrRequest
- type EthService
- func (e *EthService) Client() *ethclient.Client
- func (e *EthService) Close()
- func (e *EthService) EstimateContractGasPrice(data []byte) (uint64, error)
- func (e *EthService) EstimateGas(from, to string, value uint64) (uint64, error)
- func (e *EthService) EstimateGasPrice(from string, value uint64, data []byte) (uint64, error)
- func (e *EthService) NextNonce(address string) (uint64, error)
- func (e *EthService) SendRawTransaction(tx string) ([]byte, error)
- type RawService
Constants ¶
View Source
const ( ETHEstimateGas = "eth_estimateGas" ETHSendRawTransaction = "eth_sendRawTransaction" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrRequest ¶
type ErrRequest error
var ( ErrBadRequest ErrRequest = errors.New("invalid request") ErrRateLimitExceeded ErrRequest = errors.New("rate limit exceeded") )
type EthService ¶
type EthService struct {
// contains filtered or unexported fields
}
func NewEthService ¶
func NewEthService(endpoint string) (*EthService, error)
func (*EthService) Client ¶
func (e *EthService) Client() *ethclient.Client
func (*EthService) Close ¶
func (e *EthService) Close()
func (*EthService) EstimateContractGasPrice ¶
func (e *EthService) EstimateContractGasPrice(data []byte) (uint64, error)
func (*EthService) EstimateGas ¶
func (e *EthService) EstimateGas(from, to string, value uint64) (uint64, error)
func (*EthService) EstimateGasPrice ¶
func (*EthService) SendRawTransaction ¶
func (e *EthService) SendRawTransaction(tx string) ([]byte, error)
type RawService ¶
type RawService struct {
// contains filtered or unexported fields
}
func NewRawService ¶
func NewRawService(url string) *RawService
Click to show internal directories.
Click to hide internal directories.