Commit d8c84a91 authored by Annie Ke's avatar Annie Ke Committed by GitHub

chore: switch optimism testnet from kovan to goerli (#4719)

* chore: switch optimism testnet from kovan to goerli

* update supported chain id check
Co-authored-by: default avatarVignesh Mohankumar <me@vig.xyz>
parent 68282af4
...@@ -49,7 +49,7 @@ export default function DowntimeWarning() { ...@@ -49,7 +49,7 @@ export default function DowntimeWarning() {
switch (chainId) { switch (chainId) {
case SupportedChainId.OPTIMISM: case SupportedChainId.OPTIMISM:
case SupportedChainId.OPTIMISTIC_KOVAN: case SupportedChainId.OPTIMISM_GOERLI:
return ( return (
<Wrapper> <Wrapper>
<Trans> <Trans>
......
...@@ -178,7 +178,7 @@ const BridgeLabel = ({ chainId }: { chainId: SupportedChainId }) => { ...@@ -178,7 +178,7 @@ const BridgeLabel = ({ chainId }: { chainId: SupportedChainId }) => {
case SupportedChainId.ARBITRUM_RINKEBY: case SupportedChainId.ARBITRUM_RINKEBY:
return <Trans>Arbitrum Bridge</Trans> return <Trans>Arbitrum Bridge</Trans>
case SupportedChainId.OPTIMISM: case SupportedChainId.OPTIMISM:
case SupportedChainId.OPTIMISTIC_KOVAN: case SupportedChainId.OPTIMISM_GOERLI:
return <Trans>Optimism Bridge</Trans> return <Trans>Optimism Bridge</Trans>
case SupportedChainId.POLYGON: case SupportedChainId.POLYGON:
case SupportedChainId.POLYGON_MUMBAI: case SupportedChainId.POLYGON_MUMBAI:
...@@ -196,7 +196,7 @@ const ExplorerLabel = ({ chainId }: { chainId: SupportedChainId }) => { ...@@ -196,7 +196,7 @@ const ExplorerLabel = ({ chainId }: { chainId: SupportedChainId }) => {
case SupportedChainId.ARBITRUM_RINKEBY: case SupportedChainId.ARBITRUM_RINKEBY:
return <Trans>Arbiscan</Trans> return <Trans>Arbiscan</Trans>
case SupportedChainId.OPTIMISM: case SupportedChainId.OPTIMISM:
case SupportedChainId.OPTIMISTIC_KOVAN: case SupportedChainId.OPTIMISM_GOERLI:
return <Trans>Optimistic Etherscan</Trans> return <Trans>Optimistic Etherscan</Trans>
case SupportedChainId.POLYGON: case SupportedChainId.POLYGON:
case SupportedChainId.POLYGON_MUMBAI: case SupportedChainId.POLYGON_MUMBAI:
......
...@@ -37,7 +37,7 @@ const RootWrapper = styled.div` ...@@ -37,7 +37,7 @@ const RootWrapper = styled.div`
const SHOULD_SHOW_ALERT = { const SHOULD_SHOW_ALERT = {
[SupportedChainId.OPTIMISM]: true, [SupportedChainId.OPTIMISM]: true,
[SupportedChainId.OPTIMISTIC_KOVAN]: true, [SupportedChainId.OPTIMISM_GOERLI]: true,
[SupportedChainId.ARBITRUM_ONE]: true, [SupportedChainId.ARBITRUM_ONE]: true,
[SupportedChainId.ARBITRUM_RINKEBY]: true, [SupportedChainId.ARBITRUM_RINKEBY]: true,
[SupportedChainId.POLYGON]: true, [SupportedChainId.POLYGON]: true,
...@@ -62,7 +62,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: { ...@@ -62,7 +62,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: {
'radial-gradient(182.71% 150.59% at 2.81% 7.69%, rgba(90, 190, 170, 0.15) 0%, rgba(80, 160, 40, 0.15) 100%)', 'radial-gradient(182.71% 150.59% at 2.81% 7.69%, rgba(90, 190, 170, 0.15) 0%, rgba(80, 160, 40, 0.15) 100%)',
[SupportedChainId.OPTIMISM]: [SupportedChainId.OPTIMISM]:
'radial-gradient(948% 292% at 42% 0%, rgba(255, 58, 212, 0.01) 0%, rgba(255, 255, 255, 0.04) 100%),radial-gradient(98% 96% at 2% 0%, rgba(255, 39, 39, 0.01) 0%, rgba(235, 0, 255, 0.01) 96%)', 'radial-gradient(948% 292% at 42% 0%, rgba(255, 58, 212, 0.01) 0%, rgba(255, 255, 255, 0.04) 100%),radial-gradient(98% 96% at 2% 0%, rgba(255, 39, 39, 0.01) 0%, rgba(235, 0, 255, 0.01) 96%)',
[SupportedChainId.OPTIMISTIC_KOVAN]: [SupportedChainId.OPTIMISM_GOERLI]:
'radial-gradient(948% 292% at 42% 0%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.04) 100%),radial-gradient(98% 96% at 2% 0%, rgba(255, 39, 39, 0.04) 0%, rgba(235, 0, 255, 0.01 96%)', 'radial-gradient(948% 292% at 42% 0%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.04) 100%),radial-gradient(98% 96% at 2% 0%, rgba(255, 39, 39, 0.04) 0%, rgba(235, 0, 255, 0.01 96%)',
[SupportedChainId.ARBITRUM_ONE]: [SupportedChainId.ARBITRUM_ONE]:
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.01) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(75% 75% at 0% 0%, rgba(150, 190, 220, 0.05) 0%, rgba(33, 114, 229, 0.05) 100%), hsla(0, 0%, 100%, 0.05)', 'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.01) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(75% 75% at 0% 0%, rgba(150, 190, 220, 0.05) 0%, rgba(33, 114, 229, 0.05) 100%), hsla(0, 0%, 100%, 0.05)',
...@@ -80,7 +80,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: { ...@@ -80,7 +80,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: {
'radial-gradient(182.71% 150.59% at 2.81% 7.69%, rgba(63, 208, 137, 0.15) 0%, rgba(49, 205, 50, 0.15) 100%)', 'radial-gradient(182.71% 150.59% at 2.81% 7.69%, rgba(63, 208, 137, 0.15) 0%, rgba(49, 205, 50, 0.15) 100%)',
[SupportedChainId.OPTIMISM]: [SupportedChainId.OPTIMISM]:
'radial-gradient(92% 105% at 50% 7%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%),radial-gradient(100% 97% at 0% 12%, rgba(235, 0, 255, 0.1) 0%, rgba(243, 19, 19, 0.1) 100%), hsla(0, 0%, 100%, 0.1)', 'radial-gradient(92% 105% at 50% 7%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%),radial-gradient(100% 97% at 0% 12%, rgba(235, 0, 255, 0.1) 0%, rgba(243, 19, 19, 0.1) 100%), hsla(0, 0%, 100%, 0.1)',
[SupportedChainId.OPTIMISTIC_KOVAN]: [SupportedChainId.OPTIMISM_GOERLI]:
'radial-gradient(92% 105% at 50% 7%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%),radial-gradient(100% 97% at 0% 12%, rgba(235, 0, 255, 0.1) 0%, rgba(243, 19, 19, 0.1) 100%), hsla(0, 0%, 100%, 0.1)', 'radial-gradient(92% 105% at 50% 7%, rgba(255, 58, 212, 0.04) 0%, rgba(255, 255, 255, 0.03) 100%),radial-gradient(100% 97% at 0% 12%, rgba(235, 0, 255, 0.1) 0%, rgba(243, 19, 19, 0.1) 100%), hsla(0, 0%, 100%, 0.1)',
[SupportedChainId.ARBITRUM_ONE]: [SupportedChainId.ARBITRUM_ONE]:
'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.1) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(circle at top left, hsla(206, 50%, 75%, 0.01), hsla(215, 79%, 51%, 0.12)), hsla(0, 0%, 100%, 0.1)', 'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.1) 0%, rgba(219, 255, 0, 0) 100%),radial-gradient(circle at top left, hsla(206, 50%, 75%, 0.01), hsla(215, 79%, 51%, 0.12)), hsla(0, 0%, 100%, 0.1)',
...@@ -142,7 +142,7 @@ const TEXT_COLORS: { [chainId in NetworkAlertChains]: string } = { ...@@ -142,7 +142,7 @@ const TEXT_COLORS: { [chainId in NetworkAlertChains]: string } = {
[SupportedChainId.CELO]: 'rgba(53, 178, 97)', [SupportedChainId.CELO]: 'rgba(53, 178, 97)',
[SupportedChainId.CELO_ALFAJORES]: 'rgba(53, 178, 97)', [SupportedChainId.CELO_ALFAJORES]: 'rgba(53, 178, 97)',
[SupportedChainId.OPTIMISM]: '#ff3856', [SupportedChainId.OPTIMISM]: '#ff3856',
[SupportedChainId.OPTIMISTIC_KOVAN]: '#ff3856', [SupportedChainId.OPTIMISM_GOERLI]: '#ff3856',
[SupportedChainId.ARBITRUM_ONE]: '#0490ed', [SupportedChainId.ARBITRUM_ONE]: '#0490ed',
[SupportedChainId.ARBITRUM_RINKEBY]: '#0490ed', [SupportedChainId.ARBITRUM_RINKEBY]: '#0490ed',
} }
......
import { SupportedChainId } from '@uniswap/widgets'
import { useWeb3React, Web3ReactHooks, Web3ReactProvider } from '@web3-react/core' import { useWeb3React, Web3ReactHooks, Web3ReactProvider } from '@web3-react/core'
import { Connector } from '@web3-react/types' import { Connector } from '@web3-react/types'
import { Connection } from 'connection' import { Connection } from 'connection'
import { getConnectionName } from 'connection/utils' import { getConnectionName } from 'connection/utils'
import { isSupportedChain } from 'constants/chains'
import { RPC_PROVIDERS } from 'constants/providers' import { RPC_PROVIDERS } from 'constants/providers'
import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc' import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc'
import useEagerlyConnect from 'hooks/useEagerlyConnect' import useEagerlyConnect from 'hooks/useEagerlyConnect'
...@@ -26,7 +26,7 @@ export default function Web3Provider({ children }: { children: ReactNode }) { ...@@ -26,7 +26,7 @@ export default function Web3Provider({ children }: { children: ReactNode }) {
function Tracer() { function Tracer() {
const { chainId, provider } = useWeb3React() const { chainId, provider } = useWeb3React()
const networkProvider = RPC_PROVIDERS[(chainId || SupportedChainId.MAINNET) as SupportedChainId] const networkProvider = isSupportedChain(chainId) ? RPC_PROVIDERS[chainId] : undefined
const shouldTrace = useTraceJsonRpcFlag() === TraceJsonRpcVariant.Enabled const shouldTrace = useTraceJsonRpcFlag() === TraceJsonRpcVariant.Enabled
useEffect(() => { useEffect(() => {
......
...@@ -24,7 +24,7 @@ const CELO_TICK_LENS_ADDRESSES = '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D' ...@@ -24,7 +24,7 @@ const CELO_TICK_LENS_ADDRESSES = '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D'
export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { export const V3_CORE_FACTORY_ADDRESSES: AddressMap = {
...constructSameAddressMap(V3_FACTORY_ADDRESS, [ ...constructSameAddressMap(V3_FACTORY_ADDRESS, [
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.POLYGON_MUMBAI, SupportedChainId.POLYGON_MUMBAI,
...@@ -47,7 +47,7 @@ export const V3_MIGRATOR_ADDRESSES: AddressMap = { ...@@ -47,7 +47,7 @@ export const V3_MIGRATOR_ADDRESSES: AddressMap = {
export const MULTICALL_ADDRESS: AddressMap = { export const MULTICALL_ADDRESS: AddressMap = {
...constructSameAddressMap('0x1F98415757620B543A52E61c46B32eB19261F984', [ ...constructSameAddressMap('0x1F98415757620B543A52E61c46B32eB19261F984', [
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.POLYGON_MUMBAI, SupportedChainId.POLYGON_MUMBAI,
SupportedChainId.POLYGON, SupportedChainId.POLYGON,
...@@ -61,7 +61,7 @@ export const MULTICALL_ADDRESS: AddressMap = { ...@@ -61,7 +61,7 @@ export const MULTICALL_ADDRESS: AddressMap = {
export const SWAP_ROUTER_ADDRESSES: AddressMap = { export const SWAP_ROUTER_ADDRESSES: AddressMap = {
...constructSameAddressMap('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', [ ...constructSameAddressMap('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', [
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.POLYGON, SupportedChainId.POLYGON,
...@@ -103,7 +103,7 @@ export const ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap = { ...@@ -103,7 +103,7 @@ export const ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap = {
export const QUOTER_ADDRESSES: AddressMap = { export const QUOTER_ADDRESSES: AddressMap = {
...constructSameAddressMap('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6', [ ...constructSameAddressMap('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6', [
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.POLYGON_MUMBAI, SupportedChainId.POLYGON_MUMBAI,
...@@ -116,7 +116,7 @@ export const QUOTER_ADDRESSES: AddressMap = { ...@@ -116,7 +116,7 @@ export const QUOTER_ADDRESSES: AddressMap = {
export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = { export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
...constructSameAddressMap('0xC36442b4a4522E871399CD717aBDD847Ab11FE88', [ ...constructSameAddressMap('0xC36442b4a4522E871399CD717aBDD847Ab11FE88', [
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.POLYGON_MUMBAI, SupportedChainId.POLYGON_MUMBAI,
......
...@@ -92,7 +92,7 @@ const CHAIN_INFO: ChainInfoMap = { ...@@ -92,7 +92,7 @@ const CHAIN_INFO: ChainInfoMap = {
label: 'Kovan', label: 'Kovan',
logoUrl: ethereumLogoUrl, logoUrl: ethereumLogoUrl,
nativeCurrency: { name: 'Kovan Ether', symbol: 'kovETH', decimals: 18 }, nativeCurrency: { name: 'Kovan Ether', symbol: 'kovETH', decimals: 18 },
color: colorsDark.chain_69, color: colorsDark.chain_420,
}, },
[SupportedChainId.GOERLI]: { [SupportedChainId.GOERLI]: {
networkType: NetworkType.L1, networkType: NetworkType.L1,
...@@ -121,20 +121,20 @@ const CHAIN_INFO: ChainInfoMap = { ...@@ -121,20 +121,20 @@ const CHAIN_INFO: ChainInfoMap = {
color: colorsDark.chain_10, color: colorsDark.chain_10,
backgroundColor: colorsDark.chain_10_background, backgroundColor: colorsDark.chain_10_background,
}, },
[SupportedChainId.OPTIMISTIC_KOVAN]: { [SupportedChainId.OPTIMISM_GOERLI]: {
networkType: NetworkType.L2, networkType: NetworkType.L2,
blockWaitMsBeforeWarning: ms`25m`, blockWaitMsBeforeWarning: ms`25m`,
bridge: 'https://app.optimism.io/bridge', bridge: 'https://app.optimism.io/bridge',
defaultListUrl: OPTIMISM_LIST, defaultListUrl: OPTIMISM_LIST,
docs: 'https://optimism.io/', docs: 'https://optimism.io/',
explorer: 'https://optimistic.etherscan.io/', explorer: 'https://goerli-optimism.etherscan.io/',
infoLink: 'https://info.uniswap.org/#/optimism/', infoLink: 'https://info.uniswap.org/#/optimism/',
label: 'Optimistic Kovan', label: 'Optimism Görli',
logoUrl: optimismLogoUrl, logoUrl: optimismLogoUrl,
statusPage: 'https://optimism.io/status', statusPage: 'https://optimism.io/status',
helpCenterUrl: 'https://help.uniswap.org/en/collections/3137778-uniswap-on-optimistic-ethereum-oξ', helpCenterUrl: 'https://help.uniswap.org/en/collections/3137778-uniswap-on-optimistic-ethereum-oξ',
nativeCurrency: { name: 'Optimistic Kovan Ether', symbol: 'kovOpETH', decimals: 18 }, nativeCurrency: { name: 'Optimism Goerli Ether', symbol: 'görOpETH', decimals: 18 },
color: colorsDark.chain_69, color: colorsDark.chain_420,
}, },
[SupportedChainId.ARBITRUM_ONE]: { [SupportedChainId.ARBITRUM_ONE]: {
networkType: NetworkType.L2, networkType: NetworkType.L2,
......
...@@ -12,7 +12,7 @@ export enum SupportedChainId { ...@@ -12,7 +12,7 @@ export enum SupportedChainId {
ARBITRUM_RINKEBY = 421611, ARBITRUM_RINKEBY = 421611,
OPTIMISM = 10, OPTIMISM = 10,
OPTIMISTIC_KOVAN = 69, OPTIMISM_GOERLI = 420,
POLYGON = 137, POLYGON = 137,
POLYGON_MUMBAI = 80001, POLYGON_MUMBAI = 80001,
...@@ -34,7 +34,7 @@ export const CHAIN_IDS_TO_NAMES = { ...@@ -34,7 +34,7 @@ export const CHAIN_IDS_TO_NAMES = {
[SupportedChainId.ARBITRUM_ONE]: 'arbitrum', [SupportedChainId.ARBITRUM_ONE]: 'arbitrum',
[SupportedChainId.ARBITRUM_RINKEBY]: 'arbitrum_rinkeby', [SupportedChainId.ARBITRUM_RINKEBY]: 'arbitrum_rinkeby',
[SupportedChainId.OPTIMISM]: 'optimism', [SupportedChainId.OPTIMISM]: 'optimism',
[SupportedChainId.OPTIMISTIC_KOVAN]: 'optimistic_kovan', [SupportedChainId.OPTIMISM_GOERLI]: 'optimism_goerli',
} }
/** /**
...@@ -72,7 +72,7 @@ export const TESTNET_CHAIN_IDS = [ ...@@ -72,7 +72,7 @@ export const TESTNET_CHAIN_IDS = [
SupportedChainId.KOVAN, SupportedChainId.KOVAN,
SupportedChainId.POLYGON_MUMBAI, SupportedChainId.POLYGON_MUMBAI,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
] as const ] as const
export type SupportedTestnetChainId = typeof TESTNET_CHAIN_IDS[number] export type SupportedTestnetChainId = typeof TESTNET_CHAIN_IDS[number]
...@@ -102,7 +102,7 @@ export const L2_CHAIN_IDS = [ ...@@ -102,7 +102,7 @@ export const L2_CHAIN_IDS = [
SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
] as const ] as const
export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number] export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number]
...@@ -75,9 +75,9 @@ export const FALLBACK_URLS: { [key in SupportedChainId]: string[] } = { ...@@ -75,9 +75,9 @@ export const FALLBACK_URLS: { [key in SupportedChainId]: string[] } = {
// "Fallback" URLs // "Fallback" URLs
'https://rpc.ankr.com/optimism', 'https://rpc.ankr.com/optimism',
], ],
[SupportedChainId.OPTIMISTIC_KOVAN]: [ [SupportedChainId.OPTIMISM_GOERLI]: [
// "Safe" URLs // "Safe" URLs
'https://kovan.optimism.io', 'https://goerli.optimism.io',
], ],
[SupportedChainId.CELO]: [ [SupportedChainId.CELO]: [
// "Safe" URLs // "Safe" URLs
...@@ -112,9 +112,9 @@ export const RPC_URLS: { [key in SupportedChainId]: string[] } = { ...@@ -112,9 +112,9 @@ export const RPC_URLS: { [key in SupportedChainId]: string[] } = {
`https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`, `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`,
...FALLBACK_URLS[SupportedChainId.OPTIMISM], ...FALLBACK_URLS[SupportedChainId.OPTIMISM],
], ],
[SupportedChainId.OPTIMISTIC_KOVAN]: [ [SupportedChainId.OPTIMISM_GOERLI]: [
`https://optimism-kovan.infura.io/v3/${INFURA_KEY}`, `https://optimism-goerli.infura.io/v3/${INFURA_KEY}`,
...FALLBACK_URLS[SupportedChainId.OPTIMISTIC_KOVAN], ...FALLBACK_URLS[SupportedChainId.OPTIMISM_GOERLI],
], ],
[SupportedChainId.ARBITRUM_ONE]: [ [SupportedChainId.ARBITRUM_ONE]: [
`https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`, `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`,
......
...@@ -56,7 +56,7 @@ export const RPC_PROVIDERS: { [key in SupportedChainId]: StaticJsonRpcProvider } ...@@ -56,7 +56,7 @@ export const RPC_PROVIDERS: { [key in SupportedChainId]: StaticJsonRpcProvider }
[SupportedChainId.GOERLI]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.GOERLI]), [SupportedChainId.GOERLI]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.GOERLI]),
[SupportedChainId.KOVAN]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.KOVAN]), [SupportedChainId.KOVAN]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.KOVAN]),
[SupportedChainId.OPTIMISM]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISM]), [SupportedChainId.OPTIMISM]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISM]),
[SupportedChainId.OPTIMISTIC_KOVAN]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISTIC_KOVAN]), [SupportedChainId.OPTIMISM_GOERLI]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISM_GOERLI]),
[SupportedChainId.ARBITRUM_ONE]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_ONE]), [SupportedChainId.ARBITRUM_ONE]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_ONE]),
[SupportedChainId.ARBITRUM_RINKEBY]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_RINKEBY]), [SupportedChainId.ARBITRUM_RINKEBY]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_RINKEBY]),
[SupportedChainId.POLYGON]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.POLYGON]), [SupportedChainId.POLYGON]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.POLYGON]),
......
...@@ -157,7 +157,7 @@ export const COMMON_BASES: ChainCurrencyList = { ...@@ -157,7 +157,7 @@ export const COMMON_BASES: ChainCurrencyList = {
USDT_OPTIMISM, USDT_OPTIMISM,
WBTC_OPTIMISM, WBTC_OPTIMISM,
], ],
[SupportedChainId.OPTIMISTIC_KOVAN]: [nativeOnChain(SupportedChainId.OPTIMISTIC_KOVAN)], [SupportedChainId.OPTIMISM_GOERLI]: [nativeOnChain(SupportedChainId.OPTIMISM_GOERLI)],
[SupportedChainId.POLYGON]: [ [SupportedChainId.POLYGON]: [
nativeOnChain(SupportedChainId.POLYGON), nativeOnChain(SupportedChainId.POLYGON),
WETH_POLYGON, WETH_POLYGON,
......
...@@ -46,9 +46,9 @@ export const USDC_OPTIMISM = new Token( ...@@ -46,9 +46,9 @@ export const USDC_OPTIMISM = new Token(
'USDC', 'USDC',
'USD//C' 'USD//C'
) )
export const USDC_OPTIMISTIC_KOVAN = new Token( export const USDC_OPTIMISM_GOERLI = new Token(
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
'0x3b8e53b3ab8e01fb57d0c9e893bc4d655aa67d84', '0x7E07E15D2a87A24492740D16f5bdF58c16db0c4E',
6, 6,
'USDC', 'USDC',
'USD//C' 'USD//C'
...@@ -128,7 +128,7 @@ export const USDC: { [chainId in SupportedChainId]: Token } = { ...@@ -128,7 +128,7 @@ export const USDC: { [chainId in SupportedChainId]: Token } = {
[SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM, [SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM,
[SupportedChainId.OPTIMISM]: USDC_OPTIMISM, [SupportedChainId.OPTIMISM]: USDC_OPTIMISM,
[SupportedChainId.ARBITRUM_RINKEBY]: USDC_ARBITRUM_RINKEBY, [SupportedChainId.ARBITRUM_RINKEBY]: USDC_ARBITRUM_RINKEBY,
[SupportedChainId.OPTIMISTIC_KOVAN]: USDC_OPTIMISTIC_KOVAN, [SupportedChainId.OPTIMISM_GOERLI]: USDC_OPTIMISM_GOERLI,
[SupportedChainId.POLYGON]: USDC_POLYGON, [SupportedChainId.POLYGON]: USDC_POLYGON,
[SupportedChainId.POLYGON_MUMBAI]: USDC_POLYGON_MUMBAI, [SupportedChainId.POLYGON_MUMBAI]: USDC_POLYGON_MUMBAI,
[SupportedChainId.CELO]: PORTAL_USDC_CELO, [SupportedChainId.CELO]: PORTAL_USDC_CELO,
...@@ -353,8 +353,8 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } = ...@@ -353,8 +353,8 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } =
'WETH', 'WETH',
'Wrapped Ether' 'Wrapped Ether'
), ),
[SupportedChainId.OPTIMISTIC_KOVAN]: new Token( [SupportedChainId.OPTIMISM_GOERLI]: new Token(
SupportedChainId.OPTIMISTIC_KOVAN, SupportedChainId.OPTIMISM_GOERLI,
'0x4200000000000000000000000000000000000006', '0x4200000000000000000000000000000000000006',
18, 18,
'WETH', 'WETH',
...@@ -461,7 +461,7 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha ...@@ -461,7 +461,7 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha
[SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM.address, [SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM.address,
[SupportedChainId.OPTIMISM]: USDC_OPTIMISM.address, [SupportedChainId.OPTIMISM]: USDC_OPTIMISM.address,
[SupportedChainId.ARBITRUM_RINKEBY]: USDC_ARBITRUM_RINKEBY.address, [SupportedChainId.ARBITRUM_RINKEBY]: USDC_ARBITRUM_RINKEBY.address,
[SupportedChainId.OPTIMISTIC_KOVAN]: USDC_OPTIMISTIC_KOVAN.address, [SupportedChainId.OPTIMISM_GOERLI]: USDC_OPTIMISM_GOERLI.address,
[SupportedChainId.POLYGON]: USDC_POLYGON.address, [SupportedChainId.POLYGON]: USDC_POLYGON.address,
[SupportedChainId.POLYGON_MUMBAI]: USDC_POLYGON_MUMBAI.address, [SupportedChainId.POLYGON_MUMBAI]: USDC_POLYGON_MUMBAI.address,
[SupportedChainId.CELO]: PORTAL_USDC_CELO.address, [SupportedChainId.CELO]: PORTAL_USDC_CELO.address,
......
...@@ -39,7 +39,7 @@ export const CHAIN_IDS_TO_BACKEND_NAME: { [key: number]: Chain } = { ...@@ -39,7 +39,7 @@ export const CHAIN_IDS_TO_BACKEND_NAME: { [key: number]: Chain } = {
[SupportedChainId.ARBITRUM_ONE]: 'ARBITRUM', [SupportedChainId.ARBITRUM_ONE]: 'ARBITRUM',
[SupportedChainId.ARBITRUM_RINKEBY]: 'ARBITRUM', [SupportedChainId.ARBITRUM_RINKEBY]: 'ARBITRUM',
[SupportedChainId.OPTIMISM]: 'OPTIMISM', [SupportedChainId.OPTIMISM]: 'OPTIMISM',
[SupportedChainId.OPTIMISTIC_KOVAN]: 'OPTIMISM', [SupportedChainId.OPTIMISM_GOERLI]: 'OPTIMISM',
} }
export function useGlobalChainName() { export function useGlobalChainName() {
......
...@@ -33,7 +33,7 @@ export function shouldCheck(lastBlockNumber: number, tx: Transaction): boolean { ...@@ -33,7 +33,7 @@ export function shouldCheck(lastBlockNumber: number, tx: Transaction): boolean {
const RETRY_OPTIONS_BY_CHAIN_ID: { [chainId: number]: RetryOptions } = { const RETRY_OPTIONS_BY_CHAIN_ID: { [chainId: number]: RetryOptions } = {
[SupportedChainId.ARBITRUM_ONE]: { n: 10, minWait: 250, maxWait: 1000 }, [SupportedChainId.ARBITRUM_ONE]: { n: 10, minWait: 250, maxWait: 1000 },
[SupportedChainId.ARBITRUM_RINKEBY]: { n: 10, minWait: 250, maxWait: 1000 }, [SupportedChainId.ARBITRUM_RINKEBY]: { n: 10, minWait: 250, maxWait: 1000 },
[SupportedChainId.OPTIMISTIC_KOVAN]: { n: 10, minWait: 250, maxWait: 1000 }, [SupportedChainId.OPTIMISM_GOERLI]: { n: 10, minWait: 250, maxWait: 1000 },
[SupportedChainId.OPTIMISM]: { n: 10, minWait: 250, maxWait: 1000 }, [SupportedChainId.OPTIMISM]: { n: 10, minWait: 250, maxWait: 1000 },
} }
const DEFAULT_RETRY_OPTIONS: RetryOptions = { n: 1, minWait: 0, maxWait: 0 } const DEFAULT_RETRY_OPTIONS: RetryOptions = { n: 1, minWait: 0, maxWait: 0 }
......
...@@ -31,7 +31,7 @@ export default function Updater(): null { ...@@ -31,7 +31,7 @@ export default function Updater(): null {
}, [fetchList, isWindowVisible, lists]) }, [fetchList, isWindowVisible, lists])
useEffect(() => { useEffect(() => {
if (chainId && [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISTIC_KOVAN].includes(chainId)) { if (chainId && [SupportedChainId.OPTIMISM, SupportedChainId.OPTIMISM_GOERLI].includes(chainId)) {
dispatch(enableList(OPTIMISM_LIST)) dispatch(enableList(OPTIMISM_LIST))
} }
if (chainId && [SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_RINKEBY].includes(chainId)) { if (chainId && [SupportedChainId.ARBITRUM_ONE, SupportedChainId.ARBITRUM_RINKEBY].includes(chainId)) {
......
...@@ -52,7 +52,7 @@ export default function RadialGradientByChainUpdater(): null { ...@@ -52,7 +52,7 @@ export default function RadialGradientByChainUpdater(): null {
backgroundRadialGradientElement.style.background = darkMode ? arbitrumDarkGradient : arbitrumLightGradient backgroundRadialGradientElement.style.background = darkMode ? arbitrumDarkGradient : arbitrumLightGradient
break break
case SupportedChainId.OPTIMISM: case SupportedChainId.OPTIMISM:
case SupportedChainId.OPTIMISTIC_KOVAN: case SupportedChainId.OPTIMISM_GOERLI:
setBackground(backgroundResetStyles) setBackground(backgroundResetStyles)
const optimismLightGradient = redesignFlagEnabled const optimismLightGradient = redesignFlagEnabled
? 'radial-gradient(100% 100% at 50% 0%, rgba(255, 251, 242, 0.8) 0%, rgba(255, 244, 249, 0.6958) 50.52%, rgba(255, 255, 255, 0) 100%), #FFFFFF' ? 'radial-gradient(100% 100% at 50% 0%, rgba(255, 251, 242, 0.8) 0%, rgba(255, 244, 249, 0.6958) 50.52%, rgba(255, 255, 255, 0) 100%), #FFFFFF'
......
...@@ -215,7 +215,7 @@ export interface Palette { ...@@ -215,7 +215,7 @@ export interface Palette {
chain_10: Color chain_10: Color
chain_137: Color chain_137: Color
chain_42: Color chain_42: Color
chain_69: Color chain_420: Color
chain_42161: Color chain_42161: Color
chain_421611: Color chain_421611: Color
chain_80001: Color chain_80001: Color
...@@ -275,7 +275,7 @@ export const colorsLight: Palette = { ...@@ -275,7 +275,7 @@ export const colorsLight: Palette = {
chain_10: colors.networkOptimism, chain_10: colors.networkOptimism,
chain_137: colors.networkPolygon, chain_137: colors.networkPolygon,
chain_42: colors.networkArbitrum, chain_42: colors.networkArbitrum,
chain_69: colors.networkOptimism, chain_420: colors.networkOptimism,
chain_42161: colors.networkEthereum, chain_42161: colors.networkEthereum,
chain_421611: colors.networkEthereum, chain_421611: colors.networkEthereum,
chain_80001: colors.networkPolygon, chain_80001: colors.networkPolygon,
...@@ -337,7 +337,7 @@ export const colorsDark: Palette = { ...@@ -337,7 +337,7 @@ export const colorsDark: Palette = {
chain_10: colors.networkOptimism, chain_10: colors.networkOptimism,
chain_137: colors.networkPolygon, chain_137: colors.networkPolygon,
chain_42: colors.networkArbitrum, chain_42: colors.networkArbitrum,
chain_69: colors.networkEthereum, chain_420: colors.networkEthereum,
chain_42161: colors.networkEthereum, chain_42161: colors.networkEthereum,
chain_421611: colors.networkEthereum, chain_421611: colors.networkEthereum,
chain_80001: colors.networkPolygon, chain_80001: colors.networkPolygon,
......
...@@ -116,7 +116,7 @@ function uniswapThemeColors(darkMode: boolean): ThemeColors { ...@@ -116,7 +116,7 @@ function uniswapThemeColors(darkMode: boolean): ThemeColors {
chain_10: colorsDark.chain_10, chain_10: colorsDark.chain_10,
chain_137: colorsDark.chain_137, chain_137: colorsDark.chain_137,
chain_42: colorsDark.chain_42, chain_42: colorsDark.chain_42,
chain_69: colorsDark.chain_69, chain_420: colorsDark.chain_420,
chain_42161: colorsDark.chain_42161, chain_42161: colorsDark.chain_42161,
chain_421611: colorsDark.chain_421611, chain_421611: colorsDark.chain_421611,
chain_80001: colorsDark.chain_80001, chain_80001: colorsDark.chain_80001,
......
...@@ -48,7 +48,7 @@ export interface ThemeColors { ...@@ -48,7 +48,7 @@ export interface ThemeColors {
chain_10: Color chain_10: Color
chain_137: Color chain_137: Color
chain_42: Color chain_42: Color
chain_69: Color chain_420: Color
chain_42161: Color chain_42161: Color
chain_421611: Color chain_421611: Color
chain_80001: Color chain_80001: Color
......
...@@ -5,7 +5,7 @@ const EXPLORER_HOSTNAMES: { [hostname: string]: true } = { ...@@ -5,7 +5,7 @@ const EXPLORER_HOSTNAMES: { [hostname: string]: true } = {
'kovan.etherscan.io': true, 'kovan.etherscan.io': true,
'goerli.etherscan.io': true, 'goerli.etherscan.io': true,
'optimistic.etherscan.io': true, 'optimistic.etherscan.io': true,
'kovan-optimistic.etherscan.io': true, 'goerli-optimism.etherscan.io': true,
'rinkeby-explorer.arbitrum.io': true, 'rinkeby-explorer.arbitrum.io': true,
'arbiscan.io': true, 'arbiscan.io': true,
} }
......
...@@ -7,7 +7,7 @@ const BLOCK_EXPLORER_PREFIXES: { [chainId: number]: string } = { ...@@ -7,7 +7,7 @@ const BLOCK_EXPLORER_PREFIXES: { [chainId: number]: string } = {
[SupportedChainId.GOERLI]: 'https://goerli.etherscan.io', [SupportedChainId.GOERLI]: 'https://goerli.etherscan.io',
[SupportedChainId.KOVAN]: 'https://kovan.etherscan.io', [SupportedChainId.KOVAN]: 'https://kovan.etherscan.io',
[SupportedChainId.OPTIMISM]: 'https://optimistic.etherscan.io', [SupportedChainId.OPTIMISM]: 'https://optimistic.etherscan.io',
[SupportedChainId.OPTIMISTIC_KOVAN]: 'https://kovan-optimistic.etherscan.io', [SupportedChainId.OPTIMISM_GOERLI]: 'https://goerli-optimism.etherscan.io',
[SupportedChainId.POLYGON]: 'https://polygonscan.com', [SupportedChainId.POLYGON]: 'https://polygonscan.com',
[SupportedChainId.POLYGON_MUMBAI]: 'https://mumbai.polygonscan.com', [SupportedChainId.POLYGON_MUMBAI]: 'https://mumbai.polygonscan.com',
[SupportedChainId.CELO]: 'https://celoscan.io', [SupportedChainId.CELO]: 'https://celoscan.io',
...@@ -66,7 +66,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat ...@@ -66,7 +66,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
return `${prefix}/token/${data}` return `${prefix}/token/${data}`
case ExplorerDataType.BLOCK: case ExplorerDataType.BLOCK:
if (chainId === SupportedChainId.OPTIMISM || chainId === SupportedChainId.OPTIMISTIC_KOVAN) { if (chainId === SupportedChainId.OPTIMISM || chainId === SupportedChainId.OPTIMISM_GOERLI) {
return `${prefix}/tx/${data}` return `${prefix}/tx/${data}`
} }
return `${prefix}/block/${data}` return `${prefix}/block/${data}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment