Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + const FunctionSelectorLength + var ChainlinkFulfilledTopic = utils.MustHash("ChainlinkFulfilled(bytes32)") + var WeiPerEth = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) + func NewClientWithNodes(logger logger.Logger, primaryNodes []Node, sendOnlyNodes []SendOnlyNode, ...) (*client, error) + func ReceiptIndicatesRunLogFulfillment(txr types.Receipt) bool + func ReceiptIsUnconfirmed(txr *types.Receipt) bool + func ToBlockNumArg(number *big.Int) string + type FunctionSelector [FunctionSelectorLength]byte + func BytesToFunctionSelector(b []byte) FunctionSelector + func HexToFunctionSelector(s string) FunctionSelector + func (f *FunctionSelector) Scan(value interface{}) error + func (f *FunctionSelector) SetBytes(b []byte) + func (f *FunctionSelector) UnmarshalJSON(input []byte) error + func (f FunctionSelector) Bytes() []byte + func (f FunctionSelector) MarshalJSON() ([]byte, error) + func (f FunctionSelector) String() string + func (f FunctionSelector) Value() (driver.Value, error) + type Head struct + BaseFeePerGas *utils.Big + CreatedAt time.Time + EVMChainID *utils.Big + Hash common.Hash + ID uint64 + L1BlockNumber null.Int64 + Number int64 + Parent *Head + ParentHash common.Hash + Timestamp time.Time + func NewHead(number *big.Int, blockHash common.Hash, parentHash common.Hash, ...) Head + func (h *Head) ChainHashes() []common.Hash + func (h *Head) ChainLength() uint32 + func (h *Head) ChainString() string + func (h *Head) EarliestInChain() Head + func (h *Head) GreaterThan(r *Head) bool + func (h *Head) HashAtHeight(blockNum int64) common.Hash + func (h *Head) IsInChain(blockHash common.Hash) bool + func (h *Head) MarshalJSON() ([]byte, error) + func (h *Head) NextInt() *big.Int + func (h *Head) ToInt() *big.Int + func (h *Head) UnmarshalJSON(bs []byte) error + func (h Head) String() string type JsonError + func ExtractRPCError(err error) *JsonError + func (err *JsonError) String() string + type Node interface + BalanceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) + BatchCallContext func(ctx context.Context, b []rpc.BatchElem) error + BlockByNumber func(ctx context.Context, number *big.Int) (*types.Block, error) + CallContext func(ctx context.Context, result interface{}, method string, args ...interface{}) error + CallContract func(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + Close func() + CodeAt func(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) + Dial func(ctx context.Context) error + EstimateGas func(ctx context.Context, call ethereum.CallMsg) (uint64, error) + EthSubscribe func(ctx context.Context, channel interface{}, args ...interface{}) (ethereum.Subscription, error) + FilterLogs func(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) + HeaderByNumber func(context.Context, *big.Int) (*types.Header, error) + NonceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) + PendingCodeAt func(ctx context.Context, account common.Address) ([]byte, error) + PendingNonceAt func(ctx context.Context, account common.Address) (uint64, error) + SendTransaction func(ctx context.Context, tx *types.Transaction) error + String func() string + SubscribeFilterLogs func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + SuggestGasPrice func(ctx context.Context) (*big.Int, error) + SuggestGasTipCap func(ctx context.Context) (*big.Int, error) + TransactionReceipt func(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + Verify func(ctx context.Context, expectedChainID *big.Int) (err error) + func NewNode(lggr logger.Logger, wsuri url.URL, httpuri *url.URL, name string) Node type NullClient + func NewNullClient(cid *big.Int, lggr logger.Logger) *NullClient + type Pool struct + func NewPool(logger logger.Logger, nodes []Node, sendonlys []SendOnlyNode, chainID *big.Int) *Pool + func (p *Pool) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) + func (p *Pool) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error + func (p *Pool) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) + func (p *Pool) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error + func (p *Pool) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + func (p *Pool) ChainID() *big.Int + func (p *Pool) Close() + func (p *Pool) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) + func (p *Pool) Dial(ctx context.Context) (err error) + func (p *Pool) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) + func (p *Pool) EthSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (ethereum.Subscription, error) + func (p *Pool) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) + func (p *Pool) HeaderByNumber(ctx context.Context, n *big.Int) (*types.Header, error) + func (p *Pool) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) + func (p *Pool) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) + func (p *Pool) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) + func (p *Pool) SendTransaction(ctx context.Context, tx *types.Transaction) error + func (p *Pool) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + func (p *Pool) SuggestGasPrice(ctx context.Context) (*big.Int, error) + func (p *Pool) SuggestGasTipCap(ctx context.Context) (*big.Int, error) + func (p *Pool) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + type SendOnlyNode interface + BatchCallContext func(ctx context.Context, b []rpc.BatchElem) error + Dial func(context.Context) error + SendTransaction func(ctx context.Context, tx *types.Transaction) error + String func() string + Verify func(ctx context.Context, expectedChainID *big.Int) (err error) + func NewSendOnlyNode(lggr logger.Logger, httpuri url.URL, name string) SendOnlyNode + type UntrustedBytes []byte + func (ary UntrustedBytes) SafeByteSlice(start int, end int) ([]byte, error) v1.10.16 Oct 18, 2021 Changes in this version + const Fatal + const FeeTooHigh + const FeeTooLow + const InsufficientEth + const LimitReached + const NonceTooLow + const NullClientChainID + const ReplacementTransactionUnderpriced + const TerminallyUnderpriced + const TooExpensive + const TransactionAlreadyInMempool + func DefaultQueryCtx(ctxs ...context.Context) (ctx context.Context, cancel context.CancelFunc) + func ExtractRevertReasonFromRPCError(err error) (string, error) + func MustGetABI(json string) abi.ABI + func NewClient(rpcUrl string, rpcHTTPURL *url.URL, secondaryRPCURLs []url.URL) (*client, error) + type CallArgs struct + Data hexutil.Bytes + To common.Address + type Client interface + BalanceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) + BatchCallContext func(ctx context.Context, b []rpc.BatchElem) error + BlockByNumber func(ctx context.Context, number *big.Int) (*types.Block, error) + Call func(result interface{}, method string, args ...interface{}) error + CallContext func(ctx context.Context, result interface{}, method string, args ...interface{}) error + CallContract func(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + ChainID func(ctx context.Context) (*big.Int, error) + Close func() + CodeAt func(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) + Dial func(ctx context.Context) error + EstimateGas func(ctx context.Context, call ethereum.CallMsg) (uint64, error) + FilterLogs func(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) + GetERC20Balance func(address common.Address, contractAddress common.Address) (*big.Int, error) + GetEthBalance func(ctx context.Context, account common.Address, blockNumber *big.Int) (*assets.Eth, error) + GetLINKBalance func(linkAddress common.Address, address common.Address) (*assets.Link, error) + HeadByNumber func(ctx context.Context, n *big.Int) (*models.Head, error) + HeaderByNumber func(context.Context, *big.Int) (*types.Header, error) + NonceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) + PendingCodeAt func(ctx context.Context, account common.Address) ([]byte, error) + PendingNonceAt func(ctx context.Context, account common.Address) (uint64, error) + RoundRobinBatchCallContext func(ctx context.Context, b []rpc.BatchElem) error + SendTransaction func(ctx context.Context, tx *types.Transaction) error + SubscribeFilterLogs func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + SubscribeNewHead func(ctx context.Context, ch chan<- *models.Head) (ethereum.Subscription, error) + SuggestGasPrice func(ctx context.Context) (*big.Int, error) + SuggestGasTipCap func(ctx context.Context) (*big.Int, error) + TransactionReceipt func(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + type ClientErrors = map[int]*regexp.Regexp + type JsonError struct + Code int + Data interface{} + Message string + func (err *JsonError) Error() string + type NullClient struct + func (nc *NullClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) + func (nc *NullClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error + func (nc *NullClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) + func (nc *NullClient) Call(result interface{}, method string, args ...interface{}) error + func (nc *NullClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error + func (nc *NullClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + func (nc *NullClient) ChainID(ctx context.Context) (*big.Int, error) + func (nc *NullClient) Close() + func (nc *NullClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) + func (nc *NullClient) Dial(ctx context.Context) error + func (nc *NullClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) + func (nc *NullClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) + func (nc *NullClient) GetERC20Balance(address common.Address, contractAddress common.Address) (*big.Int, error) + func (nc *NullClient) GetEthBalance(context.Context, common.Address, *big.Int) (*assets.Eth, error) + func (nc *NullClient) GetLINKBalance(linkAddress common.Address, address common.Address) (*assets.Link, error) + func (nc *NullClient) HeadByNumber(ctx context.Context, n *big.Int) (*models.Head, error) + func (nc *NullClient) HeaderByNumber(ctx context.Context, n *big.Int) (*types.Header, error) + func (nc *NullClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) + func (nc *NullClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) + func (nc *NullClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) + func (nc *NullClient) RoundRobinBatchCallContext(ctx context.Context, b []rpc.BatchElem) error + func (nc *NullClient) SendTransaction(ctx context.Context, tx *types.Transaction) error + func (nc *NullClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + func (nc *NullClient) SubscribeNewHead(ctx context.Context, ch chan<- *models.Head) (ethereum.Subscription, error) + func (nc *NullClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) + func (nc *NullClient) SuggestGasTipCap(ctx context.Context) (tipCap *big.Int, err error) + func (nc *NullClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + type SendError struct + func NewFatalSendError(e error) *SendError + func NewFatalSendErrorS(s string) *SendError + func NewSendError(e error) *SendError + func NewSendErrorS(s string) *SendError + func (s *SendError) CauseStr() string + func (s *SendError) Error() string + func (s *SendError) Fatal() bool + func (s *SendError) IsFeeTooHigh() bool + func (s *SendError) IsFeeTooLow() bool + func (s *SendError) IsInsufficientEth() bool + func (s *SendError) IsNonceTooLowError() bool + func (s *SendError) IsReplacementUnderpriced() bool + func (s *SendError) IsTemporarilyUnderpriced() bool + func (s *SendError) IsTerminallyUnderpriced() bool + func (s *SendError) IsTooExpensive() bool + func (s *SendError) IsTransactionAlreadyInMempool() bool + type Subscription interface + Err func() <-chan error + Unsubscribe func()