Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.56 KB

README.md

File metadata and controls

68 lines (48 loc) · 2.56 KB

Chainlink \u2661 Augur

We combined Chainlink & Augur to get the best of both worlds.

Disclaimer: This code is created in a 32 hour timespan, by one person, with next-to-no sleep. Please bare with me.

Getting Started

These intstructions will get a copy of Chainlink \u2661 Augur running on your machine and will allow you to run unit tests.

Prerequisites

To run this version you're required you to have docker, nodejs and truffle installed.

Installing

After installing all of the prerequisites we'll continue by getting a (very slightly) altered version of augur-core running. This will run a local POA Ethereum blockchain with all the Augur contracts deployed and all contracts addresses needed logged.

Start by cloning this directory if you haven't already:

git clone https://github.com/jasperdg/flux-ethberlinzwei.git

Then checkout the augur-core directory:

cd flux-ethberlinzwei/augur-core

Then start the POA parity chain by entering the following command (this will take a couple minutes):

DISCLAIMER the text between -- is added after the 10am deadline because otherwise the docker wont run, since it's just for getting our container to work and doesnt have anything to do with the core of our solution we hope to be forgiven

-- You need to init git in augur core

git init

And then point origin to the augur-core repo

git remote add origin https://github.com/AugurProject/augur-core.git

This will point to the right git repo during the build.

npm run docker:run:integration:parity

Open a new tab in your terminal, enter the market-oracle directory and install all of the dependencies:

cd ../market-oracle
npm i

Setup Chainlink \u2661 Augur

No, the .pvt file is not a mistake, this is the hardcoded address that will have a crazy amount of Eth and Rep.

The final step before the tests will run is to copy the contract addresses logged by the parity node into constants.js & /contracts/MarketOracle. (Sorry for the double work here, when adding chainlink's actual smartcontracts I had too many arguments in my constructor so I had to hardcode some)

The logs should look something like this (but with different addresses): a screenshot showing how the addresses should look

Running the tests

Make sure you're in the market-oracle directory and run:

npm test