This repository is a part of open source oracle project. Initially developed by Espeo Software.
Contains off-chain server for processing requests from the Oracle
contract.
Detailed documentation here: https://gardener.readthedocs.io
Table of contents:
Oracle is a concept of getting information from outside of the blockchain to the smart contracts. Out of the box smart contracts cannot access anything outside of the blockchain network. That's were the oracle idea fits. The information exchange begins with the smart contract emitting an event describing the necessary information. A trusted off-chain server listening for such events parses it, gets data from a data source and passes it back to the smart contract.
As a first step please clone .env.tpl
file into .env
and fill with values:
ADDRESS
- address of the server's account, from which it sends the results of request to the smart contractsPRIVATE_KEY
- private key of the server's accountORACLE_ADDRESS
- address of the Oracle
smart contractDATABASE_URL
- URL with port for MongoDB connectionDATABASE_NAME
- MongoDB database nameNODE_URL
- URL for the WebSocket provider to blockchain networkRequirements:
Node.js >= 7.6
- async/await supportDev environment:
npm install
to install dependencies.npm run ganache
to start a test blockchain.oracle-sm
repository: cd oracle-sm/ && truffle migrate --network development
..env
file if necessary.npm start
.make local
(single command build)make build-local
make clean-local
make
(single command build)make build
make clean
Attention! Check if variables in .env
file are correct.