Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- copilot:all --> ### <samp>🤖 Generated by Copilot at bd096de</samp> ### Summary 🌐🚀🔗 <!-- 1. 🌐 - This emoji represents the addition of a new network or chain to the web app, as well as the subgraph endpoints and clients for querying data from it. 2. 🚀 - This emoji represents the improvement of scalability and performance by using a layer 2 solution like zkSync, which reduces gas fees and transaction times for users. 3. 🔗 - This emoji represents the integration of the network switcher with the query parameter and the chain name hook, which allows users to easily switch between different chains and see the relevant data. --> This pull request adds support for the zkSync testnet chain to the web app's info pages and network switcher. It defines the chain's subgraph endpoints, constants, token logo, and start block. It also updates the hooks and utils to handle the new chain ID and query parameter. > _`zkSync` testnet_ > _added to web app and info_ > _a winter scaling_ ### Walkthrough * Add support for the zkSync testnet chain to the info pages and the network switchers ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R32), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R51), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R60), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80L1-R1), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80L14-R16), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R25), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R36), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R45), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R52), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R59), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R66), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R73), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R80), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R87), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R94), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-f2387797bca27b530d156fa7f58d5addb1dc1d2ff995c1bb9b5dd10be464b292R298), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-f05e9516c94df2fdb153da0702487207e38d053b512fcfa96904de30b9488e6bR9), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-9a18c7fa948e0139245c60f3160a24972b35b6960387ac74cbf7b4d9da9e26a5R57), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-ae2fef01f2e4cbfcfafd8be2bd435854da0b178fbbbd7846f8a68194141de72aL25-R25), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-ae2fef01f2e4cbfcfafd8be2bd435854da0b178fbbbd7846f8a68194141de72aL98-R98), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-bb26c7b8dd2db305bc739e7e4f031774af7349a6d30a7bf6431d335abf2a5c0eL22-R22), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-bb26c7b8dd2db305bc739e7e4f031774af7349a6d30a7bf6431d335abf2a5c0eL77-R77), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-77f9b222e9f5de52041b06ae540e3a8cb32c1fd777c20be054eb88990cabc845R61)) * Define new constants for the subgraph endpoints, the chain name, the main token symbol, the start time, the URL path, the block explorer name, and the token whitelist and blacklist for the zkSync testnet chain in `endpoints.ts` and `constant.ts` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R32), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R51), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R60), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80L1-R1), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80L14-R16), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R25), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R36), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R52), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R59), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R66), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R80), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R87), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R94)) * Create new GraphQL client instances for the info and blocks subgraphs for the zkSync testnet chain and add them to the mapping objects in `graphql.ts` and `constant.ts` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-7238357db46da6bb48ca41841457ac0e832ee21fb8fd76a6b3c9dbf701ce8c62R60), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80L1-R1), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R45), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-85dec4f2520ab4d031442a39680ae804a521ef025a33f9b42fb151b108015d80R73), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-9a18c7fa948e0139245c60f3160a24972b35b6960387ac74cbf7b4d9da9e26a5R57)) * Update the `useChainNameByQuery` hook to return `ZKSYNC` if the query parameter is `zksync` in `hooks.ts` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-f2387797bca27b530d156fa7f58d5addb1dc1d2ff995c1bb9b5dd10be464b292R298)) * Update the `getTokenLogoURL` function to use the correct token logo URL prefix for the zkSync testnet chain in `getTokenLogoURL.ts` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-f05e9516c94df2fdb153da0702487207e38d053b512fcfa96904de30b9488e6bR9)) * Update the `InfoNav` components for the info and v3 info pages to include the zkSync testnet chain in the `targetChains` array for the network switcher in `InfoNav/index.tsx` and `Layout/InfoNav.tsx` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-ae2fef01f2e4cbfcfafd8be2bd435854da0b178fbbbd7846f8a68194141de72aL25-R25), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-ae2fef01f2e4cbfcfafd8be2bd435854da0b178fbbbd7846f8a68194141de72aL98-R98), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-bb26c7b8dd2db305bc739e7e4f031774af7349a6d30a7bf6431d335abf2a5c0eL22-R22), [link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-bb26c7b8dd2db305bc739e7e4f031774af7349a6d30a7bf6431d335abf2a5c0eL77-R77)) * Update the `SUBGRAPH_START_BLOCK` constant for the v3 info pages to use the start block of the v3 subgraph data for the zkSync testnet chain in `constants.ts` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7442/files?diff=unified&w=0#diff-77f9b222e9f5de52041b06ae540e3a8cb32c1fd777c20be054eb88990cabc845R61))
- Loading branch information
e6514c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./apps/web
www.pancakeswap.finance
web.pancake.run
pancake-prod.vercel.app
pancakeswap.finance
web-git-develop.pancake.run