import { envVar , fetchEnv } from './env-utils' ; export function getBlockscoutUrl ( celoEnv ) { return `https://${ celoEnv }-blockscout.${ fetchEnv ( envVar . CLUSTER_DOMAIN_NAME ) }.org` ; } export function getBlockscoutClusterInternalUrl ( celoEnv ) { return `${ celoEnv }-blockscout-web` ; } export function getEthstatsUrl ( celoEnv ) { return `https://${ celoEnv }-ethstats.${ fetchEnv ( envVar . CLUSTER_DOMAIN_NAME ) }.org` ; } export function getBlockchainApiUrl ( celoEnv ) { return `https://${ celoEnv }-dot-${ fetchEnv ( envVar . TESTNET_PROJECT_NAME ) }.appspot.com` ; } export function getGenesisGoogleStorageUrl ( celoEnv ) { return `https://www.googleapis.com/storage/v1/b/genesis_blocks/o/${ celoEnv }?alt=media` ; } export function getFornoUrl ( celoEnv ) { return celoEnv === 'rc1' ? `https://forno.celo.org` : `https://${ celoEnv }-forno.${ fetchEnv ( envVar . CLUSTER_DOMAIN_NAME ) }.org` ; } export function getFornoWebSocketUrl ( celoEnv ) { switch ( celoEnv ) { case 'rc1' : return 'wss://forno.celo.org/ws' ; case 'alfajores' : return 'wss://alfajores-forno.celo-testnet.org/ws' ; default : throw Error ( `Websockets not supported for ${ celoEnv } forno` ) ; } } export function getFullNodeHttpRpcInternalUrl ( celoEnv ) { return `http://${ celoEnv }-fullnodes-rpc.${ celoEnv }.svc.cluster.local:8545` ; } export function getFullNodeWebSocketRpcInternalUrl ( celoEnv ) { return `ws://${ celoEnv }-fullnodes-rpc.${ celoEnv }.svc.cluster.local:8546` ; }