Loopring protocol smart contract version2
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ABI Moved trade history from TradeDelegate to TradeHistory Nov 26, 2018
contracts delete unused event in IOrderCanceller Dec 13, 2018
deployment-source/v2.0.1-snapshot update deployment info Nov 23, 2018
migrations Moved trade history from TradeDelegate to TradeHistory Nov 26, 2018
test Added rounding error checking for fillAmountB + zero fill checking Dec 7, 2018
util Moved trade history from TradeDelegate to TradeHistory Nov 26, 2018
.dockerignore Test docker (#88) Nov 8, 2017
.gitignore delete unused event in IOrderCanceller Dec 13, 2018
.soliumignore fixed all but 1 solium errors and warnings (#32) Oct 16, 2017
.soliumrc.json Disabled no-experimental solium warnings for now Jul 20, 2018
.travis.yml Added EIP712 signing for orders Nov 12, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Nov 17, 2017
Dockerfile.ganachecli fix npm docker run issue. Oct 11, 2018
Dockerfile.test fix npm docker run issue. Oct 11, 2018
LICENSE Initial commit Aug 22, 2017
README.md update readme Nov 23, 2018
deployment.md update deployment.md Nov 27, 2018
docker-compose.yml fix npm docker run issue. Oct 11, 2018
ganache.sh Added one-to-many tests + updates for simulator changes Oct 11, 2018
genAbi.sh update genAbi.sh and abi files Nov 14, 2018
globals.d.ts remove util directory, use protocol-simulator-core package instead Aug 27, 2018
package-lock.json standardizing Nodejs version Oct 31, 2018
package.json Added rounding error checking for fillAmountB + zero fill checking Dec 7, 2018
truffle.js update migrate script for testnet deployment Oct 23, 2018
tsconfig.json add tokenRecipient in simulator Aug 28, 2018
tslint.json formatting May 5, 2018

README.md

Loopring Protocol Smart Contracts

Build Status

Compile

If you are using Windows:

npm install --global --production windows-build-tools

Then run the following commands from project's root directory:

npm install
npm run compile

Run Unit Tests

  • run npm run ganache from project's root directory in terminal.
  • run npm run test from project's root directory in another terminal window.
  • run single test: npm run test -- transpiled/test/xxx.js
  • print info logs in tests: npm run test -- -i
  • print more detailed debug logs in tests: npm run test -- -x

Run Unit Tests inside Docker

If you prefer to use docker, you can install docker first, then run the following:

npm run docker

If you do not have node/npm installed but still wish to use docker, you can run the commands manually:

docker-compose up --build --abort-on-container-exit
docker-compose logs -f test

The logs command is optional but will give you an easy to read output of the tests without the output from testrpc mixed in (though the combination of both is good for debugging and is why they're not being silenced.)

Deployment

  • deploy on testnet(rinkeby or ropsten)
    • fill the mnemonic phases of your account in truffle.js
    • get some ethers from rinkeby/ropsten faucet.
    • run npm run migrate -- --network rinkeby or npm run migrate -- --network ropsten

More