token

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Lookup(ctx context.Context, chainID uint64, address *common.Address, id, blockNumber *big.Int) (*metadata.Token, error)
}

Client is a client to look up token metadata.

func NewClient

func NewClient(ethereumClient ethereum.Client, options ...Option) Client

NewClient returns a new client.

type LookupFunc

type LookupFunc = func(ctx context.Context, chainID uint64, address *common.Address, id, blockNumber *big.Int) (*metadata.Token, error)

LookupFunc is a function to look up token metadata.

type Option

type Option func(*client) error

func WithParseTokenMetadata

func WithParseTokenMetadata(value bool) Option

WithParseTokenMetadata enables parsing token metadata.

func WithRueidisClient added in v0.3.11

func WithRueidisClient(rueidisClient rueidis.Client) Option

WithRueidisClient sets Redis client and enables caching.

Jump to

Keyboard shortcuts

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