Skip to content

Add tutorial "Deposit ETH to a different address" #91

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

Merged
merged 6 commits into from
Apr 11, 2023

Conversation

TucksonDev
Copy link
Contributor

Added new tutorial for depositing ETH to a different address on L2 using Retryable tickets.

This PR needs to be merged before this tutorial is functional: OffchainLabs/arbitrum-sdk#237

@TucksonDev TucksonDev added the documentation Improvements or additions to documentation label Jan 31, 2023
@TucksonDev
Copy link
Contributor Author

TucksonDev commented Feb 22, 2023

NOTE: The SDK npm package needs to be updated for this tutorial to work: https://www.npmjs.com/package/@arbitrum/sdk

UPDATE: Using the beta version of the npm package.

UPDATE 2: Using latest version of the npm package.

@mahsamoosavi mahsamoosavi self-assigned this Apr 5, 2023
Copy link
Contributor

@mahsamoosavi mahsamoosavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggestions, otherwise LGTM!

## How it works (Under the hood)

For the common case of depositing ETH to the same account on L2, use the tutorial [eth-deposit](../eth-deposit/README.md).
In this specific case, we will use the retryable tickets system to deposit ETH into a different address. We will use the parameter `l2CallValue` of the Retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on Retryable tickets, see [Retryable Tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this specific case, we will use the retryable tickets system to deposit ETH into a different address. We will use the parameter `l2CallValue` of the Retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on Retryable tickets, see [Retryable Tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).
In this specific case, we will use the retryable tickets (Arbitrum's canonical method for creating L1 to L2 messages) to deposit ETH into a different address. We will use the parameter `l2CallValue` of the Retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on Retryable tickets, see [Retryable Tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).

## How it works (Under the hood)

For the common case of depositing ETH to the same account on L2, use the tutorial [eth-deposit](../eth-deposit/README.md).
In this specific case, we will use the retryable tickets system to deposit ETH into a different address. We will use the parameter `l2CallValue` of the Retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on Retryable tickets, see [Retryable Tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this specific case, we will use the retryable tickets system to deposit ETH into a different address. We will use the parameter `l2CallValue` of the Retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on Retryable tickets, see [Retryable Tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).
In this specific case, we will use the retryable tickets system to deposit ETH into a different address. We will use the parameter `l2CallValue` of the retryable ticket to specify the amount of ETH to deposit, and `callValueRefundAddress` to specify the destination address. For more info on retryable tickets, see [retryable tickets documentation](https://developer.offchainlabs.com/docs/l1_l2_messages#depositing-eth-via-retryables).

@TucksonDev
Copy link
Contributor Author

Thanks @mahsamoosavi !
I've added your suggestions and included changes to run the tutorial on a local node (which this one didn't have yet).

@TucksonDev TucksonDev requested a review from mahsamoosavi April 11, 2023 16:06
@TucksonDev TucksonDev merged commit 2c1b7d2 into master Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants