import {SupportedToken, supportedTokensChains} from './constants'; import {SupportedChainId} from '../supported-chain-id'; export function getSupportedToken( token: SupportedToken, chainId: SupportedChainId ) { const tokenDetails = supportedTokensChains[chainId]?.[token]; if (!tokenDetails) { throw new Error( 'cannot find token for symbol ' + token + ' on chain ' + chainId ); } return tokenDetails; }