Skip to content

@chainflip/sdk/v1.7.0

Latest
Compare
Choose a tag to compare
@GabrielBuragev GabrielBuragev released this 20 Dec 12:27
· 104 commits to main since this release
7bed81f

1.7.0

Added

  • A new method has been added to the SwapSDK, requestDepositAddressV2. This
    event simplifies deposit channel creation by accepting the quote that is
    returned by the SDK to set the correct assets, DCA parameters, and Boost fee.
  • A new method has been added to the SwapSDK, approveAndExecuteSwap.
    This is a convenience method that can be used to skip the manual token
    allowance approval. Upon calling, the method will make sure there is enough
    ERC20 token allowance before proceeding with initiating the swap.
  • SwapSDK.prototype.getQuoteV2 returns a recommendedSlippageTolerancePercent
    property now. The value is calculated based on current market conditions to prevent
    refunds while protecting against big price movements. It can be passed into
    the requestDepositAddressV2 method to set the slippage tolerance for a swap.
  • SwapSDK.prototype.getStatusV2 and SwapSDK.prototype.getQuoteV2 return an
    estimatedDurationsSeconds property now. It includes the estimated time in seconds
    different stages of a swap:
    • deposit: time for a deposit to be witnessed and the respective swap being scheduled
    • swap: time for a swap to be fully executed
    • egress: time until the output transaction is included in a block

Changed

  • Fill or Kill parameters are now mandatory when opening a deposit channel through
    the default broker endpoint. If you are using your own broker, the parameters are
    still optional for now.
  • SwapSDK.prototype.getStatus: deprecated depositTransactionHash was removed.
    Use depositTransactionRef instead.
  • SwapSDK.prototype.getStatus: deprecated ccmMetadata was removed.
    Use ccmParams instead.
  • SwapSDK.prototype.requestDepositAddress: deprecated ccmMetadata was removed.
    Use ccmParams instead.
  • SwapSDK.prototype.executeSwap: deprecated ccmMetadata was removed.
    Use ccmParams instead.

Full Changelog: https://github.com/chainflip-io/chainflip-sdk-monorepo/compare/@chainflip/sdk/v1.6.6...@chainflip/sdk/v1.7.0