tokenpool

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tokenpool contains the token pool data service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// GetTokenAddress attempts to get token data from the cache otherwise its fetched from the bridge config
	GetTokenAddress(ctx context.Context, chainID uint32, tokenIndex uint8, contractAddress string) (*common.Address, error)
}

Service provides data about tokens using either a cache or bridgeconfig cache keys sare always ${KEY_NAME}_CHAIN_ID_ADDRESS so unless a token changes tokenID's (not the other way around), data is guaranteed to be accurate.

func NewPoolTokenDataService

func NewPoolTokenDataService(service fetcher.SwapService, consumerDB db.ConsumerDB) (Service, error)

NewPoolTokenDataService creates a new token data service.

Jump to

Keyboard shortcuts

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