= props => {
24 | const { classes: styles } = useStyles()
25 | return (
26 |
27 |
28 | {props.content}
29 |
30 |
31 | )
32 | }
33 |
34 | export default FeeDetails
35 |
--------------------------------------------------------------------------------
/src/app/bridge/faq/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Bridge FAQ",
5 | relativeURL: "/bridge/faq",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/bridge/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Bridge",
5 | relativeURL: "/bridge",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/community/Events/Error.tsx:
--------------------------------------------------------------------------------
1 | import { Stack, Typography } from "@mui/material"
2 |
3 | import ErrorSvg from "@/assets/svgs/ecosystem/error.svg"
4 | import useCheckViewport from "@/hooks/useCheckViewport"
5 |
6 | const Error = props => {
7 | const { title, action, ...restProps } = props
8 | const { isMobile } = useCheckViewport()
9 | return (
10 |
11 |
12 | {title}
13 | {action}
14 |
15 | )
16 | }
17 |
18 | export default Error
19 |
--------------------------------------------------------------------------------
/src/app/community/Events/NoData.tsx:
--------------------------------------------------------------------------------
1 | import { Stack, Typography } from "@mui/material"
2 |
3 | import EmptySvg from "@/assets/svgs/ecosystem/empty.svg"
4 | import useCheckViewport from "@/hooks/useCheckViewport"
5 |
6 | const NoData = props => {
7 | const { title, description, ...restProps } = props
8 | const { isMobile } = useCheckViewport()
9 | return (
10 |
11 |
12 | {title}
13 | {description}
14 |
15 | )
16 | }
17 |
18 | export default NoData
19 |
--------------------------------------------------------------------------------
/src/app/community/Globe/mainscene/countryMesh/delaunay.ts:
--------------------------------------------------------------------------------
1 | import Delaunator from "./delaunator"
2 | import { pointInPolygon } from "./pointInPolygon"
3 |
4 | function delaunay(pointsArr: string | any[], polygon: any) {
5 | var indexArr = (Delaunator.from(pointsArr) as any).triangles
6 |
7 | var usefulIndexArr: any = []
8 |
9 | for (var i = 0; i < indexArr.length; i += 3) {
10 | var p1 = pointsArr[indexArr[i]]
11 | var p2 = pointsArr[indexArr[i + 1]]
12 | var p3 = pointsArr[indexArr[i + 2]]
13 |
14 | var triangleCentroid = [(p1[0] + p2[0] + p3[0]) / 3, (p1[1] + p2[1] + p3[1]) / 3]
15 | if (pointInPolygon(triangleCentroid, polygon)) {
16 | usefulIndexArr.push(indexArr[i + 2], indexArr[i + 1], indexArr[i])
17 | }
18 | }
19 | return usefulIndexArr
20 | }
21 | export { delaunay }
22 |
--------------------------------------------------------------------------------
/src/app/community/Globe/mainscene/countryMesh/math.ts:
--------------------------------------------------------------------------------
1 | function lon2xyz(R: number, longitude: number, latitude: number) {
2 | var lon = (longitude * Math.PI) / 180
3 | var lat = (latitude * Math.PI) / 180
4 | lon = -lon
5 |
6 | var x = R * Math.cos(lat) * Math.cos(lon)
7 | var y = R * Math.sin(lat)
8 | var z = R * Math.cos(lat) * Math.sin(lon)
9 |
10 | return {
11 | x: x,
12 | y: y,
13 | z: z,
14 | }
15 | }
16 |
17 | export { lon2xyz }
18 |
--------------------------------------------------------------------------------
/src/app/community/Globe/mainscene/countryMesh/pointInPolygon.ts:
--------------------------------------------------------------------------------
1 | function pointInPolygon(point: any[], vs: string | any[]) {
2 | var x = point[0],
3 | y = point[1]
4 | var inside = false
5 | for (var i = 0, j = vs.length - 1; i < vs.length; j = i++) {
6 | var xi = vs[i][0],
7 | yi = vs[i][1]
8 | var xj = vs[j][0],
9 | yj = vs[j][1]
10 | var intersect = yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi
11 | if (intersect) inside = !inside
12 | }
13 | return inside
14 | }
15 | export { pointInPolygon }
16 |
--------------------------------------------------------------------------------
/src/app/community/layout.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | export const generateMetadata = genMeta(() => ({
7 | titleSuffix: "Community",
8 | relativeURL: "/community",
9 | ogImg: "/og_community.png",
10 | twitterImg: "/twitter_community.png",
11 | }))
12 |
13 | export default function Layout({ children }) {
14 | if (isSepolia) {
15 | notFound()
16 | }
17 | return <>{children}>
18 | }
19 |
--------------------------------------------------------------------------------
/src/app/community/page.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import dynamic from "next/dynamic"
4 | import { makeStyles } from "tss-react/mui"
5 |
6 | import { Box } from "@mui/material"
7 |
8 | import Events from "./Events"
9 | import Join from "./Join"
10 |
11 | const Globe = dynamic(() => import("./Globe"), { ssr: false })
12 |
13 | const useStyles = makeStyles()(() => ({
14 | container: {
15 | marginTop: "-6.5rem",
16 | paddingTop: "6.5rem",
17 | overflow: "hidden",
18 | },
19 | }))
20 |
21 | const Community = () => {
22 | const { classes } = useStyles()
23 |
24 | return (
25 |
30 | )
31 | }
32 |
33 | export default Community
34 |
--------------------------------------------------------------------------------
/src/app/developer-nft/components/NFTCard/NFTImage.tsx:
--------------------------------------------------------------------------------
1 | import Img from "react-cool-img"
2 |
3 | import { Box } from "@mui/material"
4 |
5 | const NFTImage = props => {
6 | const { sx, src } = props
7 |
8 | return (
9 |
10 |
11 |
12 | )
13 | }
14 |
15 | export default NFTImage
16 |
--------------------------------------------------------------------------------
/src/app/developer-nft/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Scroll Origins NFT",
5 | relativeURL: "/developer-nft",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/developer-nft/mint/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import NFTContextProvider from "@/contexts/NFTContextProvider"
4 | import { isSepolia } from "@/utils"
5 | import { genMeta } from "@/utils/route"
6 |
7 | import MintHome from "./home"
8 |
9 | export const generateMetadata = genMeta(() => ({
10 | titleSuffix: "Scroll Origins NFT",
11 | relativeURL: "/developer-nft/mint",
12 | ogImg: "/og_scroll_origins_nft.png",
13 | twitterImg: "/twitter_scroll_origins_nft.png",
14 | }))
15 |
16 | const Mint = () => {
17 | if (isSepolia) {
18 | notFound()
19 | }
20 | return (
21 |
22 |
23 |
24 | )
25 | }
26 |
27 | export default Mint
28 |
--------------------------------------------------------------------------------
/src/app/developer-nft/page.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { useRouter } from "next/navigation"
4 |
5 | const DeveloperNFT = () => {
6 | const router = useRouter()
7 |
8 | router.replace("/developer-nft/mint")
9 | return null
10 | }
11 |
12 | export default DeveloperNFT
13 |
--------------------------------------------------------------------------------
/src/app/ecosystem/Protocols/ProtocolList/Error.tsx:
--------------------------------------------------------------------------------
1 | import { Stack, Typography } from "@mui/material"
2 |
3 | import ErrorSvg from "@/assets/svgs/ecosystem/error.svg"
4 | import useCheckViewport from "@/hooks/useCheckViewport"
5 |
6 | const Error = props => {
7 | const { title, action, ...restProps } = props
8 | const { isMobile } = useCheckViewport()
9 | return (
10 |
11 |
12 |
20 | {title}
21 |
22 | {action}
23 |
24 | )
25 | }
26 |
27 | export default Error
28 |
--------------------------------------------------------------------------------
/src/app/ecosystem/Protocols/ProtocolList/NetworkLabel.tsx:
--------------------------------------------------------------------------------
1 | import { makeStyles } from "tss-react/mui"
2 |
3 | import { Chip } from "@mui/material"
4 |
5 | const useStyles = makeStyles()(theme => ({
6 | root: {
7 | height: "auto",
8 | padding: "0.4rem 1.2rem",
9 | borderRadius: "1.6rem",
10 | backgroundColor: theme.vars.palette.themeBackground.light,
11 | },
12 | label: {
13 | fontSize: "1.6rem",
14 | lineHeight: 1.5,
15 | fontWeight: 600,
16 | padding: 0,
17 | color: "#84623A",
18 | },
19 | }))
20 |
21 | const NetworkLabel = props => {
22 | const { children, ...restProps } = props
23 | const { classes } = useStyles()
24 | return
25 | }
26 | export default NetworkLabel
27 |
--------------------------------------------------------------------------------
/src/app/ecosystem/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | import Contribute from "./Contribute"
7 | import Header from "./Header"
8 | import Highlights from "./Highlights"
9 | import Protocols from "./Protocols"
10 |
11 | export const generateMetadata = genMeta(() => ({
12 | titleSuffix: "Ecosystem",
13 | relativeURL: "/ecosystem",
14 | }))
15 |
16 | const Ecosystem = () => {
17 | if (isSepolia) {
18 | notFound()
19 | }
20 | return (
21 | <>
22 |
23 |
24 |
25 |
26 | >
27 | )
28 | }
29 |
30 | export default Ecosystem
31 |
--------------------------------------------------------------------------------
/src/app/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/app/favicon.ico
--------------------------------------------------------------------------------
/src/app/global-error.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as Sentry from "@sentry/nextjs"
4 | import NextError from "next/error"
5 | import { useEffect } from "react"
6 |
7 | export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
8 | useEffect(() => {
9 | Sentry.captureException(error)
10 | }, [error])
11 |
12 | return (
13 |
14 |
15 | {/* This is the default Next.js error component but it doesn't allow omitting the statusCode property yet. */}
16 |
17 |
18 |
19 | )
20 | }
21 |
--------------------------------------------------------------------------------
/src/app/join-us/page.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material"
2 |
3 | import { genMeta } from "@/utils/route"
4 |
5 | import Header from "./Header"
6 | import Mission from "./Mission"
7 | import News from "./News"
8 | import Perks from "./Perks"
9 | import Positions from "./Positions"
10 | import WorkApproach from "./WorkApproach"
11 |
12 | export const generateMetadata = genMeta(() => ({
13 | titleSuffix: "Join Us",
14 | relativeURL: "/join-us",
15 | }))
16 |
17 | const Career = () => {
18 | return (
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | )
28 | }
29 |
30 | export default Career
31 |
--------------------------------------------------------------------------------
/src/app/loading.tsx:
--------------------------------------------------------------------------------
1 | import LoadingPage from "@/components/LoadingPage"
2 |
3 | const Loading = () => {
4 | return
5 | }
6 |
7 | export default Loading
8 |
--------------------------------------------------------------------------------
/src/app/page.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils"
2 |
3 | import FounderClub from "./_components/FounderClub"
4 | import Hero from "./_components/Hero"
5 | import Portal from "./_components/Portal"
6 | import Tech from "./_components/Tech"
7 | import Vision from "./_components/Vision"
8 |
9 | export const generateMetadata = genMeta(() => ({
10 | titleSuffix: "Native zkEVM Layer 2 for Ethereum",
11 | }))
12 |
13 | const LandingPage = () => {
14 | return (
15 | <>
16 |
17 |
18 |
19 |
20 |
21 | >
22 | )
23 | }
24 |
25 | export default LandingPage
26 |
--------------------------------------------------------------------------------
/src/app/portal/TestFlow.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material"
2 |
3 | import Link from "@/components/Link"
4 | import { NAVIGATIONS } from "@/constants"
5 |
6 | import Descriptions, { DescriptionItem } from "./Descriptions"
7 |
8 | const TestFlow = () => {
9 | return (
10 |
11 | {NAVIGATIONS.map(item => (
12 |
13 |
14 | {item.name}
15 |
16 | {item.description}
17 |
18 | ))}
19 |
20 | )
21 | }
22 |
23 | export default TestFlow
24 |
--------------------------------------------------------------------------------
/src/app/portal/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Portal",
5 | relativeURL: "/portal",
6 | }))
7 |
8 | export default function PortalLayout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/privacy-policy/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Privacy Policy",
5 | relativeURL: "/privacy-policy",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/rollupscan/batch/[batchIndex]/blocks/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(async ({ params }) => {
4 | const { batchIndex } = await params
5 | return {
6 | titleSuffix: "Rollup Explorer: Block Details",
7 | relativeURL: `/rollupscan/batch/${batchIndex}/blocks`,
8 | }
9 | })
10 |
11 | export default function Layout({ children }) {
12 | return <>{children}>
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/rollupscan/batch/[batchIndex]/chunk/[chunkIndex]/blocks/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(async ({ params }) => {
4 | const { batchIndex, chunkIndex } = await params
5 | return {
6 | titleSuffix: "Rollup Explorer: Block Details",
7 | relativeURL: `/rollupscan/batch/${batchIndex}/chunk/${chunkIndex}/blocks`,
8 | }
9 | })
10 |
11 | export default function Layout({ children }) {
12 | return <>{children}>
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/rollupscan/batch/[batchIndex]/chunk/[chunkIndex]/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(async ({ params }) => {
4 | const { batchIndex, chunkIndex } = await params
5 | return {
6 | titleSuffix: "Rollup Explorer: Chunk Details",
7 | relativeURL: `/rollupscan/batch/${batchIndex}/chunk/${chunkIndex}`,
8 | }
9 | })
10 |
11 | export default function Layout({ children }) {
12 | return <>{children}>
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/rollupscan/batch/[batchIndex]/chunks/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(async ({ params }) => {
4 | const { batchIndex } = await params
5 |
6 | return {
7 | titleSuffix: "Rollup Explorer: Chunk List",
8 | relativeURL: `/rollupscan/batch/${batchIndex}/chunks`,
9 | }
10 | })
11 |
12 | export default function Layout({ children }) {
13 | return <>{children}>
14 | }
15 |
--------------------------------------------------------------------------------
/src/app/rollupscan/batch/[batchIndex]/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(async ({ params }) => {
4 | const { batchIndex } = await params
5 |
6 | return {
7 | titleSuffix: "Rollup Explorer: Batch Details",
8 | relativeURL: `/rollupscan/batch/${batchIndex}`,
9 | }
10 | })
11 |
12 | export default function Layout({ children }) {
13 | return <>{children}>
14 | }
15 |
--------------------------------------------------------------------------------
/src/app/rollupscan/components/Spinning.tsx:
--------------------------------------------------------------------------------
1 | import { Box, CircularProgress } from "@mui/material"
2 |
3 | const Spinning = () => {
4 | return (
5 |
6 |
7 |
8 | )
9 | }
10 |
11 | export default Spinning
12 |
--------------------------------------------------------------------------------
/src/app/rollupscan/components/Table.tsx:
--------------------------------------------------------------------------------
1 | import Table from "@mui/material/Table"
2 | import { styled } from "@mui/material/styles"
3 |
4 | const StyledTable = styled(Table)(({ theme }) => ({
5 | marginTop: "3rem",
6 | minWidth: 700,
7 | borderRadius: theme.shape.borderRadius,
8 | border: `1px solid ${theme.vars.palette.divider}`,
9 | borderCollapse: "separate",
10 | overflow: "hidden",
11 | [theme.breakpoints.down("sm")]: {
12 | marginTop: "1.2rem",
13 | },
14 | ".MuiTableCell-root": {
15 | whiteSpace: "nowrap",
16 | },
17 | }))
18 |
19 | export default StyledTable
20 |
--------------------------------------------------------------------------------
/src/app/rollupscan/components/TableCell.tsx:
--------------------------------------------------------------------------------
1 | import TableCell, { tableCellClasses } from "@mui/material/TableCell"
2 | import { styled } from "@mui/material/styles"
3 |
4 | const StyledTableCell = styled(TableCell)(({ theme }) => ({
5 | fontWeight: "500",
6 | color: theme.vars.palette.text.primary,
7 | [`&.${tableCellClasses.head}`]: {
8 | fontSize: 16,
9 | height: "6rem",
10 | },
11 | [`&.${tableCellClasses.body}`]: {
12 | fontSize: "1.6rem",
13 | height: "10rem",
14 | fontWeight: "500",
15 | },
16 | "&:nth-of-type(1)": {
17 | paddingLeft: "2.7rem",
18 | },
19 | }))
20 | export default StyledTableCell
21 |
--------------------------------------------------------------------------------
/src/app/rollupscan/components/Tooltip.tsx:
--------------------------------------------------------------------------------
1 | import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"
2 | import { Box, Tooltip as MuiTooltip, Typography } from "@mui/material"
3 |
4 | const Tooltip = props => {
5 | return (
6 |
7 |
8 |
9 | {props.name}
10 |
11 |
12 |
13 |
14 | )
15 | }
16 |
17 | export default Tooltip
18 |
--------------------------------------------------------------------------------
/src/app/rollupscan/constants.ts:
--------------------------------------------------------------------------------
1 | const DEFAULT_PAGE = 1,
2 | DEFAULT_PAGE_SIZE = 10
3 |
4 | export { DEFAULT_PAGE, DEFAULT_PAGE_SIZE }
5 |
--------------------------------------------------------------------------------
/src/app/rollupscan/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Rollup Explorer",
5 | relativeURL: "/rollupscan",
6 | }))
7 |
8 | export default function RollupscanLayout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/scrETH/Explaination/data.ts:
--------------------------------------------------------------------------------
1 | import RewardsSvg from "@/assets/svgs/defi/rewards.svg"
2 | import SecureSvg from "@/assets/svgs/defi/secure.svg"
3 | import UpSvg from "@/assets/svgs/defi/up.svg"
4 |
5 | const data = [
6 | {
7 | icon: RewardsSvg,
8 | title: "Get staking rewards",
9 | description: "ETH native PoS staking rewards.",
10 | },
11 | {
12 | icon: UpSvg,
13 | title: "Deep DeFi Integrations",
14 | description:
15 | "Earn additional rewards from Scroll Sessions and from Scroll's DeFi ecosystem by deploying scrETH to eligible DeFi destinations on Scroll.",
16 | },
17 | {
18 | icon: SecureSvg,
19 | title: "Liquid and secure",
20 | description: "scrETH can be traded, used as collateral or, in the future, help secure the set of AVSs that rely on them for economic security",
21 | },
22 | ]
23 |
24 | export default data
25 |
--------------------------------------------------------------------------------
/src/app/scrETH/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { genMeta } from "@/utils"
4 | import { isSepolia } from "@/utils"
5 |
6 | import Explaination from "./Explaination"
7 | import Header from "./Header"
8 |
9 | export const generateMetadata = genMeta(() => ({
10 | titleSuffix: "scrETH",
11 | relativeURL: "/scrETH",
12 | description: "Scroll's ecosystem native ETH LRT",
13 | ogImg: "/og_scrETH.png",
14 | twitterImg: "/twitter_scrETH.png",
15 | }))
16 |
17 | const ScrETHPage = () => {
18 | if (isSepolia) {
19 | notFound()
20 | }
21 | return (
22 | <>
23 |
24 |
25 | >
26 | )
27 | }
28 |
29 | export default ScrETHPage
30 |
--------------------------------------------------------------------------------
/src/app/sessions-terms-of-use/layout.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | export const generateMetadata = genMeta(() => ({
7 | titleSuffix: "Scroll Sessions Terms of Use",
8 | relativeURL: "/sessions-terms-of-use",
9 | }))
10 |
11 | export default function Layout({ children }) {
12 | if (isSepolia) {
13 | notFound()
14 | }
15 | return <>{children}>
16 | }
17 |
--------------------------------------------------------------------------------
/src/app/sessions/Guidance/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from "@mui/material"
2 |
3 | import { SESSIONS_EXPLORER_LIST } from "@/constants/sessions"
4 |
5 | import GuidanceCard from "./GuidanceCard"
6 |
7 | const Guidance = () => {
8 | return (
9 |
17 | {SESSIONS_EXPLORER_LIST.map(item => (
18 |
19 | ))}
20 |
21 | )
22 | }
23 |
24 | export default Guidance
25 |
--------------------------------------------------------------------------------
/src/app/sessions/components/StepCard/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Stack, Typography } from "@mui/material"
2 |
3 | const Card = props => {
4 | const { sx, title, children, ...restProps } = props
5 | return (
6 |
15 | {title}
16 | {children}
17 |
18 | )
19 | }
20 |
21 | export default Card
22 |
--------------------------------------------------------------------------------
/src/app/sessions/layout.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | export const generateMetadata = genMeta(() => ({
7 | titleSuffix: "Scroll Sessions",
8 | relativeURL: "/sessions",
9 | description: "Receive Marks for your engagement with Scroll. Join Sessions now!",
10 | ogImg: "/og_sessions.png",
11 | twitterImg: "/twitter_sessions.png",
12 | }))
13 |
14 | export default function SessionsLayout({ children }) {
15 | if (isSepolia) {
16 | notFound()
17 | }
18 | return <>{children}>
19 | }
20 |
--------------------------------------------------------------------------------
/src/app/sticker-vote/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | import Finalists from "./Finalists"
7 | import Header from "./Header"
8 |
9 | export const generateMetadata = genMeta(() => ({
10 | titleSuffix: "Scroll Sticker Vote",
11 | relativeURL: "/sticker-vote",
12 | description: "Vote for your favourite sticker designs.",
13 | ogImg: "/og_sticker_vote.png",
14 | twitterImg: "/twitter_sticker_vote.png",
15 | }))
16 |
17 | const StickerContest = () => {
18 | if (isSepolia) {
19 | notFound()
20 | }
21 | return (
22 | <>
23 |
24 |
25 | >
26 | )
27 | }
28 |
29 | export default StickerContest
30 |
--------------------------------------------------------------------------------
/src/app/sticker-winners/page.tsx:
--------------------------------------------------------------------------------
1 | import { notFound } from "next/navigation"
2 |
3 | import { isSepolia } from "@/utils"
4 | import { genMeta } from "@/utils/route"
5 |
6 | import Finalists from "./Finalists"
7 | import Header from "./Header"
8 |
9 | export const generateMetadata = genMeta(() => ({
10 | titleSuffix: "Scroll Sticker Winners",
11 | relativeURL: "/sticker-winners",
12 | description: "Congratulations to the winners of the sticker contest.",
13 | }))
14 |
15 | const StickerContest = () => {
16 | if (isSepolia) {
17 | notFound()
18 | }
19 | return (
20 | <>
21 |
22 |
23 | >
24 | )
25 | }
26 |
27 | export default StickerContest
28 |
--------------------------------------------------------------------------------
/src/app/template.tsx:
--------------------------------------------------------------------------------
1 | import { ReactNode } from "react"
2 | import "swiper/css"
3 | import "swiper/css/pagination"
4 |
5 | import { Box } from "@mui/material"
6 |
7 | import Footer from "@/components/Footer"
8 | import Header from "@/components/Header"
9 | import useHideFooter from "@/hooks/useHideFooter"
10 | import { isSepolia } from "@/utils"
11 |
12 | import "./global"
13 |
14 | export default function RootTemplate({ children }: { children: ReactNode }) {
15 | const hideFooter = useHideFooter()
16 |
17 | return (
18 |
19 |
20 | {children}
21 | {!(isSepolia || hideFooter) && }
22 |
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/src/app/terms-and-conditions/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Terms and Conditions",
5 | relativeURL: "/terms-and-conditions",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/terms-of-service/layout.tsx:
--------------------------------------------------------------------------------
1 | import { genMeta } from "@/utils/route"
2 |
3 | export const generateMetadata = genMeta(() => ({
4 | titleSuffix: "Terms of Service",
5 | relativeURL: "/terms-of-service",
6 | }))
7 |
8 | export default function Layout({ children }) {
9 | return <>{children}>
10 | }
11 |
--------------------------------------------------------------------------------
/src/assets/abis/ScrollCanvas.json:
--------------------------------------------------------------------------------
1 | [
2 | "function getAttachedBadges() external view returns (bytes32[])",
3 | "function getProfile(address) view returns (address)",
4 | "function isProfileMinted(address) view returns (bool)",
5 | "function mintProfile(string)",
6 | "function mint(string username, bytes referrer) payable",
7 | "function changeUsername(string)",
8 | "function username() view returns (string)",
9 | "function changeUsername(string)",
10 | "function isUsernameUsed(string calldata username) external view returns (bool)",
11 | "function getBadgeOrder() external view returns (uint256[])",
12 | "function attachOne(bytes32)",
13 | "function detach(bytes32[])",
14 | "function detach(bytes32[])",
15 | "function attest((bytes32,(address,uint64,bool,bytes32,bytes,uint256)))"
16 | ]
17 |
--------------------------------------------------------------------------------
/src/assets/fonts/FTPolarSemiMono-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/FTPolarSemiMono-Medium.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/FTPolarSemiMono-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/FTPolarSemiMono-Regular.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Bold.otf
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Bold.woff
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Bold.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Light.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Light.otf
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Light.woff
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Light.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Medium.otf
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Medium.woff
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Medium.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Regular.otf
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Regular.woff
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-Regular.woff2
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-SemiBold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-SemiBold.otf
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-SemiBold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-SemiBold.woff
--------------------------------------------------------------------------------
/src/assets/fonts/TransSansPremium-SemiBold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/fonts/TransSansPremium-SemiBold.woff2
--------------------------------------------------------------------------------
/src/assets/images/brandkit/MediaKit/mediakit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/MediaKit/mediakit.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/Scroll_Banner/Scroll_Banner1/Scroll_Banner1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/Scroll_Banner/Scroll_Banner1/Scroll_Banner1.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/Scroll_Banner/Scroll_Banner2/Scroll_Banner2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/Scroll_Banner/Scroll_Banner2/Scroll_Banner2.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/Scroll_Logomark/Scroll_Logomark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/Scroll_Logomark/Scroll_Logomark.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/Scroll_Logos/Scroll_FullLogo/Scroll_FullLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/Scroll_Logos/Scroll_FullLogo/Scroll_FullLogo.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/Scroll_Logos/Scroll_InvertedLogo/Scroll_InvertedLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/brandkit/Scroll_Logos/Scroll_InvertedLogo/Scroll_InvertedLogo.png
--------------------------------------------------------------------------------
/src/assets/images/brandkit/download.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/images/canvas/advertising-nft-1.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/canvas/advertising-nft-1.webp
--------------------------------------------------------------------------------
/src/assets/images/canvas/advertising-nft-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/canvas/advertising-nft-2.png
--------------------------------------------------------------------------------
/src/assets/images/canvas/advertising-nft-2.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/canvas/advertising-nft-2.webp
--------------------------------------------------------------------------------
/src/assets/images/canvas/advertising-nft-3.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/canvas/advertising-nft-3.webp
--------------------------------------------------------------------------------
/src/assets/images/common/ai-bot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/common/ai-bot.png
--------------------------------------------------------------------------------
/src/assets/images/common/scrolly-cool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/common/scrolly-cool.png
--------------------------------------------------------------------------------
/src/assets/images/common/scrolly-sad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/common/scrolly-sad.png
--------------------------------------------------------------------------------
/src/assets/images/community/scroll_generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/community/scroll_generic.png
--------------------------------------------------------------------------------
/src/assets/images/defi/Bithumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/defi/Bithumb.jpg
--------------------------------------------------------------------------------
/src/assets/images/defi/OKX.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/defi/OKX.jpg
--------------------------------------------------------------------------------
/src/assets/images/home/Mike Silagadze.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/home/Mike Silagadze.webp
--------------------------------------------------------------------------------
/src/assets/images/home/Roberto Machado.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/home/Roberto Machado.webp
--------------------------------------------------------------------------------
/src/assets/images/home/Tony Olendo.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/home/Tony Olendo.webp
--------------------------------------------------------------------------------
/src/assets/images/home/Yi Sun.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/home/Yi Sun.webp
--------------------------------------------------------------------------------
/src/assets/images/sessions/HoneyPop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/sessions/HoneyPop.png
--------------------------------------------------------------------------------
/src/assets/images/skelly/Scrolly_Coding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/skelly/Scrolly_Coding.png
--------------------------------------------------------------------------------
/src/assets/images/skelly/Scrolly_Hi_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/skelly/Scrolly_Hi_c.png
--------------------------------------------------------------------------------
/src/assets/images/skelly/Scrolly_Wen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/skelly/Scrolly_Wen.png
--------------------------------------------------------------------------------
/src/assets/images/skelly/scroll.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scroll-tech/frontends/4e7d7bf7fdcb6df6721c5f97b7969147a1b84af7/src/assets/images/skelly/scroll.mp4
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/alert-error.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/alert-success.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/approve-token-selected.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/close.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/copy-success.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/etherscan.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/network-mainnet.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/remove.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/bridge/token-list-close.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/external-link.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/find.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-blur-1.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-blur-2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-1.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-10.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-2.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-3.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-4.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-5.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-6.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-7.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-8.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-circle-9.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-diamond-1.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/star-diamond-2.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas-badge/total-minted.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/arrow-left.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/back.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/check.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/close.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/copy-success.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/canvas/triangle.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/back.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/external-link.svg:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/header-triangle-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/info.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/language-checked.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/language-uncheck.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/common/triangle-down.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/community/arrow.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/community/region.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/defi/binance.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/ecosystem/arrow.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/svgs/ecosystem/error.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/ecosystem/search.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/ecosystem/twitter.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/footer/youtube.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/header/External.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/header/checked.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/header/gas-price-dot.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/header/send.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/header/spin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/assets/svgs/landingpage/left-button.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/landingpage/quota.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/landingpage/right-button.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/alert-success.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/disconnect.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/down-triangle.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/flow-close.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/question-checked.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/question-unchecked.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/step-completed-icon.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/step-default-icon.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/assets/svgs/nft/twitter.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/sessions/QuillFinance.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/assets/svgs/sessions/downTriangle.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/src/assets/svgs/sticker-vote/star.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/assets/svgs/story/security.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/assets/svgs/wallet-connector/disconnect.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/src/assets/svgs/wallet-connector/down-triangle.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/src/components/AIModal/UserMessage.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Typography } from "@mui/material"
2 |
3 | const UserMessage = props => {
4 | const { children } = props
5 | return (
6 |
7 |
19 | {children}
20 |
21 |
22 | )
23 | }
24 |
25 | export default UserMessage
26 |
--------------------------------------------------------------------------------
/src/components/Animation/FadeIn.tsx:
--------------------------------------------------------------------------------
1 | import { keyframes } from "@emotion/react"
2 | import Reveal from "react-awesome-reveal"
3 |
4 | const fadeIn = keyframes`
5 | from {
6 | opacity: 0;
7 | }
8 | to {
9 | opacity: 1;
10 | }
11 | `
12 |
13 | function FadeIn({ children, ...rest }) {
14 | return (
15 |
16 | {children}
17 |
18 | )
19 | }
20 |
21 | export default FadeIn
22 |
--------------------------------------------------------------------------------
/src/components/Animation/FadeInUp.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { keyframes } from "@emotion/react"
4 | import Reveal from "react-awesome-reveal"
5 |
6 | const fadeInUp = keyframes`
7 | from {
8 | opacity: 0;
9 | transform: translate3d(0, 30px, 0) scale3d(0.9, 0.9, 1);
10 | }
11 |
12 | to {
13 | opacity: 1;
14 | transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
15 | }
16 | `
17 |
18 | function FadeInUp({ children, ...rest }) {
19 | return (
20 |
21 | {children}
22 |
23 | )
24 | }
25 |
26 | export default FadeInUp
27 |
--------------------------------------------------------------------------------
/src/components/Animation/SlideInLeft.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { keyframes } from "@emotion/react"
4 | import Reveal from "react-awesome-reveal"
5 |
6 | const slideInLeft = keyframes`
7 | from {
8 | opacity: 0;
9 | transform: translate3d(-100px, 0, 0);
10 | }
11 |
12 | to {
13 | opacity: 1;
14 | transform: translate3d(0, 0, 0);
15 | }
16 | `
17 |
18 | function SlideInLeft({ children, ...rest }) {
19 | return (
20 |
21 | {children}
22 |
23 | )
24 | }
25 |
26 | export default SlideInLeft
27 |
--------------------------------------------------------------------------------
/src/components/Animation/SlideInRight.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { keyframes } from "@emotion/react"
4 | import Reveal from "react-awesome-reveal"
5 |
6 | const slideInRight = keyframes`
7 | from {
8 | opacity: 0;
9 | transform: translate3d(100px, 0, 0);
10 | }
11 |
12 | to {
13 | opacity: 1;
14 | transform: translate3d(0, 0, 0);
15 | }
16 | `
17 |
18 | function SlideInRight({ children, ...rest }) {
19 | return (
20 |
21 | {children}
22 |
23 | )
24 | }
25 |
26 | export default SlideInRight
27 |
--------------------------------------------------------------------------------
/src/components/Animation/index.tsx:
--------------------------------------------------------------------------------
1 | import FadeIn from "./FadeIn"
2 | import FadeInUp from "./FadeInUp"
3 | import SlideInLeft from "./SlideInLeft"
4 | import SlideInRight from "./SlideInRight"
5 |
6 | export { FadeInUp, SlideInLeft, SlideInRight, FadeIn }
7 |
--------------------------------------------------------------------------------
/src/components/Footer/index.tsx:
--------------------------------------------------------------------------------
1 | import PureFooter from "./PureFooter"
2 | import Support from "./Support"
3 |
4 | const Footer = () => {
5 | return (
6 | <>
7 |
8 |
9 | >
10 | )
11 | }
12 |
13 | export default Footer
14 |
--------------------------------------------------------------------------------
/src/components/GlobalComponents/index.tsx:
--------------------------------------------------------------------------------
1 | import { isDesktop } from "react-device-detect"
2 |
3 | import TxHistoryDialog from "@/app/bridge/TxHistoryDialog"
4 |
5 | import AIModal from "../AIModal"
6 |
7 | const GlobalComponents = () => {
8 | return (
9 | <>
10 |
11 | {isDesktop && }
12 | >
13 | )
14 | }
15 |
16 | export default GlobalComponents
17 |
--------------------------------------------------------------------------------
/src/components/Header/useCheckTheme.tsx:
--------------------------------------------------------------------------------
1 | import { usePathname } from "next/navigation"
2 | import { useMemo } from "react"
3 |
4 | import useMatch from "@/hooks/useMatch"
5 |
6 | const useCheckTheme = () => {
7 | const pathname = usePathname()
8 | // TODO:
9 | const isCanvas = useMatch("/canvas(.*)")
10 | const dark = useMemo(() => {
11 | return ["/developer-nft/check-eligibility", "/developer-nft/mint"].includes(pathname) || isCanvas
12 | }, [pathname])
13 |
14 | return dark
15 | }
16 |
17 | export default useCheckTheme
18 |
--------------------------------------------------------------------------------
/src/components/Header/useShowGasPriceViewer.ts:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { usePathname } from "next/navigation"
4 |
5 | const useShowGasPriceViewer = () => {
6 | const pathname = usePathname()
7 | return pathname === "/"
8 | }
9 |
10 | export default useShowGasPriceViewer
11 |
--------------------------------------------------------------------------------
/src/components/LoadingPage/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, CircularProgress } from "@mui/material"
2 |
3 | const LoadingPage = props => {
4 | const { height = "100vh", component, ...restProps } = props
5 | return (
6 |
7 | {component ? component : }
8 |
9 | )
10 | }
11 |
12 | export default LoadingPage
13 |
--------------------------------------------------------------------------------
/src/components/Motion/LineToView.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { motion } from "motion/react"
4 |
5 | const LineToView = props => {
6 | const { children, once = true } = props
7 |
8 | return (
9 |
16 | {children}
17 |
18 | )
19 | }
20 |
21 | export default LineToView
22 |
--------------------------------------------------------------------------------
/src/components/NavLink/index.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import Link from "next/link"
4 | import { useSelectedLayoutSegment } from "next/navigation"
5 |
6 | const NavLink = ({ slug, children }: { slug: string; children: React.ReactNode }) => {
7 | // Navigating to `/blog/hello-world` will return 'hello-world'
8 | // for the selected layout segment
9 | const segment = useSelectedLayoutSegment()
10 | const isActive = slug === segment
11 |
12 | return (
13 |
18 | {children}
19 |
20 | )
21 | }
22 |
23 | export default NavLink
24 |
--------------------------------------------------------------------------------
/src/components/NumberTypography/index.tsx:
--------------------------------------------------------------------------------
1 | import { Typography } from "@mui/material"
2 |
3 | const NumberTypography = ({ sx, ...restProps }) => {
4 | return
5 | }
6 |
7 | export default NumberTypography
8 |
--------------------------------------------------------------------------------
/src/components/ScrollLogo/index.tsx:
--------------------------------------------------------------------------------
1 | import ScrollLogoLightIcon from "@/assets/svgs/common/scroll-logo-icon-light.svg"
2 | import ScrollLogoIcon from "@/assets/svgs/common/scroll-logo-icon.svg"
3 |
4 | const ScrollLogo = props => {
5 | const { light } = props
6 |
7 | if (light) {
8 | return
9 | }
10 | return
11 | }
12 |
13 | export default ScrollLogo
14 |
--------------------------------------------------------------------------------
/src/components/SentrySetting/index.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as Sentry from "@sentry/nextjs"
4 | import { usePathname } from "next/navigation"
5 | import { useEffect } from "react"
6 |
7 | const SentrySetting = () => {
8 | const pathname = usePathname()
9 | useEffect(() => {
10 | Sentry.getCurrentScope().setTag("page", pathname)
11 |
12 | return () => {
13 | // Clear the tag when the component is unmounted
14 | Sentry.getCurrentScope().setTag("page", "")
15 | }
16 | }, [pathname])
17 | return null
18 | }
19 |
20 | export default SentrySetting
21 |
--------------------------------------------------------------------------------
/src/components/Skeleton/index.tsx:
--------------------------------------------------------------------------------
1 | import { Skeleton as MuiSkeleton } from "@mui/material"
2 |
3 | const Skeleton = props => {
4 | const { white, dark, sx, size, ...restProps } = props
5 |
6 | return (
7 |
19 | )
20 | }
21 |
22 | export default Skeleton
23 |
--------------------------------------------------------------------------------
/src/components/SvgIcon/index.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | // component is a function
4 | import { SvgIcon } from "@mui/material"
5 |
6 | export default SvgIcon
7 |
--------------------------------------------------------------------------------
/src/components/TextButton/index.tsx:
--------------------------------------------------------------------------------
1 | import { Link as MuiLink } from "@mui/material"
2 |
3 | import Link from "@/components/Link"
4 |
5 | const TextButton = props => {
6 | const { sx, underline = "hover", className, children, href, ...restProps } = props
7 | if (href) {
8 | return (
9 |
10 | {children}
11 |
12 | )
13 | }
14 | return (
15 |
27 | {children}
28 |
29 | )
30 | }
31 |
32 | export default TextButton
33 |
--------------------------------------------------------------------------------
/src/components/WalletToolkit/index.tsx:
--------------------------------------------------------------------------------
1 | import { Stack } from "@mui/material"
2 |
3 | import { useRainbowContext } from "@/contexts/RainbowProvider"
4 | import useCheckViewport from "@/hooks/useCheckViewport"
5 |
6 | import NetworkIndicator from "./NetworkSelect"
7 | import WalletDropdown from "./WalletDropdown"
8 |
9 | const WalletToolkit = props => {
10 | const { dark } = props
11 | const { isMobile } = useCheckViewport()
12 | const { walletCurrentAddress } = useRainbowContext()
13 |
14 | return (
15 |
16 | {walletCurrentAddress && !isMobile && }
17 |
18 |
19 | )
20 | }
21 |
22 | export default WalletToolkit
23 |
--------------------------------------------------------------------------------
/src/components/WebVitals/index.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { sendGAEvent } from "@next/third-parties/google"
4 | import { useReportWebVitals } from "next/web-vitals"
5 |
6 | const WebVitals = () => {
7 | useReportWebVitals(metric => {
8 | sendGAEvent("event", metric.name, {
9 | value: Math.round(metric.name === "CLS" ? metric.value * 1000 : metric.value), // values must be integers
10 | event_label: metric.id, // id unique to current page load
11 | non_interaction: true, // avoids affecting bounce rate.
12 | })
13 | })
14 | return null
15 | }
16 |
17 | export default WebVitals
18 |
--------------------------------------------------------------------------------
/src/components/WebpImage/index.tsx:
--------------------------------------------------------------------------------
1 | function WebpImage(props) {
2 | const { src, webpsrc, ...restProps } = props
3 | return (
4 |
5 |
6 |
7 |
8 | )
9 | }
10 |
11 | export default WebpImage
12 |
--------------------------------------------------------------------------------
/src/constants/canvas.ts:
--------------------------------------------------------------------------------
1 | export enum BADGES_VISIBLE_TYPE {
2 | VISIBLE = "Displayed",
3 | INVISIBLE = "Not displayed",
4 | }
5 |
6 | export const EXPLORE_BADGES_URL = "/canvas-and-badges#discover"
7 |
--------------------------------------------------------------------------------
/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./scroll"
2 | export * from "./common"
3 | export * from "./ecosystem"
4 | export * from "./networks"
5 | export * from "./transaction"
6 | export * from "./nft"
7 | export * from "./brandKit"
8 | export * from "./sticker"
9 | export * from "./sessions"
10 | export * from "./blog"
11 |
12 | export * from "./canvas"
13 | export * from "./badge"
14 | export * from "./canvas-badge"
15 | export * from "./community"
16 | export * from "./ai-assistant"
17 |
--------------------------------------------------------------------------------
/src/constants/link.ts:
--------------------------------------------------------------------------------
1 | export const DOC_URL = "https://docs.scroll.io/en/home/"
2 | export const SCROLL_OPEN_URL = "https://open.scroll.io"
3 | export const LEVEL_UP_URL = "https://www.levelup.xyz/"
4 |
5 | const USER_PORTAL_BASE_URL = process.env.NEXT_PUBLIC_USER_PORTAL_BASE_URL
6 |
7 | export const BRIDGE_URL = `${USER_PORTAL_BASE_URL}/bridge`
8 | export const ECOSYSTEM_URL = "/ecosystem"
9 | export const SESSIONS_URL = `${USER_PORTAL_BASE_URL}/sessions`
10 |
11 | export const VISION_URL = "/blog/vision-and-values"
12 |
13 | export const TECH_URL = "https://docs.scroll.io/en/technology/"
14 | export const FOUNDER_CLUB_URL = "https://t.me/+0tvdw8QMJBMyOTli"
15 |
16 | export const GET_IN_TOUCH_URL = "https://tally.so/r/waxLBW"
17 |
18 | export const REQUEST_A_DAPP_URL = "https://tally.so/r/3jlj59"
19 |
20 | export const LEARN_BUILD_URL = "https://docs.scroll.io/en/getting-started/overview/"
21 |
--------------------------------------------------------------------------------
/src/constants/searchParamsKey.ts:
--------------------------------------------------------------------------------
1 | export const BRIDGE_TOKEN = "token"
2 | export const BRIDGE_TAB = "tab"
3 |
--------------------------------------------------------------------------------
/src/constants/sticker.ts:
--------------------------------------------------------------------------------
1 | export const STICKER_CONTEST_NOTION_URL = "https://scrollzkp.notion.site/scrollzkp/Scroll-Sticker-Contest-4ba50886794a4ab5b024ca792aadda59"
2 | export const STICKER_CONTEST_DISCORD_VOTE_URL = "https://discord.gg/ymuDXbphct"
3 |
--------------------------------------------------------------------------------
/src/constants/transaction.ts:
--------------------------------------------------------------------------------
1 | export const WAIT_CONFIRMATIONS = 10
2 |
3 | export const BRIDGE_PAGE_SIZE = 3
4 |
5 | export const WITHDRAW_TABLE_PAGE_SIZE = 5
6 |
7 | export const CLAIM_TABLE_PAGE_SIZE = 5
8 |
9 | export const MAX_CACHE_NUMBER = 18
10 |
11 | export enum TX_TYPE {
12 | ALL,
13 | DEPOSIT,
14 | WITHDRAW,
15 | CLAIM,
16 | }
17 |
18 | export enum TX_STATUS {
19 | Unknown = -1,
20 | Sent,
21 | SentFailed,
22 | Relayed,
23 | FailedRelayed,
24 | RelayedReverted,
25 | Skipped,
26 | Dropped,
27 | BatchDepositSent,
28 | BatchDepositRelayed,
29 | BatchDepositFailed,
30 | }
31 |
32 | export const BATCH_DEPOSIT_TOKENS = [""]
33 |
--------------------------------------------------------------------------------
/src/contexts/RainbowProvider/walletConnectors/binanceWallet/binanceWallet.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export { default as useAsyncMemo } from "./useAsyncMemo"
2 | export { default as useBalance } from "./useBalance"
3 | export { default as useIsSmartContractWallet } from "./useIsSmartContractWallet"
4 | export { default as useLoadAllStaticAssetsOnIdle } from "./useLoadAllOnIdle"
5 |
--------------------------------------------------------------------------------
/src/hooks/useAsyncMemo.tsx:
--------------------------------------------------------------------------------
1 | import { DependencyList, useEffect, useRef, useState } from "react"
2 |
3 | import { shallowEquals } from "@/utils"
4 |
5 | function useAsyncMemo(factory: () => Promise, deps: DependencyList | undefined): T | undefined {
6 | const [res, setRes] = useState()
7 | const prevDependencies = useRef(undefined)
8 | const lastCallId = useRef(0)
9 |
10 | useEffect(() => {
11 | if (shallowEquals(deps, prevDependencies.current)) {
12 | return
13 | }
14 | prevDependencies.current = deps
15 |
16 | const fetchRes = async () => {
17 | const callId = ++lastCallId.current
18 | const _res = await factory()
19 | if (callId === lastCallId.current) {
20 | setRes(_res)
21 | }
22 | }
23 |
24 | fetchRes()
25 | }, [deps])
26 |
27 | return res
28 | }
29 |
30 | export default useAsyncMemo
31 |
--------------------------------------------------------------------------------
/src/hooks/useHideFooter.ts:
--------------------------------------------------------------------------------
1 | // import { usePathname } from "next/navigation"
2 | // import { useMemo } from "react"
3 |
4 | const useHideFooter = () => {
5 | // const pathname = usePathname()
6 |
7 | // const hidden = useMemo(
8 | // () => pathname.match(/^\/canvas(\/\w*)?$/g),
9 | // [pathname],
10 | // )
11 | // return hidden
12 | return false
13 | }
14 |
15 | export default useHideFooter
16 |
--------------------------------------------------------------------------------
/src/hooks/useImagesLoaded.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react"
2 |
3 | function useImagesLoaded(imageUrls) {
4 | const [allLoaded, setAllLoaded] = useState(false)
5 |
6 | useEffect(() => {
7 | let images: HTMLImageElement[] = []
8 | let loadedCount = 0
9 |
10 | const imageLoaded = () => {
11 | loadedCount++
12 | if (loadedCount === imageUrls.length) {
13 | setAllLoaded(true)
14 | }
15 | }
16 |
17 | imageUrls.forEach(url => {
18 | const img = new Image()
19 | img.src = url
20 | img.onload = imageLoaded
21 | images.push(img)
22 | })
23 |
24 | return () => {
25 | images.forEach(img => {
26 | img.onload = null
27 | })
28 | }
29 | }, [imageUrls])
30 |
31 | return { allLoaded }
32 | }
33 |
34 | export default useImagesLoaded
35 |
--------------------------------------------------------------------------------
/src/hooks/useIsSmartContractWallet.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from "react"
2 |
3 | import { useRainbowContext } from "@/contexts/RainbowProvider"
4 |
5 | export default function useIsSmartContractWallet() {
6 | const { provider, walletCurrentAddress } = useRainbowContext()
7 | const [isSmartContractWallet, setIsSmartContractWallet] = useState(false)
8 |
9 | useEffect(() => {
10 | const checkAddress = async () => {
11 | if (!provider || !walletCurrentAddress) return
12 |
13 | const code = await provider.getCode(walletCurrentAddress)
14 | setIsSmartContractWallet(code !== "0x")
15 | }
16 |
17 | checkAddress()
18 | }, [provider, walletCurrentAddress])
19 |
20 | return {
21 | isSmartContractWallet,
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/hooks/useMatch.ts:
--------------------------------------------------------------------------------
1 | import { usePathname } from "next/navigation"
2 |
3 | import { checkMatchPath } from "@/utils"
4 |
5 | const useMatch = pathReg => {
6 | const pathname = usePathname()
7 | return checkMatchPath(pathReg, pathname)
8 | }
9 |
10 | export default useMatch
11 |
--------------------------------------------------------------------------------
/src/hooks/useScrollToTop.ts:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { usePathname } from "next/navigation"
4 | import { useLayoutEffect } from "react"
5 |
6 | function ScrollToTop({ children }: any) {
7 | const pathname = usePathname()
8 | useLayoutEffect(() => {
9 | document.documentElement.scrollTo(0, 0)
10 | }, [pathname])
11 | return children
12 | }
13 |
14 | export default ScrollToTop
15 |
--------------------------------------------------------------------------------
/src/hooks/useShowLanguageSelect.tsx:
--------------------------------------------------------------------------------
1 | import { usePathname } from "next/navigation"
2 | import { useMemo } from "react"
3 |
4 | const useShowLanguageSelect = () => {
5 | const pathname = usePathname()
6 |
7 | const showLanguageSelect = useMemo(() => pathname.startsWith("/blog"), [pathname])
8 |
9 | return showLanguageSelect
10 | }
11 |
12 | export default useShowLanguageSelect
13 |
--------------------------------------------------------------------------------
/src/hooks/useShowWalletToolkit.tsx:
--------------------------------------------------------------------------------
1 | import { usePathname } from "next/navigation"
2 | import { useMemo } from "react"
3 |
4 | const useShowWalletConnector = () => {
5 | const pathname = usePathname()
6 |
7 | const showWalletConnector = useMemo(
8 | () => pathname.startsWith("/developer-nft") || pathname.startsWith("/bridge") || pathname.startsWith("/sessions"),
9 | // () => !pathname.startsWith("/blog"),
10 | [pathname],
11 | )
12 | return showWalletConnector
13 | }
14 |
15 | export default useShowWalletConnector
16 |
--------------------------------------------------------------------------------
/src/hooks/useSnackbar.ts:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import { VariantType, useSnackbar } from "notistack"
4 | import { useCallback } from "react"
5 |
6 | // min width 288px
7 | const useScrollSnackbar = () => {
8 | const { enqueueSnackbar } = useSnackbar()
9 | const enqueueScrollSnackbar = useCallback(
10 | (message, variant: VariantType = "default", key?) => {
11 | enqueueSnackbar(message, { key, autoHideDuration: 6000, anchorOrigin: { horizontal: "center", vertical: "bottom" }, variant })
12 | },
13 | [enqueueSnackbar],
14 | )
15 | return enqueueScrollSnackbar
16 | }
17 |
18 | export default useScrollSnackbar
19 |
--------------------------------------------------------------------------------
/src/hooks/useTransactionBuffer.ts:
--------------------------------------------------------------------------------
1 | import { parseUnits } from "ethers"
2 | import { useMemo } from "react"
3 |
4 | const useTransactionBuffer = selectedToken => {
5 | const transactionBuffer = useMemo(() => {
6 | if (selectedToken.native) {
7 | return selectedToken.chainId === 1 ? parseUnits("0.001", "ether") : parseUnits("0.001", "ether")
8 | }
9 | return BigInt(0)
10 | }, [selectedToken])
11 |
12 | return transactionBuffer
13 | }
14 |
15 | export default useTransactionBuffer
16 |
--------------------------------------------------------------------------------
/src/hooks/useUserLanguage.ts:
--------------------------------------------------------------------------------
1 | import useStorage from "squirrel-gill"
2 |
3 | import { BLOG_LANGUAGE } from "@/constants/storageKey"
4 |
5 | function getUserLanguage() {
6 | // Get the user's primary language preference
7 | const userLanguage = navigator.language || "en"
8 |
9 | // Check if the language is Turkish
10 | if (userLanguage.startsWith("tr")) {
11 | return "tr" // Return 'tr' for Turkish
12 | } else if (userLanguage.startsWith("es")) {
13 | return "es" // Return 'es' for Español
14 | } else {
15 | return "en" // Return 'en' for any other language
16 | }
17 | }
18 |
19 | export default function useUserLanguage() {
20 | return useStorage(localStorage, BLOG_LANGUAGE, getUserLanguage())
21 | }
22 |
--------------------------------------------------------------------------------
/src/hooks/useViemBalance.tsx:
--------------------------------------------------------------------------------
1 | import { useBalance as useBalance_RAW } from "wagmi"
2 |
3 | import { useRainbowContext } from "@/contexts/RainbowProvider"
4 |
5 | const useBalance = tokenAddress => {
6 | const { walletCurrentAddress } = useRainbowContext()
7 |
8 | const { data, isLoading } = useBalance_RAW({ address: walletCurrentAddress, token: tokenAddress })
9 |
10 | return { balance: data?.value, isLoading }
11 | }
12 |
13 | export default useBalance
14 |
--------------------------------------------------------------------------------
/src/instrumentation.ts:
--------------------------------------------------------------------------------
1 | import * as Sentry from "@sentry/nextjs"
2 |
3 | export async function register() {
4 | if (process.env.NEXT_RUNTIME === "nodejs") {
5 | await import("../sentry.server.config")
6 | }
7 |
8 | if (process.env.NEXT_RUNTIME === "edge") {
9 | await import("../sentry.edge.config")
10 | }
11 | }
12 |
13 | export const onRequestError = Sentry.captureRequestError
14 |
--------------------------------------------------------------------------------
/src/mdx-components.tsx:
--------------------------------------------------------------------------------
1 | import type { MDXComponents } from "mdx/types"
2 |
3 | export function useMDXComponents(components: MDXComponents): MDXComponents {
4 | return {
5 | ...components,
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/middleware.ts:
--------------------------------------------------------------------------------
1 | import { type NextRequest, NextResponse } from "next/server"
2 |
3 | export function middleware(request: NextRequest) {
4 | if (request.nextUrl.pathname === "/" && process.env.NEXT_PUBLIC_SCROLL_ENVIRONMENT === "Sepolia") {
5 | const response = NextResponse.redirect(new URL("/portal", request.url))
6 | return response
7 | }
8 |
9 | // Redirects in next.config.mjs are case-insensitive.
10 | if (request.nextUrl.pathname === "/blog/zkEVM") {
11 | const response = NextResponse.redirect(new URL("/blog/zkevm", request.url))
12 | return response
13 | }
14 |
15 | // if (request.nextUrl.pathname === "/archive/20230308/terms-and-conditions") {
16 | // const response = NextResponse.rewrite(new URL("/terms-and-conditions", request.url))
17 | // return response
18 | // }
19 |
20 | const response = NextResponse.next()
21 | return response
22 | }
23 |
--------------------------------------------------------------------------------
/src/stores/globalStore.ts:
--------------------------------------------------------------------------------
1 | import { create } from "zustand"
2 |
3 | interface GlobalStore {
4 | aiModalVisible: boolean
5 |
6 | changeAIModalVisible: (visible: boolean) => void
7 | }
8 |
9 | const useGlobalStore = create()((set, get) => ({
10 | aiModalVisible: false,
11 |
12 | changeAIModalVisible: visible => {
13 | set({
14 | aiModalVisible: visible,
15 | })
16 | },
17 | }))
18 |
19 | export default useGlobalStore
20 |
--------------------------------------------------------------------------------
/src/theme/dark.tsx:
--------------------------------------------------------------------------------
1 | // TODO:custom dark theme
2 | // import { createTheme } from "@mui/material/styles"
3 |
4 | // const darkTheme = createTheme({})
5 |
6 | // export default darkTheme
7 |
--------------------------------------------------------------------------------
/src/theme/index.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | // import CssBaseline from "@mui/material/CssBaseline"
4 | import { StyledEngineProvider, ThemeProvider, createTheme } from "@mui/material/styles"
5 |
6 | // import darkTheme from "./dark"
7 | import lightTheme from "./light"
8 |
9 | const ScrollThemeProvider = ({ children }) => {
10 | const theme = createTheme({
11 | cssVariables: {
12 | colorSchemeSelector: "class",
13 | },
14 | colorSchemes: {
15 | light: lightTheme,
16 | dark: false,
17 | },
18 | })
19 |
20 | // not use StyledEngineProvider, so mui style > tailwind style
21 | return (
22 | //
23 |
24 | {/* */}
25 | {children}
26 |
27 | //
28 | )
29 | }
30 |
31 | export default ScrollThemeProvider
32 |
--------------------------------------------------------------------------------
/src/types/network.d.ts:
--------------------------------------------------------------------------------
1 | type EmptyNetwork = ValidNetwork
2 |
3 | type ValidNetwork = {
4 | name: string
5 | slug: string
6 | icon: any
7 | rpcUrl: string
8 | explorer: string
9 | chainId: number
10 | nativeTokenSymbol: string
11 | isL1: boolean
12 | }
13 |
14 | type Network = EmptyNetwork & ValidNetwork
15 |
--------------------------------------------------------------------------------
/src/types/react.d.ts:
--------------------------------------------------------------------------------
1 | // global.d.ts 或任何.d.ts文件中
2 | import "react"
3 |
4 | declare module "react" {
5 | interface CSSProperties {
6 | [key: `--${string}`]: string | number
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/types/svg.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.svg?url" {
2 | const content: any
3 | export default content
4 | }
5 |
6 | declare module "*.svg" {
7 | const content: any
8 | export default content
9 | }
10 |
--------------------------------------------------------------------------------
/src/types/token.d.ts:
--------------------------------------------------------------------------------
1 | type BaseToken = {
2 | chainId: number
3 | name: string
4 | symbol: string
5 | decimals: bigint
6 | logoURI: string
7 | extensions?: {
8 | bridgeInfo: {
9 | bridgeUrl: string
10 | bridgeName: string
11 | bridgeIcon: string
12 | }
13 | }
14 | }
15 |
16 | type NativeToken = BaseToken & {
17 | native: boolean
18 | }
19 |
20 | type ERC20Token = BaseToken & {
21 | address: string
22 | }
23 |
24 | type Token = NativeToken | ERC20Token
25 |
--------------------------------------------------------------------------------
/src/utils/blog.ts:
--------------------------------------------------------------------------------
1 | export const filterBlogsByLanguage = (blogJson, language) => {
2 | if (language === "en") {
3 | return blogJson.filter(item => item.language === language)
4 | }
5 | const suffix = `_lang_${language}`
6 | return blogJson.filter((item, _index, arr) => {
7 | if (item.language === language) {
8 | return true
9 | } else if (item.language !== "en") {
10 | return false
11 | } else if (!arr.find(i => i.slug.slice(0, -suffix.length) === item.slug)) {
12 | return true
13 | }
14 | return false
15 | })
16 | }
17 |
--------------------------------------------------------------------------------
/src/utils/dom.ts:
--------------------------------------------------------------------------------
1 | export const isAboveScreen = element => {
2 | const rect = element.getBoundingClientRect()
3 | return rect.bottom < 0
4 | }
5 |
6 | export const isBelowScreen = element => {
7 | const rect = element.getBoundingClientRect()
8 | return rect.top > window.innerHeight
9 | }
10 |
11 | export const lockBodyScroll = (lock: boolean) => {
12 | if (lock) {
13 | const scrollbarWidth = window.innerWidth - document.body.offsetWidth
14 | document.body.style.overflow = "hidden"
15 | document.body.style.paddingRight = `${scrollbarWidth}px`
16 | } else {
17 | document.body.style.overflow = "auto"
18 | document.body.style.paddingRight = "0px"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./common"
2 | export * from "./format"
3 | export * from "./ethereum"
4 | export * from "./sentry"
5 | export * from "./nft"
6 | export * from "./dom"
7 | export * from "./blog"
8 | export * from "./canvas"
9 | export * from "./txError"
10 | export * from "./route"
11 |
--------------------------------------------------------------------------------
/src/utils/logger.ts:
--------------------------------------------------------------------------------
1 | class Logger {
2 | private prefix: string
3 |
4 | constructor(prefix: string = "") {
5 | this.prefix = prefix
6 | }
7 |
8 | critical = (...input: any[]) => {
9 | console.error(this.prefix, ...input)
10 | }
11 |
12 | debug = (...input: any[]) => {
13 | console.debug(this.prefix, ...input)
14 | }
15 |
16 | error = (...input: any[]) => {
17 | console.error(this.prefix, ...input)
18 | }
19 |
20 | info = (...input: any[]) => {
21 | console.info(this.prefix, ...input)
22 | }
23 |
24 | log = (...input: any[]) => {
25 | console.log(this.prefix, ...input)
26 | }
27 |
28 | warn = (...input: any[]) => {
29 | console.warn(this.prefix, ...input)
30 | }
31 | }
32 |
33 | const logger = new Logger("scroll:")
34 |
35 | export default logger
36 |
--------------------------------------------------------------------------------
/src/utils/sentry.ts:
--------------------------------------------------------------------------------
1 | import * as Sentry from "@sentry/react"
2 |
3 | export const sentryDebug = message => {
4 | Sentry.withScope(function (scope) {
5 | scope.setLevel("debug")
6 | Sentry.captureException(new Error(message))
7 | })
8 | }
9 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.json",
3 | "tasks": {
4 | "build": {
5 | "outputs": [".next/**", "!.next/cache/**"],
6 | "inputs": ["$TURBO_DEFAULT$", "src/assets/blog/main.data.json"]
7 | },
8 | "lint": {},
9 | "dev": {
10 | "cache": false,
11 | "persistent": true
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------