Migrating from Hyphen V1

With HyphenV2, our main goal was to remove the dependency on native bridges by decentralising the process of rebalancing on our Liquidity Pools. While much has changed with regards to how our pools work internally, the flow of interacting with them has remained largely unchanged.

Contracts

  1. The depositERC20 and depositNative now accept a new parameter, "dAppName", an arbitrary string that is treated as a dapp-specific identifier. This does not affect any functionality and is only intended for analytics purposes.

  2. Hyphen V2 has a different set of contracts deployed on each chain, please refer to this page for the same

Backend

  1. The base-URL for our public REST APIs has been changed to https://hyphen-v2-api.biconomy.io.

For Test Environment use https://hyphen-v2-integration-api.biconomy.io

Client UI

To integrate Hyphen on UI you'll need to show the dynamic transfer fee to user based on given input conditions as transfer fee is dynamic in nature in current version of Hyphen. To make it easy you can call this Transfer Fee API that gives your all fee components that will be charged on destination chain for a given token and amount.

SDK

  1. SDK has been updated with version 1.0.0 with breaking changes. Always install the latest version though.

  2. Constructor remains the same. There's no change the way you initialise hyphen SDK.

  3. The depositERC20 and depositNative now accept a new parameter, "dAppName", an arbitrary string that is treated as a Dapp specific identifier. This does not affect any functionality and is only intended for analytics purposes.

  4. Most functions have been moved to their respective subclasses to improve the maintainability of the SDK. Following is the list of changes that would be needed to be compatible with the new SDK:

V1 SDK
V2 SDK

preDepositStatus

depositManager.preDepositStatus

checkDepositStatus

depositManager.checkDepositStatus

deposit

depositManager.deposit

getERC20TokenDecimals

tokens.getERC20TokenDecimals

getERC20Allowance

tokens.getERC20Allowance

approveERC20

tokens.approveERC20

getPoolInformation

liquidityPool.getPoolInformation

triggerManualTransfer

transfer.triggerManualTransfer

Last updated