Ethereum is a decentralized, open-source blockchain with smart contract functionality. Ether is the native cryptocurrency of the platform. Among cryptocurrencies, Ether is second only to Bitcoin in market capitalization. Ethereum was conceived in 2013 by programmer Vitalik Buterin.
This project is about doing a refund by location smart contract that is aimed to be used when one party, for example an employer, agrees to pay another party, when 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.
As indicated in the overview this project main objective is to create a smart contract in ethereum blockchain that includes the above conditions that are mentioned. In this spirit, the following tasks will be done:
- There will be a function that will accept the location that is sent from the employee device;
- There will be a function that will evalutate the recieved location for a certain duration and decides if the smart contract is met or not;
- There will be a function that gives response if the above condition is not met, an out of compliance error will be fired;
Steps to do the project:
- Developing smart contract.
- With solidity programming
- Testing and deploying the contract on ethereum blockchain
- Building frontend web dApp
- Designing the user interface
- Doing it with Reactjs
- Connecting the frontend and smart contract backend
- Frontend is done with reactjs
- Backend is done with solidity for the smart contract and hardhat frame work is used
https://github.com/RYees/refund-by-location-dapp-ethereum.git
npm install
npm run dev