Releases: makerdao/dai.js
dai-plugin-mcd-v0.2.11
Updates dai-plugin-mcd to mcd-v0.2.11. The main changes include:
- Replacing
lock
andwipe
withsafeLock
andsafeWipe
- Using GNT-specific
openLockAndDraw
for safer bag creation - Adjusting expected values in tests after new
drip()
calls were added to the contracts
dai-v0.18.4
- Update
@makerdao/services-core
dependency, which has been moved into the monorepo - Move test helpers into a new monorepo-local
test-helpers
package - Stub out a new service,
MulticallService
, which will be used in the future for reducing network requests and keeping data up-to-date using Multicall
dai-plugin-mcd-v0.2.10-4
- Drop the async methods from CdpType and ManagedCdp; rename the sync methods to be getters (e.g.
getPriceSync()
->price
) - Use the monorepo-local
test-helpers
package - Ensure that
ManagedCdp.create
,getCdp
, andCdpTypeService.connect
wait for prefetching to complete - Update
@makerdao/services-core
dependency to match latest@makerdao/dai
release
dai-v0.17.1
Miscellaneous small improvements and dependency upgrades
All commits since last release (includes commits related to dai-plugin-mcd)
dai-plugin-mcd-v0.2.10-1
This release updates the dai-plugin-mcd
package to MCD v0.2.10. The main change was adding the transferFrom
parameter to the lock
and lockAndDraw
gem functions.
However, it also revealed some bugs in handling tokens that don't support transferFrom
, like GNT. So the release also includes some expansion of the CdpManager
, which now allows for both GNT and DGD CDPs (in addition to the standard ERC20 gems that were already tested).
dai-v0.17.0
The repo has been reorganized using lerna.
Breaking change: When importing a file directly from inside the package, the path now contains dist
.
// old
import addresses from `@makerdao/dai/contracts/addresses/kovan.json`
// new
import addresses from `@makerdao/dai/dist/contract/addresses/kovan.json`
All commits since last release (includes commits related to dai-plugin-mcd)
v0.16.2
Most of the work since the last release has been in the MCD plugin, so there aren't many substantial changes here. The purpose of this release was to bump the versions of a few dependencies: in particular, web3
and @makerdao/services-core
.
v0.16.0
Breaking change: This release extracts the exchange services (OasisExchangeService and Eth2DaiDirectService), which are now available as plugins. If you want to continue using either service, you'll need to install it separately and inject it into your configuration.
First, install:
$ yarn add @makerdao/dai-plugin-eth2dai-direct
Or:
$ yarn add @makerdao/dai-plugin-maker-otc
Then add it to your Maker instance:
import Maker from '@makerdao/dai';
import Eth2DaiDirect from '@makerdao/dai-plugin-eth2dai-direct';
async function createMakerAndSellEth(amount) {
const maker = await Maker.create('browser', {
plugins: [Eth2DaiDirect]
});
await maker.authenticate();
await maker.service('exchange').sell('ETH', 'DAI', amount);
}
v0.15.3
Updates MCD contracts to v0.2.5 and other minor improvements
v0.15.2
Updated ManagedCdp
to include the following functions: getCollateralAmount
, getCollateralizationRatio
, getLiquidationPrice
, isSafe
, minCollateral
, getCollateralAvailable
, getDaiAvailable
.
Included caching functionality to ManagedCdp and CDPType classes. In order to update the contract derived values, the reset
function can be called.