To withdraw user's original token on original chain, FE(front-end) needs to do the following things:
  1. 1.
    Get basic pegged configs through cBridge gateway. The same api as general token transfer
  2. 2.
    Check user's on-chain token allowance for cBridge PeggedTokenBridge contract. If the allowance is not enough for burn, trigger the corresponding on-chain approve flow
  3. 3.
    Submit on-chain burn request to cBridge PeggedTokenBridge contract on pegged chain
  4. 4.
    Get transfer status repeatedly to check whether the burn/withdraw is complete.
Copy link