Skip to content

@liquity/lib-ethers-v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 09 Mar 07:44
· 956 commits to master since this release

@liquity/lib-ethers-v2.0.0 (2021-03-09)

Bug Fixes

  • calculate fees at the time of the latest block (d012ad4)
  • correct borrowing rate in recovery mode (fb1242a), closes #300
  • exclude temporary files from package (2ba1d9b)
  • fix event listening in watchTroveWithoutRewards() (f5e70de)
  • increase gas overhead for TXs that may issue LQTY (b3dc588)

Features

  • add maximum acceptable rate param to borrowing and redemption (cac80da)
  • add new property haveUndercollateralizedTroves to LiquityStoreState (6266649)
  • allow increasing truncated redemptions to next lowest redeemable amount (f15167d)
  • introduce UserTrove class (be15c0f)
  • introduce minimum net debt (93e2e77)
  • truncate redemption amount to ensure maximum possible redemption (574e263)
  • update contract ABIs to include new events (05b875b)
  • use latest version of the contracts (d66d88d)

BREAKING CHANGES

  • getTroves() now returns an array of UserTroves.

It would previously return an array of [string, Trove] tuples, where the
first element of the tuple was the Trove owner's address. After the change,
the owner's address can be found as UserTrove.ownerAddress.

  • openTrove(), borrowLUSD() and adjustTrove() have a new
    maxBorrowingRate parameter, and redeemLUSD() has a new maxRedemptionRate
    parameter.

The new parameters are optional, however the position of the existing optional
parameter overrides has changed for these functions. All usages of these
functions where overrides is used must be updated by passing undefined as
second parameter (or a Decimalish value to be used as the maximum acceptable
rate).

  • Troves can no longer be created without borrowing LUSD.

Any transaction that would result in a Trove with less debt than the new
constant LUSD_MINIMUM_DEBT will be reverted.

  • fees has been moved from LiquityStoreBaseState
    to LiquityStoreDerivedState.

Most users won't need to make a code change. However, care should
be taken to upgrade both SDK packages at the same time, to ensure
compatibility.