Skip to content
Draft
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/components/NavBar/ChainSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ChainSelectorRow from './ChainSelectorRow'
import { NavDropdown } from './NavDropdown'

const NETWORK_SELECTOR_CHAINS = [
SupportedChainId.SCROLL_ALPHA,
SupportedChainId.SCROLL_STAGING,
// SupportedChainId.MAINNET,
// SupportedChainId.POLYGON,
// SupportedChainId.OPTIMISM,
Expand Down Expand Up @@ -65,7 +65,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => {
}

// const isSupported = !!info
const isSupported = !!info && chainId === SupportedChainId.SCROLL_ALPHA;
const isSupported = !!info && chainId === SupportedChainId.SCROLL_STAGING;

const dropdown = (
<NavDropdown top="56" left={leftAlign ? '0' : 'auto'} right={leftAlign ? 'auto' : '0'} ref={modalRef}>
Expand Down
12 changes: 6 additions & 6 deletions src/components/NetworkAlert/NetworkAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const SHOULD_SHOW_ALERT = {
// [SupportedChainId.POLYGON_MUMBAI]: true,
// [SupportedChainId.CELO]: true,
// [SupportedChainId.CELO_ALFAJORES]: true,
[SupportedChainId.SCROLL_ALPHA]: true,
[SupportedChainId.SCROLL_STAGING]: true,
}

type NetworkAlertChains = keyof typeof SHOULD_SHOW_ALERT
Expand All @@ -63,7 +63,7 @@ const BG_COLORS_BY_DARK_MODE_AND_CHAIN_ID: {
// '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)',
// [SupportedChainId.ARBITRUM_RINKEBY]:
// '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]:
[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: {
Expand All @@ -83,7 +83,7 @@ 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.ARBITRUM_RINKEBY]:
// '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]:
[SupportedChainId.SCROLL_STAGING]:
'radial-gradient(182.71% 205.59% at 2.81% 7.69%,#EEE2D4FF 0%, #E4D5C3FF 100%)',
},
}
Expand Down Expand Up @@ -144,7 +144,7 @@ const TEXT_COLORS: { [chainId in NetworkAlertChains]: string } = {
// [SupportedChainId.OPTIMISM_GOERLI]: '#ff3856',
// [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 {
Expand All @@ -157,11 +157,11 @@ export function NetworkAlert() {

if (!shouldShowAlert(chainId)) {

const textColor = TEXT_COLORS[SupportedChainId.SCROLL_ALPHA]
const textColor = TEXT_COLORS[SupportedChainId.SCROLL_STAGING]

return (
<RootWrapper>
<ContentWrapper chainId={SupportedChainId.SCROLL_ALPHA} darkMode={darkMode} logoUrl="">
<ContentWrapper chainId={SupportedChainId.SCROLL_STAGING} darkMode={darkMode} logoUrl="">
<LinkOutToBridge href="https://snapshot.org/#/uniswap/proposal/0x5ad7208d9ccad93dbc96abc12bfeffcfe83e96b9782e5135727cdaaf494d70f3">
<BodyText color={darkMode ? textColor : "black"}>
<AlertTriangle size={24} style={{ marginRight: "16px" }} />
Expand Down
14 changes: 7 additions & 7 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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_ALPHA_V3_CORE_FACTORY_ADDRESSES,
}

export const V3_MIGRATOR_ADDRESSES: AddressMap = {
Expand All @@ -51,7 +51,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]: '0x5Db25d2b7dba65c8aA2b16465438Ec44f75b0511',
}

export const MULTICALL_ADDRESS: AddressMap = {
Expand All @@ -65,7 +65,7 @@ export const MULTICALL_ADDRESS: AddressMap = {
// [SupportedChainId.ARBITRUM_RINKEBY]: '0xa501c031958F579dB7676fF1CE78AD305794d579',
// [SupportedChainId.CELO]: CELO_MULTICALL_ADDRESS,
// [SupportedChainId.CELO_ALFAJORES]: CELO_MULTICALL_ADDRESS,
[SupportedChainId.SCROLL_ALPHA]: '0x2117f703867a2B7E6813c7e5Edd96bf9a8d8eC30',
[SupportedChainId.SCROLL_STAGING]: '0x2117f703867a2B7E6813c7e5Edd96bf9a8d8eC30',
}

export const SWAP_ROUTER_ADDRESSES: AddressMap = {
Expand All @@ -79,7 +79,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_ALPHA_ROUTER_ADDRESS,
}

/**
Expand Down Expand Up @@ -122,7 +122,7 @@ export const QUOTER_ADDRESSES: AddressMap = {
]),
// [SupportedChainId.CELO]: CELO_QUOTER_ADDRESSES,
// [SupportedChainId.CELO_ALFAJORES]: CELO_QUOTER_ADDRESSES,
[SupportedChainId.SCROLL_ALPHA]: '0xbf1c1FE1e9e900aFd5ba2Eb67480c44266D5eD84',
[SupportedChainId.SCROLL_STAGING]: '0xbf1c1FE1e9e900aFd5ba2Eb67480c44266D5eD84',
}

export const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap = {
Expand All @@ -136,7 +136,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_ALPHA_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES,
}

export const ENS_REGISTRAR_ADDRESSES: AddressMap = {
Expand All @@ -155,5 +155,5 @@ export const TICK_LENS_ADDRESSES: AddressMap = {
// [SupportedChainId.ARBITRUM_RINKEBY]: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573',
// [SupportedChainId.CELO]: CELO_TICK_LENS_ADDRESSES,
// [SupportedChainId.CELO_ALFAJORES]: CELO_TICK_LENS_ADDRESSES,
[SupportedChainId.SCROLL_ALPHA]: '0xf39a3f98Bc7e03cB9A8dBF8246B8C66a1A5c025F',
[SupportedChainId.SCROLL_STAGING]: '0xf39a3f98Bc7e03cB9A8dBF8246B8C66a1A5c025F',
}
2 changes: 1 addition & 1 deletion src/constants/chainInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const CHAIN_INFO: ChainInfoMap = {
// nativeCurrency: { name: 'Celo', symbol: 'CELO', decimals: 18 },
// defaultListUrl: CELO_LIST,
// },
[SupportedChainId.SCROLL_ALPHA]: {
[SupportedChainId.SCROLL_STAGING]: {
networkType: NetworkType.L2,
docs: 'https://docs.uniswap.org/',
explorer: 'https://blockscout.scroll.io/',
Expand Down
9 changes: 5 additions & 4 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export enum SupportedChainId {
// CELO = 42220,
// CELO_ALFAJORES = 44787,

SCROLL_ALPHA = 534353,
// SCROLL_ALPHA = 534353,
SCROLL_STAGING = 5343532222,
}

export const CHAIN_IDS_TO_NAMES = {
Expand All @@ -37,7 +38,7 @@ export const CHAIN_IDS_TO_NAMES = {
// [SupportedChainId.ARBITRUM_RINKEBY]: 'arbitrum_rinkeby',
// [SupportedChainId.OPTIMISM]: 'optimism',
// [SupportedChainId.OPTIMISM_GOERLI]: 'optimism_goerli',
[SupportedChainId.SCROLL_ALPHA]: 'scroll_alpha',
[SupportedChainId.SCROLL_STAGING]: 'scroll_staging',
}

/**
Expand Down Expand Up @@ -77,7 +78,7 @@ export const TESTNET_CHAIN_IDS = [
// SupportedChainId.POLYGON_MUMBAI,
// SupportedChainId.ARBITRUM_RINKEBY,
// SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.SCROLL_ALPHA,
SupportedChainId.SCROLL_STAGING,
] as const

export type SupportedTestnetChainId = typeof TESTNET_CHAIN_IDS[number]
Expand Down Expand Up @@ -108,7 +109,7 @@ export const L2_CHAIN_IDS = [
// SupportedChainId.ARBITRUM_RINKEBY,
// SupportedChainId.OPTIMISM,
// SupportedChainId.OPTIMISM_GOERLI,
SupportedChainId.SCROLL_ALPHA,
SupportedChainId.SCROLL_STAGING,
] as const

export type SupportedL2ChainId = typeof L2_CHAIN_IDS[number]
4 changes: 2 additions & 2 deletions src/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const FALLBACK_URLS: { [key in SupportedChainId]: string[] } = {
// // "Safe" URLs
// `https://alfajores-forno.celo-testnet.org`,
// ],
[SupportedChainId.SCROLL_ALPHA]: [
[SupportedChainId.SCROLL_STAGING]: [
// "Safe" URLs
'https://alpha-rpc.scroll.io/l2',
],
Expand Down Expand Up @@ -138,5 +138,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],
}
2 changes: 1 addition & 1 deletion src/constants/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ export const RPC_PROVIDERS: { [key in SupportedChainId]: StaticJsonRpcProvider }
// [SupportedChainId.POLYGON_MUMBAI]: new AppJsonRpcProvider(SupportedChainId.POLYGON_MUMBAI),
// [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),
}
6 changes: 3 additions & 3 deletions src/constants/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ export const COMMON_BASES: ChainCurrencyList = {
// CUSD_CELO_ALFAJORES,
// CEUR_CELO_ALFAJORES,
// ],
[SupportedChainId.SCROLL_ALPHA]: [
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,
],
}

Expand Down
12 changes: 6 additions & 6 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const USDC_MAINNET = new Token(
// 'USD//C'
// )
const USDC_SCROLL_ALPHA = new Token(
SupportedChainId.SCROLL_ALPHA,
SupportedChainId.SCROLL_STAGING,
'0x38BA9a208F34Ddc9332f6DfC0E9d567f098958A4',
6,
'USDC',
Expand Down Expand Up @@ -385,8 +385,8 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } =
// 'CELO',
// 'Celo native asset'
// ),
[SupportedChainId.SCROLL_ALPHA]: new Token(
SupportedChainId.SCROLL_ALPHA,
[SupportedChainId.SCROLL_STAGING]: new Token(
SupportedChainId.SCROLL_STAGING,
'0xa1EA0B2354F5A344110af2b6AD68e75545009a03',
18,
'WETH',
Expand All @@ -399,8 +399,8 @@ export function isCelo(chainId: number) {
return false
}

export function isScroll(chainId: number): chainId is SupportedChainId.SCROLL_ALPHA {
return chainId === SupportedChainId.SCROLL_ALPHA
export function isScroll(chainId: number): chainId is SupportedChainId.SCROLL_STAGING {
return chainId === SupportedChainId.SCROLL_STAGING
}

// function getCeloNativeCurrency(chainId: number) {
Expand Down Expand Up @@ -480,6 +480,6 @@ export const TOKEN_SHORTHANDS: { [shorthand: string]: { [chainId in SupportedCha
// [SupportedChainId.RINKEBY]: USDC_RINKEBY.address,
// [SupportedChainId.KOVAN]: USDC_KOVAN.address,
// [SupportedChainId.ROPSTEN]: USDC_ROPSTEN.address,
[SupportedChainId.SCROLL_ALPHA]: USDC_SCROLL_ALPHA.address,
[SupportedChainId.SCROLL_STAGING]: USDC_SCROLL_ALPHA.address,
},
}
2 changes: 1 addition & 1 deletion src/hooks/usePoolTickData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const PRICE_FIXED_DIGITS = 8
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.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/hooks/transactions/updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const RETRY_OPTIONS_BY_CHAIN_ID: { [chainId: number]: RetryOptions } = {
// [SupportedChainId.ARBITRUM_RINKEBY]: { n: 10, minWait: 250, maxWait: 1000 },
// [SupportedChainId.OPTIMISM_GOERLI]: { n: 10, minWait: 250, maxWait: 1000 },
// [SupportedChainId.OPTIMISM]: { n: 10, minWait: 250, maxWait: 1000 },
[SupportedChainId.SCROLL_ALPHA]: { n: 10, minWait: 250, maxWait: 1000 },
[SupportedChainId.SCROLL_STAGING]: { 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/pages/Pool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default function Pool() {

const { positions, loading: positionsLoading } = useV3Positions(account)

if (chainId !== SupportedChainId.SCROLL_ALPHA) {
if (chainId !== SupportedChainId.SCROLL_STAGING) {
return <WrongNetworkCard />
}

Expand Down
2 changes: 1 addition & 1 deletion src/theme/components/RadialGradientByChainUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default function RadialGradientByChainUpdater(): null {
// 'radial-gradient(100% 100% at 50% 0%, rgba(20, 49, 37, 0.29) 0%, rgba(12, 31, 23, 0.6536) 49.48%, rgba(31, 33, 40, 0) 100%, rgba(31, 33, 40, 0) 100%), #0D0E0E'
// backgroundRadialGradientElement.style.background = darkMode ? celoDarkGradient : celoLightGradient
// break
case SupportedChainId.SCROLL_ALPHA:
case SupportedChainId.SCROLL_STAGING:
setBackground(backgroundResetStyles)
const scrollLightGradient = 'radial-gradient(142% 91% at 111% 84%, #EEE2D4FF 0%, #F8F2EAFF 100%), #FFFFFF'
const scrollDarkGradient =
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getExplorerLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function getExplorerLink(chainId: number, data: string, type: ExplorerDat
// }
// }

if (chainId === SupportedChainId.SCROLL_ALPHA) {
if (chainId === SupportedChainId.SCROLL_STAGING) {
switch (type) {
case ExplorerDataType.TRANSACTION:
return `https://blockscout.scroll.io/tx/${data}`
Expand Down