The refund by location smart contract is aimed to be used when one party, for example an employer, agrees to pay another party, for example an employee, for being present in a certain geographic area for a certain duration.
Medium article for this repo https://medium.com/@natnaelmelese/etherium-refund-by-location-smart-contract-ecc031ee5f7c
Table of Contents
This repository is used for week 10 challenge of 10Academy. The instructions for this project can be found in the challenge document.
The refund by location smart contract is aimed to be used when one party, for example, an employer, agrees to pay another party, for example, an employee, for being present in a certain geographic area for a certain duration. The employee’s phone sends its GPS location to a smart contract at a certain interval. Based on the pre-agreed contract codified in an Ethereum smart contract, a cryptocurrency payment is executed when all the agreed conditions are met. If at any point, the GPS sensor indicates that an employee is outside the range of the agreed GPS area, the contract state will be updated to indicate that it is out of compliance.
Produce an Ethereum based dApp that has both the smart contract tested and deployed in a testnet and a front end that will allow monitoring of the status.
The repository has a number of files including python scripts, jupyter notebooks, raw and cleaned data, and text files. Here is their structure with a brief explanation.
- Example implementation of https://medium.com/ethereum-developers/the-ultimate-end-to-end-tutorial-to-create-and-deploy-a-fully-descentralized-dapp-in-ethereum-18f0cf6d7e0e
- Truffle implementation of this project
- Front end submodule created using reactjs
- Inbound Location
- Out of bound Location
- Mobile app submodule created using flutter
- Inbound Location
git clone https://github.com/natyrix/Refund-by-Location.git
cd Refund-by-Location
npm -g install truffle
npm install
truffle compile
truffle deploy --network <Desired network>
git clone https://github.com/natyrix/Refund-By-Location-Frontend.git
cd Refund-By-Location-Frontend
npm install --legacy-peer-deps
npm start
git clone git clone https://github.com/natyrix/Refund-by-Location-Flutter.git
cd Refund-by-Location-Flutter
flutter pub get
flutter run --no-sound-null-safety