-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
MPMedium PriorityMedium Priority
Description
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()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
MPMedium PriorityMedium Priority