provider

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockNumber        methodCall = "eth_blockNumber"
	TransactionByHash  methodCall = "eth_getTransactionByHash"
	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"

	ResolveENSAddress methodCall = "resolve_ens_address"

	GasInfo methodCall = "gas_info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	LastLogReceivedAt time.Time `json:"-" mapstructure:"-"`
	// contains filtered or unexported fields
}

func FromConfig

func FromConfig(config interface{}) (*Pool, error)

func (*Pool) BlockNumber added in v0.4.3

func (pp *Pool) BlockNumber(ctx context.Context) (uint64, error)

BlockNumber returns the most recent block number.

func (*Pool) ERC1155TokenName

func (pp *Pool) ERC1155TokenName(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (string, error)

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 (pp *Pool) ERC721CollectionMetadata(ctx context.Context, contractAddress common.Address) (map[string]interface{}, error)

func (*Pool) ERC721CollectionName

func (pp *Pool) ERC721CollectionName(ctx context.Context, contractAddress common.Address) (string, error)

func (*Pool) GetCurrentGasInfo

func (pp *Pool) GetCurrentGasInfo() (*nemo.GasInfo, error)

func (*Pool) GetERC1155ABI

func (pp *Pool) GetERC1155ABI(ctx context.Context, contractAddress common.Address) (*abis.ERC1155, error)

func (*Pool) GetTokenImageURI

func (pp *Pool) GetTokenImageURI(ctx context.Context, contractAddress common.Address, tokenID *big.Int) (string, error)

func (*Pool) GetWETHABI

func (pp *Pool) GetWETHABI(ctx context.Context, contractAddress common.Address) (*abis.WETH, error)

func (*Pool) PreferredProviderAvailable

func (pp *Pool) PreferredProviderAvailable() bool

func (*Pool) ReconnectProviders

func (pp *Pool) ReconnectProviders()

func (pp *Pool) ReconnectProviders(queueLogs *chan types.Log) {

func (*Pool) ResolveENSForAddress

func (pp *Pool) ResolveENSForAddress(ctx context.Context, address common.Address) (string, error)

func (*Pool) Subscribe

func (pp *Pool) Subscribe(queueLogs chan types.Log) (uint64, error)

func (*Pool) TransactionByHash

func (pp *Pool) TransactionByHash(ctx context.Context, txHash common.Hash) (*types.Transaction, error)

TransactionByHash returns the transaction for the given hash.

func (*Pool) TransactionReceipt

func (pp *Pool) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

TransactionReceipt returns the receipt of a transaction by transaction hash.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL