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

Releases: makerdao/dai.js

v0.15.1

09 Apr 03:54
Compare
Choose a tag to compare

Fixes a bug in the GasService that caused incorrect gas prices to be included with transactions.

v0.15.0

02 Apr 23:42
Compare
Choose a tag to compare
  • Faster proxy contract creation
  • The INFURA provider type now constructs v3 endpoint URLs and requires an infuraProjectId
  • Remove restriction on overriding existing contract addresses with smartContract.addContracts
  • User-provided configuration now overrides plugin-provided configuration

v0.14.0

22 Mar 23:17
Compare
Choose a tag to compare

This release integrates gas prices, fetched from EthGasStation, with all contract calls. It also redesigns the API for gasLimit settings (and changes the service's name from GasEstimatorService to GasService ).

The gasPrice from EthGasStation defaults to the fast value, but that preset can be specified in the configuration.

The following configuration settings are available, all of which are optional:

gas: {
  limit: {
    multiplier: 1.55,
    fallback: 4000000,
    absolute: 4000000
  },
  price: {
    transactionSpeed: 'fastest'
  }
}

gasLimit and gasPrice can each be disabled in one of two ways. First, if a specific value is included with the configuration settings, the service will bypass the other functionality and default to the supplied number:

gas: {
  limit: 4000000,
  price: 12
}

Either option can also simply be disabled. For gasLimit, the fallback will be used. For gasPrice, the value will be omitted from all transactions (except where it's explicitly provided):

gas: {
  limit: {
    disable: true
  }
}

v0.13.2+mcd-0.2.2

22 Mar 18:30
Compare
Choose a tag to compare
v0.13.2+mcd-0.2.2 Pre-release
Pre-release
dai-plugin-mcd v0.0.10

v0.13.1

20 Mar 02:35
Compare
Choose a tag to compare

Add the tracksTransactions decorator to DSProxyService.ensureProxy, so that when creating a proxy contract "just-in-time" before running a transaction that requires one, you can track the progress of proxy creation.

Example:

import tracksTransactions from './utils/tracksTransactions';

// pretend this function is inside a service
@tracksTransactions
async function foo(a, b, { promise }) {
  await this.get('proxy').ensureProxy({ promise });
  const d = await callThatNeedsProxy(a, { promise });
  const e = await anotherCall(b, { promise });
  return d + e;
}

const operation = myService.foo();
maker.service('transactionManager').listen(operation, (tx, state) => {
  // this will be called for pending, mined, & confirmed states (assuming 
  // there are no errors) for a tx to create the proxy if it doesn't already 
  // exist, then for the two contract calls, i.e. up to 9 calls
});

const dPlusE = await operation;

v0.13.0

14 Mar 23:56
6ad6069
Compare
Choose a tag to compare

Prior to this release, the gasLimit was defined explicitly as 4000000. This caused max price estimates in MetaMask to display unnecessarily high values. v0.13.0 uses web3's estimateGas function multiplied by a configurable buffer value to set gasLimit dynamically for each transaction. Users can control this with three parameters:

  • absolute: the maximum acceptable gasLimit (defaults to the current block's gas limit)
  • multiplier: the integer used as a buffer on the return value of estimateGas (defaults to 1.55)
  • fallback: the value used as a gasLimit if estimateGas fails (defaults to the gasLimit passed in with transactionSettings in the config object, or 4000000 if none is supplied)

These values can be updated directly. Each setter expects a number greater than zero:

maker.service('gasEstimator').multiplier = 1.75;


This release is also the first one to be built with Babel 7 instead of Babel 6.

v0.12.0

13 Mar 21:05
Compare
Choose a tag to compare

Breaking change: the top-level export Maker no longer has properties Currency, LocalService, etc. These should now be imported from the stand-alone modules @makerdao/currency and @makerdao/services-core.

v0.11.4

06 Mar 21:04
Compare
Choose a tag to compare

Replaces node-fetch with isomorphic-fetch to fix error in frontend builds

v0.11.3

01 Mar 23:10
Compare
Choose a tag to compare

Adds maker.getCdpIds

v0.11.1

13 Feb 22:39
Compare
Choose a tag to compare
  • Moved services-core into external package
  • Bug fixes