From f1be27e01987c134127f991a4cf9d76da34f2d5a Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 27 Mar 2023 22:41:19 +0800 Subject: [PATCH 01/21] add staging support --- src/constants/chains.ts | 1 + src/constants/networks.ts | 5 ++++ .../tokenLists/scroll-staging.tokenlist.json | 28 +++++++++++++++++++ src/constants/tokens.ts | 15 ++++++++++ 4 files changed, 49 insertions(+) create mode 100644 src/constants/tokenLists/scroll-staging.tokenlist.json diff --git a/src/constants/chains.ts b/src/constants/chains.ts index e94c85b0f3e..aab881b64f7 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -21,6 +21,7 @@ export enum SupportedChainId { // CELO_ALFAJORES = 44787, SCROLL_ALPHA = 534353, + SCROLL_STAGING = 5343541, } export const CHAIN_IDS_TO_NAMES = { diff --git a/src/constants/networks.ts b/src/constants/networks.ts index bda6f18b356..7a4a7543abb 100644 --- a/src/constants/networks.ts +++ b/src/constants/networks.ts @@ -91,6 +91,10 @@ export const FALLBACK_URLS: { [key in SupportedChainId]: string[] } = { // "Safe" URLs 'https://alpha-rpc.scroll.io/l2', ], + [SupportedChainId.SCROLL_STAGING]: [ + // "Safe" URLs + 'https://staging-rpc.scroll.io/l2,', + ] } /** @@ -139,4 +143,5 @@ export const RPC_URLS: { [key in SupportedChainId]: string[] } = { // [SupportedChainId.CELO]: FALLBACK_URLS[SupportedChainId.CELO], // [SupportedChainId.CELO_ALFAJORES]: FALLBACK_URLS[SupportedChainId.CELO_ALFAJORES], [SupportedChainId.SCROLL_ALPHA]: FALLBACK_URLS[SupportedChainId.SCROLL_ALPHA], + [SupportedChainId.SCROLL_STAGING]: FALLBACK_URLS[SupportedChainId.SCROLL_STAGING], } diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json new file mode 100644 index 00000000000..65b7af40d4d --- /dev/null +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -0,0 +1,28 @@ +{ + "name": "Scroll Whitelist Era", + "timestamp": "2022-03-01T22:44:18.339Z", + "version": { + "major": 0, + "minor": 0, + "patch": 1 + }, + "tokens": [ + { + "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", + "chainId": 5343541, + "address": "0xa1EA0B2354F5A344110af2b6AD68e75545009a03", + "name": "Wrapped Ether", + "symbol": "WETH", + "decimals": 18 + }, + { + "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", + "chainId": 5343541, + "address": "0x9E49B313081158b6D66b6d82FB181A391A0d3026", + "name": "test-scroll-univ3", + "symbol": "TUV3", + "decimals": 18 + } + ], + "logoURI": "ipfs://" +} diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 3bfec08e538..de90bd1d446 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -89,6 +89,13 @@ const USDC_SCROLL_ALPHA = new Token( 'USDC', 'USD//C' ) +const TUV3_SCROLL_STAGING = new Token( + SupportedChainId.SCROLL_STAGING, + '0x9E49B313081158b6D66b6d82FB181A391A0d3026', + 18, + 'TUV3', + 'test-uniswap-v3', +) // export const PORTAL_USDC_CELO = new Token( // SupportedChainId.CELO, // '0x37f750B7cC259A2f741AF45294f6a16572CF5cAd', @@ -392,6 +399,13 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } = 'WETH', 'Wrapped Ether' ), + [SupportedChainId.SCROLL_STAGING]: new Token( + SupportedChainId.SCROLL_STAGING, + '0x9E49B313081158b6D66b6d82FB181A391A0d3026', + 18, + "TUV3", + 'test-uniswap-v3' + ) } export function isCelo(chainId: number) { @@ -481,5 +495,6 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha // [SupportedChainId.KOVAN]: USDC_KOVAN.address, // [SupportedChainId.ROPSTEN]: USDC_ROPSTEN.address, [SupportedChainId.SCROLL_ALPHA]: USDC_SCROLL_ALPHA.address, + [SupportedChainId.SCROLL_STAGING]: TUV3_SCROLL_STAGING.address, }, } From e17d1079c5101a194afc5c75d6ce645a319eb942 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Tue, 28 Mar 2023 00:14:20 +0800 Subject: [PATCH 02/21] add into chain.ts --- src/constants/chains.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/constants/chains.ts b/src/constants/chains.ts index aab881b64f7..cd52e02d304 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -39,6 +39,7 @@ export const CHAIN_IDS_TO_NAMES = { // [SupportedChainId.OPTIMISM]: 'optimism', // [SupportedChainId.OPTIMISM_GOERLI]: 'optimism_goerli', [SupportedChainId.SCROLL_ALPHA]: 'scroll_alpha', + [SupportedChainId.SCROLL_STAGING]: 'scroll_staging', } /** @@ -79,6 +80,7 @@ export const TESTNET_CHAIN_IDS = [ // SupportedChainId.ARBITRUM_RINKEBY, // SupportedChainId.OPTIMISM_GOERLI, SupportedChainId.SCROLL_ALPHA, + SupportedChainId.SCROLL_STAGING, ] as const export type SupportedTestnetChainId = typeof TESTNET_CHAIN_IDS[number] @@ -110,6 +112,7 @@ export const L2_CHAIN_IDS = [ // SupportedChainId.OPTIMISM, // SupportedChainId.OPTIMISM_GOERLI, SupportedChainId.SCROLL_ALPHA, + SupportedChainId.SCROLL_STAGING, ] as const export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number] From 9ce3c3d1978440efaa5514727db418d1947fd990 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Tue, 28 Mar 2023 00:25:30 +0800 Subject: [PATCH 03/21] add staging vars --- src/components/NavBar/ChainSelector.tsx | 31 ++++++++++---------- src/components/NetworkAlert/NetworkAlert.tsx | 1 + src/constants/providers.ts | 1 + 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/NavBar/ChainSelector.tsx b/src/components/NavBar/ChainSelector.tsx index 7be5bcd32be..4d30826d28f 100644 --- a/src/components/NavBar/ChainSelector.tsx +++ b/src/components/NavBar/ChainSelector.tsx @@ -1,26 +1,27 @@ -import { useWeb3React } from '@web3-react/core' -import { getChainInfo } from 'constants/chainInfo' -import { SupportedChainId } from 'constants/chains' -import { useOnClickOutside } from 'hooks/useOnClickOutside' +import {useWeb3React} from '@web3-react/core' +import {getChainInfo} from 'constants/chainInfo' +import {SupportedChainId} from 'constants/chains' +import {useOnClickOutside} from 'hooks/useOnClickOutside' import useSelectChain from 'hooks/useSelectChain' import useSyncChainQuery from 'hooks/useSyncChainQuery' -import { Box } from 'nft/components/Box' -import { Portal } from 'nft/components/common/Portal' -import { Column, Row } from 'nft/components/Flex' -import { TokenWarningRedIcon } from 'nft/components/icons' -import { subhead } from 'nft/css/common.css' -import { themeVars } from 'nft/css/sprinkles.css' -import { useIsMobile } from 'nft/hooks' -import { useCallback, useRef, useState } from 'react' -import { ChevronDown, ChevronUp } from 'react-feather' -import { useTheme } from 'styled-components/macro' +import {Box} from 'nft/components/Box' +import {Portal} from 'nft/components/common/Portal' +import {Column, Row} from 'nft/components/Flex' +import {TokenWarningRedIcon} from 'nft/components/icons' +import {subhead} from 'nft/css/common.css' +import {themeVars} from 'nft/css/sprinkles.css' +import {useIsMobile} from 'nft/hooks' +import {useCallback, useRef, useState} from 'react' +import {ChevronDown, ChevronUp} from 'react-feather' +import {useTheme} from 'styled-components/macro' import * as styles from './ChainSelector.css' import ChainSelectorRow from './ChainSelectorRow' -import { NavDropdown } from './NavDropdown' +import {NavDropdown} from './NavDropdown' const NETWORK_SELECTOR_CHAINS = [ SupportedChainId.SCROLL_ALPHA, + SupportedChainId.SCROLL_STAGING, // SupportedChainId.MAINNET, // SupportedChainId.POLYGON, // SupportedChainId.OPTIMISM, diff --git a/src/components/NetworkAlert/NetworkAlert.tsx b/src/components/NetworkAlert/NetworkAlert.tsx index 9fe6a518162..a692fb15911 100644 --- a/src/components/NetworkAlert/NetworkAlert.tsx +++ b/src/components/NetworkAlert/NetworkAlert.tsx @@ -39,6 +39,7 @@ const SHOULD_SHOW_ALERT = { // [SupportedChainId.CELO]: true, // [SupportedChainId.CELO_ALFAJORES]: true, [SupportedChainId.SCROLL_ALPHA]: true, + [SupportedChainId.SCROLL_STAGING]: true, } type NetworkAlertChains = keyof typeof SHOULD_SHOW_ALERT diff --git a/src/constants/providers.ts b/src/constants/providers.ts index b2708cdb8b8..c30a02ba6e2 100644 --- a/src/constants/providers.ts +++ b/src/constants/providers.ts @@ -71,4 +71,5 @@ export const RPC_PROVIDERS: { [key in SupportedChainId]: StaticJsonRpcProvider } // [SupportedChainId.CELO]: new AppJsonRpcProvider(SupportedChainId.CELO), // [SupportedChainId.CELO_ALFAJORES]: new AppJsonRpcProvider(SupportedChainId.CELO_ALFAJORES), [SupportedChainId.SCROLL_ALPHA]: new AppJsonRpcProvider(SupportedChainId.SCROLL_ALPHA), + [SupportedChainId.SCROLL_STAGING]: new AppJsonRpcProvider(SupportedChainId.SCROLL_STAGING), } From 61effbee4d96e4e455af9b26c01cd0ec3f7d3605 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Tue, 28 Mar 2023 11:01:24 +0800 Subject: [PATCH 04/21] fix --- src/components/NetworkAlert/NetworkAlert.tsx | 5 +++++ src/constants/chainInfo.ts | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/components/NetworkAlert/NetworkAlert.tsx b/src/components/NetworkAlert/NetworkAlert.tsx index a692fb15911..2353569d53f 100644 --- a/src/components/NetworkAlert/NetworkAlert.tsx +++ b/src/components/NetworkAlert/NetworkAlert.tsx @@ -66,6 +66,8 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: { // 'radial-gradient(285% 8200% at 30% 50%, rgba(40, 160, 240, 0.05) 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.1) 100%), hsla(0, 0%, 100%, 0.05)', [SupportedChainId.SCROLL_ALPHA]: 'radial-gradient(100% 93.36% at 0% 6.64%, rgba(120, 128, 247, 0.1) 0%, rgba(62, 62, 160, 0.1) 100%)', + [SupportedChainId.SCROLL_STAGING]: + 'radial-gradient(100% 93.36% at 0% 6.64%, rgba(120, 128, 247, 0.1) 0%, rgba(62, 62, 160, 0.1) 100%)', }, light: { // [SupportedChainId.POLYGON]: @@ -86,6 +88,8 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: { // '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)', [SupportedChainId.SCROLL_ALPHA]: 'radial-gradient(182.71% 205.59% at 2.81% 7.69%,#EEE2D4FF 0%, #E4D5C3FF 100%)', + [SupportedChainId.SCROLL_STAGING]: + 'radial-gradient(182.71% 205.59% at 2.81% 7.69%,#EEE2D4FF 0%, #E4D5C3FF 100%)', }, } @@ -146,6 +150,7 @@ const TEXT_COLORS: { [chainId in NetworkAlertChains]: string } = { // [SupportedChainId.ARBITRUM_ONE]: '#0490ed', // [SupportedChainId.ARBITRUM_RINKEBY]: '#0490ed', [SupportedChainId.SCROLL_ALPHA]: 'rgba(113, 98, 124)', + [SupportedChainId.SCROLL_STAGING]: 'rgba(113, 98, 124)', } function shouldShowAlert(chainId: number | undefined): chainId is NetworkAlertChains { diff --git a/src/constants/chainInfo.ts b/src/constants/chainInfo.ts index 709504cf6fa..ecd52244456 100644 --- a/src/constants/chainInfo.ts +++ b/src/constants/chainInfo.ts @@ -229,6 +229,23 @@ const CHAIN_INFO: ChainInfoMap = { defaultListUrl: SCROLL_ALPHA_LIST, helpCenterUrl: 'https://help.uniswap.org/en/collections/3137787-uniswap-on-arbitrum', }, + [SupportedChainId.SCROLL_STAGING]: { + networkType: NetworkType.L2, + docs: 'https://docs.uniswap.org/', + explorer: 'https://blockscout.scroll.io/', + infoLink: 'https://info.uniswap.org/#/', + label: 'Scroll Staging', + logoUrl: scrollLogo, + nativeCurrency: { name: 'Scroll Staging Ether', symbol: 'ETH', decimals: 18 }, + //TODO: Add Scroll Brand Color + color: darkTheme.chain_5, + + // Required for L2 networks + blockWaitMsBeforeWarning: ms`10m`, + bridge: 'https://scroll.io/alpha/bridge/', + defaultListUrl: SCROLL_ALPHA_LIST, + helpCenterUrl: 'https://help.uniswap.org/en/collections/3137787-uniswap-on-arbitrum', + } } export function getChainInfo(chainId: SupportedL1ChainId): L1ChainInfo From c808534e687c073cae05d3b0e715e3be89de4d72 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 3 Apr 2023 15:30:24 +0800 Subject: [PATCH 05/21] add chainID staging --- src/components/NavBar/ChainSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NavBar/ChainSelector.tsx b/src/components/NavBar/ChainSelector.tsx index 4d30826d28f..b8afdbcd18a 100644 --- a/src/components/NavBar/ChainSelector.tsx +++ b/src/components/NavBar/ChainSelector.tsx @@ -66,7 +66,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => { } // const isSupported = !!info - const isSupported = !!info && chainId === SupportedChainId.SCROLL_ALPHA; + const isSupported = !!info && (chainId === SupportedChainId.SCROLL_ALPHA || chainId === SupportedChainId.SCROLL_STAGING); const dropdown = ( From f56e0e83fbf2e6220b9667d5256b2dbb6eb31725 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 3 Apr 2023 15:51:56 +0800 Subject: [PATCH 06/21] fix chainID --- src/constants/chains.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/chains.ts b/src/constants/chains.ts index cd52e02d304..92e6f356c13 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -21,7 +21,7 @@ export enum SupportedChainId { // CELO_ALFAJORES = 44787, SCROLL_ALPHA = 534353, - SCROLL_STAGING = 5343541, + SCROLL_STAGING = 5343532222, } export const CHAIN_IDS_TO_NAMES = { From a43665e62d2379ae0b9b6710e08141eabe5fba80 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 3 Apr 2023 15:59:19 +0800 Subject: [PATCH 07/21] fix chainID --- src/constants/tokenLists/scroll-staging.tokenlist.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json index 65b7af40d4d..ad6e9418a58 100644 --- a/src/constants/tokenLists/scroll-staging.tokenlist.json +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -9,7 +9,7 @@ "tokens": [ { "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", - "chainId": 5343541, + "chainId": 5343532222, "address": "0xa1EA0B2354F5A344110af2b6AD68e75545009a03", "name": "Wrapped Ether", "symbol": "WETH", @@ -17,7 +17,7 @@ }, { "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", - "chainId": 5343541, + "chainId": 5343532222, "address": "0x9E49B313081158b6D66b6d82FB181A391A0d3026", "name": "test-scroll-univ3", "symbol": "TUV3", From adf63f3d504d204dcb6940bf3fcccc0e943a75a9 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 3 Apr 2023 16:15:28 +0800 Subject: [PATCH 08/21] rm weth --- src/constants/tokenLists/scroll-staging.tokenlist.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json index ad6e9418a58..467110fdf68 100644 --- a/src/constants/tokenLists/scroll-staging.tokenlist.json +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -7,14 +7,6 @@ "patch": 1 }, "tokens": [ - { - "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", - "chainId": 5343532222, - "address": "0xa1EA0B2354F5A344110af2b6AD68e75545009a03", - "name": "Wrapped Ether", - "symbol": "WETH", - "decimals": 18 - }, { "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", "chainId": 5343532222, From dd63165fb9c4f85c2ece48cfc67b3bf66b865618 Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Mon, 3 Apr 2023 17:36:56 +0800 Subject: [PATCH 09/21] add weth addr into staging --- src/constants/tokenLists/scroll-staging.tokenlist.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json index 467110fdf68..ceaf0417c84 100644 --- a/src/constants/tokenLists/scroll-staging.tokenlist.json +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -14,6 +14,14 @@ "name": "test-scroll-univ3", "symbol": "TUV3", "decimals": 18 + }, + { + "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", + "chainId": 5343532222, + "address": "0x5300000000000000000000000000000000000004", + "name": "Wrapped Ether", + "symbol": "WETH", + "decimals": 18 } ], "logoURI": "ipfs://" From 31be1964e8643b46d6644c4f56bd5cd95a2848bc Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Mon, 3 Apr 2023 17:50:58 +0800 Subject: [PATCH 10/21] add --- src/constants/tokens.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index de90bd1d446..20cdce23949 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -96,6 +96,13 @@ const TUV3_SCROLL_STAGING = new Token( 'TUV3', 'test-uniswap-v3', ) +const WETH_SCROLL_STAGING = new Token( + SupportedChainId.SCROLL_STAGING, + "0x5300000000000000000000000000000000000004", + 18, + 'WETH', + 'Wrapped Ether', +) // export const PORTAL_USDC_CELO = new Token( // SupportedChainId.CELO, // '0x37f750B7cC259A2f741AF45294f6a16572CF5cAd', @@ -496,5 +503,6 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha // [SupportedChainId.ROPSTEN]: USDC_ROPSTEN.address, [SupportedChainId.SCROLL_ALPHA]: USDC_SCROLL_ALPHA.address, [SupportedChainId.SCROLL_STAGING]: TUV3_SCROLL_STAGING.address, + [SupportedChainId.SCROLL_STAGING]: WETH_SCROLL_STAGING.address, }, } From 90295697bd0a922ff0a2d9c08398491ce4c5ce86 Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Mon, 3 Apr 2023 22:19:43 +0800 Subject: [PATCH 11/21] add addresses --- src/constants/addresses.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index 60b828cbcc5..924a1a80fd8 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -27,6 +27,9 @@ const SCROLL_ALPHA_V3_CORE_FACTORY_ADDRESSES = '0x6E7E0d996eF50E289af9BFd93f774C const SCROLL_ALPHA_ROUTER_ADDRESS = '0xD9880690bd717189cC3Fbe7B9020F27fae7Ac76F' const SCROLL_ALPHA_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0xbd1A5920303F45d628630E88aFbAF012bA078F37' +// scroll_staging v3 addresses +const SCROLL_STAGING_V3_CORE_FACTORY_ADDRESSES = '0x88d67da19e63Ee9aA9B9021Cb275E1332d6324FC' + /* V3 Contract Addresses */ export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { ...constructSameAddressMap(V3_FACTORY_ADDRESS, [ @@ -40,6 +43,7 @@ export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_V3_CORE_FACTORY_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_V3_CORE_FACTORY_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: SCROLL_ALPHA_V3_CORE_FACTORY_ADDRESSES, + [SupportedChainId.SCROLL_STAGING]: SCROLL_STAGING_V3_CORE_FACTORY_ADDRESSES, } export const V3_MIGRATOR_ADDRESSES: AddressMap = { @@ -66,6 +70,7 @@ export const MULTICALL_ADDRESS: AddressMap = { // [SupportedChainId.CELO]: CELO_MULTICALL_ADDRESS, // [SupportedChainId.CELO_ALFAJORES]: CELO_MULTICALL_ADDRESS, [SupportedChainId.SCROLL_ALPHA]: '0x2117f703867a2B7E6813c7e5Edd96bf9a8d8eC30', + [SupportedChainId.SCROLL_STAGING]: '0x2Ff892E0277EA17BA74B281C3998bDf37705Ea07', } export const SWAP_ROUTER_ADDRESSES: AddressMap = { @@ -156,4 +161,5 @@ export const TICK_LENS_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_TICK_LENS_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_TICK_LENS_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: '0xf39a3f98Bc7e03cB9A8dBF8246B8C66a1A5c025F', + [SupportedChainId.SCROLL_STAGING]: '0x61b5CF52d7B3D7dCF749E23dF3B4A47EC0a79d59', } From 047149a9386d52adff2467134378bed10e7bc61f Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Mon, 3 Apr 2023 22:29:23 +0800 Subject: [PATCH 12/21] add routing staging --- src/constants/routing.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/constants/routing.ts b/src/constants/routing.ts index 89aab221fbf..a6073dd57f6 100644 --- a/src/constants/routing.ts +++ b/src/constants/routing.ts @@ -189,6 +189,10 @@ export const COMMON_BASES: ChainCurrencyList = { nativeOnChain(SupportedChainId.SCROLL_ALPHA), WRAPPED_NATIVE_CURRENCY[SupportedChainId.SCROLL_ALPHA] as Token, ], + [SupportedChainId.SCROLL_STAGING]: [ + nativeOnChain(SupportedChainId.SCROLL_STAGING), + WRAPPED_NATIVE_CURRENCY[SupportedChainId.SCROLL_STAGING] as Token, + ] } // used to construct the list of all pairs we consider by default in the frontend From 20054d3864681a4ce3de6fe7d17b9ba0e3072e46 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Mon, 3 Apr 2023 22:55:11 +0800 Subject: [PATCH 13/21] add --- src/constants/tokens.ts | 6 +++--- src/hooks/usePoolTickData.ts | 1 + src/pages/Pool/index.tsx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 20cdce23949..868b63feadf 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -408,10 +408,10 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } = ), [SupportedChainId.SCROLL_STAGING]: new Token( SupportedChainId.SCROLL_STAGING, - '0x9E49B313081158b6D66b6d82FB181A391A0d3026', + "0x5300000000000000000000000000000000000004", 18, - "TUV3", - 'test-uniswap-v3' + 'WETH', + 'Wrapped Ether', ) } diff --git a/src/hooks/usePoolTickData.ts b/src/hooks/usePoolTickData.ts index 385b4603b3b..66ff3b08f4e 100644 --- a/src/hooks/usePoolTickData.ts +++ b/src/hooks/usePoolTickData.ts @@ -19,6 +19,7 @@ const CHAIN_IDS_MISSING_SUBGRAPH_DATA = [ // SupportedChainId.ARBITRUM_ONE, // SupportedChainId.ARBITRUM_RINKEBY, SupportedChainId.SCROLL_ALPHA, + SupportedChainId.SCROLL_STAGING, ] // Tick with fields parsed to JSBIs, and active liquidity computed. diff --git a/src/pages/Pool/index.tsx b/src/pages/Pool/index.tsx index ae7fd55f798..77e516616e8 100644 --- a/src/pages/Pool/index.tsx +++ b/src/pages/Pool/index.tsx @@ -202,7 +202,7 @@ export default function Pool() { const { positions, loading: positionsLoading } = useV3Positions(account) - if (chainId !== SupportedChainId.SCROLL_ALPHA) { + if (chainId !== SupportedChainId.SCROLL_ALPHA && chainId !== SupportedChainId.SCROLL_STAGING) { return } From 21a0efbb85cef0ffa93dbc759963662890cef655 Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Tue, 4 Apr 2023 00:11:52 +0800 Subject: [PATCH 14/21] add list --- src/constants/chainInfo.ts | 4 ++-- src/constants/lists.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/constants/chainInfo.ts b/src/constants/chainInfo.ts index ecd52244456..638a579669f 100644 --- a/src/constants/chainInfo.ts +++ b/src/constants/chainInfo.ts @@ -4,7 +4,7 @@ import ms from 'ms.macro' import { darkTheme } from 'theme/colors' import { SupportedChainId, SupportedL1ChainId, SupportedL2ChainId } from './chains' -import { SCROLL_ALPHA_LIST } from './lists' +import { SCROLL_ALPHA_LIST, SCROLL_STAGING_LIST } from './lists' export const AVERAGE_L1_BLOCK_TIME = ms`12s` @@ -243,7 +243,7 @@ const CHAIN_INFO: ChainInfoMap = { // Required for L2 networks blockWaitMsBeforeWarning: ms`10m`, bridge: 'https://scroll.io/alpha/bridge/', - defaultListUrl: SCROLL_ALPHA_LIST, + defaultListUrl: SCROLL_STAGING_LIST, helpCenterUrl: 'https://help.uniswap.org/en/collections/3137787-uniswap-on-arbitrum', } } diff --git a/src/constants/lists.ts b/src/constants/lists.ts index c4e3274c0a4..a1a34cf0c0e 100644 --- a/src/constants/lists.ts +++ b/src/constants/lists.ts @@ -17,6 +17,8 @@ const WRAPPED_LIST = 'wrapped.tokensoft.eth' // export const CELO_LIST = 'https://celo-org.github.io/celo-token-list/celo.tokenlist.json' export const SCROLL_ALPHA_LIST = 'https://raw.githubusercontent.com/scroll-tech/uniswap-v3-interface/scroll-showcase/src/constants/tokenLists/scroll-alpha.tokenlist.json' +export const SCROLL_STAGING_LIST = + 'https://raw.githubusercontent.com/Lawliet-Chan/uniswap-v3-interface/add_staging/src/constants/tokenLists/scroll-staging.tokenlist.json' export const UNSUPPORTED_LIST_URLS: string[] = [BA_LIST, UNI_UNSUPPORTED_LIST] @@ -37,6 +39,7 @@ export const DEFAULT_INACTIVE_LIST_URLS: string[] = [ // OPTIMISM_LIST, // CELO_LIST, SCROLL_ALPHA_LIST, + SCROLL_STAGING_LIST, ...UNSUPPORTED_LIST_URLS, ] From e2e3a220a4d59ae620c3d8bee1579214168402ac Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Tue, 4 Apr 2023 09:19:32 +0800 Subject: [PATCH 15/21] add alpha into blockscout --- src/utils/getExplorerLink.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/getExplorerLink.ts b/src/utils/getExplorerLink.ts index 4c042ca2ba1..eb0ef534ef0 100644 --- a/src/utils/getExplorerLink.ts +++ b/src/utils/getExplorerLink.ts @@ -56,7 +56,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat // } // } - if (chainId === SupportedChainId.SCROLL_ALPHA) { + if (chainId === SupportedChainId.SCROLL_ALPHA || chainId === SupportedChainId.SCROLL_STAGING) { switch (type) { case ExplorerDataType.TRANSACTION: return `https://blockscout.scroll.io/tx/${data}` From 82e3061fabd2bce99208a0414564fde14941885e Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Tue, 4 Apr 2023 14:59:53 +0800 Subject: [PATCH 16/21] MCT token --- src/constants/tokenLists/scroll-staging.tokenlist.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json index ceaf0417c84..1841d78ca73 100644 --- a/src/constants/tokenLists/scroll-staging.tokenlist.json +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -10,7 +10,7 @@ { "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", "chainId": 5343532222, - "address": "0x9E49B313081158b6D66b6d82FB181A391A0d3026", + "address": "0xE374Be4dcCe6DE402133c0FD3C57BBB528C69f84", "name": "test-scroll-univ3", "symbol": "TUV3", "decimals": 18 From 287fdf140a30eaf26003f59add9f65ba02f4dbe0 Mon Sep 17 00:00:00 2001 From: xinran chen Date: Tue, 4 Apr 2023 23:41:58 +0800 Subject: [PATCH 17/21] add some addresses --- src/constants/addresses.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index 924a1a80fd8..f9b404b5734 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -29,6 +29,8 @@ const SCROLL_ALPHA_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0xbd1A5920303F45d62 // scroll_staging v3 addresses const SCROLL_STAGING_V3_CORE_FACTORY_ADDRESSES = '0x88d67da19e63Ee9aA9B9021Cb275E1332d6324FC' +const SCROLL_STAGING_ROUTER_ADDRESS = '0xC18394cf6555B541Efdb83083F720eCB1dF4692e' +const SCROLL_STAGING_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0x157aE6c46e2Aec7D4F59F34C40293A46AD9D1e9D' /* V3 Contract Addresses */ export const V3_CORE_FACTORY_ADDRESSES: AddressMap = { @@ -85,6 +87,7 @@ export const SWAP_ROUTER_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_ROUTER_ADDRESS, // [SupportedChainId.CELO_ALFAJORES]: CELO_ROUTER_ADDRESS, [SupportedChainId.SCROLL_ALPHA]: SCROLL_ALPHA_ROUTER_ADDRESS, + [SupportedChainId.SCROLL_STAGING]: SCROLL_STAGING_ROUTER_ADDRESS } /** @@ -142,6 +145,7 @@ export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: SCROLL_ALPHA_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES, + [SupportedChainId.SCROLL_STAGING]: SCROLL_STAGING_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES, } export const ENS_REGISTRAR_ADDRESSES: AddressMap = { From e23e6dfd961969741ff05ca867d6aac6bffbfa72 Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Thu, 6 Apr 2023 11:27:29 +0800 Subject: [PATCH 18/21] add addresses --- src/constants/addresses.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index f9b404b5734..7e7662f2276 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -58,6 +58,7 @@ export const V3_MIGRATOR_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_V3_MIGRATOR_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_V3_MIGRATOR_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: '0x5Db25d2b7dba65c8aA2b16465438Ec44f75b0511', + [SupportedChainId.SCROLL_STAGING]: '0xfb14B5d29c302A0f74245c5dEb918f5faB5320dd', } export const MULTICALL_ADDRESS: AddressMap = { @@ -131,6 +132,7 @@ export const QUOTER_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_QUOTER_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_QUOTER_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: '0xbf1c1FE1e9e900aFd5ba2Eb67480c44266D5eD84', + [SupportedChainId.SCROLL_STAGING]: '0x14724C2Ca23cA7E3769f47F7C281B74DF32d76a4', } export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = { From f9d43f2c58a2d6422e5f89bc1f1d2a4f0ae46b62 Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Thu, 6 Apr 2023 14:51:00 +0800 Subject: [PATCH 19/21] add addresses --- src/constants/addresses.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index 7e7662f2276..3d2513a5328 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -28,7 +28,7 @@ const SCROLL_ALPHA_ROUTER_ADDRESS = '0xD9880690bd717189cC3Fbe7B9020F27fae7Ac76F' const SCROLL_ALPHA_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0xbd1A5920303F45d628630E88aFbAF012bA078F37' // scroll_staging v3 addresses -const SCROLL_STAGING_V3_CORE_FACTORY_ADDRESSES = '0x88d67da19e63Ee9aA9B9021Cb275E1332d6324FC' +const SCROLL_STAGING_V3_CORE_FACTORY_ADDRESSES = '0x8236472a9331c4aE636C292889320875bfb83591' const SCROLL_STAGING_ROUTER_ADDRESS = '0xC18394cf6555B541Efdb83083F720eCB1dF4692e' const SCROLL_STAGING_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = '0x157aE6c46e2Aec7D4F59F34C40293A46AD9D1e9D' @@ -73,7 +73,7 @@ export const MULTICALL_ADDRESS: AddressMap = { // [SupportedChainId.CELO]: CELO_MULTICALL_ADDRESS, // [SupportedChainId.CELO_ALFAJORES]: CELO_MULTICALL_ADDRESS, [SupportedChainId.SCROLL_ALPHA]: '0x2117f703867a2B7E6813c7e5Edd96bf9a8d8eC30', - [SupportedChainId.SCROLL_STAGING]: '0x2Ff892E0277EA17BA74B281C3998bDf37705Ea07', + [SupportedChainId.SCROLL_STAGING]: '0x88b3A57207Dc59d42F2e088a0eC08e9A3f4927B4', } export const SWAP_ROUTER_ADDRESSES: AddressMap = { @@ -167,5 +167,5 @@ export const TICK_LENS_ADDRESSES: AddressMap = { // [SupportedChainId.CELO]: CELO_TICK_LENS_ADDRESSES, // [SupportedChainId.CELO_ALFAJORES]: CELO_TICK_LENS_ADDRESSES, [SupportedChainId.SCROLL_ALPHA]: '0xf39a3f98Bc7e03cB9A8dBF8246B8C66a1A5c025F', - [SupportedChainId.SCROLL_STAGING]: '0x61b5CF52d7B3D7dCF749E23dF3B4A47EC0a79d59', + [SupportedChainId.SCROLL_STAGING]: '0x763aCdC41F331a294A8A0a32290762Bfe25214aA', } From 1b78035624ac4365c8021c0088ebda4576b692ba Mon Sep 17 00:00:00 2001 From: Lawliet-Chan <1576710154@qq.com> Date: Thu, 6 Apr 2023 16:19:07 +0800 Subject: [PATCH 20/21] fix --- src/constants/tokens.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 868b63feadf..3fd69b7b880 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -421,7 +421,7 @@ export function isCelo(chainId: number) { } export function isScroll(chainId: number): chainId is SupportedChainId.SCROLL_ALPHA { - return chainId === SupportedChainId.SCROLL_ALPHA + return chainId === SupportedChainId.SCROLL_ALPHA || chainId === SupportedChainId.SCROLL_STAGING } // function getCeloNativeCurrency(chainId: number) { @@ -502,7 +502,7 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha // [SupportedChainId.KOVAN]: USDC_KOVAN.address, // [SupportedChainId.ROPSTEN]: USDC_ROPSTEN.address, [SupportedChainId.SCROLL_ALPHA]: USDC_SCROLL_ALPHA.address, - [SupportedChainId.SCROLL_STAGING]: TUV3_SCROLL_STAGING.address, - [SupportedChainId.SCROLL_STAGING]: WETH_SCROLL_STAGING.address, + // [SupportedChainId.SCROLL_STAGING]: TUV3_SCROLL_STAGING.address, + // [SupportedChainId.SCROLL_STAGING]: WETH_SCROLL_STAGING.address, }, } From 675ce58110a73f698238a69b053915a3ba6a359c Mon Sep 17 00:00:00 2001 From: xinran chen Date: Wed, 12 Apr 2023 16:52:22 +0800 Subject: [PATCH 21/21] rm TUV3 --- .../tokenLists/scroll-staging.tokenlist.json | 8 -------- src/constants/tokens.ts | 14 -------------- 2 files changed, 22 deletions(-) diff --git a/src/constants/tokenLists/scroll-staging.tokenlist.json b/src/constants/tokenLists/scroll-staging.tokenlist.json index 1841d78ca73..2cf40c8f5da 100644 --- a/src/constants/tokenLists/scroll-staging.tokenlist.json +++ b/src/constants/tokenLists/scroll-staging.tokenlist.json @@ -7,14 +7,6 @@ "patch": 1 }, "tokens": [ - { - "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", - "chainId": 5343532222, - "address": "0xE374Be4dcCe6DE402133c0FD3C57BBB528C69f84", - "name": "test-scroll-univ3", - "symbol": "TUV3", - "decimals": 18 - }, { "logoURI": "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", "chainId": 5343532222, diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 3fd69b7b880..3a20b4cc83f 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -89,20 +89,6 @@ const USDC_SCROLL_ALPHA = new Token( 'USDC', 'USD//C' ) -const TUV3_SCROLL_STAGING = new Token( - SupportedChainId.SCROLL_STAGING, - '0x9E49B313081158b6D66b6d82FB181A391A0d3026', - 18, - 'TUV3', - 'test-uniswap-v3', -) -const WETH_SCROLL_STAGING = new Token( - SupportedChainId.SCROLL_STAGING, - "0x5300000000000000000000000000000000000004", - 18, - 'WETH', - 'Wrapped Ether', -) // export const PORTAL_USDC_CELO = new Token( // SupportedChainId.CELO, // '0x37f750B7cC259A2f741AF45294f6a16572CF5cAd',