Documentation ¶
Index ¶
- Constants
- type Pool
- func (pp *Pool) BlockNumber(ctx context.Context) (uint64, error)
- func (pp *Pool) ERC1155TokenName(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (string, error)
- func (pp *Pool) ERC1155TotalSupply(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (*big.Int, error)
- func (pp *Pool) ERC721CollectionMetadata(ctx context.Context, contractAddress common.Address) (map[string]interface{}, error)
- func (pp *Pool) ERC721CollectionName(ctx context.Context, contractAddress common.Address) (string, error)
- func (pp *Pool) GeERC20ABI(contractAddress common.Address) (*erc20.ERC20, error)
- func (pp *Pool) GetCodeAt(ctx context.Context, address common.Address) ([]byte, error)
- func (pp *Pool) GetCurrentGasInfo() (*nemo.GasInfo, error)
- func (pp *Pool) GetERC1155ABI(contractAddress common.Address) (*abis.ERC1155, error)
- func (pp *Pool) GetLogsByBlockNumber(blockNumber int64) []types.Log
- func (pp *Pool) GetNonceAt(ctx context.Context, address common.Address) (uint64, error)
- func (pp *Pool) GetProviders() []*Provider
- func (pp *Pool) GetTokenImageURI(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (string, error)
- func (pp *Pool) GetWETHABI(contractAddress common.Address) (*abis.WETH, error)
- func (pp *Pool) IsContract(address common.Address) bool
- func (pp *Pool) PreferredProviderAvailable() bool
- func (pp *Pool) ReconnectProviders()
- func (pp *Pool) ResolveENS(ctx context.Context, ensName string) (common.Address, error)
- func (pp *Pool) ReverseResolveAddressToENS(ctx context.Context, address common.Address) (string, error)
- func (pp *Pool) Subscribe(queueLogs chan types.Log) (uint64, error)
- func (pp *Pool) SubscribeToAddresses(queueLogs chan types.Log, addresses []common.Address) (uint64, error)
- func (pp *Pool) SubscribeToEverything(queueLogs chan types.Log) (uint64, error)
- func (pp *Pool) SubscribeToEverythingPending(queuePendingTx chan *types.Transaction) (uint64, error)
- func (pp *Pool) SubscribeToTopics(queueLogs chan types.Log, topics [][]common.Hash) (uint64, error)
- func (pp *Pool) TransactionByHash(ctx context.Context, txHash common.Hash) (*types.Transaction, error)
- func (pp *Pool) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- type Provider
Constants ¶
View Source
const ( BlockNumber methodCall = "eth_blockNumber" TransactionByHash methodCall = "eth_getTransactionByHash" //nolint:gosec TransactionReceipt methodCall = "eth_getTransactionReceipt" TokenImageURI methodCall = "token_image_uri" //nolint:gosec ERC721CollectionName methodCall = "erc721_collection_name" ERC721CollectionMetadata methodCall = "erc721_collection_metadata" ERC1155TokenName methodCall = "erc1155_token_name" //nolint:gosec ERC1155TotalSupply methodCall = "erc1155_total_supply" ReverseResolveENS methodCall = "resolve_ens_address" ResolveENS methodCall = "resolve_ens" GasInfo methodCall = "gas_info" CodeAt methodCall = "bytecode" NonceAt methodCall = "nonce" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct { LastLogReceivedAt time.Time `json:"-" mapstructure:"-"` Rueidi *rueidica.Rueidica // contains filtered or unexported fields }
func FromConfig ¶
func (*Pool) BlockNumber ¶ added in v0.4.3
BlockNumber returns the most recent block number.
func (*Pool) ERC1155TokenName ¶
func (*Pool) ERC1155TotalSupply ¶
func (pp *Pool) ERC1155TotalSupply(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (*big.Int, error)
ERC1155TotalSupply returns the (current) total supply of a token.
func (*Pool) ERC721CollectionMetadata ¶
func (*Pool) ERC721CollectionName ¶
func (*Pool) GeERC20ABI ¶ added in v0.6.1
func (*Pool) GetCodeAt ¶ added in v0.11.0
get bytecode of address to check if its a EOA or contract.
func (*Pool) GetERC1155ABI ¶
func (*Pool) GetLogsByBlockNumber ¶ added in v0.6.0
func (*Pool) GetNonceAt ¶ added in v0.11.0
func (*Pool) GetProviders ¶ added in v0.6.1
func (*Pool) GetTokenImageURI ¶
func (*Pool) GetWETHABI ¶
func (*Pool) IsContract ¶ added in v0.11.2
IsContract returns true if the given address is a contract address. to resource intensive to check this for every address we encounter, so we cache the result.
func (*Pool) PreferredProviderAvailable ¶
func (*Pool) ReconnectProviders ¶
func (pp *Pool) ReconnectProviders()
func (pp *Pool) ReconnectProviders(queueLogs *chan types.Log) {.
func (*Pool) ResolveENS ¶ added in v0.6.0
func (*Pool) ReverseResolveAddressToENS ¶ added in v0.6.0
func (*Pool) SubscribeToAddresses ¶ added in v0.6.2
func (*Pool) SubscribeToEverything ¶ added in v0.6.0
func (*Pool) SubscribeToEverythingPending ¶ added in v0.6.0
func (pp *Pool) SubscribeToEverythingPending(queuePendingTx chan *types.Transaction) (uint64, error)
func (*Pool) SubscribeToTopics ¶ added in v0.6.1
func (*Pool) TransactionByHash ¶
func (pp *Pool) TransactionByHash(ctx context.Context, txHash common.Hash) (*types.Transaction, error)
TransactionByHash returns the transaction for the given hash.
type Provider ¶ added in v0.6.1
type Provider struct { Name string `json:"name" mapstructure:"name"` Endpoint string `json:"endpoint" mapstructure:"endpoint"` Preferred bool `json:"preferred" mapstructure:"preferred"` Color lipgloss.Color `json:"color" mapstructure:"color"` PID common.Hash `json:"pid" mapstructure:"pid"` Client *ethclient.Client `json:"-" mapstructure:"-"` GethClient *gethclient.Client `json:"-" mapstructure:"-"` }
Provider represents a rpc-endpoint Provider configuration.
Click to show internal directories.
Click to hide internal directories.