Skip to content
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

Update token-bridging doc #156

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ The BOBA token bridge functionality provides a method for the BOBA token to be d

The BOBA Token Bridge is composed of two main contracts the [`EthBridge` (opens new window)](https://github.com/bobanetwork/boba\_legacy/blob/develop/packages/boba/contracts/contracts/lzTokenBridge/EthBridge.sol)(for Ethereum) and the [`AltL1Bridge` (opens new window)](https://github.com/bobanetwork/boba/blob/develop/packages/boba\_legacy/contracts/contracts/lzTokenBridge/AltL1Bridge.sol)(for Alt L1s).

> Note: **To protect our users, we are only allowed to bridge BOBA tokens between Ethereum and Alt L1s.** For example, you are not allowed to directly bridge BOBA tokens from Moonbeam to BNB. What you can do is to bridge it from Moonbeam to Etherem and bridge it to BNB.

Choose a reason for hiding this comment

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

Maybe as a replacement we can add something in the form of - "To protect users, theses bridges only allow to bridge .... However, the light bridge offers an alt option to ..."

Copy link
Author

Choose a reason for hiding this comment

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

I can add this back, though I don't really understand what it's documenting, since fundamentally, with only Boba Eth and Boba BNB, there is no combination of L1s where the bridging does not work. So I don't understand how we can say "To protect our users, we don't allow you to do this thing that doesn't actually exist".

I was trying to come up with a sentence to incorporate the light bridge, but there is no Eth Mainnet <-> BOBA BNB, nor Eth Mainnet <-> BNB Mainnet, as I read in the docs at least. So, I'm having trouble making it make sense in this context.

Any ideas?

Copy link

@souradeep-das souradeep-das Apr 16, 2024

Choose a reason for hiding this comment

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

true - this needs some fixing. As i see it the line mostly wants to inform users that these bridges (EthBridge/AltL1Bridge) are setup (and meant to be) between Ethereum and BNB (L1) (because its the canonical way). Ethereum <> L2 should not be supported because of the finality on L2, and BNB <> Boba ETH wouldn't work either (because tokens have a source at Ethereum)
agree with the latter part about light-bridges

also not strictly a requirement unless you feel its informative to the user

Copy link
Author

Choose a reason for hiding this comment

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

Given that this section is titled:

Using the BOBA Token Bridge Between L1s

I feel like it's clear that this path is not intended for anything related to L2 bridging.

I do think this section could be improved, but my feeling is that removing is the clearest option for the moment.

Choose a reason for hiding this comment

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

sure thing! makes sense


Here we'll go over the basics of using this bridge to move BOBA tokens between Layer 1s.

<figure><img src="../../../../assets/bridge boba tokens from ethereum.png" alt=""><figcaption></figcaption></figure>

For normal users, you can go to [Ethereum Gateway](https://gateway.boba.network) first, then head to [wallet](https://gateway.boba.network/wallet) page. After connecting to it on Ethereum, you can click the `Bridge To Alt L1` button to bridge your BOBA tokens from Ethereum to Alt L1s.

> Video: https://twitter.com/i/status/1598360155825278977
For normal users, bridging can be accomplished simply via the [Light Bridge](contents/developer/boba-basics/bridge-basics/light-bridge.md).

For developers, you can interact with [`EthBridge` (opens new window)](https://github.com/bobanetwork/boba\_legacy/blob/develop/packages/boba/contracts/contracts/lzTokenBridge/EthBridge.sol) to deposit BOBA tokens from Ethereum to Alt L1s.

Expand Down Expand Up @@ -87,7 +83,7 @@ Example code can be found here: [bridgeFromEthereumToAltL.js](https://github.com

<figure><img src="../../../../assets/bridge boba tokens from alt l1s.png" alt=""><figcaption></figcaption></figure>

For normal users, you can go to [Alt L1 Gateway](https://gateway.boba.network) first, then head to [wallet](https://gateway.boba.network/wallet/) page. After connecting to it on Alt L1, you can click the `Bridge To Ethereum` button to bridge your BOBA tokens from Alt L1 to Ethereum.
For normal users, bridging can be accomplished simply via the [Light Bridge](contents/developer/boba-basics/bridge-basics/light-bridge.md).

For developers, you can interact with [`AltL1Bridge` (opens new window)](https://github.com/bobanetwork/boba\_legacy/blob/develop/packages/boba/contracts/contracts/lzTokenBridge/AltL1Bridge.sol) to deposit BOBA tokens from Alt L1 to Ethereum.

Expand Down Expand Up @@ -170,9 +166,6 @@ console.log(`-> Sent ${DEPOSIT_AMOUNT} BOBA tokens to the bridge contract....`);
| Contract Name | Contract Address |
| ----------------------------- | ------------------------------------------ |
| Proxy\_\_EthBridgeToBNB | 0x1A36E24D61BC1aDa68C21C2Da1aD53EaB8E03e55 |
| Proxy\_\_EthBridgeToFantom | 0x9DD4202AA5ee9625d1eaa671E2294014dd434E7E |
| Proxy\_\_EthBridgeToAvalanche | 0xB0003eB166654f7e57c0463F8D1a438eB238c490 |
| Proxy\_\_EthBridgeToMoonbeam | 0x6F537839714761388B6d7ED61Bc09579d5dA2F41 |
| L1\_BOBA | 0x42bBFa2e77757C645eeaAd1655E0911a7553Efbc |

#### BNB Contract
Expand Down