| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68282af commit d8c84a9
20 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,7 @@ export default function DowntimeWarning() { | |||
| 49 | 49 | ||
| 50 | 50 | switch (chainId) { | |
| 51 | 51 | case SupportedChainId.OPTIMISM: | |
| 52 | - case SupportedChainId.OPTIMISTIC_KOVAN: | ||
| 52 | + case SupportedChainId.OPTIMISM_GOERLI: | ||
| 53 | 53 | return ( | |
| 54 | 54 | <Wrapper> | |
| 55 | 55 | <Trans> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,7 +178,7 @@ const BridgeLabel = ({ chainId }: { chainId: SupportedChainId }) => { | |||
| 178 | 178 | case SupportedChainId.ARBITRUM_RINKEBY: | |
| 179 | 179 | return <Trans>Arbitrum Bridge</Trans> | |
| 180 | 180 | case SupportedChainId.OPTIMISM: | |
| 181 | - case SupportedChainId.OPTIMISTIC_KOVAN: | ||
| 181 | + case SupportedChainId.OPTIMISM_GOERLI: | ||
| 182 | 182 | return <Trans>Optimism Bridge</Trans> | |
| 183 | 183 | case SupportedChainId.POLYGON: | |
| 184 | 184 | case SupportedChainId.POLYGON_MUMBAI: | |
@@ -196,7 +196,7 @@ const ExplorerLabel = ({ chainId }: { chainId: SupportedChainId }) => { | |||
| 196 | 196 | case SupportedChainId.ARBITRUM_RINKEBY: | |
| 197 | 197 | return <Trans>Arbiscan</Trans> | |
| 198 | 198 | case SupportedChainId.OPTIMISM: | |
| 199 | - case SupportedChainId.OPTIMISTIC_KOVAN: | ||
| 199 | + case SupportedChainId.OPTIMISM_GOERLI: | ||
| 200 | 200 | return <Trans>Optimistic Etherscan</Trans> | |
| 201 | 201 | case SupportedChainId.POLYGON: | |
| 202 | 202 | case SupportedChainId.POLYGON_MUMBAI: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,7 +37,7 @@ const RootWrapper = styled.div` | |||
| 37 | 37 | ||
| 38 | 38 | const SHOULD_SHOW_ALERT = { | |
| 39 | 39 | [SupportedChainId.OPTIMISM]: true, | |
| 40 | - [SupportedChainId.OPTIMISTIC_KOVAN]: true, | ||
| 40 | + [SupportedChainId.OPTIMISM_GOERLI]: true, | ||
| 41 | 41 | [SupportedChainId.ARBITRUM_ONE]: true, | |
| 42 | 42 | [SupportedChainId.ARBITRUM_RINKEBY]: true, | |
| 43 | 43 | [SupportedChainId.POLYGON]: true, | |
@@ -62,7 +62,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: { | |||
| 62 | 62 | '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%)', | |
| 63 | 63 | [SupportedChainId.OPTIMISM]: | |
| 64 | 64 | '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%)', | |
| 65 | - [SupportedChainId.OPTIMISTIC_KOVAN]: | ||
| 65 | + [SupportedChainId.OPTIMISM_GOERLI]: | ||
| 66 | 66 | '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%)', | |
| 67 | 67 | [SupportedChainId.ARBITRUM_ONE]: | |
| 68 | 68 | '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 | 80 | '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%)', | |
| 81 | 81 | [SupportedChainId.OPTIMISM]: | |
| 82 | 82 | '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)', | |
| 83 | - [SupportedChainId.OPTIMISTIC_KOVAN]: | ||
| 83 | + [SupportedChainId.OPTIMISM_GOERLI]: | ||
| 84 | 84 | '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)', | |
| 85 | 85 | [SupportedChainId.ARBITRUM_ONE]: | |
| 86 | 86 | '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 | 142 | [SupportedChainId.CELO]: 'rgba(53, 178, 97)', | |
| 143 | 143 | [SupportedChainId.CELO_ALFAJORES]: 'rgba(53, 178, 97)', | |
| 144 | 144 | [SupportedChainId.OPTIMISM]: '#ff3856', | |
| 145 | - [SupportedChainId.OPTIMISTIC_KOVAN]: '#ff3856', | ||
| 145 | + [SupportedChainId.OPTIMISM_GOERLI]: '#ff3856', | ||
| 146 | 146 | [SupportedChainId.ARBITRUM_ONE]: '#0490ed', | |
| 147 | 147 | [SupportedChainId.ARBITRUM_RINKEBY]: '#0490ed', | |
| 148 | 148 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,8 @@ | |||
| 1 | - import { SupportedChainId } from '@uniswap/widgets' | ||
| 2 | 1 | import { useWeb3React, Web3ReactHooks, Web3ReactProvider } from '@web3-react/core' | |
| 3 | 2 | import { Connector } from '@web3-react/types' | |
| 4 | 3 | import { Connection } from 'connection' | |
| 5 | 4 | import { getConnectionName } from 'connection/utils' | |
| 5 | + import { isSupportedChain } from 'constants/chains' | ||
| 6 | 6 | import { RPC_PROVIDERS } from 'constants/providers' | |
| 7 | 7 | import { TraceJsonRpcVariant, useTraceJsonRpcFlag } from 'featureFlags/flags/traceJsonRpc' | |
| 8 | 8 | import useEagerlyConnect from 'hooks/useEagerlyConnect' | |
@@ -26,7 +26,7 @@ export default function Web3Provider({ children }: { children: ReactNode }) { | |||
| 26 | 26 | ||
| 27 | 27 | function Tracer() { | |
| 28 | 28 | const { chainId, provider } = useWeb3React() | |
| 29 | - const networkProvider = RPC_PROVIDERS[(chainId || SupportedChainId.MAINNET) as SupportedChainId] | ||
| 29 | + const networkProvider = isSupportedChain(chainId) ? RPC_PROVIDERS[chainId] : undefined | ||
| 30 | 30 | const shouldTrace = useTraceJsonRpcFlag() === TraceJsonRpcVariant.Enabled | |
| 31 | 31 | ||
| 32 | 32 | useEffect(() => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,7 +24,7 @@ const CELO_TICK_LENS_ADDRESSES = '0x5f115D9113F88e0a0Db1b5033D90D4a9690AcD3D' | |||
| 24 | 24 | export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { | |
| 25 | 25 | ...constructSameAddressMap(V3_FACTORY_ADDRESS, [ | |
| 26 | 26 | SupportedChainId.OPTIMISM, | |
| 27 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 27 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 28 | 28 | SupportedChainId.ARBITRUM_ONE, | |
| 29 | 29 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 30 | 30 | SupportedChainId.POLYGON_MUMBAI, | |
@@ -47,7 +47,7 @@ export const V3_MIGRATOR_ADDRESSES: AddressMap = { | |||
| 47 | 47 | ||
| 48 | 48 | export const MULTICALL_ADDRESS: AddressMap = { | |
| 49 | 49 | ...constructSameAddressMap('0x1F98415757620B543A52E61c46B32eB19261F984', [ | |
| 50 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 50 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 51 | 51 | SupportedChainId.OPTIMISM, | |
| 52 | 52 | SupportedChainId.POLYGON_MUMBAI, | |
| 53 | 53 | SupportedChainId.POLYGON, | |
@@ -61,7 +61,7 @@ export const MULTICALL_ADDRESS: AddressMap = { | |||
| 61 | 61 | export const SWAP_ROUTER_ADDRESSES: AddressMap = { | |
| 62 | 62 | ...constructSameAddressMap('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', [ | |
| 63 | 63 | SupportedChainId.OPTIMISM, | |
| 64 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 64 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 65 | 65 | SupportedChainId.ARBITRUM_ONE, | |
| 66 | 66 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 67 | 67 | SupportedChainId.POLYGON, | |
@@ -103,7 +103,7 @@ export const ARGENT_WALLET_DETECTOR_ADDRESS: AddressMap = { | |||
| 103 | 103 | export const QUOTER_ADDRESSES: AddressMap = { | |
| 104 | 104 | ...constructSameAddressMap('0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6', [ | |
| 105 | 105 | SupportedChainId.OPTIMISM, | |
| 106 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 106 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 107 | 107 | SupportedChainId.ARBITRUM_ONE, | |
| 108 | 108 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 109 | 109 | SupportedChainId.POLYGON_MUMBAI, | |
@@ -116,7 +116,7 @@ export const QUOTER_ADDRESSES: AddressMap = { | |||
| 116 | 116 | export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = { | |
| 117 | 117 | ...constructSameAddressMap('0xC36442b4a4522E871399CD717aBDD847Ab11FE88', [ | |
| 118 | 118 | SupportedChainId.OPTIMISM, | |
| 119 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 119 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 120 | 120 | SupportedChainId.ARBITRUM_ONE, | |
| 121 | 121 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 122 | 122 | SupportedChainId.POLYGON_MUMBAI, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,7 +92,7 @@ const CHAIN_INFO: ChainInfoMap = { | |||
| 92 | 92 | label: 'Kovan', | |
| 93 | 93 | logoUrl: ethereumLogoUrl, | |
| 94 | 94 | nativeCurrency: { name: 'Kovan Ether', symbol: 'kovETH', decimals: 18 }, | |
| 95 | - color: colorsDark.chain_69, | ||
| 95 | + color: colorsDark.chain_420, | ||
| 96 | 96 | }, | |
| 97 | 97 | [SupportedChainId.GOERLI]: { | |
| 98 | 98 | networkType: NetworkType.L1, | |
@@ -121,20 +121,20 @@ const CHAIN_INFO: ChainInfoMap = { | |||
| 121 | 121 | color: colorsDark.chain_10, | |
| 122 | 122 | backgroundColor: colorsDark.chain_10_background, | |
| 123 | 123 | }, | |
| 124 | - [SupportedChainId.OPTIMISTIC_KOVAN]: { | ||
| 124 | + [SupportedChainId.OPTIMISM_GOERLI]: { | ||
| 125 | 125 | networkType: NetworkType.L2, | |
| 126 | 126 | blockWaitMsBeforeWarning: ms`25m`, | |
| 127 | 127 | bridge: 'https://app.optimism.io/bridge', | |
| 128 | 128 | defaultListUrl: OPTIMISM_LIST, | |
| 129 | 129 | docs: 'https://optimism.io/', | |
| 130 | - explorer: 'https://optimistic.etherscan.io/', | ||
| 130 | + explorer: 'https://goerli-optimism.etherscan.io/', | ||
| 131 | 131 | infoLink: 'https://info.uniswap.org/#/optimism/', | |
| 132 | - label: 'Optimistic Kovan', | ||
| 132 | + label: 'Optimism Görli', | ||
| 133 | 133 | logoUrl: optimismLogoUrl, | |
| 134 | 134 | statusPage: 'https://optimism.io/status', | |
| 135 | 135 | helpCenterUrl: 'https://help.uniswap.org/en/collections/3137778-uniswap-on-optimistic-ethereum-oξ', | |
| 136 | - nativeCurrency: { name: 'Optimistic Kovan Ether', symbol: 'kovOpETH', decimals: 18 }, | ||
| 137 | - color: colorsDark.chain_69, | ||
| 136 | + nativeCurrency: { name: 'Optimism Goerli Ether', symbol: 'görOpETH', decimals: 18 }, | ||
| 137 | + color: colorsDark.chain_420, | ||
| 138 | 138 | }, | |
| 139 | 139 | [SupportedChainId.ARBITRUM_ONE]: { | |
| 140 | 140 | networkType: NetworkType.L2, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ export enum SupportedChainId { | |||
| 12 | 12 | ARBITRUM_RINKEBY = 421611, | |
| 13 | 13 | ||
| 14 | 14 | OPTIMISM = 10, | |
| 15 | - OPTIMISTIC_KOVAN = 69, | ||
| 15 | + OPTIMISM_GOERLI = 420, | ||
| 16 | 16 | ||
| 17 | 17 | POLYGON = 137, | |
| 18 | 18 | POLYGON_MUMBAI = 80001, | |
@@ -34,7 +34,7 @@ export const CHAIN_IDS_TO_NAMES = { | |||
| 34 | 34 | [SupportedChainId.ARBITRUM_ONE]: 'arbitrum', | |
| 35 | 35 | [SupportedChainId.ARBITRUM_RINKEBY]: 'arbitrum_rinkeby', | |
| 36 | 36 | [SupportedChainId.OPTIMISM]: 'optimism', | |
| 37 | - [SupportedChainId.OPTIMISTIC_KOVAN]: 'optimistic_kovan', | ||
| 37 | + [SupportedChainId.OPTIMISM_GOERLI]: 'optimism_goerli', | ||
| 38 | 38 | } | |
| 39 | 39 | ||
| 40 | 40 | /** | |
@@ -72,7 +72,7 @@ export const TESTNET_CHAIN_IDS = [ | |||
| 72 | 72 | SupportedChainId.KOVAN, | |
| 73 | 73 | SupportedChainId.POLYGON_MUMBAI, | |
| 74 | 74 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 75 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 75 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 76 | 76 | ] as const | |
| 77 | 77 | ||
| 78 | 78 | export type SupportedTestnetChainId = typeof TESTNET_CHAIN_IDS[number] | |
@@ -102,7 +102,7 @@ export const L2_CHAIN_IDS = [ | |||
| 102 | 102 | SupportedChainId.ARBITRUM_ONE, | |
| 103 | 103 | SupportedChainId.ARBITRUM_RINKEBY, | |
| 104 | 104 | SupportedChainId.OPTIMISM, | |
| 105 | - SupportedChainId.OPTIMISTIC_KOVAN, | ||
| 105 | + SupportedChainId.OPTIMISM_GOERLI, | ||
| 106 | 106 | ] as const | |
| 107 | 107 | ||
| 108 | 108 | export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,9 +75,9 @@ export const FALLBACK_URLS: { [key in SupportedChainId]: string[] } = { | |||
| 75 | 75 | // "Fallback" URLs | |
| 76 | 76 | 'https://rpc.ankr.com/optimism', | |
| 77 | 77 | ], | |
| 78 | - [SupportedChainId.OPTIMISTIC_KOVAN]: [ | ||
| 78 | + [SupportedChainId.OPTIMISM_GOERLI]: [ | ||
| 79 | 79 | // "Safe" URLs | |
| 80 | - 'https://kovan.optimism.io', | ||
| 80 | + 'https://goerli.optimism.io', | ||
| 81 | 81 | ], | |
| 82 | 82 | [SupportedChainId.CELO]: [ | |
| 83 | 83 | // "Safe" URLs | |
@@ -112,9 +112,9 @@ export const RPC_URLS: { [key in SupportedChainId]: string[] } = { | |||
| 112 | 112 | `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`, | |
| 113 | 113 | ...FALLBACK_URLS[SupportedChainId.OPTIMISM], | |
| 114 | 114 | ], | |
| 115 | - [SupportedChainId.OPTIMISTIC_KOVAN]: [ | ||
| 116 | - `https://optimism-kovan.infura.io/v3/${INFURA_KEY}`, | ||
| 117 | - ...FALLBACK_URLS[SupportedChainId.OPTIMISTIC_KOVAN], | ||
| 115 | + [SupportedChainId.OPTIMISM_GOERLI]: [ | ||
| 116 | + `https://optimism-goerli.infura.io/v3/${INFURA_KEY}`, | ||
| 117 | + ...FALLBACK_URLS[SupportedChainId.OPTIMISM_GOERLI], | ||
| 118 | 118 | ], | |
| 119 | 119 | [SupportedChainId.ARBITRUM_ONE]: [ | |
| 120 | 120 | `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,7 @@ export const RPC_PROVIDERS: { [key in SupportedChainId]: StaticJsonRpcProvider } | |||
| 56 | 56 | [SupportedChainId.GOERLI]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.GOERLI]), | |
| 57 | 57 | [SupportedChainId.KOVAN]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.KOVAN]), | |
| 58 | 58 | [SupportedChainId.OPTIMISM]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISM]), | |
| 59 | - [SupportedChainId.OPTIMISTIC_KOVAN]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISTIC_KOVAN]), | ||
| 59 | + [SupportedChainId.OPTIMISM_GOERLI]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.OPTIMISM_GOERLI]), | ||
| 60 | 60 | [SupportedChainId.ARBITRUM_ONE]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_ONE]), | |
| 61 | 61 | [SupportedChainId.ARBITRUM_RINKEBY]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.ARBITRUM_RINKEBY]), | |
| 62 | 62 | [SupportedChainId.POLYGON]: new AppJsonRpcProvider(RPC_URLS[SupportedChainId.POLYGON]), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -157,7 +157,7 @@ export const COMMON_BASES: ChainCurrencyList = { | |||
| 157 | 157 | USDT_OPTIMISM, | |
| 158 | 158 | WBTC_OPTIMISM, | |
| 159 | 159 | ], | |
| 160 | - [SupportedChainId.OPTIMISTIC_KOVAN]: [nativeOnChain(SupportedChainId.OPTIMISTIC_KOVAN)], | ||
| 160 | + [SupportedChainId.OPTIMISM_GOERLI]: [nativeOnChain(SupportedChainId.OPTIMISM_GOERLI)], | ||
| 161 | 161 | [SupportedChainId.POLYGON]: [ | |
| 162 | 162 | nativeOnChain(SupportedChainId.POLYGON), | |
| 163 | 163 | WETH_POLYGON, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments