-
Notifications
You must be signed in to change notification settings - Fork 97
docs(l2): add quick handsOn on bridging assets between L1 and L2 #2589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lines of code reportTotal lines added: Detailed view
|
1. Prerequisites: | ||
- An L1 account with sufficient ETH balance | ||
- The address of the deployed CommonBridge contract | ||
- An Ethereum utility tool like [Rex](https://github.com/lambdaclass/rex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Found some typos.
- Suggested better Rex commands.
- We are missing a section explaining how to claim the withdrawn funds.
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
crates/l2/docs/README.md
Outdated
2. Make the Withdraw: | ||
|
||
Using Rex we simply use the `rex l2 withdraw` command. | ||
```Shell | ||
# Format: rex l2 withdraw <AMOUNT> <PRIVATE_KEY> [RPC_URL] | ||
rex l2 withdraw 5000 0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a comment saying that if successful, the tx_hash
will be printed in the format: Withdrawal sent: 0x7d01..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
0e45603
crates/l2/docs/README.md
Outdated
|
||
1. Prerequisites: | ||
- An L1 account with sufficient ETH balance | ||
- The address of the deployed CommonBridge contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When developing locally, the value of this address is always the same. Let's put it here for reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 5e728a7
crates/l2/docs/README.md
Outdated
|
||
3. Claim the Withdraw: | ||
|
||
After making the withdraw it has to be claimed in the L1. This is done with the L1 CommonBridge contract. We can use the Rex command `rex l2 claim-withdraw`. Here we have to use the tx hash obtained in the previous step. Also, it is necessary to wait for the block that includes the withdraw to be committed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we have to use the tx hash obtained in the previous step. Also, it is necessary to wait for the block that includes the withdraw to be committed.
Here we have to use the tx hash obtained in the previous step. Also, it is necessary to wait for the block that includes the withdraw to be verified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 54adfb5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
…bdaclass#2589) **Motivation** This PR tries to show some basic walkthrough on moving assets between the two chains in the docs **Description** * Add an example of how to deposit and how to withdraw funds in L2 and L1. * Explain the deposit functions from the CommonBridge contract in the L1 Closes lambdaclass#2524 --------- Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com> Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
Motivation
This PR tries to show some basic walkthrough on moving assets between the two chains in the docs
Description
Closes #2524