Skip to content

Commit

Permalink
ci(release): publish latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-happy-puppy committed Jun 13, 2024
1 parent 1d59f92 commit aa949db
Show file tree
Hide file tree
Showing 38 changed files with 255 additions and 110 deletions.
17 changes: 11 additions & 6 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IPFS hash of the deployment:
- CIDv0: `QmU2prusDiAfiySsHU8tcVbFwcrvSXdEDBVbvyzkpYKEUH`
- CIDv1: `bafybeicususuyvytbxxpmjbk7ustwesnzwekzn4fs3argdhmr3d3p2t2mi`
- CIDv0: `QmWqSfbLDY22q6duTWFocMGoy317SVW13YLpc1yrkrHoeJ`
- CIDv1: `bafybeid6hw4k6jbgyrrwnqtzrgszxdpwotrphjy2nys4mssjakpzbsbztm`

The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).

Expand All @@ -10,10 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.

IPFS gateways:
- https://bafybeicususuyvytbxxpmjbk7ustwesnzwekzn4fs3argdhmr3d3p2t2mi.ipfs.dweb.link/
- https://bafybeicususuyvytbxxpmjbk7ustwesnzwekzn4fs3argdhmr3d3p2t2mi.ipfs.cf-ipfs.com/
- [ipfs://QmU2prusDiAfiySsHU8tcVbFwcrvSXdEDBVbvyzkpYKEUH/](ipfs://QmU2prusDiAfiySsHU8tcVbFwcrvSXdEDBVbvyzkpYKEUH/)
- https://bafybeid6hw4k6jbgyrrwnqtzrgszxdpwotrphjy2nys4mssjakpzbsbztm.ipfs.dweb.link/
- https://bafybeid6hw4k6jbgyrrwnqtzrgszxdpwotrphjy2nys4mssjakpzbsbztm.ipfs.cf-ipfs.com/
- [ipfs://QmWqSfbLDY22q6duTWFocMGoy317SVW13YLpc1yrkrHoeJ/](ipfs://QmWqSfbLDY22q6duTWFocMGoy317SVW13YLpc1yrkrHoeJ/)

### 5.34.1 (2024-06-13)
## 5.35.0 (2024-06-13)


### Features

* **web:** Add ZKsync - prod (#9083) 90c6c69


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.34.1
web/5.35.0
4 changes: 2 additions & 2 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"@uniswap/analytics": "1.7.0",
"@uniswap/analytics-events": "2.32.0",
"@uniswap/ethers-rs-mobile": "0.0.5",
"@uniswap/sdk-core": "5.0.0",
"@uniswap/v3-sdk": "3.11.2",
"@uniswap/sdk-core": "5.3.0",
"@uniswap/v3-sdk": "3.13.0",
"@walletconnect/core": "2.11.2",
"@walletconnect/react-native-compat": "2.11.2",
"@walletconnect/utils": "2.11.2",
Expand Down
1 change: 1 addition & 0 deletions apps/web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_QUICKNODE_MAINNET_RPC_URL="https://magical-alien-tab.quiknode.pro/669e87e569a8277d3fbd9e202f9df93189f19f4c"
REACT_APP_QUICKNODE_ARBITRUM_RPC_URL="https://black-ultra-valley.arbitrum-mainnet.quiknode.pro/96d7122781cfdcbccf5377cf0c68187332891e79"
REACT_APP_QUICKNODE_ZORA_RPC_URL="https://sly-fabled-breeze.zora-mainnet.quiknode.pro/b9b1f6ade530f3f32c0da16e573fe09eb0eb9132"
REACT_APP_QUICKNODE_ZKSYNC_RPC_URL="https://weathered-young-theorem.zksync-mainnet.quiknode.pro/4cff937b0c3b9c95154711ba0e337052445ef316"
REACT_APP_MOONPAY_API="https://api.moonpay.com"
REACT_APP_MOONPAY_LINK="https://us-central1-uniswap-mobile.cloudfunctions.net/signMoonpayLinkV2?platform=web&env=staging"
REACT_APP_MOONPAY_PUBLISHABLE_KEY="pk_test_DycfESRid31UaSxhI5yWKe1r5E5kKSz"
Expand Down
2 changes: 2 additions & 0 deletions apps/web/functions/utils/getNetworkLogoURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export default function getNetworkLogoUrl(network: string, origin: string) {
return origin + '/images/logos/Blast_Logo.png'
case Chain.Zora:
return origin + '/images/logos/Zora_Logo.png'
case Chain.Zksync:
return origin + '/images/logos/Zora_Logo.png'
default:
return ''
}
Expand Down
8 changes: 4 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,20 @@
"@uniswap/governance": "1.0.2",
"@uniswap/liquidity-staker": "1.0.2",
"@uniswap/merkle-distributor": "1.0.1",
"@uniswap/permit2-sdk": "1.2.1",
"@uniswap/permit2-sdk": "1.3.0",
"@uniswap/redux-multicall": "1.1.8",
"@uniswap/router-sdk": "1.9.2",
"@uniswap/sdk-core": "5.0.0",
"@uniswap/sdk-core": "5.3.0",
"@uniswap/smart-order-router": "3.17.3",
"@uniswap/token-lists": "1.0.0-beta.33",
"@uniswap/uniswapx-sdk": "2.0.4-alpha.1",
"@uniswap/universal-router-sdk": "2.1.0",
"@uniswap/universal-router-sdk": "2.2.0",
"@uniswap/v2-core": "1.0.1",
"@uniswap/v2-periphery": "1.1.0-beta.0",
"@uniswap/v2-sdk": "4.3.2",
"@uniswap/v3-core": "1.0.1",
"@uniswap/v3-periphery": "1.4.4",
"@uniswap/v3-sdk": "3.11.2",
"@uniswap/v3-sdk": "3.13.0",
"@vanilla-extract/css": "1.14.0",
"@vanilla-extract/dynamic": "2.1.0",
"@vanilla-extract/sprinkles": "1.6.1",
Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/csp.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"https://vercel.live/",
"https://wallet.crypto.com",
"https://web3.1inch.io",
"https://mainnet.era.zksync.io/",
"wss://*.uniswap.org",
"wss://relay.walletconnect.com",
"wss://relay.walletconnect.org",
Expand All @@ -106,4 +107,4 @@
"'self'",
"blob:"
]
}
}
Binary file added apps/web/public/images/logos/zkSync_Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import 'test-utils/tokens/mocks'

import { permit2Address } from '@uniswap/permit2-sdk'
import { ChainId, TradeType as MockTradeType, Token } from '@uniswap/sdk-core'
import { PERMIT2_ADDRESS } from '@uniswap/universal-router-sdk'
import { getCurrency } from 'components/AccountDrawer/MiniPortfolio/Activity/getCurrency'
import {
signatureToActivity,
transactionToActivity,
useLocalActivities,
} from 'components/AccountDrawer/MiniPortfolio/Activity/parseLocal'
import { DAI as MockDAI, USDC_MAINNET as MockUSDC_MAINNET, USDT as MockUSDT, nativeOnChain } from 'constants/tokens'
import { SignatureDetails, SignatureType } from 'state/signatures/types'
import {
Expand All @@ -11,14 +17,11 @@ import {
TransactionDetails,
TransactionInfo,
} from 'state/transactions/types'
import { mocked } from 'test-utils/mocked'
import { act, renderHook } from 'test-utils/render'
import { UniswapXOrderStatus } from 'types/uniswapx'
import { TransactionStatus } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { useFormatter } from 'utils/formatNumbers'
import { signatureToActivity, transactionToActivity, useLocalActivities } from './parseLocal'

import { getCurrency } from 'components/AccountDrawer/MiniPortfolio/Activity/getCurrency'
import { mocked } from 'test-utils/mocked'

function mockSwapInfo(
type: MockTradeType,
Expand Down Expand Up @@ -55,7 +58,7 @@ function mockSwapInfo(
const mockAccount1 = '0x000000000000000000000000000000000000000001'
const mockAccount2 = '0x000000000000000000000000000000000000000002'
const mockChainId = ChainId.MAINNET
const mockSpenderAddress = PERMIT2_ADDRESS[mockChainId]
const mockSpenderAddress = permit2Address(mockChainId)
const mockCurrencyAmountRaw = '1000000000000000000'
const mockCurrencyAmountRawUSDC = '1000000'
const mockApprovalAmountRaw = '10000000'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TransactionRequest } from '@ethersproject/abstract-provider'
import { Web3Provider } from '@ethersproject/providers'
import { PERMIT2_ADDRESS } from '@uniswap/permit2-sdk'
import { permit2Address } from '@uniswap/permit2-sdk'
import { ChainId } from '@uniswap/sdk-core'
import { CosignedV2DutchOrder, DutchOrder } from '@uniswap/uniswapx-sdk'
import { getYear, isSameDay, isSameMonth, isSameWeek, isSameYear } from 'date-fns'
Expand Down Expand Up @@ -147,7 +147,7 @@ export function useCancelMultipleOrdersCallback(
orders?: Array<UniswapXOrderDetails>
): () => Promise<ContractTransaction[] | undefined> {
const provider = useEthersWeb3Provider()
const permit2 = useContract<Permit2>(PERMIT2_ADDRESS, PERMIT2_ABI, true)
const permit2 = useContract<Permit2>(permit2Address(orders?.[0]?.chainId), PERMIT2_ABI, true)

return useCallback(async () => {
if (!orders || orders.length === 0) {
Expand Down Expand Up @@ -240,7 +240,7 @@ export function useCreateCancelTransactionRequest(
}
| undefined
): TransactionRequest | undefined {
const permit2 = useContract<Permit2>(PERMIT2_ADDRESS, PERMIT2_ABI, true)
const permit2 = useContract<Permit2>(permit2Address(params?.chainId), PERMIT2_ABI, true)
const transactionFetcher = useCallback(() => {
if (
!params ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function useMultiChainPositions(account: string, chains = DEFAULT
let poolAddress = poolAddressCache.get(details, chainId)
if (!poolAddress) {
const factoryAddress = V3_CORE_FACTORY_ADDRESSES[chainId]
poolAddress = computePoolAddress({ factoryAddress, tokenA, tokenB, fee: details.fee })
poolAddress = computePoolAddress({ factoryAddress, tokenA, tokenB, fee: details.fee, chainId })
poolAddressCache.set(details, chainId, poolAddress)
}
poolPairs.push([tokenA, tokenB])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ export default function FeatureFlagModal() {
<FeatureFlagOption flag={FeatureFlags.Realtime} label="Realtime activity updates" />
<FeatureFlagOption flag={FeatureFlags.MultipleRoutingOptions} label="Enable Multiple Routing Options" />
<FeatureFlagOption flag={FeatureFlags.NavRefresh} label="Refreshed navigation features" />
<FeatureFlagOption flag={FeatureFlags.Zora} label="Enable Zora" />
<FeatureFlagGroup name="New Chains">
<FeatureFlagOption flag={FeatureFlags.Zora} label="Enable Zora" />
<FeatureFlagOption flag={FeatureFlags.ZkSync} label="Enable ZkSync" />
</FeatureFlagGroup>
<FeatureFlagGroup name="Multichain UX">
<FeatureFlagOption flag={FeatureFlags.MultichainUX} label="Enable Multichain Swap/Send UX" />
<FeatureFlagOption flag={FeatureFlags.MultichainExplore} label="Enable Multichain Explore Page" />
Expand Down
13 changes: 13 additions & 0 deletions apps/web/src/components/Logo/ChainLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ETHEREUM_LOGO,
OPTIMISM_LOGO,
POLYGON_LOGO,
ZKSYNC_LOGO,
ZORA_LOGO,
} from 'ui/src/assets'

Expand Down Expand Up @@ -104,6 +105,18 @@ export function getChainUI(chainId: ChainId, darkMode: boolean): ChainUI | undef
bgColor: 'rgba(65, 71, 148, 0.12)',
textColor: '#414794',
}
case ChainId.ZKSYNC:
return darkMode
? {
symbol: ZKSYNC_LOGO,
bgColor: 'rgba(97, 137, 255, 0.12)',
textColor: '#6189FF',
}
: {
symbol: ZKSYNC_LOGO,
bgColor: 'rgba(54, 103, 246, 0.12)',
textColor: '#3667F6',
}
default:
return undefined
}
Expand Down
9 changes: 8 additions & 1 deletion apps/web/src/constants/chains.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const chainPriorityTestCases: [ChainId, number][] = [
[ChainId.CELO_ALFAJORES, 7],
[ChainId.BLAST, 8],
[ChainId.ZORA, 9],
[ChainId.ZKSYNC, 10],
]

test.each(chainPriorityTestCases)(
Expand Down Expand Up @@ -68,6 +69,7 @@ const chainIdNames: { [chainId in SupportedInterfaceChainId]: string } = {
[ChainId.BASE]: 'base',
[ChainId.BLAST]: 'blast',
[ChainId.ZORA]: 'zora',
[ChainId.ZKSYNC]: 'zksync',
} as const

test.each(Object.keys(chainIdNames).map((key) => parseInt(key) as SupportedInterfaceChainId))(
Expand Down Expand Up @@ -138,6 +140,7 @@ const l2ChainIds = [
ChainId.BASE,
ChainId.BLAST,
ChainId.ZORA,
ChainId.ZKSYNC,
] as const

test.each(l2ChainIds)('L2_CHAIN_IDS generates the correct chainIds', (chainId: SupportedInterfaceChainId) => {
Expand All @@ -156,6 +159,7 @@ const GQLMainnetChains = [
Chain.Base,
Chain.Blast,
Chain.Zora,
Chain.Zksync,
] as const

const GQL_TESTNET_CHAINS = [Chain.EthereumGoerli, Chain.EthereumSepolia] as const
Expand Down Expand Up @@ -211,6 +215,7 @@ const chainToChainId = {
[Chain.Base]: ChainId.BASE,
[Chain.Blast]: ChainId.BLAST,
[Chain.Zora]: ChainId.ZORA,
[Chain.Zksync]: ChainId.ZKSYNC,
} as const

test.each(Object.keys(chainToChainId).map((key) => key as InterfaceGqlChain))(
Expand Down Expand Up @@ -240,7 +245,7 @@ test.each(backendSupportedChains)(
}
)

const backendNotyetSupportedChainIds = [ChainId.AVALANCHE, ChainId.ZORA] as const
const backendNotyetSupportedChainIds = [ChainId.AVALANCHE, ChainId.ZORA, ChainId.ZKSYNC] as const

test.each(backendNotyetSupportedChainIds)(
'BACKEND_SUPPORTED_CHAINS generates the correct chains',
Expand Down Expand Up @@ -278,6 +283,8 @@ function getBlocksPerMainnetEpochForChainId(chainId: number | undefined): number
switch (chainId) {
case ChainId.ARBITRUM_ONE:
return 46
case ChainId.ZKSYNC:
return 12
case ChainId.OPTIMISM:
return 6
case ChainId.POLYGON:
Expand Down
8 changes: 7 additions & 1 deletion apps/web/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const SUPPORTED_INTERFACE_CHAIN_IDS = [
ChainId.BASE,
ChainId.BLAST,
ChainId.ZORA,
ChainId.ZKSYNC,
] as const

export function isSupportedChainId(chainId?: number | ChainId | null): chainId is SupportedInterfaceChainId {
Expand All @@ -41,11 +42,13 @@ function useFeatureFlaggedChainIds(): Partial<Record<SupportedInterfaceChainId,
// Example: [ChainId.BLAST]: useFeatureFlag(FeatureFlags.BLAST)

const zoraEnabled = useFeatureFlag(FeatureFlags.Zora)
const zkSyncEnabled = useFeatureFlag(FeatureFlags.ZkSync)
return useMemo(
() => ({
[ChainId.ZORA]: zoraEnabled,
[ChainId.ZKSYNC]: zkSyncEnabled,
}),
[zoraEnabled]
[zkSyncEnabled, zoraEnabled]
)
}

Expand Down Expand Up @@ -96,6 +99,7 @@ const POLYGON = UNIVERSE_CHAIN_INFO[UniverseChainId.Polygon]
const POLYGON_MUMBAI = UNIVERSE_CHAIN_INFO[UniverseChainId.PolygonMumbai]
const SEPOLIA = UNIVERSE_CHAIN_INFO[UniverseChainId.SEPOLIA]
const ZORA = UNIVERSE_CHAIN_INFO[UniverseChainId.ZORA]
const ZKSYNC = UNIVERSE_CHAIN_INFO[UniverseChainId.ZKSYNC]

const INTERFACE_SUPPORTED_CHAINS = [
MAINNET,
Expand All @@ -114,6 +118,7 @@ const INTERFACE_SUPPORTED_CHAINS = [
BASE,
BLAST,
ZORA,
ZKSYNC,
] as const

type ExtractObject<TObject extends Record<string, unknown>, TNarrowedObject extends Partial<TObject>> = Extract<
Expand Down Expand Up @@ -145,6 +150,7 @@ export const CHAIN_INFO: ChainInfoMap = {
[ChainId.BASE]: BASE,
[ChainId.BLAST]: BLAST,
[ChainId.ZORA]: ZORA,
[ChainId.ZKSYNC]: ZKSYNC,
} as const

export type ChainSlug = SupportedInterfaceChain['urlParam']
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/constants/lists.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Lists we use as fallbacks on chains that our backend doesn't support
const COINGECKO_AVAX_LIST = 'https://tokens.coingecko.com/avalanche/all.json'
const COINGECKO_ZKSYNC_LIST = 'https://tokens.coingecko.com/zksync/all.json'

export const DEFAULT_INACTIVE_LIST_URLS: string[] = [COINGECKO_AVAX_LIST]
export const DEFAULT_INACTIVE_LIST_URLS: string[] = [COINGECKO_AVAX_LIST, COINGECKO_ZKSYNC_LIST]
14 changes: 9 additions & 5 deletions apps/web/src/constants/routing.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { ChainId, Currency, Token, WETH9 } from '@uniswap/sdk-core'
import { getNativeLogoURI, getTokenLogoURI } from 'lib/hooks/useCurrencyLogoURIs'
import { USDC_ZORA } from 'uniswap/src/constants/tokens'
import { SafetyLevel } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'
import {
ARB,
BTC_BSC,
Expand Down Expand Up @@ -48,7 +44,11 @@ import {
WETH_POLYGON_MUMBAI,
WRAPPED_NATIVE_CURRENCY,
nativeOnChain,
} from './tokens'
} from 'constants/tokens'
import { getNativeLogoURI, getTokenLogoURI } from 'lib/hooks/useCurrencyLogoURIs'
import { USDC_ZKSYNC, USDC_ZORA } from 'uniswap/src/constants/tokens'
import { SafetyLevel } from 'uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks'
import { CurrencyInfo } from 'uniswap/src/features/dataApi/types'

type ChainTokenList = {
readonly [chainId: number]: Token[]
Expand Down Expand Up @@ -168,6 +168,10 @@ export const COMMON_BASES: ChainCurrencyList = {
[ChainId.ZORA]: [nativeOnChain(ChainId.ZORA), WRAPPED_NATIVE_CURRENCY[ChainId.ZORA] as Token, USDC_ZORA].map(
buildCurrencyInfo
),

[ChainId.ZKSYNC]: [nativeOnChain(ChainId.ZKSYNC), WRAPPED_NATIVE_CURRENCY[ChainId.ZKSYNC] as Token, USDC_ZKSYNC].map(
buildCurrencyInfo
),
}

// used to construct the list of all pairs we consider by default in the frontend
Expand Down
7 changes: 7 additions & 0 deletions apps/web/src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ export const WRAPPED_NATIVE_CURRENCY: { [chainId: number]: Token | undefined } =
),
[ChainId.BLAST]: new Token(ChainId.BLAST, '0x4300000000000000000000000000000000000004', 18, 'WETH', 'Wrapped Ether'),
[ChainId.ZORA]: new Token(ChainId.ZORA, '0x4200000000000000000000000000000000000006', 18, 'WETH', 'Wrapped Ether'),
[ChainId.ZKSYNC]: new Token(
ChainId.ZKSYNC,
'0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91',
18,
'WETH',
'Wrapped Ether'
),
}

export function isCelo(chainId: number): chainId is ChainId.CELO | ChainId.CELO_ALFAJORES {
Expand Down
Loading

0 comments on commit aa949db

Please sign in to comment.