Skip to content

Commit c212584

Browse files
add some class diagrams
1 parent 15c6492 commit c212584

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed
332 KB
Loading
258 KB
Loading
-1010 KB
Loading

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![Polygon Solidity smart contract bridging architecture](../../../../img/cdk/high-level-architecture/bridging-class-diagram.png)
2+
13
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 whose deployment address is an [upgradeable proxy](https://etherscan.io/address/0x2a3DD3EB832aF982ec71669E178424b10Dca2EDe#code). Interaction with the actual contract happens via the proxy.
24

35
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.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![Polygon Solidity smart contract bridging architecture](../../../../img/cdk/high-level-architecture/bridging-class-diagram.png)
2+
13
An exit tree is a binary, append-only, sparse Merkle tree (SMT) whose leaf nodes store bridging data. The exit trees have a depth of 32.
24

35
The Merkle root of an exit tree is known as the exit tree root, and it is the fingerprint of all the information recorded in the exit tree's leaf nodes.

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
comments: true
33
---
44

5-
<!-- https://excalidraw.com/#json=JKZp9QEihifF_B7Z41Dfv,FVNhqQKi9PA1jM0kzUoCsQ" -->
5+
The skeleton-class diagram below reveals the smart contract architecture of rollup and CDK stacks.
6+
7+
![Polygon Solidity smart contract architecture full view](../../../../img/cdk/high-level-architecture/overview-class-diagram.png)
68

79
## Polygon smart contract architecture
810

911
Chain stacks at the node level direct transaction data to the L2 and L1 networks via smart contract calls. The system stores state in binary tree structures containing verifiable local and global exit roots.
1012

11-
The diagram below details the Polygon Solidity smart contract architecture.
13+
The diagram below details the Polygon Solidity smart contract architecture minus the bridging contracts.
1214

1315
![Polygon Solidity smart contract architecture](../../../../img/cdk/high-level-architecture/smart-contracts-full-view.png)
1416

17+
And here is the class diagram for the unified bridge and exit roots activity.
18+
19+
![Polygon Solidity smart contract bridging architecture](../../../../img/cdk/high-level-architecture/bridging-class-diagram.png)
20+
1521
There are four key contract types built into the system design:
1622

1723
- The [consensus contract set](#consensus-contracts).

0 commit comments

Comments
 (0)