learning resource
- Oraclize Documentation
- slides - Introduction to fitbit dapp by alincode
- slides - Introduction to oraclize by alincode
npm i
npm start
npm run build
git add -A && git commit -m "bundle"
git push
- signup
you need to wait 2~3 minute, until oraclize callback. then you could see you are signed.
- playerRefund
if contest end over 3 days, but the owner still not end the contest, the user could click refund button, then get money back.
struct Player {
address addr;
uint amount;
string userId;
uint createdAt;
uint beginStep;
uint endStep;
bool refunded;
string encryptHeader;
}
- fund: funder could fund many times, second time will update amount and name.
struct Funder {
address addr;
uint amount;
uint createdAt;
string name;
}
- Step1: contestDone
it will update all user end step and save the doneAt.
- Step2: award
if will check doneAt, make a sure, you already waiting for 10 minutes. then you can call this function.
it will count all winner and award money to winner.