Truffle and Ganache test with custom oracle scripts (Thanx to @axic)
(For doubts also consult tinyOracle project)
npm install && cd ethereum
- In a separate termina run ganache with network id 7775
ganache-cli -i 7775
, or edittruffle.js
truffle migrate
or if truffle not installed globally../node_modules/.bin/truffle migrate
- Change OracleAPI.sol adding the new OracleLookup address
truffle migrate -f 3
In a temporary directory do:
npm install --save json-server
In the same directory create a db.json
file with dummy monitor values. Example
{
"monitor": [
{"id": "client", "value": "10"},
{"id": "provider", "value": "60"}]
}
Start oracle server:
node oracle.js