Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

v0.16.0

Compare
Choose a tag to compare
@ethanbennett ethanbennett released this 14 May 05:53
· 1773 commits to dev since this release

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);
}