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.
Click to show internal directories.
Click to hide internal directories.