Bridge articles overhaul#3287
Open
anegg0 wants to merge 10 commits into
Open
Conversation
…teway Documents the standardized token registration template for cases where the parent chain token can't self-register (non-upgradeable, missing ICustomToken). Covers the RegisterAndSetArbCustomGatewayAction contract, the calldata generator script, Tally proposal submission, and the post-execution sequence. Cross-links from setup-generic-custom-gateway.mdx (Step 1 prerequisite mention and FAQ entry). New sidebar entry under Configure token bridging. Sources: - https://github.com/OffchainLabs/governance/blob/main/src/gov-action-contracts/token-bridge/RegisterAndSetArbCustomGatewayAction.sol - https://forum.arbitrum.foundation/t/announcement-of-standardized-token-registrations-template/29764 - https://gist.github.com/gzeoneth/439dedc7bdd971345657a04c266daf00
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| Auctioneer code: https://github.com/OffchainLabs/nitro/tree/master/cmd/autonomous-auctioneer | ||
|
|
||
| ## Architecture |
Contributor
There was a problem hiding this comment.
Suggested change
| ## Architecture |
|
|
||
| ## How to use it? | ||
|
|
||
| Any auction participant looking to submit a valid bid will need to access the Timeboost Reserve Pricer API to get the round and minimum bid amount. There are 2 API endpoints that can be access using the following command |
Contributor
There was a problem hiding this comment.
Suggested change
| Any auction participant looking to submit a valid bid will need to access the Timeboost Reserve Pricer API to get the round and minimum bid amount. There are 2 API endpoints that can be access using the following command | |
| Any auction participant looking to submit a valid bid will need to access the Timeboost Reserve Pricer API to get the round and minimum bid amount. There are two API endpoints that can be access using the following command |
| `curl -H "Authorization: Bearer replace_with_api_token" ip_addr:port/api/latest` | ||
|
|
||
| - `/api/latest` which returns the newest reserve price and round | ||
| - `/api/recent` which returns the reserve price and rounds of the last 2 hours |
Contributor
There was a problem hiding this comment.
Suggested change
| - `/api/recent` which returns the reserve price and rounds of the last 2 hours | |
| - `/api/recent` which returns the reserve price and rounds of the last two hours |
|
|
||
| <VanillaAdmonition type="info"> | ||
|
|
||
| **Audience and scope.** This guide covers registration on Arbitrum One. The Solidity interfaces, SDK calls, and on-chain mechanics generalize to any Arbitrum chain — including Arbitrum Nova and chains you operate yourself — but the registration fallback for non-upgradeable parent chain tokens differs: |
Contributor
There was a problem hiding this comment.
Suggested change
| **Audience and scope.** This guide covers registration on Arbitrum One. The Solidity interfaces, SDK calls, and on-chain mechanics generalize to any Arbitrum chain — including Arbitrum Nova and chains you operate yourself — but the registration fallback for non-upgradeable parent chain tokens differs: | |
| **Audience and scope.** This guide covers registration on Arbitrum One. The Solidity interfaces, SDK calls, and on-chain mechanics generalize to any Arbitrum chain—including Arbitrum Nova and chains you operate yourself—but the registration fallback for non-upgradeable parent chain tokens differs: |
|
|
||
| import TokenCompatibilityPartial from '../partials/_token-compatibility.mdx'; | ||
|
|
||
| The interfaces above also place a few constraints on how your token implements standard ERC-20 behavior. Review these before continuing: |
Contributor
There was a problem hiding this comment.
Suggested change
| The interfaces above also place a few constraints on how your token implements standard ERC-20 behavior. Review these before continuing: | |
| The interfaces above also place a few constraints on how your token implements standard **ERC-20** behavior. Review these before continuing: |
| /** | ||
| * For the purpose of our tests, here we deploy an standard ERC20 token (L1Token) to L1 | ||
| * It sends its deployer (us) the initial supply of 1000 | ||
| * For the purpose of our tests, here we deploy a standard ERC-20 token (L1Token) to the parent chain. |
Contributor
There was a problem hiding this comment.
Suggested change
| * For the purpose of our tests, here we deploy a standard ERC-20 token (L1Token) to the parent chain. | |
| * For the purpose of our tests, here we deploy a standard **ERC-20** token (`L1Token`) to the parent chain. |
|
|
||
| /** | ||
| * For the purpose of our tests, here we deploy an standard ERC20 token (L2Token) to L2 | ||
| * For the purpose of our tests, here we deploy a standard ERC-20 token (L2Token) to the child chain. |
Contributor
There was a problem hiding this comment.
Suggested change
| * For the purpose of our tests, here we deploy a standard ERC-20 token (L2Token) to the child chain. | |
| * For the purpose of our tests, here we deploy a standard **ERC-20** token (`L2Token`) to the child chain. |
| You can bridge tokens between the parent and child chain using the origin parent chain token and the custom token deployed on the child chain, along with the router and gateway contracts from each layer. | ||
|
|
||
| Suppose you want to see an example of bridging a token from the parent to the child chain using Arbitrum’s SDK. In that case, you can check out [How to bridge tokens via Arbitrum’s standard **ERC-20** gateway](/build-decentralized-apps/bridging/deposit/tokens.mdx), specifically in Steps 2-5. | ||
| For a fully working end-to-end implementation of every step on this page — contract sources, deployment scripts, registration call, and post-registration checks — see the [`custom-token-bridging` tutorial package](https://github.com/OffchainLabs/arbitrum-tutorials/tree/master/packages/custom-token-bridging). |
Contributor
There was a problem hiding this comment.
Suggested change
| For a fully working end-to-end implementation of every step on this page — contract sources, deployment scripts, registration call, and post-registration checks — see the [`custom-token-bridging` tutorial package](https://github.com/OffchainLabs/arbitrum-tutorials/tree/master/packages/custom-token-bridging). | |
| For a fully working end-to-end implementation of every step on this page—contract sources, deployment scripts, registration call, and post-registration checks—see the [`custom-token-bridging` tutorial package](https://github.com/OffchainLabs/arbitrum-tutorials/tree/master/packages/custom-token-bridging). |
|
|
||
| ### One of the retryables didn't redeem. How do I recover? | ||
|
|
||
| `registerCustomToken` produces two parent-to-child retryables (one for the router, one for the gateway). If either fails to auto-redeem — for example, because the supplied gas wasn't enough — the corresponding child chain mapping won't update and the verification calls in [Step 4](#verify-the-registration) will return `0x0000…0000`. Manually redeem the failed retryable from the child chain by calling `redeem()` on the message; see [Parent-to-child messaging](/how-arbitrum-works/deep-dives/l1-to-l2-messaging.mdx) for the procedure. Registration succeeds as soon as both retryables are redeemed. |
Contributor
There was a problem hiding this comment.
Suggested change
| `registerCustomToken` produces two parent-to-child retryables (one for the router, one for the gateway). If either fails to auto-redeem — for example, because the supplied gas wasn't enough — the corresponding child chain mapping won't update and the verification calls in [Step 4](#verify-the-registration) will return `0x0000…0000`. Manually redeem the failed retryable from the child chain by calling `redeem()` on the message; see [Parent-to-child messaging](/how-arbitrum-works/deep-dives/l1-to-l2-messaging.mdx) for the procedure. Registration succeeds as soon as both retryables are redeemed. | |
| `registerCustomToken` produces two parent-to-child retryables (one for the router, one for the gateway). If either fails to auto-redeem—for example, because the supplied gas wasn't enough — the corresponding child chain mapping won't update and the verification calls in [Step 4](#verify-the-registration) will return `0x0000…0000`. Manually redeem the failed retryable from the child chain by calling `redeem()` on the message; see [Parent-to-child messaging](/how-arbitrum-works/deep-dives/l1-to-l2-messaging.mdx) for the procedure. Registration succeeds as soon as both retryables are redeemed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Improvements on gateway conceptual parts and setup instructions.
Re-add Timeboost article that wasn't exposed.
Document type