Skip to content

Commit

Permalink
Merge branch 'sb-port-docs-to-reorg' of ssh://github.com/matter-labs/…
Browse files Browse the repository at this point in the history
…era-contracts into kl/port-notion
  • Loading branch information
kelemeno committed Oct 26, 2024
2 parents a1b1106 + 9e4d256 commit 98c2ca6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 12 deletions.
18 changes: 6 additions & 12 deletions docs/bridgehub/L1 ecosystem contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,15 @@ This step ensures that the baseToken will be backed 1-1 on L1.

If the transaction is successful, the `request.l2Value` will be minted on the `request.l2Contract` address (it can potentially transfer these funds within the transaction). The rest are minted to the `request.refundRecipient` address. In case the transaction is not successful, all of the base token will be minted to the `request.refundRecipient` address. These are the same rules as for the zkSync Era.

FIXME: the diagrams below are not relevant
***Diagram of the L1→L2 transaction flow on L1 for direct user calls, the baseToken can be ETH or an ERC20:***

***Diagram of the L1→L2 transaction flow on L1 when the baseToken is ETH:***

![requestL2TransactionDirect (ETH) (2).png](./L1%20smart%20contracts/requestL2TransactionDirect-ETH.png)

***Diagram of the L1→L2 transaction flow on L1 when the baseToken is an ERC20:***

![requestL2TransactionDirect (ERC20) (3).png](./L1%20smart%20contracts/requestL2TransactionDirect.png)
![requestL2TransactionDirect (ETH) (2).png](./L1%20smart%20contracts/requestL2TransactionDirect.png)

***Diagram of the L1→L2 transaction flow on L2 (it is the same regardless of the baseToken):***

![L1-_L2 tx processing on L2.png](./L1%20smart%20contracts/L1-L2%20tx%20processing%20on%20L2.png)
![requestL2TransactionTwoBridges](./L1%20smart%20contracts/requestL2TransactionTwoBridges_token.png)

![L1-_L2 tx processing on L2.png](./L1%20smart%20contracts/L1_L2_tx_processing_on_L2.png)

### Limitations of custom base tokens in the first release

Expand Down Expand Up @@ -306,9 +302,7 @@ This call will return the parameters to call the l2 contract with (the address o

***Diagram of a depositing ETH onto a chain with USDC as the baseToken. Note that some contract calls (like `USDC.transerFrom` are omitted for the sake of consiceness):***

FIXME: the following diagram is outdated.

![requestL2TransactionTwoBridges (SharedBridge) (1).png](./L1%20smart%20contracts/requestL2TransactionTwoBridges-depositEthToUSDC.png)
![requestL2TransactionTwoBridges (SharedBridge) (1).png](./L1%20smart%20contracts/requestL2TransactionTwoBridges_depositEthToUSDC.png)

## Generic usage of `BridgeHub.requestL2TransactionTwoBridges`

Expand Down
3 changes: 3 additions & 0 deletions docs/data_availability/Rollup DA.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Let's see an example of how the approach above works in rollup DA validators.

## RollupL2DAValidator

![RollupL2DAValidator.png](./L1%20smart%20contracts/Rollup_DA.png)


`RollupL2DAValidator` accepts the preimages for the data to publishes as well as their compressed format. After verifying the compression, it forms the `_totalPubdata` bytes array, which represents the entire blob of data that should be published to L1.

It calls the `PubdataChunkPublisher` system contract to split this pubdata into multiple "chunks" of size `4096 * 31` bytes and return the `keccak256` hash of those, These will be the `blobHash` of from the section before.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/other/L1 smart contracts/Rollup_DA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/other/L1 smart contracts/newChain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 98c2ca6

Please sign in to comment.