You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
A user has fungible tokens on both chain A and chain B. This user bridges a token from chain A to chain B, and now they want to bridge it back. How do you determine whether to call bridgeTokens() or bridgeBackTokens() on chain B?
Solution
Given a fungible or non-fungible token, we need to determine whether the token has been bridged or not. This is important so that we don't end up wrapping existing wrapped tokens.
Implementation
Use isWrappedToken() on the origin bridge to prevent fungible tokens from being wrapped. The return response should be Promise<boolean> .
Note
Functions to call
Fungible: bridgeTokens() or bridgeTokensBack()
Non-Fungible: bridgeNonFungibleTokens() or bridgeNonFungibleTokensBack()
The text was updated successfully, but these errors were encountered:
Problem
A user has fungible tokens on both chain A and chain B. This user bridges a token from chain A to chain B, and now they want to bridge it back. How do you determine whether to call
bridgeTokens()
orbridgeBackTokens()
on chain B?Solution
Given a fungible or non-fungible token, we need to determine whether the token has been bridged or not. This is important so that we don't end up wrapping existing wrapped tokens.
Implementation
Use
isWrappedToken()
on the origin bridge to prevent fungible tokens from being wrapped. The return response should bePromise<boolean>
.Note
Functions to call
Fungible:
bridgeTokens()
orbridgeTokensBack()
Non-Fungible:
bridgeNonFungibleTokens()
orbridgeNonFungibleTokensBack()
The text was updated successfully, but these errors were encountered: