Documentation
¶
Index ¶
- func SetDialer(d Dialer)
- type Client
- func (c *Client) AddABI(intf abi.ABI)
- func (c *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (c *Client) CallContractAtHash(ctx context.Context, msg ethereum.CallMsg, blockHash common.Hash) ([]byte, error)
- func (c *Client) CallContractWithAccountOverride(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int, ...) ([]byte, error)
- func (c *Client) CallMsg(ctx context.Context, msg message.Request, blockNumber *big.Int) (returnData []byte, err error)
- func (c *Client) Close()
- func (c *Client) CloseSendMsg()
- func (c *Client) DebugTransactionOnChain(ctx context.Context, txHash common.Hash) ([]byte, error)
- func (c *Client) DecodeJsonRpcError(err error) error
- func (c *Client) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error)
- func (c *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) (logs []types.Log, err error)
- func (c *Client) GetMsg(msgId common.Hash) (message.Message, error)
- func (c *Client) GetNonce(msgId common.Hash) (uint64, error)
- func (c *Client) GetSigner() bind.SignerFn
- func (c *Client) HasMsg(msgId common.Hash) bool
- func (c *Client) MessageToTransactOpts(ctx context.Context, msg message.Request) (*bind.TransactOpts, error)
- func (c *Client) NewMethodData(a abi.ABI, methodName string, args ...interface{}) ([]byte, error)
- func (c *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error)
- func (c *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (c *Client) RawClient() *ethclient.Client
- func (c *Client) RegisterPrivateKey(ctx context.Context, key *ecdsa.PrivateKey) error
- func (c *Client) RegisterSigner(signerFn bind.SignerFn)
- func (c *Client) ReplayMsg(msgId common.Hash) (newMsgId common.Hash, err error)
- func (c *Client) Response() <-chan message.Response
- func (c *Client) RpcClient() *rpc.Client
- func (c *Client) ScheduleMsg(req *message.Request)
- func (c *Client) SetMaxQueriesPerMerge(n int)
- func (c *Client) SetMsgBuffer(buffer int)
- func (c *Client) SetNonceManager(nm nonce.Manager)
- func (c *Client) SetSubscriber(s subscriber.Subscriber)
- func (c *Client) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (c *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)
- func (c *Client) SuggestGasPrice(ctx context.Context) (gasPrice *big.Int, err error)
- func (c *Client) WaitMsgReceipt(msgId common.Hash, confirmations uint64, timeout time.Duration) (*message.Receipt, bool)
- func (c *Client) WaitMsgResponse(msgId common.Hash, timeout time.Duration) (*message.Response, bool)
- func (c *Client) WaitTxReceipt(txHash common.Hash, confirmations uint64, timeout time.Duration) (*types.Receipt, bool)
- type Dialer
- type EthClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
*ethclient.Client
subscriber.Subscriber
// contains filtered or unexported fields
}
func DialWithTransport ¶ added in v0.1.42
DialWithTransport creates an RPC client that uses the given transport for HTTP/HTTPS endpoints. When transport is non-nil and rawurl has scheme "http" or "https", rpc.DialHTTPWithClient is used. Otherwise Dial(rawurl) is used (e.g. for ws/wss or when transport is nil).
func NewEthClient ¶ added in v0.1.0
func (*Client) CallContract ¶
func (*Client) CallContractAtHash ¶
func (*Client) CallContractWithAccountOverride ¶ added in v0.1.0
func (*Client) CloseSendMsg ¶
func (c *Client) CloseSendMsg()
func (*Client) DebugTransactionOnChain ¶
func (*Client) DecodeJsonRpcError ¶
func (*Client) EstimateGas ¶
func (*Client) FilterLogs ¶
func (*Client) MessageToTransactOpts ¶
func (c *Client) MessageToTransactOpts(ctx context.Context, msg message.Request) (*bind.TransactOpts, error)
MessageToTransactOpts . NOTE: You must provide private key for signature.
func (*Client) NewMethodData ¶
func (*Client) PendingCallContract ¶
func (*Client) PendingNonceAt ¶
func (*Client) RegisterPrivateKey ¶
Registers the private key used for signing txs.
func (*Client) RegisterSigner ¶
func (*Client) ScheduleMsg ¶
func (*Client) SetMaxQueriesPerMerge ¶ added in v0.1.39
SetMaxQueriesPerMerge sets the maximum number of realtime queries merged into one eth_getLogs. Use 2 on BSC to avoid nodes returning 0 for large merged filters. 0 = no limit. No-op if the underlying subscriber is not a *ChainSubscriber.
func (*Client) SetMsgBuffer ¶
func (*Client) SetNonceManager ¶
func (*Client) SetSubscriber ¶
func (c *Client) SetSubscriber(s subscriber.Subscriber)
func (*Client) SubscribeFilterLogs ¶
func (c *Client) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
func (*Client) SubscribeNewHead ¶
func (*Client) SuggestGasPrice ¶
func (*Client) WaitMsgReceipt ¶ added in v0.1.0
func (*Client) WaitMsgResponse ¶ added in v0.1.0
type Dialer ¶ added in v0.0.2
type Dialer = func(rawurl string) (EthClientInterface, error)
type EthClientInterface ¶ added in v0.0.2
type EthClientInterface interface {
bind.ContractBackend
bind.DeployBackend
bind.PendingContractCaller
ethereum.ChainReader
ethereum.TransactionReader
ethereum.ChainStateReader
ethereum.ContractCaller
ethereum.LogFilterer
ethereum.TransactionSender
ethereum.GasPricer
ethereum.GasPricer1559
ethereum.FeeHistoryReader
ethereum.PendingStateReader
ethereum.PendingContractCaller
ethereum.GasEstimator
ethereum.BlockNumberReader
ethereum.ChainIDReader
}
func DialOnce ¶ added in v0.0.2
func DialOnce(url string) EthClientInterface
Directories
¶
| Path | Synopsis |
|---|---|
|
common
|
|
|
ds
|
|
|
examples
|
|
|
client/debug_tx
command
|
|
|
client/schedule_msg
command
|
|
|
safetx
command
|
|
|
subscribe_polymarket
command
|
|
|
Package subscriber: batch log filterer to merge multiple eth_getLogs into one JSON-RPC batch request.
|
Package subscriber: batch log filterer to merge multiple eth_getLogs into one JSON-RPC batch request. |
|
tests
|
|
Click to show internal directories.
Click to hide internal directories.