Skip to content

Commit 32d7207

Browse files
committed
fixes around ETHGateway change and updating dates
1 parent 62487f4 commit 32d7207

File tree

8 files changed

+12
-50
lines changed

8 files changed

+12
-50
lines changed

src/content/docs/en/developers/l1-and-l2-bridging.mdx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,10 @@ In addition to token transfers, the Scroll Messenger contract enables cross-chai
2828

2929
There are many entry points from the user to the Scroll bridge. This will depend on what you want to do and how you want to do it. If you want to send ETH or ERC20 tokens, you should use the `GatewayRouter` . If you want to send NFTs, you should use the `L1ERC721Gateway` or `L1ERC1155Gateway`. If you want to send arbitrary data, you should use the `L1ScrollMessenger`. All Gateway transfers use the Scroll Messenger to send assets cross-chain, whose job is to append the transactions to the Message Queue for L2 inclusion.
3030

31-
<Aside type="tip" title="Upgrade Notice">
32-
With the February 2024 Bridge Upgrade, minor changes will be made to the above flow. Most notably, `L1GatewayRouter` will now bypass `L1ETHGateway` when bridging ETH to improve gas efficiency.
33-
34-
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).
35-
36-
</Aside>
37-
3831
## L2 Gateway architecture
3932

4033
<ClickToZoom src={withdrawWHITE} />
4134

4235
Regarding possible permissionlessly callable entry points, the L2 Gateway Architecture is very similar to L1. The difference is that when sending a message from L2, calling the `appendMessage` function will store the message in an append-only binary merkle tree (aka withdraw tree) in the `L2MessageQueue`. When a new message is sent to the `L2MessageQueue`, the relayer will detect it and store it in the database. When the block is finalized, it will generate a proof of the new merkle path and pass it to the L1geth node to execute on `L1ScrollMessenger` . All finalized withdraw roots will be stored in the rollup contract so we can verify the proof against them. In the next Scroll versions, the Relayer won't be needed since all users will be able to finalize the transaction on L1.
4336

44-
In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities.
45-
46-
<Aside type="tip" title="Upgrade Notice">
47-
With the February 2024 Bridge Upgrade, minor changes will be made to the above flow. Most notably, `L2GatewayRouter` will now bypass `L2ETHGateway` when bridging ETH to improve gas efficiency.
48-
49-
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).
50-
51-
</Aside>
37+
In the upcoming sections, we will explore the technical aspects of the bridge, including the smart contract API required to utilize its capabilities. Detailed guides with code examples are provided in the Developer Guides section to assist developers and users in understanding and implementing these functionalities.

src/content/docs/en/developers/scroll-contracts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet.
7070
- L2 ERC1155 Gateway: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc)
7171
- Gas Oracle (deployed on Mainnet)
7272
- L2 Gas Oracle (*soon to be deprecated*): [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852)
73-
- *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/to-replace-slug)*
73+
- *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction)*
7474
- L2 Message Queue With Gas Price Oracle: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B)
7575

7676
### L2 Predeploys

src/content/docs/en/developers/transaction-fees-on-scroll.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ Computes the amount of L1 gas used for a transaction. Adds the overhead which re
167167

168168
## L1 Originated Transactions
169169

170-
When messaging from L1 to L2, the user does not pay the L1 fee but may need to know how much L2 gas to pay. Contracts on L1 can use an L2 Gas Price Oracle deployed to the L1 to get the gas fee for a given transaction. The oracle also exposes the current l2BaseFee and estimated cross-domain message fee for a given gas limit.
170+
When messaging from L1 to L2, the user pays all transaction fees on L1. The user pays L1 gas fees, but because of this, doesn't need to pay Scroll an L1 Data Fee. They will need to account for L2 Execution Fees in their L1 transaction though, and will need to know how much L2 gas to pay.
171+
172+
Contracts on L1 can use an L2 Gas Price Oracle deployed to the L1 to get the gas fee for a given transaction. The oracle also exposes the current l2BaseFee and estimated cross-domain message fee for a given gas limit.
171173

172174
On mainnet, the `L2GasPriceOracle` is deployed at [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852).
173175

@@ -176,7 +178,7 @@ On Sepolia, an upgraded `L1MessageQueueWithGasPriceOracle` should be used, deplo
176178
<Aside type="danger" title="Upgrade Notice">
177179
After the February 2024 Bridge Upgrade, `L1GasPriceOracle` will be deprecated in favor of `L1MessageQueueWithGasPriceOracle`, which will be available at [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B).
178180

179-
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).
181+
The upgrade is expected to be finalized on February 21, 2024 after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction).
180182

181183
</Aside>
182184
{/* TODO: Add full documentation of key methods */}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The contract `L2GasPriceOracle` deployed on L1 computes the relay fee of a messa
197197
<Aside type="tip" title="Upgrade Notice">
198198
During the February 2024 Bridge Upgrade, `L2GasPriceOracle` will be deprecated, with its functionality moved into the `L1MessageQueueWithGasPriceOracle` contract.
199199

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).
200+
The upgrade is expected to be finalized on February 21, 2024, after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction).
201201

202202
</Aside>
203203

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ This document describes how users and developers can utilize gateways to deposit
2323
| `L1ERC721Gateway` | The gateway for ERC-721 token deposits. |
2424
| `L1ERC1155Gateway` | The gateway for ERC-1155 token deposits. |
2525

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-
3326
## Overview
3427

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

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

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-
7462
## Depositing ERC20 Tokens
7563

7664
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: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ This document describes how users and developers can utilize gateways to withdra
2323
| `L2ERC721Gateway` | The gateway for ERC-721 token withdrawals. |
2424
| `L2ERC1155Gateway` | The gateway for ERC-1155 token withdrawals. |
2525

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-
3326
## Overview
3427

3528
<ClickToZoom src={WithdrawWorkflow} alt="Withdraw Workflow" />
@@ -62,10 +55,6 @@ The withdrawal of ETH token works as follows.
6255
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.
6356
5. If the user calls `withdrawETHAndCall` on L2, the `finalizeWithdrawETH` in the `L1ETHGateway` contract will forward the additional data to the target L1 contract.
6457

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-
6958
## Withdrawing ERC20 Tokens
7059

7160
The withdraw of ERC20 tokens works as follows.

src/content/docs/en/technology/overview/scroll-upgrades.mdx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ The following contracts are used to initiate upgrades and execute upgrades after
2121

2222
### Overview
2323

24-
To reduce bridging costs, we implemented a number of gas optimizations on our bridge and rollup contract suite. The optimization techniques used include the following:
24+
To reduce bridging costs, we implemented several gas optimizations on our bridge and rollup contract suite. The optimization techniques used include the following:
2525

2626
- We will now use constants to store some companion contract addresses, instead of using storage variables. This is possible since these values should (almost) never change. With this change we can save on a few storage load operations.
2727
- We updated the intrinsic gas estimation in `L1MessageQueue` to use a simple upper bound instead of an exact calculation. The two results will be similar for most bridge transactions but the new implementation is significantly cheaper.
28-
- The gateway router contracts will now bridge ETH directly through the messenger contracts, skipping `ETHGateway`.
2928
- We merged two contracts `L1MessageQueue` and `L2GasPriceOracle` to save on call costs from one contract to the other.
3029

3130
### Timeline
@@ -34,15 +33,15 @@ To reduce bridging costs, we implemented a number of gas optimizations on our br
3433
- **Scroll Sepolia:**
3534
- Network Upgrade: January 19, 2024
3635
- **Scroll Mainnet:**
37-
- Upgrade Initiation: February 5, 2024
38-
- Timelock Completion & Upgrade: February 19, 2024
36+
- Upgrade Initiation: February 7, 2024
37+
- Timelock Completion & Upgrade: February 21, 2024
3938

4039

4140
### Technical Details
4241

4342
#### Code Changes
4443
- [Bridge Cost Optimization](https://github.com/scroll-tech/scroll/pull/1011)
45-
- [Audit Fixes](https://github.com/scroll-tech/scroll/pulls?q=is%3Apr+created%3A%3E2024-01-27+created%3A%3C2024-02-19+state%3Aopen+OZ+)
44+
- [Audit Fixes](https://github.com/scroll-tech/scroll/pulls?q=OZ+is%3Apr+created%3A2024-01-27..2024-02-10)
4645
- [Previously deployed version](https://github.com/scroll-tech/scroll/tree/ff380141a8cbcc214dc65f17ffa44faf4be646b6) (commit `ff380141a8cbcc214dc65f17ffa44faf4be646b6`)
4746
- [Version deployed](https://github.com/scroll-tech/scroll/tree/) (commit `TBA`)
4847
{/* TODO: add commit and link for deployed version */}
@@ -62,14 +61,12 @@ To reduce bridging costs, we implemented a number of gas optimizations on our br
6261
- In `ScrollChain`, change `messageQueue` and `verifier` to `immutable`.
6362
- In `L1ScrollMessenger`, change `counterpart`, `rollup`, and `messageQueue` to `immutable`.
6463
- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`.
65-
- In `L1GatewayRouter`, skip `L1ETHGateway` and bridge directly through `L1ScrollMessenger` for ETH deposits.
6664
- Merge `L1MessageQueue` and `L2GasPriceOracle` into a single contract `L1MessageQueueWithGasPriceOracle` (deployed on the same address as the previous `L1MessageQueue`). In this contract we also change `messenger` and `scrollChain` to `immutable`, and simplify `calculateIntrinsicGasFee`.
6765

6866
**Changes to L2 contracts:**
6967

7068
- In `L2ScrollMessenger`, change `counterpart` to `immutable`.
7169
- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`.
72-
- In `L2GatewayRouter`, skip `L2ETHGateway` and bridge directly through `L2ScrollMessenger` for ETH withdrawals.
7370

7471
**Contracts affected:**
7572

src/content/docs/zh/developers/scroll-contracts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import ToggleElement from "../../../../components/ToggleElement.astro"
7171
- L2 ERC1155 Gateway: [`0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc`](https://scrollscan.com/address/0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc)
7272
- Gas Oracle (deployed on Mainnet)
7373
- L2 Gas Oracle (*soon to be deprecated*): [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852)
74-
- *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/to-replace-slug)*
74+
- *after [Feb '24 Bridge Upgrade](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction)*
7575
- L2 Message Queue With Gas Price Oracle: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B)
7676

7777
### L2 预部署合约

0 commit comments

Comments
 (0)