Skip to content

Commit 8185c22

Browse files
committed
add notices for technology pages along with comments on enforced txs
1 parent a178ebe commit 8185c22

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

src/content/docs/en/technology/bridge/cross-domain-messaging.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ whatsnext: { "Deposit Gateways": "/technology/bridge/deposit-gateways/" }
88
---
99

1010
import ClickToZoom from "../../../../../components/ClickToZoom.astro"
11+
import Aside from "../../../../../components/Aside.astro"
1112
import ToggleElement from "../../../../../components/ToggleElement.astro"
1213

1314
import L1ToL2 from "../_images/L1-to-L2.png"
@@ -22,6 +23,10 @@ Scroll has an arbitrary message passing bridge that enables token transfers and
2223

2324
There are two primary approaches to sending a message from L1 to L2: sending arbitrary messages via `L1ScrollMessenger` and sending enforced transactions via `EnforcedTxGateway`. Both approaches allow users to initiate a L2 transaction on L1 and call arbitrary contracts on L2. For arbitrary messages, the sender of the L2 transactions is the aliased `L1ScrollMessenger` address. For enforced transactions, the L2 sender is an externally-owned account (EOA). In addition, we provide several standard token gateways to make it easier for users to deposit ETH and other standard tokens including ERC-20, ERC-677, ERC-721, and ERC-1155. In essence, these gateways encode token deposits into a message and send it to their counterparts on L2 through the `L1ScrollMessenger` contract. You can find more details about the L1 token gateways in the [Deposit Gateways](/technology/bridge/deposit-gateways).
2425

26+
<Aside type="danger" title="">
27+
Enforced Transactions are not yet enabled on Scroll. In future upgrades, users will be able to use this functionality to bypass the `L1ScrollMessenger` and send messages directly to the `L1MessageQueue`.
28+
</Aside>
29+
2530
As depicted in Figure 1, both arbitrary messages and enforced transactions are appended to the message queue stored in the `L1MessageQueue` contract. The `L1MessageQueue` contract provides two functions `appendCrossDomainMessage` and `appendEnforcedTransaction` for appending arbitrary messages and enforced transactions respectively.
2631

2732
```solidity
@@ -112,6 +117,10 @@ The deposited ETH of `value` amount is locked in the `L1ScrollMessenger` contrac
112117
113118
### Sending Enforced Transactions
114119
120+
<Aside type="danger" title="">
121+
Enforced Transactions are not yet enabled on Scroll. In future upgrades, users will be able to use this functionality to bypass the `L1ScrollMessenger` and send messages directly to the `L1MessageQueue`.
122+
</Aside>
123+
115124
The `EnforcedTxGateway` contract provides two `sendTransaction` functions to send an enforced transaction. In the first function, the sender of the generated `L1MessageTx` transaction is the transaction sender. On the other hand, the second function uses the passed `sender` address as the sender of the `L1MessageTx` transaction. This allows a third party to send an enforced transaction on behalf of the user and pay the relay fee. Note that the second function requires providing a valid signature of the generated `L1MessageTx` transaction that matches the `sender` address. Both `sendTransaction` functions enforce the sender to be an EOA account.
116125
117126
<ToggleElement anchor="sendTransaction function signatures">
@@ -185,6 +194,13 @@ Because the `L2ScrollMessenger` contract records all L1 messages that were succe
185194

186195
The contract `L2GasPriceOracle` deployed on L1 computes the relay fee of a message given its gas limit. This contract stores the `l2BaseFee` in its storage, which is updated by a dedicated relayer run by Scroll currently. The relay fee of L1-to-L2 messages is `gasLimit * l2BaseFee`.
187196

197+
<Aside type="tip" title="Upgrade Notice">
198+
During the February 2024 Bridge Upgrade, `L2GasPriceOracle` will be deprecated, with its functionality moved into the `L1MessageQueueWithGasPriceOracle` contract.
199+
200+
The upgrade is expected to be finalized on February 19th, 2024 after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/to-do-slug).
201+
202+
</Aside>
203+
188204
### Address Alias
189205

190206
Due to the behavior of the `CREATE` opcode, it is possible that someone deploys a contract at the same address on L1 and L2 but with different bytecode. To avoid malicious users taking advantage of this, the bridge applies an address alias when the message sender is a contract on L1. The aliased sender address of the L1 message transaction is `l1_contract_address + offset` where the `offset` is `0x1111000000000000000000000000000000001111`.

src/content/docs/en/technology/bridge/deposit-gateways.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ whatsnext: { "Withdraw Gateways": "/technology/bridge/withdraw-gateways/" }
88
---
99

1010
import ClickToZoom from "../../../../../components/ClickToZoom.astro"
11+
import Aside from "../../../../../components/Aside.astro"
1112
import DepositWorkflow from "../_images/deposit.png"
1213

1314
This document describes how users and developers can utilize gateways to deposit tokens from L1 to L2. We provide several gateways for standard tokens and a gateway router on L1, listed in the table below.
@@ -22,6 +23,13 @@ This document describes how users and developers can utilize gateways to deposit
2223
| `L1ERC721Gateway` | The gateway for ERC-721 token deposits. |
2324
| `L1ERC1155Gateway` | The gateway for ERC-1155 token deposits. |
2425

26+
<Aside type="tip" title="Upgrade Notice">
27+
With the February 2024 Bridge Upgrade, `L1GatewayRouter` will now bypass `L1ETHGateway` when bridging ETH to improve gas efficiency.
28+
29+
The upgrade is expected to be finalized on February 19th, 2024 after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/to-do-slug).
30+
31+
</Aside>
32+
2533
## Overview
2634

2735
<ClickToZoom src={DepositWorkflow} alt="Deposit Workflow" />
@@ -58,6 +66,11 @@ Scroll treats ETH as its native token. We pre-allocate a sufficient amount of ET
5866

5967
6. If the user calls `depositETHAndCall` on L1, `finalizeDepositETH` in the `L2ETHGateway` contract will forward the additional data to the target L2 contract.
6068

69+
<Aside type="tip" title="Upgrade Notice">
70+
With the February 2024 Bridge Upgrade, step 3 will change. `L1GatewayRouter` will now bypass `L1ETHGateway` when depositing ETH to improve gas efficiency.
71+
</Aside>
72+
73+
6174
## Depositing ERC20 Tokens
6275

6376
Several ERC20 gateway contracts are provided to bridge different kinds of ERC20 tokens, such as standard ERC20 tokens, custom ERC20 tokens, and Wrapped ETH token. `L1GatewayRouter` records the canonical mapping of ERC20 tokens to the corresponding ERC20 gateway on the L1. The `L1GatewayRouter` uses `StandardERC20Gateway` as the default ERC20 gateway for new ERC20 tokens unless a custom gateway is already set up.

src/content/docs/en/technology/bridge/withdraw-gateways.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ whatsnext: { "Sequencer": "/technology/sequencer/execution-node/" }
88
---
99

1010
import ClickToZoom from "../../../../../components/ClickToZoom.astro"
11+
import Aside from "../../../../../components/Aside.astro"
1112
import WithdrawWorkflow from "../_images/withdraw.png"
1213

1314
This document describes how users and developers can utilize gateways to withdraw tokens from L2 to L1. We provide several gateways for standard tokens and a gateway router on L2, listed in the table below.
@@ -22,6 +23,13 @@ This document describes how users and developers can utilize gateways to withdra
2223
| `L2ERC721Gateway` | The gateway for ERC-721 token withdrawals. |
2324
| `L2ERC1155Gateway` | The gateway for ERC-1155 token withdrawals. |
2425

26+
<Aside type="tip" title="Upgrade Notice">
27+
With the February 2024 Bridge Upgrade, `L2GatewayRouter` will now bypass `L2ETHGateway` when bridging ETH to improve gas efficiency.
28+
29+
The upgrade is expected to be finalized on February 19th, 2024 after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/to-do-slug).
30+
31+
</Aside>
32+
2533
## Overview
2634

2735
<ClickToZoom src={WithdrawWorkflow} alt="Withdraw Workflow" />
@@ -54,6 +62,10 @@ The withdrawal of ETH token works as follows.
5462
4. The withdrawal execution transaction on L1 calls the `L1ScrollMessenger.relayMessageWithProof` function to finalize the withdrawal. In the case of ETH withdrawal, the `relayMessageWithProof` function calls `L1ETHGateway.finalizeWithdrawETH` to send back ETH to the recipient account on L1.
5563
5. If the user calls `withdrawETHAndCall` on L2, the `finalizeWithdrawETH` in the `L1ETHGateway` contract will forward the additional data to the target L1 contract.
5664

65+
<Aside type="tip" title="Upgrade Notice">
66+
With the February 2024 Bridge Upgrade, step 2 will change. `L2GatewayRouter` will now bypass `L2ETHGateway` when depositing ETH to improve gas efficiency.
67+
</Aside>
68+
5769
## Withdrawing ERC20 Tokens
5870

5971
The withdraw of ERC20 tokens works as follows.

0 commit comments

Comments
 (0)