From b95a106a036f27cf2926a286768533bce338663a Mon Sep 17 00:00:00 2001 From: holybasil Date: Mon, 12 Feb 2024 09:59:17 +0800 Subject: [PATCH 01/81] fix: the winners --- .env.template | 45 ++-- netlify.toml | 4 + package.json | 1 + src/Homepage.tsx | 2 + .../sticker-winners/Finalists/Winner.tsx | 6 +- src/pages/sticker-winners/Finalists/data.json | 42 +-- src/pages/sticker-winners/Header/index.tsx | 8 +- src/routes/index.tsx | 14 +- yarn.lock | 247 +++++++++++++++++- 9 files changed, 318 insertions(+), 51 deletions(-) diff --git a/.env.template b/.env.template index 0131eb77d..283222db3 100644 --- a/.env.template +++ b/.env.template @@ -1,35 +1,50 @@ REACT_APP_VERSION="1.0.0" -REACT_APP_MAIN_ENVIRONMENT = "Sepolia" # used to determine which SCROLL_ENVIRONMENT is to be treated as the main/production one -REACT_APP_SCROLL_ENVIRONMENT = "Sepolia" + +REACT_APP_MAIN_ENVIRONMENT = "Mainnet" # used to determine which SCROLL_ENVIRONMENT is to be treated as the main/production one REACT_APP_ETH_SYMBOL = "ETH" REACT_APP_PREFIX_CLS = "scroll" REACT_APP_SENTRY_DSN = "https://791d7df9132d46a9868de0863bd6583c@o4504371258785792.ingest.sentry.io/4504371261079552" REACT_APP_GOOGLE_ANALYTICS_ID = "G-XR3MGVSHFC" REACT_APP_CONNECT_WALLET_PROJECT_ID = "14efbaafcf5232a47d93a68229b71028" +REACT_APP_UNIFRA_API_KEY = "9d431c1c-d717-4931-9595-ad0b3a246d13" +REACT_APP_NFT_VIEWER_URL="https://nft.scroll.io" +REACT_APP_NFT_API_URI="https://nft.scroll.io" + +REACT_APP_SCROLL_ENVIRONMENT = "Staging" REACT_APP_API_BASE_URI = "https://sepolia-api.scroll.io" -REACT_APP_BRIDGE_API_URI = "https://sepolia-api-bridge.scroll.io/api" +REACT_APP_BRIDGE_API_URI = "https://sepolia-api-bridge-v2.scroll.io/api" REACT_APP_ROLLUPSCAN_API_URI = "https://sepolia-api-re.scroll.io/api" REACT_APP_CHAIN_ID_L1 = "11155111" REACT_APP_CHAIN_ID_L2 = "534351" REACT_APP_EXTERNAL_RPC_URI_L1 = "https://ethereum-sepolia.blockpi.network/v1/rpc/public" REACT_APP_EXTERNAL_RPC_URI_L2 = "https://sepolia-rpc.scroll.io" REACT_APP_EXTERNAL_EXPLORER_URI_L1 = "https://sepolia.etherscan.io" -REACT_APP_EXTERNAL_EXPLORER_URI_L2 = "https://sepolia-blockscout.scroll.io" -REACT_APP_L2_SCAN_URI = "https://scroll.unifra.xyz/" -REACT_APP_EXTERNAL_EXPLORER_URI_DORA = "https://www.ondora.xyz/zh/network/scroll-sepolia/interactions" -REACT_APP_ETHERSCAN_L2 = "https://sepolia.scrollscan.dev" +REACT_APP_EXTERNAL_EXPLORER_URI_L2 = "https://sepolia.scrollscan.com" +REACT_APP_L2_SCAN_URI = "https://scroll-sepolia.l2scan.co" +REACT_APP_EXTERNAL_EXPLORER_URI_DORA = "https://www.ondora.xyz/network/scroll-sepolia" +REACT_APP_ETHERSCAN_L2 = "https://sepolia.scrollscan.com" REACT_APP_L2_SWAP_URI = "https://uniswap-showcase.sepolia.scroll.xyz/" -REACT_APP_L1_ETH_GATEWAY_PROXY_ADDR="0x8A54A2347Da2562917304141ab67324615e9866d" -REACT_APP_L2_ETH_GATEWAY_PROXY_ADDR="0x91e8ADDFe1358aCa5314c644312d38237fC1101C" -REACT_APP_L1_WETH_GATEWAY_PROXY_ADDR="0x3dA0BF44814cfC678376b3311838272158211695" -REACT_APP_L2_WETH_GATEWAY_PROXY_ADDR="0x481B20A927206aF7A754dB8b904B052e2781ea27" +REACT_APP_L1_ETH_GATEWAY_PROXY_ADDR = "0x8A54A2347Da2562917304141ab67324615e9866d" +REACT_APP_L2_ETH_GATEWAY_PROXY_ADDR = "0x91e8ADDFe1358aCa5314c644312d38237fC1101C" +REACT_APP_L1_WETH_GATEWAY_PROXY_ADDR = "0x3dA0BF44814cfC678376b3311838272158211695" +REACT_APP_L2_WETH_GATEWAY_PROXY_ADDR = "0x481B20A927206aF7A754dB8b904B052e2781ea27" +REACT_APP_L1_CUSTOM_ERC20_GATEWAY_PROXY_ADDR = "0x31C994F2017E71b82fd4D8118F140c81215bbb37" +REACT_APP_L2_CUSTOM_ERC20_GATEWAY_PROXY_ADDR = "0x058dec71E53079F9ED053F3a0bBca877F6f3eAcf" +REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" +REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" +REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" +REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" -REACT_APP_L1_SCROLL_MESSENGER="0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" -REACT_APP_L2_SCROLL_MESSENGER="0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" +REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" +REACT_APP_L2_SCROLL_MESSENGER = "0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x9aD3c5617eCAa556d6E166787A97081907171230" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" REACT_APP_L2_GAS_PRICE_ORACLE = "0x247969F4fad93a33d4826046bc3eAE0D36BdE548" -REACT_APP_SCROLL_CHAIN="0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" -REACT_APP_L1_MESSAGE_QUEUE="0xF0B2293F5D834eAe920c6974D50957A1732de763" \ No newline at end of file +REACT_APP_SCROLL_CHAIN = "0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" +REACT_APP_L1_MESSAGE_QUEUE = "0xF0B2293F5D834eAe920c6974D50957A1732de763" +REACT_APP_SCROLL_ORIGINS_NFT="0x90a274D591d5AB1a25f0DD0F06F28533C34D7d9f" +REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 7303bc87d..1bf7a2afa 100644 --- a/netlify.toml +++ b/netlify.toml @@ -63,6 +63,10 @@ from = "/blog/scrollsFreshCoat" to = "/blog/scrolls-fresh-coat" status = 301 +[[redirects]] +from = "/sticker-vote" +to = "/sticker-winners" +status = 301 diff --git a/package.json b/package.json index 68e678693..8001bcd61 100644 --- a/package.json +++ b/package.json @@ -108,6 +108,7 @@ "husky": "^8.0.2", "less": "^4.1.3", "less-loader": "^11.1.0", + "lint-staged": "^15.2.2", "os-browserify": "^0.3.0", "postcss": "^8.4.17", "prettier": "^2.8.1", diff --git a/src/Homepage.tsx b/src/Homepage.tsx index 9de9341b7..37f38cdc7 100644 --- a/src/Homepage.tsx +++ b/src/Homepage.tsx @@ -33,6 +33,8 @@ function Homepage() { return window.location.origin + `/og_scroll_brand.png` } else if (window.location.pathname.startsWith("/sticker-vote")) { return window.location.origin + `/${type}_sticker_vote.png` + } else if (window.location.pathname.startsWith("/sticker-winners")) { + return window.location.origin + `/${type}_sticker_vote.png` } return window.location.origin + "/og_scroll.png" } diff --git a/src/pages/sticker-winners/Finalists/Winner.tsx b/src/pages/sticker-winners/Finalists/Winner.tsx index 36d87589f..c6c1aad06 100644 --- a/src/pages/sticker-winners/Finalists/Winner.tsx +++ b/src/pages/sticker-winners/Finalists/Winner.tsx @@ -36,7 +36,7 @@ const useStyles = makeStyles()(theme => ({ const Winner = props => { const { - data: { name, author, images, bg }, + data: { author, images, bg }, } = props const { classes } = useStyles() const { isMobile } = useCheckViewport() @@ -53,14 +53,14 @@ const Winner = props => { <> - {name} - {author} + Finalist - {author} {images.map((src, index) => ( diff --git a/src/pages/sticker-winners/Finalists/data.json b/src/pages/sticker-winners/Finalists/data.json index 24c8d5ffc..a6662d458 100644 --- a/src/pages/sticker-winners/Finalists/data.json +++ b/src/pages/sticker-winners/Finalists/data.json @@ -1,47 +1,49 @@ { "winner": { - "author": "Magda", - "images": ["/imgs/sticker/Magda1.png", "/imgs/sticker/Magda2.png"] + "author": "MillionDollars", + "images": ["/imgs/sticker/MillionDollars1.png", "/imgs/sticker/MillionDollars2.png"] }, "top2-5": [ { - "author": "Coincuddle", - "images": ["/imgs/sticker/Coincuddle1.png", "/imgs/sticker/Coincuddle2.png"] + "author": "Cozy", + "images": ["/imgs/sticker/Cozy1.png", "/imgs/sticker/Cozy2.png"], + "bg": "#FFF8F3" }, { - "author": "Cozy", - "images": ["/imgs/sticker/Cozy1.png", "/imgs/sticker/Cozy2.png"] + "author": "Shallot", + "images": ["/imgs/sticker/Shallot1.png", "/imgs/sticker/Shallot2.png"] }, { - "author": "EssisW.eth", - "images": ["/imgs/sticker/EssisW.eth1.gif", "/imgs/sticker/EssisW.eth2.jpg"], - "bg": ["#FAECE5", "#FFF3E7"] + "author": "Coincuddle", + "images": ["/imgs/sticker/Coincuddle1.png", "/imgs/sticker/Coincuddle2.png"] }, { "author": "fomomonstr", - "images": ["/imgs/sticker/fomomonstr1.png", "/imgs/sticker/fomomonstr2.png"] + "images": ["/imgs/sticker/fomomonstr1.png", "/imgs/sticker/fomomonstr2.png"], + "bg": "#FFEEDA" } ], "remaining": [ { - "author": "Yol", - "images": ["/imgs/sticker/Yol1.png", "/imgs/sticker/Yol2.png"] + "author": "EssisW.eth", + "images": ["/imgs/sticker/EssisW.eth1.gif", "/imgs/sticker/EssisW.eth2.jpg"], + "bg": ["#FAECE5", "#FFF3E7"] }, { - "author": "MillionDollars", - "images": ["/imgs/sticker/MillionDollars1.png", "/imgs/sticker/MillionDollars2.png"] + "author": "Yol", + "images": ["/imgs/sticker/Yol1.png", "/imgs/sticker/Yol2.png"] }, { - "author": "Shallot", - "images": ["/imgs/sticker/Shallot1.png", "/imgs/sticker/Shallot2.png"] + "author": "Andre", + "images": ["/imgs/sticker/Andre1.jpg", "/imgs/sticker/Andre2.jpg"] }, { - "author": "Cozy", - "images": ["/imgs/sticker/Cozy1.png", "/imgs/sticker/Cozy2.png"] + "author": "afifridwan", + "images": ["/imgs/sticker/afifridwan1.gif", "/imgs/sticker/afifridwan2.gif"] }, { - "author": "Coincuddle", - "images": ["/imgs/sticker/Coincuddle1.png", "/imgs/sticker/Coincuddle2.png"] + "author": "Magda", + "images": ["/imgs/sticker/Magda1.png", "/imgs/sticker/Magda2.png"] } ] } diff --git a/src/pages/sticker-winners/Header/index.tsx b/src/pages/sticker-winners/Header/index.tsx index 1eeb2faff..8fc12dc26 100644 --- a/src/pages/sticker-winners/Header/index.tsx +++ b/src/pages/sticker-winners/Header/index.tsx @@ -32,12 +32,14 @@ const useStyles = makeStyles()(theme => ({ }, }, award: { - padding: "0.8rem 2rem", + padding: "1.5rem 2rem", border: `3px solid ${theme.palette.text.primary}`, - height: "8rem", backgroundColor: theme.palette.themeBackground.light, borderRadius: "1.6rem", textAlign: "center", + [theme.breakpoints.down("md")]: { + padding: "0.6rem 2rem", + }, [theme.breakpoints.down("sm")]: { borderWidth: "2px", }, @@ -89,7 +91,7 @@ const Award = () => { Top 1 prize: 1000 USD {isPortrait ?

: "|"} Top 2-5 prize: 200 USD each
diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 617cae7b2..92996680f 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -19,7 +19,7 @@ import RollupScanChunk from "@/pages/rollup/chunk" import RollupScanChunkDetail from "@/pages/rollup/chunk/detail" import RollupScan from "@/pages/rollup/index" import StickerVote from "@/pages/sticker-vote" -// import StickerWinners from "@/pages/sticker-winners" +import StickerWinners from "@/pages/sticker-winners" import Terms from "@/pages/terms" import { isSepolia } from "@/utils" @@ -211,12 +211,12 @@ const mainnetRoutes = [ element: , description: "Vote for your favourite sticker designs.", }, - // { - // name: "Scroll Sticker Winners", - // path: "/sticker-winners", - // element: , - // description: "Congratulations to the winners of the sticker contest.", - // }, + { + name: "Scroll Sticker Winners", + path: "/sticker-winners", + element: , + description: "Congratulations to the winners of the sticker contest.", + }, ] const routes = isSepolia ? sepoliaRoutes : mainnetRoutes diff --git a/yarn.lock b/yarn.lock index 7d585e942..891af9a5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5036,6 +5036,13 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: dependencies: type-fest "^0.21.3" +ansi-escapes@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.2.0.tgz#8a13ce75286f417f1963487d86ba9f90dccf9947" + integrity sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw== + dependencies: + type-fest "^3.0.0" + ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" @@ -5070,6 +5077,11 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-styles@^6.0.0, ansi-styles@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + any-promise@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -5871,6 +5883,11 @@ ccount@^2.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== +chalk@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + chalk@^2.0.0, chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -5996,6 +6013,13 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-table3@~0.6.1: version "0.6.3" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" @@ -6013,6 +6037,14 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" +cli-truncate@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-4.0.0.tgz#6cc28a2924fee9e25ce91e973db56c7066e6172a" + integrity sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA== + dependencies: + slice-ansi "^5.0.0" + string-width "^7.0.0" + clipboardy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-3.0.0.tgz#f3876247404d334c9ed01b6f269c11d09a5e3092" @@ -6103,7 +6135,7 @@ colord@^2.9.1: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== -colorette@^2.0.10, colorette@^2.0.16: +colorette@^2.0.10, colorette@^2.0.16, colorette@^2.0.20: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== @@ -6120,6 +6152,11 @@ comma-separated-tokens@^2.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== +commander@11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" + integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== + commander@^2.20.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -6686,7 +6723,7 @@ debug@2.6.9, debug@^2.1.3, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -7112,6 +7149,11 @@ emittery@^0.8.1: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +emoji-regex@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -7796,6 +7838,11 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -7824,6 +7871,21 @@ execa@4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -8292,6 +8354,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" @@ -8333,6 +8400,11 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== +get-stream@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -8850,6 +8922,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -9145,6 +9222,18 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + +is-fullwidth-code-point@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz#9609efced7c2f97da7b60145ef481c787c7ba704" + integrity sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA== + dependencies: + get-east-asian-width "^1.0.0" + is-generator-fn@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" @@ -9272,6 +9361,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -10318,6 +10412,11 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lilconfig@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.0.0.tgz#f8067feb033b5b74dab4602a5f5029420be749bc" + integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g== + lilconfig@^2.0.3, lilconfig@^2.0.5, lilconfig@^2.0.6: version "2.1.0" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" @@ -10328,6 +10427,22 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +lint-staged@^15.2.2: + version "15.2.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.2.tgz#ad7cbb5b3ab70e043fa05bff82a09ed286bc4c5f" + integrity sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw== + dependencies: + chalk "5.3.0" + commander "11.1.0" + debug "4.3.4" + execa "8.0.1" + lilconfig "3.0.0" + listr2 "8.0.1" + micromatch "4.0.5" + pidtree "0.6.0" + string-argv "0.3.2" + yaml "2.3.4" + listhen@^1.5.5: version "1.5.5" resolved "https://registry.yarnpkg.com/listhen/-/listhen-1.5.5.tgz#58915512af70f770aa3e9fb19367adf479bb58c4" @@ -10351,6 +10466,18 @@ listhen@^1.5.5: untun "^0.1.2" uqr "^0.1.2" +listr2@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.0.1.tgz#4d3f50ae6cec3c62bdf0e94f5c2c9edebd4b9c34" + integrity sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA== + dependencies: + cli-truncate "^4.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.0.0" + rfdc "^1.3.0" + wrap-ansi "^9.0.0" + listr2@^3.8.3: version "3.14.0" resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" @@ -10516,6 +10643,17 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" +log-update@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.0.0.tgz#0ddeb7ac6ad658c944c1de902993fce7c33f5e59" + integrity sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw== + dependencies: + ansi-escapes "^6.2.0" + cli-cursor "^4.0.0" + slice-ansi "^7.0.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + longest-streak@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4" @@ -11125,7 +11263,7 @@ micromark@^3.0.0: micromark-util-types "^1.0.1" uvu "^0.5.0" -micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: +micromatch@4.0.5, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== @@ -11173,6 +11311,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -11420,6 +11563,13 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955" + integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg== + dependencies: + path-key "^4.0.0" + nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" @@ -11580,6 +11730,13 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.0.9, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -11762,6 +11919,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -11818,6 +11980,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatc resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pidtree@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" + integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== + pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -13418,6 +13585,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" @@ -13785,6 +13960,11 @@ signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -13828,6 +14008,22 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + +slice-ansi@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.0.tgz#cd6b4655e298a8d1bdeb04250a433094b347b9a9" + integrity sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg== + dependencies: + ansi-styles "^6.2.1" + is-fullwidth-code-point "^5.0.0" + sockjs@^0.3.24: version "0.3.24" resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" @@ -14069,6 +14265,11 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== +string-argv@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -14099,6 +14300,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.matchall@^4.0.6, string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -14177,6 +14387,13 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" +strip-ansi@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -14197,6 +14414,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -14746,6 +14968,11 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +type-fest@^3.0.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" + integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -15693,6 +15920,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.0.tgz#1a3dc8b70d85eeb8398ddfb1e4a02cd186e58b3e" + integrity sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -15768,6 +16004,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2" + integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== + yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" From 7cd37b4c8a1bc2daf4ef8c904888c5aa718014e1 Mon Sep 17 00:00:00 2001 From: holybasil Date: Mon, 12 Feb 2024 10:37:08 +0800 Subject: [PATCH 02/81] fix: inconsistence css --- src/pages/sticker-winners/Finalists/Winner.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/sticker-winners/Finalists/Winner.tsx b/src/pages/sticker-winners/Finalists/Winner.tsx index c6c1aad06..f1f7abd08 100644 --- a/src/pages/sticker-winners/Finalists/Winner.tsx +++ b/src/pages/sticker-winners/Finalists/Winner.tsx @@ -28,6 +28,7 @@ const useStyles = makeStyles()(theme => ({ }, [theme.breakpoints.down("sm")]: { + width: "100%", flexDirection: "column", gap: "1.6rem", }, @@ -51,7 +52,7 @@ const Winner = props => { return ( <> - + Finalist - {author} From b52ec6858082a3b5ab2d3a9aa194111b4077695b Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Mon, 19 Feb 2024 22:19:30 +0800 Subject: [PATCH 03/81] add lido sepolia gateway (#966) * add lido sepolia gateway * Fix use wrong instance for erc20 --- netlify.toml | 4 ++-- src/hooks/useEstimateSendTransaction.ts | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/netlify.toml b/netlify.toml index 2b8a92941..ca1a7c077 100644 --- a/netlify.toml +++ b/netlify.toml @@ -122,8 +122,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" diff --git a/src/hooks/useEstimateSendTransaction.ts b/src/hooks/useEstimateSendTransaction.ts index 2a1b600be..3fcc7a2cb 100644 --- a/src/hooks/useEstimateSendTransaction.ts +++ b/src/hooks/useEstimateSendTransaction.ts @@ -17,11 +17,13 @@ export function useEstimateSendTransaction(props) { const minimumAmount = BigInt(1) useEffect(() => { - const scrollMessenger = networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].scrollMessenger - if (scrollMessenger) { - setInstance(scrollMessenger) + const instance = selectedToken.native + ? networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].scrollMessenger + : networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].gateway + if (instance) { + setInstance(instance) } - }, [networksAndSigners, fromNetwork]) + }, [networksAndSigners, fromNetwork, selectedToken.native]) const depositETH = async () => { const fee = gasPrice * gasLimit @@ -32,6 +34,7 @@ export function useEstimateSendTransaction(props) { const depositERC20 = async () => { const fee = gasPrice * gasLimit + return instance["depositERC20(address,uint256,uint256)"].estimateGas(selectedToken.address, minimumAmount, gasLimit, { value: fee, }) From 967940cd10076129090a5a9d4739a9e26cfaf4b9 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Mon, 19 Feb 2024 22:25:49 +0800 Subject: [PATCH 04/81] Add lido sepolia gateway --- netlify.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index ca1a7c077..f737a4042 100644 --- a/netlify.toml +++ b/netlify.toml @@ -162,8 +162,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" @@ -202,8 +202,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" From 2da663fa49e9ab0fc5b2e9fc8086070fbf20537c Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Tue, 20 Feb 2024 09:06:59 +0800 Subject: [PATCH 05/81] Update netlify.toml --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index f737a4042..a14c9d550 100644 --- a/netlify.toml +++ b/netlify.toml @@ -254,4 +254,4 @@ REACT_APP_SCROLL_CHAIN = "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" REACT_APP_L1_MESSAGE_QUEUE = "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B" REACT_APP_SCROLL_ORIGINS_NFT="0x74670A3998d9d6622E32D0847fF5977c37E0eC91" REACT_APP_SCROLL_ORIGINS_NFT_V2="0x42bCaCb8D24Ba588cab8Db0BB737DD2eFca408EC" -REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="" +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B" From 145eadb5e2fb553ca22ddb60c437c8e8669e6e91 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Thu, 22 Feb 2024 16:23:35 +0800 Subject: [PATCH 06/81] Merge sepolia into mainnet (#969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Auto squash #914  [bot] * upgrade: node 16.x -> node 20.x * upgrade: browserslist from >0.2% to >0.5% * doc: update readme.MD * Fix warning (#907) * fix warning * Fix warning * Fix warning * Change tag name * Update sepolia banner * Bridge history refactor (#896) * Transaction history is changed to be obtained from the backend Update * Only show unclaimed txs in claim page * Only show unclaimed txs in claim page * Rename var * fix typo * Update transation storagekey * Update bridge history api fields (#917) * Update bridge history api fields * fix apis error * Auto squash #921  [bot] * fix: support long list * fix: measure only when getting the final height * feat: change bridge-history backend api to v2 (#922) * fix typos (#925) * fix: custom navbar bg color * Auto squash #930  [bot] * Bridge costs optimization (#916) * Contract upgrade: Bridge cost optimization * Update netlify.toml * Auto squash #932  [bot] * FailedRelayed tx support retry feature (#924) * Revert "Bridge costs optimization (#916)" This reverts commit f61221aaa020372bffaab29ce82d5f39d36a29d7. * Auto squash #935  [bot] * Revert "Revert "Bridge costs optimization (#916)"" This reverts commit b80ffc8879aa62ffa5558ef75ea11bb8e2d41dd2. * Auto squash #939  [bot] * Auto squash #941  [bot] * Auto squash #946  [bot] * Auto squash #948  [bot] * Auto squash #951  [bot] * add lido sepolia gateway (#966) * add lido sepolia gateway * Fix use wrong instance for erc20 * Add lido sepolia gateway * Update netlify.toml --------- Co-authored-by: github-actions Co-authored-by: holybasil Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> --- .env.template | 9 +- netlify.toml | 21 +- package.json | 2 +- src/assets/abis/L1MessageQueue.json | 585 ------------------ ...1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json | 311 ++++++++++ src/assets/abis/L2GasPriceOracle.json | 315 ---------- src/constants/common.ts | 5 + src/contexts/BridgeContextProvider.tsx | 10 +- src/contexts/PriceFeeProvider.tsx | 36 +- src/hooks/useEstimateSendTransaction.ts | 15 +- src/hooks/useRetry.ts | 14 +- src/hooks/useSendTransaction.ts | 22 +- 12 files changed, 397 insertions(+), 948 deletions(-) delete mode 100644 src/assets/abis/L1MessageQueue.json create mode 100644 src/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json delete mode 100644 src/assets/abis/L2GasPriceOracle.json diff --git a/.env.template b/.env.template index 283222db3..1331ce3d3 100644 --- a/.env.template +++ b/.env.template @@ -9,7 +9,6 @@ REACT_APP_CONNECT_WALLET_PROJECT_ID = "14efbaafcf5232a47d93a68229b71028" REACT_APP_UNIFRA_API_KEY = "9d431c1c-d717-4931-9595-ad0b3a246d13" REACT_APP_NFT_VIEWER_URL="https://nft.scroll.io" REACT_APP_NFT_API_URI="https://nft.scroll.io" - REACT_APP_SCROLL_ENVIRONMENT = "Staging" REACT_APP_API_BASE_URI = "https://sepolia-api.scroll.io" REACT_APP_BRIDGE_API_URI = "https://sepolia-api-bridge-v2.scroll.io/api" @@ -34,8 +33,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" @@ -43,8 +42,8 @@ REACT_APP_L2_SCROLL_MESSENGER = "0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x9aD3c5617eCAa556d6E166787A97081907171230" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" -REACT_APP_L2_GAS_PRICE_ORACLE = "0x247969F4fad93a33d4826046bc3eAE0D36BdE548" REACT_APP_SCROLL_CHAIN = "0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" REACT_APP_L1_MESSAGE_QUEUE = "0xF0B2293F5D834eAe920c6974D50957A1732de763" REACT_APP_SCROLL_ORIGINS_NFT="0x90a274D591d5AB1a25f0DD0F06F28533C34D7d9f" -REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" \ No newline at end of file +REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0xF0B2293F5D834eAe920c6974D50957A1732de763" diff --git a/netlify.toml b/netlify.toml index 1bf7a2afa..15b6ba4bf 100644 --- a/netlify.toml +++ b/netlify.toml @@ -126,8 +126,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" @@ -135,11 +135,11 @@ REACT_APP_L2_SCROLL_MESSENGER = "0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x9aD3c5617eCAa556d6E166787A97081907171230" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" -REACT_APP_L2_GAS_PRICE_ORACLE = "0x247969F4fad93a33d4826046bc3eAE0D36BdE548" REACT_APP_SCROLL_CHAIN = "0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" REACT_APP_L1_MESSAGE_QUEUE = "0xF0B2293F5D834eAe920c6974D50957A1732de763" REACT_APP_SCROLL_ORIGINS_NFT="0x90a274D591d5AB1a25f0DD0F06F28533C34D7d9f" REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0xF0B2293F5D834eAe920c6974D50957A1732de763" [context.staging.environment] REACT_APP_SCROLL_ENVIRONMENT = "Staging" @@ -166,8 +166,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" @@ -175,11 +175,11 @@ REACT_APP_L2_SCROLL_MESSENGER = "0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x9aD3c5617eCAa556d6E166787A97081907171230" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" -REACT_APP_L2_GAS_PRICE_ORACLE = "0x247969F4fad93a33d4826046bc3eAE0D36BdE548" REACT_APP_SCROLL_CHAIN = "0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" REACT_APP_L1_MESSAGE_QUEUE = "0xF0B2293F5D834eAe920c6974D50957A1732de763" REACT_APP_SCROLL_ORIGINS_NFT="0x90a274D591d5AB1a25f0DD0F06F28533C34D7d9f" REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0xF0B2293F5D834eAe920c6974D50957A1732de763" [context.sepolia.environment] REACT_APP_SCROLL_ENVIRONMENT = "Sepolia" @@ -206,8 +206,8 @@ REACT_APP_L1_USDC_GATEWAY_PROXY_ADDR = "" REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR= "" REACT_APP_L1_DAI_GATEWAY_PROXY_ADDR = "0x8b0B9c4e9f41b9bbDEfFee24F9f11C328093d248" REACT_APP_L2_DAI_GATEWAY_PROXY_ADDR = "0xbF28c28490988026Dca2396148DE50136A54534e" -REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "" -REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "" +REACT_APP_L1_LIDO_GATEWAY_PROXY_ADDR = "0xF22B24fa7c3168f30b17fd97b71bdd3162DDe029" +REACT_APP_L2_LIDO_GATEWAY_PROXY_ADDR = "0x635B054A092F6aE61Ce0Fddc397A704F6626510D" REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0x65D123d6389b900d954677c26327bfc1C3e88A13" REACT_APP_L2_STANDARD_ERC20_GATEWAY_PROXY_ADDR = "0xaDcA915971A336EA2f5b567e662F5bd74AEf9582" REACT_APP_L1_SCROLL_MESSENGER = "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A" @@ -215,11 +215,11 @@ REACT_APP_L2_SCROLL_MESSENGER = "0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x9aD3c5617eCAa556d6E166787A97081907171230" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" -REACT_APP_L2_GAS_PRICE_ORACLE = "0x247969F4fad93a33d4826046bc3eAE0D36BdE548" REACT_APP_SCROLL_CHAIN = "0x2D567EcE699Eabe5afCd141eDB7A4f2D0D6ce8a0" REACT_APP_L1_MESSAGE_QUEUE = "0xF0B2293F5D834eAe920c6974D50957A1732de763" REACT_APP_SCROLL_ORIGINS_NFT="0x90a274D591d5AB1a25f0DD0F06F28533C34D7d9f" REACT_APP_SCROLL_ORIGINS_NFT_V2="0xDd7d857F570B0C211abfe05cd914A85BefEC2464" +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0xF0B2293F5D834eAe920c6974D50957A1732de763" [context.mainnet.environment] REACT_APP_SCROLL_ENVIRONMENT = "Mainnet" @@ -254,9 +254,8 @@ REACT_APP_L2_SCROLL_MESSENGER = "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC" REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR = "0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6" REACT_APP_L2_GATEWAY_ROUTER_PROXY_ADDR = "0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79" REACT_APP_L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" -REACT_APP_L2_GAS_PRICE_ORACLE = "0x987e300fDfb06093859358522a79098848C33852" REACT_APP_SCROLL_CHAIN = "0xa13BAF47339d63B743e7Da8741db5456DAc1E556" REACT_APP_L1_MESSAGE_QUEUE = "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B" REACT_APP_SCROLL_ORIGINS_NFT="0x74670A3998d9d6622E32D0847fF5977c37E0eC91" REACT_APP_SCROLL_ORIGINS_NFT_V2="0x42bCaCb8D24Ba588cab8Db0BB737DD2eFca408EC" - +REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE="0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B" diff --git a/package.json b/package.json index 8001bcd61..6c780ffb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.67", + "version": "5.0.73", "private": false, "license": "MIT", "scripts": { diff --git a/src/assets/abis/L1MessageQueue.json b/src/assets/abis/L1MessageQueue.json deleted file mode 100644 index 127fc2b59..000000000 --- a/src/assets/abis/L1MessageQueue.json +++ /dev/null @@ -1,585 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "count", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "skippedBitmap", - "type": "uint256" - } - ], - "name": "DequeueTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "DropTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "queueIndex", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "QueueTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_oldGateway", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_newGateway", - "type": "address" - } - ], - "name": "UpdateEnforcedTxGateway", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_oldGasOracle", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_newGasOracle", - "type": "address" - } - ], - "name": "UpdateGasOracle", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_oldMaxGasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newMaxGasLimit", - "type": "uint256" - } - ], - "name": "UpdateMaxGasLimit", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "appendCrossDomainMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_gasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "appendEnforcedTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - } - ], - "name": "calculateIntrinsicGasFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_queueIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_gasLimit", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "computeTransactionHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "dropCrossDomainMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "enforcedTxGateway", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_gasLimit", - "type": "uint256" - } - ], - "name": "estimateCrossDomainMessageFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gasOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_queueIndex", - "type": "uint256" - } - ], - "name": "getCrossDomainMessage", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_messenger", - "type": "address" - }, - { - "internalType": "address", - "name": "_scrollChain", - "type": "address" - }, - { - "internalType": "address", - "name": "_enforcedTxGateway", - "type": "address" - }, - { - "internalType": "address", - "name": "_gasOracle", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxGasLimit", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "messageQueue", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messenger", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextCrossDomainMessageIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingQueueIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_count", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_skippedBitmap", - "type": "uint256" - } - ], - "name": "popCrossDomainMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "scrollChain", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newGateway", - "type": "address" - } - ], - "name": "updateEnforcedTxGateway", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newGasOracle", - "type": "address" - } - ], - "name": "updateGasOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newMaxGasLimit", - "type": "uint256" - } - ], - "name": "updateMaxGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json b/src/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json new file mode 100644 index 000000000..9e2d54fe0 --- /dev/null +++ b/src/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json @@ -0,0 +1,311 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_messenger", "type": "address" }, + { "internalType": "address", "name": "_scrollChain", "type": "address" }, + { "internalType": "address", "name": "_enforcedTxGateway", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "name": "ErrorNotWhitelistedSender", "type": "error" }, + { "inputs": [], "name": "ErrorZeroAddress", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "startIndex", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "count", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "skippedBitmap", "type": "uint256" } + ], + "name": "DequeueTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], + "name": "DropTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, + { "indexed": false, "internalType": "uint64", "name": "queueIndex", "type": "uint64" }, + { "indexed": false, "internalType": "uint256", "name": "gasLimit", "type": "uint256" }, + { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "QueueTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "_oldGasOracle", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "_newGasOracle", "type": "address" } + ], + "name": "UpdateGasOracle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "oldL2BaseFee", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newL2BaseFee", "type": "uint256" } + ], + "name": "UpdateL2BaseFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "_oldMaxGasLimit", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "_newMaxGasLimit", "type": "uint256" } + ], + "name": "UpdateMaxGasLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "_oldWhitelistChecker", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "_newWhitelistChecker", "type": "address" } + ], + "name": "UpdateWhitelistChecker", + "type": "event" + }, + { + "inputs": [ + { "internalType": "address", "name": "_target", "type": "address" }, + { "internalType": "uint256", "name": "_gasLimit", "type": "uint256" }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "appendCrossDomainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_sender", "type": "address" }, + { "internalType": "address", "name": "_target", "type": "address" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" }, + { "internalType": "uint256", "name": "_gasLimit", "type": "uint256" }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "appendEnforcedTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes", "name": "_calldata", "type": "bytes" }], + "name": "calculateIntrinsicGasFee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_sender", "type": "address" }, + { "internalType": "uint256", "name": "_queueIndex", "type": "uint256" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" }, + { "internalType": "address", "name": "_target", "type": "address" }, + { "internalType": "uint256", "name": "_gasLimit", "type": "uint256" }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "computeTransactionHash", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_index", "type": "uint256" }], + "name": "dropCrossDomainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "enforcedTxGateway", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_gasLimit", "type": "uint256" }], + "name": "estimateCrossDomainMessageFee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gasOracle", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_queueIndex", "type": "uint256" }], + "name": "getCrossDomainMessage", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_messenger", "type": "address" }, + { "internalType": "address", "name": "_scrollChain", "type": "address" }, + { "internalType": "address", "name": "_enforcedTxGateway", "type": "address" }, + { "internalType": "address", "name": "_gasOracle", "type": "address" }, + { "internalType": "uint256", "name": "_maxGasLimit", "type": "uint256" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [], "name": "initializeV2", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [{ "internalType": "uint256", "name": "_queueIndex", "type": "uint256" }], + "name": "isMessageDropped", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_queueIndex", "type": "uint256" }], + "name": "isMessageSkipped", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2BaseFee", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxGasLimit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "name": "messageQueue", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messenger", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextCrossDomainMessageIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingQueueIndex", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_startIndex", "type": "uint256" }, + { "internalType": "uint256", "name": "_count", "type": "uint256" }, + { "internalType": "uint256", "name": "_skippedBitmap", "type": "uint256" } + ], + "name": "popCrossDomainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "scrollChain", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_newL2BaseFee", "type": "uint256" }], + "name": "setL2BaseFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "_newGasOracle", "type": "address" }], + "name": "updateGasOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_newMaxGasLimit", "type": "uint256" }], + "name": "updateMaxGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "_newWhitelistChecker", "type": "address" }], + "name": "updateWhitelistChecker", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "whitelistChecker", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/assets/abis/L2GasPriceOracle.json b/src/assets/abis/L2GasPriceOracle.json deleted file mode 100644 index cd9696e1d..000000000 --- a/src/assets/abis/L2GasPriceOracle.json +++ /dev/null @@ -1,315 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "txGas", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "txGasContractCreation", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "zeroGas", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonZeroGas", - "type": "uint256" - } - ], - "name": "IntrinsicParamsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldL2BaseFee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newL2BaseFee", - "type": "uint256" - } - ], - "name": "L2BaseFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_oldWhitelist", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_newWhitelist", - "type": "address" - } - ], - "name": "UpdateWhitelist", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_message", - "type": "bytes" - } - ], - "name": "calculateIntrinsicGasFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_gasLimit", - "type": "uint256" - } - ], - "name": "estimateCrossDomainMessageFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "_txGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_txGasContractCreation", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_zeroGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_nonZeroGas", - "type": "uint64" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "intrinsicParams", - "outputs": [ - { - "internalType": "uint64", - "name": "txGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "txGasContractCreation", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "zeroGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "nonZeroGas", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2BaseFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "_txGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_txGasContractCreation", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_zeroGas", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_nonZeroGas", - "type": "uint64" - } - ], - "name": "setIntrinsicParams", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newL2BaseFee", - "type": "uint256" - } - ], - "name": "setL2BaseFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newWhitelist", - "type": "address" - } - ], - "name": "updateWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "whitelist", - "outputs": [ - { - "internalType": "contract IWhitelist", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/constants/common.ts b/src/constants/common.ts index 0a87f93ac..4e36789f5 100644 --- a/src/constants/common.ts +++ b/src/constants/common.ts @@ -39,6 +39,11 @@ export const WETH_GATEWAY_PROXY_ADDR = { [CHAIN_ID.L2]: requireEnv("REACT_APP_L2_WETH_GATEWAY_PROXY_ADDR"), } +export const SCROLL_MESSENGER_ADDR = { + [CHAIN_ID.L1]: requireEnv("REACT_APP_L1_SCROLL_MESSENGER"), + [CHAIN_ID.L2]: requireEnv("REACT_APP_L2_SCROLL_MESSENGER"), +} + export const USDC_GATEWAY_PROXY_ADDR = { [CHAIN_ID.L2]: requireEnv("REACT_APP_L2_USDC_GATEWAY_PROXY_ADDR"), } diff --git a/src/contexts/BridgeContextProvider.tsx b/src/contexts/BridgeContextProvider.tsx index e79df7c60..47fd0a60e 100644 --- a/src/contexts/BridgeContextProvider.tsx +++ b/src/contexts/BridgeContextProvider.tsx @@ -6,9 +6,11 @@ import useSWR, { mutate } from "swr" import { Alert, Snackbar } from "@mui/material" import { tokenListUrl } from "@/apis/dynamic" +import L1_SCROLL_MESSENGER_ABI from "@/assets/abis/L1ScrollMessenger.json" import L1_GATEWAY_ROUTER_PROXY_ABI from "@/assets/abis/L1_GATEWAY_ROUTER_PROXY_ADDR.json" +import L2_SCROLL_MESSENGER_ABI from "@/assets/abis/L2ScrollMessenger.json" import L2_GATEWAY_ROUTER_PROXY_ABI from "@/assets/abis/L2_GATEWAY_ROUTER_PROXY_ADDR.json" -import { CHAIN_ID, ETH_SYMBOL, GATEWAY_ROUTE_PROXY_ADDR, NATIVE_TOKEN_LIST, RPC_URL } from "@/constants" +import { CHAIN_ID, ETH_SYMBOL, GATEWAY_ROUTE_PROXY_ADDR, NATIVE_TOKEN_LIST, RPC_URL, SCROLL_MESSENGER_ADDR } from "@/constants" import { BLOCK_NUMBERS, BRIDGE_TOKEN_SYMBOL, USER_TOKEN_LIST } from "@/constants/storageKey" import { useRainbowContext } from "@/contexts/RainbowProvider" import useBlockNumbers from "@/hooks/useBlockNumbers" @@ -58,7 +60,7 @@ const BridgeContextProvider = ({ children }: any) => { // TODO: need refactoring inspired by publicClient and walletClient const update = async (walletProvider: BrowserProvider, address: string) => { - let l1signer, l2signer, l1Gateway, l2Gateway, l1Provider, l2Provider, l1ProviderForSafeBlock + let l1signer, l2signer, l1Gateway, l2Gateway, l1Provider, l2Provider, l1ProviderForSafeBlock, l1ScrollMessenger, l2ScrollMessenger if (chainId === CHAIN_ID.L1) { l1Provider = walletProvider l2Provider = await new JsonRpcProvider(RPC_URL.L2) @@ -77,12 +79,15 @@ const BridgeContextProvider = ({ children }: any) => { } // TODO: publicProvider l1ProviderForSafeBlock = await new JsonRpcProvider(RPC_URL.L1) + l1ScrollMessenger = new ethers.Contract(SCROLL_MESSENGER_ADDR[CHAIN_ID.L1], L1_SCROLL_MESSENGER_ABI, l1signer) + l2ScrollMessenger = new ethers.Contract(SCROLL_MESSENGER_ADDR[CHAIN_ID.L2], L2_SCROLL_MESSENGER_ABI, l2signer) setNetworksAndSigners({ [CHAIN_ID.L1]: { provider: l1Provider, signer: l1signer, gateway: l1Gateway, + scrollMessenger: l1ScrollMessenger, }, [`${CHAIN_ID.L1}ForSafeBlock`]: { provider: l1ProviderForSafeBlock, @@ -91,6 +96,7 @@ const BridgeContextProvider = ({ children }: any) => { provider: l2Provider, signer: l2signer, gateway: l2Gateway, + scrollMessenger: l2ScrollMessenger, }, }) } diff --git a/src/contexts/PriceFeeProvider.tsx b/src/contexts/PriceFeeProvider.tsx index 8f6487715..a2eedb7b5 100644 --- a/src/contexts/PriceFeeProvider.tsx +++ b/src/contexts/PriceFeeProvider.tsx @@ -42,7 +42,7 @@ enum GatewayType { // For USDC, Lido, and DAI, can use the STANDARD_ERC20_GATEWAY const Address2GatewayType = { - [requireEnv("REACT_APP_L1_ETH_GATEWAY_PROXY_ADDR")]: GatewayType.ETH_GATEWAY, + ETH_GATEWAY: GatewayType.ETH_GATEWAY, [requireEnv("REACT_APP_L1_WETH_GATEWAY_PROXY_ADDR")]: GatewayType.WETH_GATEWAY, [requireEnv("REACT_APP_L1_CUSTOM_ERC20_GATEWAY_PROXY_ADDR")]: GatewayType.CUSTOM_ERC20_GATEWAY, [requireEnv("REACT_APP_L1_STANDARD_ERC20_GATEWAY_PROXY_ADDR")]: GatewayType.STANDARD_ERC20_GATEWAY, @@ -77,7 +77,10 @@ const Contracts = { }, SCROLL_MESSENGER: { abi: require("@/assets/abis/L2ScrollMessenger.json"), env: "REACT_APP_L2_SCROLL_MESSENGER" }, L1_GAS_PRICE_ORACLE: { abi: require("@/assets/abis/L1GasPriceOracle.json"), env: "REACT_APP_L1_GAS_PRICE_ORACLE" }, - L2_GAS_PRICE_ORACLE: { abi: require("@/assets/abis/L2GasPriceOracle.json"), env: "REACT_APP_L2_GAS_PRICE_ORACLE" }, + L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE: { + abi: require("@/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json"), + env: "REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE", + }, L1_GATEWAY_ROUTER_PROXY: { abi: require("@/assets/abis/L1_GATEWAY_ROUTER_PROXY_ADDR.json"), env: "REACT_APP_L1_GATEWAY_ROUTER_PROXY_ADDR" }, } @@ -149,8 +152,8 @@ export const PriceFeeProvider = ({ children }) => { const getGasPrice = async () => { try { - const L2GasPriceOracleContract = getContract("L2_GAS_PRICE_ORACLE", networksAndSigners[CHAIN_ID.L1].provider) - const gasPrice = await L2GasPriceOracleContract.l2BaseFee() + const L1MessageQueueWithGasPriceOracleContract = getContract("L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE", networksAndSigners[CHAIN_ID.L1].provider) + const gasPrice = await L1MessageQueueWithGasPriceOracleContract.l2BaseFee() return (gasPrice * BigInt(120)) / BigInt(100) } catch (err) { // console.log(err) @@ -160,7 +163,7 @@ export const PriceFeeProvider = ({ children }) => { const getGasLimit = async () => { if (l2Token.symbol === ETH_SYMBOL) { - return await getGasLimitGeneric(requireEnv(`REACT_APP_L1_ETH_GATEWAY_PROXY_ADDR`)) + return await getGasLimitGeneric("ETH_GATEWAY") } const { provider } = networksAndSigners[CHAIN_ID.L2] @@ -221,23 +224,32 @@ export const PriceFeeProvider = ({ children }) => { const { provider: l1Provider } = networksAndSigners[CHAIN_ID.L1] const { provider: l2Provider } = networksAndSigners[CHAIN_ID.L2] const gatewayType = Address2GatewayType[l1GatewayAddress] - - const gateway = getContract(gatewayType, l2Provider) + let accountOrAddress1, accountOrAddress2, message const l2messenger = getContract("SCROLL_MESSENGER", l2Provider) const { finalizeDepositMethod, finalizeDepositParams } = messageDataGeneric(l1GatewayAddress) - const message = gateway.interface.encodeFunctionData(finalizeDepositMethod, finalizeDepositParams) - const l1Gateway = new ethers.Contract(l1GatewayAddress, Contracts[gatewayType].abi, l1Provider) - const l2GatewayAddress = await l1Gateway.counterpart() + + if ([GatewayType.ETH_GATEWAY].includes(gatewayType)) { + accountOrAddress1 = walletCurrentAddress + accountOrAddress2 = walletCurrentAddress + message = "0x" + } else { + const l1Gateway = new ethers.Contract(l1GatewayAddress, Contracts[gatewayType].abi, l1Provider) + const l2GatewayAddress = await l1Gateway.counterpart() + accountOrAddress1 = l1GatewayAddress + accountOrAddress2 = l2GatewayAddress + message = getContract(gatewayType, l2Provider).interface.encodeFunctionData(finalizeDepositMethod, finalizeDepositParams) + } const calldata = l2messenger.interface.encodeFunctionData("relayMessage", [ - l1GatewayAddress, // l1 gateway - l2GatewayAddress, // l2 gateway + accountOrAddress1, + accountOrAddress2, [GatewayType.ETH_GATEWAY, GatewayType.WETH_GATEWAY].includes(gatewayType) ? amount : 0, ethers.MaxUint256, message, ]) + try { const gaslimit = await l2Provider.estimateGas({ from: "0x" + (BigInt(requireEnv("REACT_APP_L1_SCROLL_MESSENGER")) + (BigInt(OFFSET) % BigInt(Math.pow(2, 160)))).toString(16), diff --git a/src/hooks/useEstimateSendTransaction.ts b/src/hooks/useEstimateSendTransaction.ts index e01144541..3fcc7a2cb 100644 --- a/src/hooks/useEstimateSendTransaction.ts +++ b/src/hooks/useEstimateSendTransaction.ts @@ -17,28 +17,31 @@ export function useEstimateSendTransaction(props) { const minimumAmount = BigInt(1) useEffect(() => { - const gateway = networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].gateway - if (gateway) { - setInstance(gateway) + const instance = selectedToken.native + ? networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].scrollMessenger + : networksAndSigners[fromNetwork.isL1 ? CHAIN_ID.L1 : CHAIN_ID.L2].gateway + if (instance) { + setInstance(instance) } - }, [networksAndSigners, fromNetwork]) + }, [networksAndSigners, fromNetwork, selectedToken.native]) const depositETH = async () => { const fee = gasPrice * gasLimit - return instance["depositETH(uint256,uint256)"].estimateGas(minimumAmount, gasLimit, { + return instance["sendMessage(address,uint256,bytes,uint256)"].estimateGas(walletCurrentAddress, minimumAmount, "0x", gasLimit, { value: minimumAmount + fee, }) } const depositERC20 = async () => { const fee = gasPrice * gasLimit + return instance["depositERC20(address,uint256,uint256)"].estimateGas(selectedToken.address, minimumAmount, gasLimit, { value: fee, }) } const withdrawETH = async () => { - return instance["withdrawETH(uint256,uint256)"].estimateGas(minimumAmount, 0, { + return instance["sendMessage(address,uint256,bytes,uint256)"].estimateGas(walletCurrentAddress, minimumAmount, "0x", 0, { value: minimumAmount, }) } diff --git a/src/hooks/useRetry.ts b/src/hooks/useRetry.ts index 349903d72..428943402 100644 --- a/src/hooks/useRetry.ts +++ b/src/hooks/useRetry.ts @@ -1,9 +1,8 @@ import { ethers } from "ethers" import { useState } from "react" -import L1MessageQueue from "@/assets/abis/L1MessageQueue.json" import L1ScrollMessenger from "@/assets/abis/L1ScrollMessenger.json" -import L2GasPriceOracle from "@/assets/abis/L2GasPriceOracle.json" +import L1MessageQueueWithGasPriceOracle from "@/assets/abis/L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE.json" import { CHAIN_ID } from "@/constants" import { useBridgeContext } from "@/contexts/BridgeContextProvider" import useTxStore from "@/stores/txStore" @@ -19,9 +18,12 @@ export function useRetry(props) { const replayMessage = async () => { const l2provider = networksAndSigners[CHAIN_ID.L2].provider const deployer = networksAndSigners[CHAIN_ID.L1].signer - const queue = new ethers.Contract(requireEnv("REACT_APP_L1_MESSAGE_QUEUE"), L1MessageQueue, deployer) const messenger = new ethers.Contract(requireEnv("REACT_APP_L1_SCROLL_MESSENGER"), L1ScrollMessenger, deployer) - const oracle = new ethers.Contract(requireEnv("REACT_APP_L2_GAS_PRICE_ORACLE"), L2GasPriceOracle, deployer) + const l1MessageQueueWithGasPriceOracleContract = new ethers.Contract( + requireEnv("REACT_APP_L1_MESSAGE_QUEUE_WITH_GAS_PRICE_ORACLE"), + L1MessageQueueWithGasPriceOracle, + deployer, + ) setLoading(true) try { @@ -31,7 +33,7 @@ export function useRetry(props) { for (const log of receipts.logs) { if (log.topics[0] === "0x69cfcb8e6d4192b8aba9902243912587f37e550d75c1fa801491fce26717f37e") { - const event = queue.interface.decodeEventLog("QueueTransaction", log.data, log.topics) + const event = l1MessageQueueWithGasPriceOracleContract.interface.decodeEventLog("QueueTransaction", log.data, log.topics) gasLimit = await l2provider.estimateGas({ from: event.sender, to: event.target, @@ -40,7 +42,7 @@ export function useRetry(props) { }) } else if (log.topics[0] === "0x104371f3b442861a2a7b82a070afbbaab748bb13757bf47769e170e37809ec1e") { const event = messenger.interface.decodeEventLog("SentMessage", log.data, log.topics) - const gasPirce = await oracle.estimateCrossDomainMessageFee((gasLimit * BigInt(12)) / BigInt(10)) + const gasPirce = await l1MessageQueueWithGasPriceOracleContract.estimateCrossDomainMessageFee((gasLimit * BigInt(12)) / BigInt(10)) await messenger.replayMessage( event.sender, diff --git a/src/hooks/useSendTransaction.ts b/src/hooks/useSendTransaction.ts index 0af03b023..dccb133fd 100644 --- a/src/hooks/useSendTransaction.ts +++ b/src/hooks/useSendTransaction.ts @@ -151,7 +151,13 @@ export function useSendTransaction(props) { options.maxPriorityFeePerGas = maxPriorityFeePerGas } - return networksAndSigners[CHAIN_ID.L1].gateway["depositETH(uint256,uint256)"](parsedAmount, gasLimit, options) + return networksAndSigners[CHAIN_ID.L1].scrollMessenger["sendMessage(address,uint256,bytes,uint256)"]( + walletCurrentAddress, + parsedAmount, + "0x", + gasLimit, + options, + ) } const depositERC20 = async () => { @@ -169,10 +175,16 @@ export function useSendTransaction(props) { } const withdrawETH = async () => { - return networksAndSigners[CHAIN_ID.L2].gateway["withdrawETH(uint256,uint256)"](parsedAmount, 0, { - value: parsedAmount, - gasLimit: txGasLimit, - }) + return networksAndSigners[CHAIN_ID.L2].scrollMessenger["sendMessage(address,uint256,bytes,uint256)"]( + walletCurrentAddress, + parsedAmount, + "0x", + 0, + { + value: parsedAmount, + gasLimit: txGasLimit, + }, + ) } const withdrawERC20 = async () => { From c2a0bd5b671d1bd1fe16ef173de1e1a87cef7a01 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Thu, 22 Feb 2024 16:24:40 +0800 Subject: [PATCH 07/81] =?UTF-8?q?Auto=20squash=20#977=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c780ffb7..65137c99d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.73", + "version": "5.0.74", "private": false, "license": "MIT", "scripts": { From a9080a2122202eb940ef58a18d5242d77380c40c Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Fri, 23 Feb 2024 21:00:28 +0800 Subject: [PATCH 08/81] add scroll audits (#979) --- src/components/Header/constants.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Header/constants.ts b/src/components/Header/constants.ts index 247be83a4..4b2910ba7 100644 --- a/src/components/Header/constants.ts +++ b/src/components/Header/constants.ts @@ -192,6 +192,12 @@ const mainnetNavigations = [ href: "https://community.scroll.io", isExternal: true, }, + { + label: "Audits", + key: "audits", + href: "https://github.com/scroll-tech/scroll-audits", + isExternal: true, + }, ], }, ], From 9824d0b6afceb8c6f1ad67fb87549d9da00828c1 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Fri, 23 Feb 2024 21:02:23 +0800 Subject: [PATCH 09/81] =?UTF-8?q?Auto=20squash=20#982=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65137c99d..0ea50b28a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.74", + "version": "5.0.75", "private": false, "license": "MIT", "scripts": { From fa2de555fcf38d3bba51698157d17aca6877306e Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Sat, 24 Feb 2024 16:53:31 +0800 Subject: [PATCH 10/81] add OKX Wallet (#983) --- src/contexts/RainbowProvider/configs.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/contexts/RainbowProvider/configs.tsx b/src/contexts/RainbowProvider/configs.tsx index 8904b10fc..324cf1cbe 100644 --- a/src/contexts/RainbowProvider/configs.tsx +++ b/src/contexts/RainbowProvider/configs.tsx @@ -6,7 +6,8 @@ import { frameWallet, imTokenWallet, injectedWallet, - metaMaskWallet, // okxWallet, + metaMaskWallet, + okxWallet, rabbyWallet, rainbowWallet, safeWallet, @@ -105,7 +106,7 @@ const walletConfigs: WalletConfig[] = [ createWalletConfig("Safe", () => safeWallet({ chains }), window.ethereum?.isSafeWallet === true), createWalletConfig("Frame", () => frameWallet({ chains }), window.ethereum?.isFrame === true), createWalletConfig("imToken", () => imTokenWallet({ chains, projectId }), window.ethereum?.isImToken === true), - // createWalletConfig("Okx Wallet", () => okxWallet({ chains, projectId }), window.okxwallet?.isOKExWallet || window.okxwallet?.isOkxWallet === true), + createWalletConfig("Okx Wallet", () => okxWallet({ chains, projectId }), window.okxwallet?.isOKExWallet || window.okxwallet?.isOkxWallet === true), createWalletConfig("Rabby", () => rabbyWallet({ chains }), window.ethereum?.isRabby && !window.ethereum?.isMetaMask === true), // Add any additional wallets here ] From 8206a43a84c48a9c6cae00b1e892beb27f89ef2d Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Sat, 24 Feb 2024 16:55:05 +0800 Subject: [PATCH 11/81] =?UTF-8?q?Auto=20squash=20#986=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ea50b28a..067d2ad16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.75", + "version": "5.0.76", "private": false, "license": "MIT", "scripts": { From 253fa02c3e390f743ffec5efd2b2d4bd0be5e70d Mon Sep 17 00:00:00 2001 From: zhengqi zhang <770166635@qq.com> Date: Wed, 28 Feb 2024 19:26:09 +0800 Subject: [PATCH 12/81] Update recruitment link address --- src/assets/blog/architecture.md | 2 +- src/assets/blog/pre-alpha-testnet.md | 2 +- src/assets/blog/technical-principles.md | 2 +- src/assets/blog/upgrading-pre-alpha-testnet.md | 2 +- src/assets/blog/vision-and-values.md | 2 +- src/pages/career/Header/index.tsx | 2 +- src/pages/career/Positions/index.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/assets/blog/architecture.md b/src/assets/blog/architecture.md index 46f39406a..4b2c8973e 100644 --- a/src/assets/blog/architecture.md +++ b/src/assets/blog/architecture.md @@ -74,4 +74,4 @@ If our vision of scaling Ethereum in an open and community-driven way resonates - If you are a ZK researcher, ZKP, Go or Solidity developer, or a GPU engineer, we are working on many interesting technical challenges at the edge of what’s possible. Come build cutting-edge solutions to these problems with us in the open! - If you love nurturing and growing ecosystems or communities, we are looking for developer advocates and community organizers to make sure we are building in a community-aligned and user-friendly way. -To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://jobs.lever.co/ScrollFoundation). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). +To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://boards.greenhouse.io/scrollio). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). diff --git a/src/assets/blog/pre-alpha-testnet.md b/src/assets/blog/pre-alpha-testnet.md index dff798da4..2bbc52022 100644 --- a/src/assets/blog/pre-alpha-testnet.md +++ b/src/assets/blog/pre-alpha-testnet.md @@ -39,4 +39,4 @@ To become an early tester or contributor, sign up to try out our pre-alpha testn - If you are a ZK researcher, ZKP, Go or Solidity developer, or a GPU engineer, we are working on many interesting technical challenges at the edge of what’s possible. Come build cutting-edge solutions to these problems with us in the open! - If you love nurturing and growing ecosystems or communities, we are looking for developer advocates and community organizers to make sure we are building in a community-aligned and user-friendly way. -To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://jobs.lever.co/ScrollFoundation). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](https://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](https://github.com/privacy-scaling-explorations/zkevm-circuits). +To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://boards.greenhouse.io/scrollio). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](https://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](https://github.com/privacy-scaling-explorations/zkevm-circuits). diff --git a/src/assets/blog/technical-principles.md b/src/assets/blog/technical-principles.md index 72571e0e3..de9e82af7 100644 --- a/src/assets/blog/technical-principles.md +++ b/src/assets/blog/technical-principles.md @@ -67,4 +67,4 @@ If our vision of scaling Ethereum in an open and community-driven way resonates - If you are a ZK researcher, ZKP, Go or Solidity developer, or a GPU engineer, we are working on many interesting technical challenges at the edge of what’s possible. Come build cutting-edge solutions to these problems with us in the open! - If you love nurturing and growing ecosystems or communities, we are looking for developer advocates and community organizers to make sure we are building in a community-aligned and user-friendly way. -To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://jobs.lever.co/ScrollFoundation). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). +To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://boards.greenhouse.io/scrollio). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). diff --git a/src/assets/blog/upgrading-pre-alpha-testnet.md b/src/assets/blog/upgrading-pre-alpha-testnet.md index 8ab91d18e..02902414e 100644 --- a/src/assets/blog/upgrading-pre-alpha-testnet.md +++ b/src/assets/blog/upgrading-pre-alpha-testnet.md @@ -44,4 +44,4 @@ To become an early tester or contributor, sign up to try out our Pre-Alpha Testn - If you love nurturing and growing ecosystems or communities, we are looking for developer advocates and community organizers to build with us in a community-aligned and user-friendly way. -To learn more about these roles, check out our [jobs page](https://jobs.lever.co/ScrollFoundation). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). +To learn more about these roles, check out our [jobs page](https://boards.greenhouse.io/scrollio). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](http://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](http://github.com/privacy-scaling-explorations/zkevm-circuits). diff --git a/src/assets/blog/vision-and-values.md b/src/assets/blog/vision-and-values.md index 9333f240f..7451b068d 100644 --- a/src/assets/blog/vision-and-values.md +++ b/src/assets/blog/vision-and-values.md @@ -47,4 +47,4 @@ If our vision of scaling Ethereum in an open and community-driven way resonates - If you are a ZK researcher, ZKP, Go or Solidity developer, or a GPU engineer, we are working on many interesting technical challenges at the edge of what’s possible. Come build cutting-edge solutions to these problems with us in the open! - If you love nurturing and growing ecosystems or communities, we are looking for developer advocates and community organizers to make sure we are building in a community-aligned and user-friendly way. -To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://jobs.lever.co/ScrollFoundation). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](https://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](https://github.com/privacy-scaling-explorations/zkevm-circuits). +To learn more about these roles and about Scroll, check out our [website](https://scroll.io/), [Twitter](https://twitter.com/Scroll_ZKP), [Discord](https://discord.gg/scroll), or [jobs page](https://boards.greenhouse.io/scrollio). If you want to get straight to the code and build with us, you can find our repos at [github.com/scroll-tech](https://github.com/scroll-tech) and [github.com/privacy-scaling-explorations/zkevm-circuits](https://github.com/privacy-scaling-explorations/zkevm-circuits). diff --git a/src/pages/career/Header/index.tsx b/src/pages/career/Header/index.tsx index 68b4d3058..d94788ecf 100644 --- a/src/pages/career/Header/index.tsx +++ b/src/pages/career/Header/index.tsx @@ -83,7 +83,7 @@ const Header = () => { - diff --git a/src/pages/career/Positions/index.tsx b/src/pages/career/Positions/index.tsx index 1f47d5a01..2e3a777f4 100644 --- a/src/pages/career/Positions/index.tsx +++ b/src/pages/career/Positions/index.tsx @@ -55,7 +55,7 @@ const Positions = () => { Join Scroll and contribute in
building the best L2 product in the web3 world. -
From fbfc44e8d6862295d7ccb58691e6983a77cb4c3e Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Wed, 28 Feb 2024 19:27:46 +0800 Subject: [PATCH 13/81] =?UTF-8?q?Auto=20squash=20#991=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 067d2ad16..520ae870f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.76", + "version": "5.0.77", "private": false, "license": "MIT", "scripts": { From 97c804a5a7feb634e529a14686bb6912a3d15000 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Wed, 28 Feb 2024 21:01:48 +0800 Subject: [PATCH 14/81] =?UTF-8?q?Auto=20squash=20#994=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 520ae870f..4f433ab0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.77", + "version": "5.0.78", "private": false, "license": "MIT", "scripts": { From 6da6a163538387d3861e72c71ef92a2fd5bf255f Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Sat, 9 Mar 2024 08:57:47 +0800 Subject: [PATCH 15/81] Allow user to specify a different receiver address (#999) * Allow user to specify a different receiver address * Update style * Update style --- src/assets/svgs/bridge/edit.svg | 10 ++ src/assets/svgs/bridge/remove.svg | 3 + src/hooks/useSendTransaction.ts | 27 +++- .../SendTransaction/CustomiseRecipient.tsx | 128 ++++++++++++++++++ .../bridge/Send/SendTransaction/index.tsx | 14 ++ 5 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 src/assets/svgs/bridge/edit.svg create mode 100644 src/assets/svgs/bridge/remove.svg create mode 100644 src/pages/bridge/Send/SendTransaction/CustomiseRecipient.tsx diff --git a/src/assets/svgs/bridge/edit.svg b/src/assets/svgs/bridge/edit.svg new file mode 100644 index 000000000..762c8e7d4 --- /dev/null +++ b/src/assets/svgs/bridge/edit.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/assets/svgs/bridge/remove.svg b/src/assets/svgs/bridge/remove.svg new file mode 100644 index 000000000..c6bdb4601 --- /dev/null +++ b/src/assets/svgs/bridge/remove.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/hooks/useSendTransaction.ts b/src/hooks/useSendTransaction.ts index dccb133fd..03aec4227 100644 --- a/src/hooks/useSendTransaction.ts +++ b/src/hooks/useSendTransaction.ts @@ -19,7 +19,7 @@ type TxOptions = { } export function useSendTransaction(props) { - const { amount: fromTokenAmount, selectedToken } = props + const { amount: fromTokenAmount, selectedToken, receiver } = props const { walletCurrentAddress } = useRainbowContext() const { networksAndSigners, blockNumbers } = useBridgeContext() const { enlargedGasLimit: txGasLimit, maxFeePerGas, maxPriorityFeePerGas } = useGasFee(selectedToken, false) @@ -152,7 +152,7 @@ export function useSendTransaction(props) { } return networksAndSigners[CHAIN_ID.L1].scrollMessenger["sendMessage(address,uint256,bytes,uint256)"]( - walletCurrentAddress, + receiver || walletCurrentAddress, parsedAmount, "0x", gasLimit, @@ -171,12 +171,22 @@ export function useSendTransaction(props) { options.maxPriorityFeePerGas = maxPriorityFeePerGas } + if (receiver) { + return networksAndSigners[CHAIN_ID.L1].gateway["depositERC20(address,address,uint256,uint256)"]( + selectedToken.address, + receiver, + parsedAmount, + gasLimit, + options, + ) + } + return networksAndSigners[CHAIN_ID.L1].gateway["depositERC20(address,uint256,uint256)"](selectedToken.address, parsedAmount, gasLimit, options) } const withdrawETH = async () => { return networksAndSigners[CHAIN_ID.L2].scrollMessenger["sendMessage(address,uint256,bytes,uint256)"]( - walletCurrentAddress, + receiver || walletCurrentAddress, parsedAmount, "0x", 0, @@ -188,6 +198,17 @@ export function useSendTransaction(props) { } const withdrawERC20 = async () => { + if (receiver) { + return networksAndSigners[CHAIN_ID.L2].gateway["withdrawERC20(address,address,uint256,uint256)"]( + selectedToken.address, + receiver, + parsedAmount, + 0, + { + gasLimit: txGasLimit, + }, + ) + } return networksAndSigners[CHAIN_ID.L2].gateway["withdrawERC20(address,uint256,uint256)"](selectedToken.address, parsedAmount, 0, { gasLimit: txGasLimit, }) diff --git a/src/pages/bridge/Send/SendTransaction/CustomiseRecipient.tsx b/src/pages/bridge/Send/SendTransaction/CustomiseRecipient.tsx new file mode 100644 index 000000000..d2f98ce42 --- /dev/null +++ b/src/pages/bridge/Send/SendTransaction/CustomiseRecipient.tsx @@ -0,0 +1,128 @@ +import { isAddress } from "ethers" +import { useEffect, useMemo, useState } from "react" +import { makeStyles } from "tss-react/mui" + +import { Box, InputBase, Stack, SvgIcon, Typography } from "@mui/material" + +import { ReactComponent as EditSvg } from "@/assets/svgs/bridge/edit.svg" +import { ReactComponent as RemoveSvg } from "@/assets/svgs/bridge/remove.svg" +import { ReactComponent as WarningSvg } from "@/assets/svgs/bridge/warning.svg" +import TextButton from "@/components/TextButton" + +const useStyles = makeStyles()(theme => ({ + title: { + fontSize: "1.8rem", + lineHeight: "3.6rem", + fontWeight: 500, + textAlign: "left", + cursor: "pointer", + color: "#101010", + [theme.breakpoints.down("md")]: { + lineHeight: "1", + }, + }, + disabledButton: { + pointerEvents: "none", + color: "#EBC28E", + }, + readOnlyButton: { + pointerEvents: "none", + }, +})) + +const CustomiseRecipient = props => { + const { handleChangeRecipient, bridgeWarning, disabled, readOnly } = props + const { classes, cx } = useStyles() + + const [isEditing, setIsEditing] = useState(false) + + const [recipient, setRecipient] = useState("") + const [isValidate, setIsValidate] = useState(false) + + const handleChangeAddress = recipient => { + setRecipient(recipient.trim()) + } + + useEffect(() => { + if (isAddress(recipient)) { + handleChangeRecipient(recipient) + setIsValidate(true) + } else { + handleChangeRecipient(null) + setIsValidate(false) + } + }, [recipient]) + + useEffect(() => { + if (!isEditing) { + setRecipient("") + } + }, [isEditing]) + + const showErrorMessage = useMemo(() => { + return recipient && !isValidate && !(!!bridgeWarning && bridgeWarning !== ">0") + }, [isValidate, recipient, bridgeWarning]) + return ( + 0" ? "0.3" : 1 }}> + {isEditing ? ( + + + + Customise recipient + + setIsEditing(false)} className={classes.title}> + + Remove + + + + handleChangeAddress(v.target.value)} + placeholder="Enter a different wallet address" + value={recipient} + /> + + + ) : ( + setIsEditing(true)} + > + Customise recipient + + + )} + {showErrorMessage ? ( + + + + Invalid wallet address + + + ) : null} + + ) +} + +export default CustomiseRecipient diff --git a/src/pages/bridge/Send/SendTransaction/index.tsx b/src/pages/bridge/Send/SendTransaction/index.tsx index b3f8c3a30..40e8b8bb9 100644 --- a/src/pages/bridge/Send/SendTransaction/index.tsx +++ b/src/pages/bridge/Send/SendTransaction/index.tsx @@ -23,6 +23,7 @@ import { amountToBN, switchNetwork, trimErrorMessage } from "@/utils" import ApprovalDialog from "./ApprovalDialog" import BalanceInput from "./BalanceInput" +import CustomiseRecipient from "./CustomiseRecipient" import NetworkDirection from "./NetworkDirection" import TransactionSummary from "./TransactionSummary" @@ -45,6 +46,7 @@ const SendTransaction = props => { const [inputError, setInputError] = useState(false) const [approvalVisible, setApprovalVisible] = useState(false) + const [recipient, setRecipient] = useState(null) const validAmount = useMemo(() => (Number(amount) > 0 ? amount : ""), [amount]) @@ -70,6 +72,7 @@ const SendTransaction = props => { } = useSendTransaction({ amount: validAmount, selectedToken, + receiver: recipient, }) // fee start @@ -209,6 +212,10 @@ const SendTransaction = props => { approve(isMaximum) } + const handleChangeRecipient = recipient => { + setRecipient(recipient) + } + const renderButton = () => { if (!chainId) { return ( @@ -301,6 +308,13 @@ const SendTransaction = props => { )} + + Date: Sat, 9 Mar 2024 09:00:00 +0800 Subject: [PATCH 16/81] =?UTF-8?q?Auto=20squash=20#1002=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f433ab0a..5d6e48334 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.78", + "version": "5.0.79", "private": false, "license": "MIT", "scripts": { From 383c5d4fc1653e66de5c34760e96f794e275b091 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Wed, 13 Mar 2024 15:27:47 +0800 Subject: [PATCH 17/81] Close origin nft (#1006) * close origin nft * adjust logic --- src/constants/nft.ts | 2 + .../developer-nft/mint/home/ReadyToMint.tsx | 54 ++++++++++++------- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/constants/nft.ts b/src/constants/nft.ts index 31045c316..cf7cc47d2 100644 --- a/src/constants/nft.ts +++ b/src/constants/nft.ts @@ -17,6 +17,8 @@ export const EndDate = dayjs("2023-12-09T23:00:00Z").subtract(1, "ms") export const MintableDate = dayjs("2023-12-14T23:00:00Z") // 1702594800 +export const MintableEndDate = dayjs("2024-03-29T23:59:59Z") + export const ContractReleaseDate = dayjs("2023-12-14T11:30:42Z") export const NFT_RARITY_MAP = { diff --git a/src/pages/developer-nft/mint/home/ReadyToMint.tsx b/src/pages/developer-nft/mint/home/ReadyToMint.tsx index 66b77ee14..e64b836b9 100644 --- a/src/pages/developer-nft/mint/home/ReadyToMint.tsx +++ b/src/pages/developer-nft/mint/home/ReadyToMint.tsx @@ -1,4 +1,5 @@ import { useState } from "react" +import Countdown, { zeroPad } from "react-countdown" import ReactGA from "react-ga4" import { Box, Stack, Typography } from "@mui/material" @@ -10,7 +11,7 @@ import Button from "@/components/Button" import Link from "@/components/Link" import RequestWarning from "@/components/RequestWarning" import { ANNOUNCING_SCROLL_ORIGINS_NFT, ContractReleaseDate, DESIGNING_SCROLL_ORIGINS } from "@/constants" -import { CHAIN_ID, L2_NAME, SCROLL_ORIGINS_NFT } from "@/constants" +import { CHAIN_ID, L2_NAME, MintableEndDate, SCROLL_ORIGINS_NFT } from "@/constants" import { useRainbowContext } from "@/contexts/RainbowProvider" import useCheckViewport from "@/hooks/useCheckViewport" import useNFTStore from "@/stores/nftStore" @@ -65,8 +66,15 @@ const MintHome = props => { }) } - const renderAction = () => { + const renderAction = (end = false) => { if (chainId === CHAIN_ID.L2) { + if (end) { + return ( + + ) + } return ( - } /> From 461c6665154a6291aab754ec927e2046a934a5aa Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Mon, 22 Apr 2024 15:49:16 +0800 Subject: [PATCH 29/81] =?UTF-8?q?Auto=20squash=20#1030=20=E2=80=89[bot]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb7df9365..4e4289955 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scroll.io", - "version": "5.0.84", + "version": "5.0.85", "private": false, "license": "MIT", "scripts": { From c2153fa1c6063012c80c3b929f54beb146025d71 Mon Sep 17 00:00:00 2001 From: zzq0826 <770166635@qq.com> Date: Sun, 28 Apr 2024 11:03:05 +0800 Subject: [PATCH 30/81] Update blog style (#1031) --- src/assets/svgs/common/back.svg | 3 +++ src/index.css | 21 ++++++++++++++----- src/pages/blog/components/tableOfContents.tsx | 9 ++++---- src/pages/blog/detail.tsx | 20 +++++++----------- 4 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 src/assets/svgs/common/back.svg diff --git a/src/assets/svgs/common/back.svg b/src/assets/svgs/common/back.svg new file mode 100644 index 000000000..312822add --- /dev/null +++ b/src/assets/svgs/common/back.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/index.css b/src/index.css index a773d4baf..78d6b74b9 100644 --- a/src/index.css +++ b/src/index.css @@ -29,7 +29,7 @@ body { /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; */ - font-family: "TransSansPremium"; + font-family: var(--default-font-family); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-ligatures: no-contextual; @@ -108,6 +108,11 @@ onboard-v2 .outer-container icon { } } +div.markdown-body { + max-width: 76rem; + font-family: var(--default-font-family); +} + div.markdown-body h1, div.markdown-body h2, div.markdown-body h3 { @@ -118,6 +123,12 @@ div.markdown-body h3 { list-style-type: decimal; } +div.markdown-body a { + color: #ff684b; + font-weight: 600; + text-decoration: underline; +} + div.markdown-body img { background-color: transparent; } @@ -129,11 +140,10 @@ div.markdown-body img { .header-link { font-size: 1.6rem; font-weight: 400; - padding-left: 1em; cursor: pointer; display: block; - line-height: normal; - margin: 0.5rem 0; + line-height: 1.5; + margin: 1.2rem 0; padding-right: 1.8em; transition: all 0.2s; } @@ -141,7 +151,8 @@ div.markdown-body img { .header-link.active, .header-link:hover, .header-link:focus { - font-weight: 500; + font-weight: 600; + color: #ff684b; } .header-link a { diff --git a/src/pages/blog/components/tableOfContents.tsx b/src/pages/blog/components/tableOfContents.tsx index 336b65e9f..5b848d467 100644 --- a/src/pages/blog/components/tableOfContents.tsx +++ b/src/pages/blog/components/tableOfContents.tsx @@ -2,10 +2,11 @@ import type { FC } from "react" import { useEffect, useRef, useState } from "react" import { Link as RouterLink, useLocation } from "react-router-dom" -import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos" -import { Typography } from "@mui/material" +import { SvgIcon, Typography } from "@mui/material" import { styled } from "@mui/system" +import { ReactComponent as BackSvg } from "@/assets/svgs/common/back.svg" + const Link = styled(RouterLink)({ display: "flex", alignItems: "center", @@ -102,8 +103,8 @@ const TableOfContents: FC = () => {