Skip to content

rridtraining/Uptime-Verification-Oraclize

 
 

Repository files navigation

This repo is to demonstrate how an Oraclize smart-contract is used in managing an ISP and its customers account by debiting the ISP account anytime there is a breach in contract in the offtime value gotten from the API using Truffle & the Ethereum-Bridge to do most of the heavy lifting for you. Head on over to the ./test folder to examine the javascript files that thoroughly test the smart-contract, which latter you will find in ./contracts.

📃 Instructions

1) Fire up your favourite console & clone this repo somewhere:

❍ git clone https://github.com/vahiwe/Uptime-Verification-Oraclize.git

2) Enter this directory & install dependencies:

❍ cd Uptime-Verification-Oraclize && npm install

3) Install npx if not already installed:

❍ sudo npm install -g npx

4) Launch Truffle:

❍ npx truffle develop

5) Open a new console in the same directory & spool up the ethereum-bridge:

❍ npx ethereum-bridge -a 9 -H 127.0.0.1 -p 9545 --dev

6) Once the bridge is ready & listening, go back to the first console with Truffle running & compile the contract code

❍ truffle(develop)> compile

7) Migrate the contract to the network:

❍ truffle(develop)> migrate

8) Set the tests going!

❍ truffle(develop)> test

9) Open a new console in the same directory & Start up the ÐApp:

❍ npm run dev

 

📷 Passing Tests:

The passing tests

 

🌐 ÐApp Homepage:

ÐApp Homepage

 

ℹ️ Links:

  • Click here to view a video on setting up the system
  • This is a link to images of the IoT Device used in keeping record of time

 

Happy developing!

About

Uptime Verification System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.5%
  • CSS 19.8%
  • HTML 8.7%