|
1 | | -## Solidity Template |
| 1 | +## CommitPool Single Player Smart Contract repository |
2 | 2 |
|
3 | | -To be used when building a new solidity project from scratch. |
| 3 | + |
| 4 | +[CommitPool](http://commitpool.com/) helps people meet their personal goals by holding themselves accountable. CommitPool users stake money to credibly commit to meeting their goals, and lose their stake when they don’t. |
| 5 | + |
| 6 | +Our MVP focuses on a single goal type for individuals, hence the Single Player mode. |
| 7 | + |
| 8 | +## Getting started |
| 9 | + |
| 10 | +Currently Ganache and Node 14 are not playing well together. To get started: |
| 11 | + |
| 12 | +1. Use node 12 (using nvm is recommended) |
| 13 | +2. ```npm install``` |
| 14 | +3. ```npm run-script build``` |
| 15 | +4. ```npm test``` (to verify the build) |
| 16 | + |
| 17 | +## Features |
| 18 | + |
| 19 | +Single Player mode features: |
| 20 | + |
| 21 | +- [x] Creation of Commitment |
| 22 | +- [ ] Management of Activities |
| 23 | +- [ ] Management of Measures |
| 24 | +- [x] Execution of commitment settlement |
| 25 | + |
| 26 | +#### Creation of Commitment |
| 27 | + |
| 28 | +A commitment consists of an ```activity```, a ```measure``` for given activity, a ```start time```, and ```stake```. We will set the ```end date``` 7 days after the startdate. |
| 29 | + |
| 30 | +#### Management of Activities |
| 31 | + |
| 32 | +An activity consists of a ```name```, a ```measure``` to express activity metrics, an array of accepted ```ranges```, and the ```oracle``` address. Activities can be enabled by setting it to ```allowed```. |
| 33 | + |
| 34 | +For the Single Player mode ```biking``` is the only available activity, as declared in ```scripts/deploy.ts``` |
| 35 | + |
| 36 | +#### Management of Measures |
| 37 | + |
| 38 | +A measure has a ```name``` and can be enabled by setting it to ```allowed```. |
| 39 | + |
| 40 | +For the Single Player mode ```km``` is the only available measure, as declared in ```scripts/deploy.ts``` |
| 41 | + |
| 42 | +#### Execution of commitment settlement |
| 43 | + |
| 44 | +The contract can be called to process the commitment based on the address of the committer. A check on time and completion determines whether the stake is returned to the committer. |
| 45 | + |
| 46 | +## Architecture |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +## Stack |
| 51 | + |
| 52 | +This repository is a fork from [Paul Berg's Solidity Template](https://github.com/PaulRBerg/solidity-template) |
| 53 | + |
| 54 | +## Get in touch |
| 55 | + |
| 56 | +[commitpool.com](http://commitpool.com/) |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +Subscribe to our [Substack](https://commit.substack.com/) |
0 commit comments