forked from l2beat/l2beat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from l2beat/main
[pull] main from l2beat:main
- Loading branch information
Showing
11 changed files
with
141 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { InfoIcon } from '~/icons/info' | ||
import { | ||
Drawer, | ||
DrawerContent, | ||
DrawerHeader, | ||
DrawerTrigger, | ||
} from './core/drawer' | ||
|
||
export function RollupsInfo() { | ||
return ( | ||
<InfoWithMobileDrawer | ||
title="What are rollups?" | ||
content="Rollups are L2s that periodically post state commitments to Ethereum. | ||
These commitments are validated by either Validity Proofs or are | ||
accepted optimistically and can be challenged via Fraud Proof mechanism | ||
within a certain fraud proof window. Additionally L2 data is also posted | ||
to Ethereum, hence there are no additional trust assumptions introduced." | ||
/> | ||
) | ||
} | ||
|
||
export function ValidiumsAndOptimiumsInfo() { | ||
return ( | ||
<InfoWithMobileDrawer | ||
title="What are Validiums and Optimiums?" | ||
content="Alt-DAs are L2s that, similarly to Rollups, periodically post state | ||
commitments to Ethereum that are validated by it, however data is not | ||
posted to Ethereum. This means that additional trust assumptions, external | ||
to Ethereum, are introduced to prevent data withholding attacks." | ||
/> | ||
) | ||
} | ||
|
||
export function OthersInfo() { | ||
return ( | ||
<InfoWithMobileDrawer | ||
title="What are Others?" | ||
content="OTHERS are L2s that either do not have a working proof system or they | ||
don't have an external DA sufficiently decentralised (ie at least 5 | ||
independent attesters)" | ||
/> | ||
) | ||
} | ||
|
||
function InfoWithMobileDrawer({ | ||
title, | ||
content, | ||
}: { title: string; content: string }) { | ||
return ( | ||
<div className="flex flex-row sm:mb-2"> | ||
<div className="text-[11px] leading-snug text-zinc-500 dark:text-secondary md:text-[13px] md:leading-tight"> | ||
<p className="max-sm:hidden">{content}</p> | ||
<Drawer> | ||
<DrawerTrigger className="flex items-center gap-1 sm:hidden"> | ||
<InfoIcon className="size-3 fill-blue-550" /> | ||
<div className="text-2xs font-medium underline">{title}</div> | ||
</DrawerTrigger> | ||
<DrawerContent className="px-1 pb-0"> | ||
<DrawerHeader className="text-[18px] font-semibold text-zinc-800 dark:text-primary"> | ||
{title} | ||
</DrawerHeader> | ||
<p className="mt-4 text-sm font-normal text-zinc-500 dark:text-primary"> | ||
{content} | ||
</p> | ||
<DrawerTrigger className="w-full py-8 text-center text-zinc-500 underline dark:text-primary"> | ||
Close | ||
</DrawerTrigger> | ||
</DrawerContent> | ||
</Drawer> | ||
</div> | ||
</div> | ||
) | ||
} |