Documentation ¶
Index ¶
- type ArgBig
- type Client
- func (c *Client) Call(method string, out interface{}, params ...interface{}) error
- func (c *Client) Close() error
- func (c *Client) Debug() *Debug
- func (c *Client) Eth() *Eth
- func (c *Client) Net() *Net
- func (c *Client) SetMaxConnsLimit(count int)
- func (c *Client) Subscribe(method string, callback func(b []byte)) (func() error, error)
- func (c *Client) SubscriptionEnabled() bool
- func (c *Client) Web3() *Web3
- type Config
- type ConfigOption
- type Debug
- type Eth
- func (e *Eth) Accounts() ([]ethgo.Address, error)
- func (e *Eth) BlockNumber() (uint64, error)
- func (e *Eth) Call(msg *ethgo.CallMsg, block ethgo.BlockNumber, override ...*ethgo.StateOverride) (string, error)
- func (e *Eth) ChainID() (*big.Int, error)
- func (e *Eth) EstimateGas(msg *ethgo.CallMsg) (uint64, error)
- func (e *Eth) EstimateGasContract(bin []byte) (uint64, error)
- func (e *Eth) FeeHistory(blockCount uint64, newestBlock ethgo.BlockNumber, rewardPercentiles []float64) (*FeeHistory, error)
- func (e *Eth) GasPrice() (uint64, error)
- func (e *Eth) GetBalance(addr ethgo.Address, blockNumber ethgo.BlockNumberOrHash) (*big.Int, error)
- func (e *Eth) GetBlockByHash(hash ethgo.Hash, full bool) (*ethgo.Block, error)
- func (e *Eth) GetBlockByNumber(i ethgo.BlockNumber, full bool) (*ethgo.Block, error)
- func (e *Eth) GetCode(addr ethgo.Address, block ethgo.BlockNumberOrHash) (string, error)
- func (e *Eth) GetFilterChanges(id string) ([]*ethgo.Log, error)
- func (e *Eth) GetFilterChangesBlock(id string) ([]ethgo.Hash, error)
- func (e *Eth) GetLogs(filter *ethgo.LogFilter) ([]*ethgo.Log, error)
- func (e *Eth) GetNonce(addr ethgo.Address, blockNumber ethgo.BlockNumberOrHash) (uint64, error)
- func (e *Eth) GetStorageAt(addr ethgo.Address, slot ethgo.Hash, block ethgo.BlockNumberOrHash) (ethgo.Hash, error)
- func (e *Eth) GetTransactionByHash(hash ethgo.Hash) (*ethgo.Transaction, error)
- func (e *Eth) GetTransactionReceipt(hash ethgo.Hash) (*ethgo.Receipt, error)
- func (e *Eth) MaxPriorityFeePerGas() (*big.Int, error)
- func (e *Eth) NewBlockFilter() (string, error)
- func (e *Eth) NewFilter(filter *ethgo.LogFilter) (string, error)
- func (e *Eth) SendRawTransaction(data []byte) (ethgo.Hash, error)
- func (e *Eth) SendTransaction(txn *ethgo.Transaction) (ethgo.Hash, error)
- func (e *Eth) UninstallFilter(id string) (bool, error)
- type FeeHistory
- type Net
- type StructLogs
- type TraceTransactionOptions
- type TransactionTrace
- type Web3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgBig ¶
func (*ArgBig) UnmarshalText ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the jsonrpc client
func (*Client) SetMaxConnsLimit ¶
SetMaxConnsLimit sets the maximum number of connections that can be established with a host
func (*Client) SubscriptionEnabled ¶
SubscriptionEnabled returns true if the subscription endpoints are enabled
type ConfigOption ¶
type ConfigOption func(*Config)
func WithHeaders ¶
func WithHeaders(headers map[string]string) ConfigOption
type Debug ¶
type Debug struct {
// contains filtered or unexported fields
}
func (*Debug) TraceTransaction ¶
func (d *Debug) TraceTransaction(hash ethgo.Hash, opts TraceTransactionOptions) (*TransactionTrace, error)
type Eth ¶
type Eth struct {
// contains filtered or unexported fields
}
Eth is the eth namespace
func (*Eth) BlockNumber ¶
BlockNumber returns the number of most recent block.
func (*Eth) Call ¶
func (e *Eth) Call(msg *ethgo.CallMsg, block ethgo.BlockNumber, override ...*ethgo.StateOverride) (string, error)
Call executes a new message call immediately without creating a transaction on the blockchain.
func (*Eth) EstimateGas ¶
EstimateGas generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
func (*Eth) EstimateGasContract ¶
EstimateGasContract estimates the gas to deploy a contract
func (*Eth) FeeHistory ¶
func (e *Eth) FeeHistory(blockCount uint64, newestBlock ethgo.BlockNumber, rewardPercentiles []float64) (*FeeHistory, error)
FeeHistory returns base fee per gas and transaction effective priority fee
func (*Eth) GetBalance ¶
GetBalance returns the balance of the account of given address.
func (*Eth) GetBlockByHash ¶
GetBlockByHash returns information about a block by hash.
func (*Eth) GetBlockByNumber ¶
GetBlockByNumber returns information about a block by block number.
func (*Eth) GetFilterChanges ¶
GetFilterChanges returns the filter changes for log filters
func (*Eth) GetFilterChangesBlock ¶
GetFilterChangesBlock returns the filter changes for block filters
func (*Eth) GetStorageAt ¶
func (e *Eth) GetStorageAt(addr ethgo.Address, slot ethgo.Hash, block ethgo.BlockNumberOrHash) (ethgo.Hash, error)
GetStorageAt returns the value from a storage position at a given address.
func (*Eth) GetTransactionByHash ¶
GetTransactionByHash returns a transaction by his hash
func (*Eth) GetTransactionReceipt ¶
GetTransactionReceipt returns the receipt of a transaction by transaction hash.
func (*Eth) MaxPriorityFeePerGas ¶
MaxPriorityFeePerGas returns a fee per gas that is an estimate of how much you can pay as a priority fee, or 'tip', to get a transaction included in the current block (EIP-1559).
func (*Eth) NewBlockFilter ¶
NewBlockFilter creates a new block filter
func (*Eth) SendRawTransaction ¶
SendRawTransaction sends a signed transaction in rlp format.
func (*Eth) SendTransaction ¶
SendTransaction creates new message call transaction or a contract creation.
type FeeHistory ¶
type FeeHistory struct { OldestBlock *big.Int `json:"oldestBlock"` Reward [][]*big.Int `json:"reward,omitempty"` BaseFee []*big.Int `json:"baseFeePerGas,omitempty"` GasUsedRatio []float64 `json:"gasUsedRatio"` }
FeeHistory is the result of the eth_feeHistory endpoint
func (*FeeHistory) UnmarshalJSON ¶
func (f *FeeHistory) UnmarshalJSON(data []byte) error
type Net ¶
type Net struct {
// contains filtered or unexported fields
}
Net is the net namespace
func (*Net) Listening ¶
Listening returns true if client is actively listening for network connections
type StructLogs ¶
type TraceTransactionOptions ¶
type TraceTransactionOptions struct { EnableMemory bool `json:"enableMemory"` DisableStack bool `json:"disableStack"` DisableStorage bool `json:"disableStorage"` EnableReturnData bool `json:"enableReturnData"` Timeout string `json:"timeout,omitempty"` Tracer string `json:"tracer,omitempty"` TracerConfig map[string]interface{} `json:"tracerConfig,omitempty"` }
type TransactionTrace ¶
type TransactionTrace struct { Gas uint64 ReturnValue string StructLogs []*StructLogs }
type Web3 ¶
type Web3 struct {
// contains filtered or unexported fields
}
Web3 is the web3 namespace
func (*Web3) ClientVersion ¶
ClientVersion returns the current client version