Skip to content

v2.0.0

Compare
Choose a tag to compare
@cag cag released this 05 Apr 16:07
· 39 commits to master since this release

Migration guide from v1.x to v2.x

Hey, welcome to the first set of breaking changes! They're not terribly radical, and require only a few small steps to ensure a smooth transition. Here's the lowdown:

@gnosis.pm/gnosis-core-contracts is now a peerDependency

This mainly affects Node.JS users. Make sure that you install and list the core contracts package separately as a dependency in your project's package.json:

npm install --save @gnosis.pm/gnosis-core-contracts

With v2.x, we plan on supporting a new set of the Gnosis prediction market contracts. With that said, we don't plan on dropping support for the existing contract set! We will leave it up to your application to decide which contract set you wish to use. Stay tuned for the release of v2 of gnosis-contracts, when we will release a corresponding version here which will be compatible.

For the users of the precompiled gnosis.js file, the core contract artifacts are already compiled into the file, so you shouldn't have to change anything.

olympia-token contracts no longer a dependency

This change affects all users depending on the olympiaToken or olympiaAddressRegistry instance variables. If desired, the original Olympia-related contracts now must be imported separately:

npm install --save @gnosis.pm/olympia-token

To emulate 1.x behavior, the following additional code will have to be included:

import olympiaArtifacts from '@gnosis.pm/olympia-token'
// or for CJS:
// const olympiaArtifacts = require('@gnosis.pm/olympia-token')

// ... then, once you have a gnosis = await Gnosis.create(...)
await gnosis.importContracts(olympiaArtifacts, {
    OlympiaToken: 'olympiaToken',
    AddressRegistry: 'olympiaAddressRegistry',
})

Changelog