python -m venv env
source env/bin/activate
pip install -r requirements.txt
- IPFS(for hashing purposes only)
- Ethereum Geth
- Python 3.8
- Python package requirements in
requirements.txt
. To install, please runpip install -r requirements.txt
.
- On one terminal, run "ipfs daemon"
- On another, run "geth --dev --ipcpath ~/Library/Ethereum/geth.ipc"
- To simulate some sample data, run "python -m http.server 8000" as a test server in another terminal
- Run "python path_to_main/main.py"
- You may expect an error the first 1-2 times you run the code. This is simply coming from the ethereum chain. It should resolve itself when you run it again.
- To see the full functionality, please run step 4 3-4 times(this may be to give the smart contracts time to deploy, but I'm not sure).
- The "control" file is main.py. Here, you can see a couple of things: the configuration file, and the basic control functions. Registration creates register.sol and registers the patient. Deploy deploys smart contracts. The Oracle is the main loop that facilitates all commands coming from the smart contracts.
- Time limits are set to the amount of times you can request patient graphs as well as the the amount of alerts a physician can get. Physicians can request charts once an hour, and alerts are only sent once a week.
- Compliance for the last 7 days(rather than 30) are calculated when sending alerts, to prevent overlaps w/ compliance every week.
- The information you see in the terminal after running it is simply all events that are sent into the oracle. This helps track actions done by the program.
- Sending SMSes involves using your email address, and password to set it up. Obviously, I didn't want to send over my personal Gmail password, but please feel free to test it yourself by adding in your gmail user/pass, your phone number, and carrier.