mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-13 16:08:04 -05:00
1.8 KiB
1.8 KiB
Overview
The above picture is the overview of the contract design. There are several components both in layer 1 and layer 2: L1/L2 Scroll Messenger, various L1/L2 Gateways and L1/L2 Gateway Router. Besides these, there is a Rollup component only in layer 1.
The followings are the detailed docs for each component (docs are generated automatically by @primitivefi/hardhat-dodoc plugin):
- L1 Scroll Messenger and L2 Scroll Messenger: Main entry for sending and relaying cross domain message.
- Rollup
- L1 Gateway Router and L2 Gateway Router: Router contract for depositing/withdrawing Ethers and ERC20 tokens.
- L1/L2 Gateways:
- ScrollStandardERC20Factory: The
ScrollStandardERC20token factory used byL2StandardERC20Gateway.
There are two main applications: Token Bridge and Cross Domain Messaging. You can find the documentations in the links below:
- Token Bridge: moving token from layer 1 to layer 2, or from layer 2 to layer 1.
- Cross Domain Messaging: sending data to layer 2 from layer 1, or sending data to layer 2 from layer 1. Basically, it will help to trigger function call cross layer. The token bridge also use cross domain messaging to achieve its functionality.
