Skip to content

Commit 703c9cd

Browse files
update bridging exit root sequence
1 parent bb44497 commit 703c9cd

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed
-23.6 KB
Loading

docs/zkEVM/architecture/high-level/smart-contracts/bridging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The unified bridge transfers assets and messages between networks (L1, L2) by calling bridge and claim functions on the [PolygonZkEVMBridgeV2.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/contracts/v2/PolygonZkEVMBridgeV2.sol) contract which is an upgradeable proxy.
1+
The unified bridge transfers assets and messages between networks (L1, L2) by calling bridge and claim functions on the [PolygonZkEVMBridgeV2.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/contracts/v2/PolygonZkEVMBridgeV2.sol) contract which can act as an upgradeable proxy via the library imports.
22

33
This contract is deployed on L1 and there is also one deployed on every L2 network. It communicates closely with an exit root manager contract specific to L1 or L2.
44

docs/zkEVM/architecture/high-level/smart-contracts/exit-roots.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,10 @@ When bridging, the global exit root is updated if the [`forceUpdateGlobalExitRoo
3939

4040
![Update exit roots via bridging flow](../../../../img/cdk/high-level-architecture/update-exit-roots-via-bridging.png)
4141

42-
1. User initiates a bridging transaction by interacting with the `PolygonZkEVMBridgeV2` contract.
43-
2. The `PolygonZkEVMBridgeV2` contract handles the bridging request and forwards it to the `PolygonRollupManager`.
44-
3. The `PolygonRollupManager` updates the local exit root in the `PolygonZkEVMGlobalExitRootL2` contract.
45-
4. The `PolygonZkEVMGlobalExitRootL2` contract confirms that the local exit root has been updated and notifies the `PolygonRollupManager`.
46-
5. The `PolygonRollupManager` then updates the global exit root in the `PolygonZkEVMGlobalExitRootV2` contract.
47-
6. The `PolygonZkEVMGlobalExitRootV2` contract confirms that the global exit root has been updated and notifies the `PolygonRollupManager`.
48-
7. The `PolygonRollupManager` completes the bridging process and notifies the `PolygonZkEVMBridgeV2`.
49-
8. The `PolygonZkEVMBridgeV2` informs the iuser that the bridging transaction is completed.
42+
1. The user interacts with the `PolygonZkEVMBridgeV2` contract by calling the `bridge()` and `claim()` functions.
43+
2. For both bridge() and claim():
44+
`PolygonZkEVMBridgeV2` calls `updateLocalExitRoot()` on `PolygonZkEVMGlobalExitRootL2`, which updates the local exit root.
45+
3. If `forceUpdateGlobalExitRoot` is set to true, `PolygonZkEVMBridgeV2` calls `updateGlobalExitRoot()` on `PolygonZkEVMGlobalExitRootV2`, which updates the global exit root.
5046

5147
## Rollup local exit trees
5248

0 commit comments

Comments
 (0)