Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch optimism testnet from kovan to goerli #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const UNI_ADDRESS: AddressMap = constructSameAddressMap('0x1f9840a85d5aF5

export const MULTICALL_ADDRESS: AddressMap = {
...constructSameAddressMap('0x1F98415757620B543A52E61c46B32eB19261F984', [
SupportedChainId.OPTIMISTIC_KOVAN,
SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.OPTIMISM,
SupportedChainId.POLYGON_MUMBAI,
SupportedChainId.POLYGON,
Expand All @@ -18,7 +18,7 @@ export const MULTICALL_ADDRESS: AddressMap = {

export const SWAP_ROUTER_ADDRESSES: AddressMap = constructSameAddressMap('0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45', [
SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN,
SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.POLYGON,
Expand Down
8 changes: 4 additions & 4 deletions src/constants/chainInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ const CHAIN_INFO: ChainInfoMap = {
helpCenterUrl: 'https://help.uniswap.org/en/collections/3137778-uniswap-on-optimistic-ethereum-oξ',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
},
[SupportedChainId.OPTIMISTIC_KOVAN]: {
[SupportedChainId.OPTIMISM_GOERLI]: {
networkType: NetworkType.L2,
blockWaitMsBeforeWarning: ms`25m`,
bridge: 'https://app.optimism.io/bridge',
defaultListUrl: OPTIMISM_LIST,
docs: 'https://optimism.io/',
explorer: 'https://optimistic.etherscan.io/',
explorer: 'https://goerli-optimism.etherscan.io/',
infoLink: 'https://info.uniswap.org/#/optimism/',
label: 'Optimistic Kovan',
label: 'Optimism Goerli',
logoUrl: optimismLogoUrl,
statusPage: 'https://optimism.io/status',
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 Görli Ether', symbol: 'görOpETH', decimals: 18 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this symbol come from? Why does this use ö instead of oe, like the rest of the labels?

Copy link
Author

@annieke annieke Sep 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goerli in this same file uses the symbol, copypastaed here for consistency

nativeCurrency: { name: 'Görli Ether', symbol: 'görETH', decimals: 18 },

},
[SupportedChainId.ARBITRUM_ONE]: {
networkType: NetworkType.L2,
Expand Down
8 changes: 4 additions & 4 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export enum SupportedChainId {
ARBITRUM_RINKEBY = 421611,

OPTIMISM = 10,
OPTIMISTIC_KOVAN = 69,
OPTIMISM_GOERLI = 420,

POLYGON = 137,
POLYGON_MUMBAI = 80001,
Expand All @@ -25,7 +25,7 @@ export enum ChainName {
GOERLI = 'goerli',
KOVAN = 'kovan',
OPTIMISM = 'optimism-mainnet',
OPTIMISTIC_KOVAN = 'optimism-kovan',
OPTIMISM_GOERLI = 'optimism-goerli',
ARBITRUM_ONE = 'arbitrum-mainnet',
ARBITRUM_RINKEBY = 'arbitrum-rinkeby',
POLYGON = 'polygon-mainnet',
Expand All @@ -43,7 +43,7 @@ export const CHAIN_NAMES_TO_IDS: { [chainName: string]: SupportedChainId } = {
[ChainName.ARBITRUM_ONE]: SupportedChainId.ARBITRUM_ONE,
[ChainName.ARBITRUM_RINKEBY]: SupportedChainId.ARBITRUM_RINKEBY,
[ChainName.OPTIMISM]: SupportedChainId.OPTIMISM,
[ChainName.OPTIMISTIC_KOVAN]: SupportedChainId.OPTIMISTIC_KOVAN,
[ChainName.OPTIMISM_GOERLI]: SupportedChainId.OPTIMISM_GOERLI,
}

/**
Expand Down Expand Up @@ -83,7 +83,7 @@ export const L2_CHAIN_IDS = [
SupportedChainId.ARBITRUM_ONE,
SupportedChainId.ARBITRUM_RINKEBY,
SupportedChainId.OPTIMISM,
SupportedChainId.OPTIMISTIC_KOVAN,
SupportedChainId.OPTIMISM_GOERLI,
] as const

export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number]
4 changes: 2 additions & 2 deletions src/constants/jsonRpcEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const JSON_RPC_FALLBACK_ENDPOINTS: Record<SupportedChainId, string[]> = {
// "Fallback" URLs
'https://rpc.ankr.com/optimism',
],
[SupportedChainId.OPTIMISTIC_KOVAN]: [
[SupportedChainId.OPTIMISM_GOERLI]: [
// "Safe" URLs
'https://kovan.optimism.io',
'https://goerli.optimism.io',
],
}
2 changes: 1 addition & 1 deletion src/constants/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const COMMON_BASES: ChainCurrencyList = {
USDT_OPTIMISM,
WBTC_OPTIMISM,
],
[SupportedChainId.OPTIMISTIC_KOVAN]: [nativeOnChain(SupportedChainId.OPTIMISTIC_KOVAN)],
[SupportedChainId.OPTIMISM_GOERLI]: [nativeOnChain(SupportedChainId.OPTIMISM_GOERLI)],
[SupportedChainId.POLYGON]: [
nativeOnChain(SupportedChainId.POLYGON),
WETH_POLYGON,
Expand Down
14 changes: 7 additions & 7 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export const USDC_OPTIMISM = new Token(
'USDC',
'USD//C'
)
export const USDC_OPTIMISTIC_KOVAN = new Token(
SupportedChainId.OPTIMISTIC_KOVAN,
'0x3b8e53b3ab8e01fb57d0c9e893bc4d655aa67d84',
export const USDC_OPTIMISM_GOERLI = new Token(
SupportedChainId.OPTIMISM_GOERLI,
'0x7E07E15D2a87A24492740D16f5bdF58c16db0c4E',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you pull this address from?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6,
'USDC',
'USD//C'
Expand Down Expand Up @@ -115,7 +115,7 @@ export const USDC: { [chainId in SupportedChainId]: Token } = {
[SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM,
[SupportedChainId.OPTIMISM]: USDC_OPTIMISM,
[SupportedChainId.ARBITRUM_RINKEBY]: USDC_ARBITRUM_RINKEBY,
[SupportedChainId.OPTIMISTIC_KOVAN]: USDC_OPTIMISTIC_KOVAN,
[SupportedChainId.OPTIMISM_GOERLI]: USDC_OPTIMISM_GOERLI,
[SupportedChainId.POLYGON]: USDC_POLYGON,
[SupportedChainId.POLYGON_MUMBAI]: USDC_POLYGON_MUMBAI,
[SupportedChainId.GOERLI]: USDC_GOERLI,
Expand Down Expand Up @@ -281,8 +281,8 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } =
'WETH',
'Wrapped Ether'
),
[SupportedChainId.OPTIMISTIC_KOVAN]: new Token(
SupportedChainId.OPTIMISTIC_KOVAN,
[SupportedChainId.OPTIMISM_GOERLI]: new Token(
SupportedChainId.OPTIMISM_GOERLI,
'0x4200000000000000000000000000000000000006',
18,
'WETH',
Expand Down Expand Up @@ -370,7 +370,7 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha
[SupportedChainId.ARBITRUM_ONE]: USDC_ARBITRUM.address,
[SupportedChainId.OPTIMISM]: USDC_OPTIMISM.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_MUMBAI]: USDC_POLYGON_MUMBAI.address,
[SupportedChainId.GOERLI]: USDC_GOERLI.address,
Expand Down
2 changes: 1 addition & 1 deletion src/cosmos/useProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const INFURA_NETWORK_URLS: { [chainId: number]: string[] } = INFURA_KEY
[SupportedChainId.GOERLI]: [`https://goerli.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.KOVAN]: [`https://kovan.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.OPTIMISM]: [`https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.OPTIMISTIC_KOVAN]: [`https://optimism-kovan.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.OPTIMISM_GOERLI]: [`https://optimism-goerli.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.ARBITRUM_ONE]: [`https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.ARBITRUM_RINKEBY]: [`https://arbitrum-rinkeby.infura.io/v3/${INFURA_KEY}`],
[SupportedChainId.POLYGON]: [`https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`],
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/transactions/updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function shouldCheck(lastBlockNumber: number, tx: Transaction): boolean {
const RETRY_OPTIONS_BY_CHAIN_ID: { [chainId: number]: RetryOptions } = {
[SupportedChainId.ARBITRUM_ONE]: { 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 },
}
const DEFAULT_RETRY_OPTIONS: RetryOptions = { n: 1, minWait: 0, maxWait: 0 }
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/web3/useJsonRpcUrlsMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function toJsonRpcMap<T>(getChainConnections: (chainId: SupportedChainId) => T):
[SupportedChainId.ARBITRUM_ONE]: getChainConnections(SupportedChainId.ARBITRUM_ONE),
[SupportedChainId.ARBITRUM_RINKEBY]: getChainConnections(SupportedChainId.ARBITRUM_RINKEBY),
[SupportedChainId.OPTIMISM]: getChainConnections(SupportedChainId.OPTIMISM),
[SupportedChainId.OPTIMISTIC_KOVAN]: getChainConnections(SupportedChainId.OPTIMISTIC_KOVAN),
[SupportedChainId.OPTIMISM_GOERLI]: getChainConnections(SupportedChainId.OPTIMISM_GOERLI),
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/utils/getExplorerLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ETHERSCAN_PREFIXES: { [chainId: number]: string } = {
[SupportedChainId.GOERLI]: 'https://goerli.etherscan.io',
[SupportedChainId.KOVAN]: 'https://kovan.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_MUMBAI]: 'https://mumbai.polygonscan.com',
[SupportedChainId.POLYGON]: 'https://polygonscan.com',
}
Expand Down Expand Up @@ -64,7 +64,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
return `${prefix}/token/${data}`

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}/block/${data}`
Expand Down