Gnosis Protocol JS it's library, with typescrupt support for Gnosis Protocol.
Gnosis Protocol introduces a new, fully decentralized exchange mechanism for ERC20 tokens with the following properties:
- Batch auctions
- Multidimensional order books with ring trades
- Uniform clearing prices in every batch
This library provides:
- Typescrypt version of the contracts of Gnosis Protocol
- Some handy utils and constants
# Using yarn
yarn add @gnosis.pm/dex-js --save
#Alternatively
npm install @gnosis.pm/dex-js --save
Import the contract:
import { BatchExchangeContract } from ' @gnosis.pm/dex-js'
// Instanciate the smart contract
const web3 = new Web3()
const batchExchangeContract = new BatchExchangeContract({ web3 })
// Alternativelly provide the address
const batchExchangeContract = new BatchExchangeContract({ web3, address: '0x89593E017D4A88c60347257DAfB95384a422da09' })
If you find any issue, or you want to request a feature use https://github.com/gnosis/dex-js/issues
Pull requests are welcomed and are the best way to suggest new features.
# Install dependencies
yarn install
# Build
yarn build
# Build and watch (useful when using "npm link")
yarn build:watch
# Install dependencies
yarn install
# Run
yarn test