You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the user signs up, the encrypted token should be stored in the contract (it's encrypted and because it's used to get beginStep it's now bound to our contract, so nobody else who would copy the encrypted token could use it
the methods kill and ownerWithdrawal should be removed
because we don't want to replace centralised servers with almighty owners
for funders, the minimum funding should be bigger than the users signup fee of 0.1
users should NEVER have to update their steps
instead, the frontend should fetch current steps from the fitbit web api to compare it to beginStep to show the user his progress
when the owner closes the round, the contract should now loop over all users and use their fitbit token to get their end steps
maybe you also need to save a beginDate and then compare the endDate to check if the average daily steps were 10.000
the user can close the round only once, so calling the method again will not be possible so the contract can never use the encrypted token again to check step data from users
if possible - this probably expensive transaction to get all steps from all users should be either paid by the funds in the contract or the owner should be re-imbursed for this by taking that amount from the funds
when users come to the page after the round was closed, they should be able to "withdraw" their funds from the contract to get them into their metamask account
add ability to set a custom duration (like e.g. 5 minutes) when deploying a contract instance, but (by default it's 30 days) => owner should only be allowed to close contest rount AFTER duration is over
allow https://alincode.github.io/fitbit-dapp#dev to show "debug buttons"
e.g. beginning of all javascript checks localStorage.debug = locatin.hash === "#dev"
including a button to load a different "contract address"
when in #dev mode, display a button to change contract instance address, so app loads with different contract
similar to https://ninabreznik.github.io/voting-ethereum-contract/
Can you try to find "test fitbit accounts"? so that learners can sign in and use the dapp?
Could you make 1-5 minute screencast videos to explain the topics used in the dapp?
fitbit and how to use fitbit api (get token to make requests)
use fitbit api to get steps (javascript fetch)
use oraclize web api (to encrypt request/token)
use web3.js to call contract methods (e.g. send encrypted request token to contract)
use oraclize in a solidity contract ("computational query?" and what it can do)
people can join the competition, pay the entrance fee & those who actually successfully finish split the funds amognst themselves
some sponsors can join and add funds to the pool
Prepare Fitbit Demo for Remix folks
Can you make a PR to update the english "wording" to improve/change some variable or function names and maybe some other text (...maybe code comments, etc...)
so fitbit users can "sign up" and stake some "money/tokens" (alternatively a health insurance provider could take a small percentage of peoples monthly insurance payment and stake it)
and fitbit users then get personalised fitness challenges
...if people achieved or over achieved those challenges, they get back what they staked OR they get back money from their health insurance provider - essentially making their insurance cheaper
...if people under achieved their staked tokens or part of their monthly insurance fee goes to all the ones who achieved or over achieved :-)
THIS could be the "baseline scenario" and now we could
connect to the fitbit API using some kind of oracle provider service thing (and teach people how to use those)
build the contract
build the frontend (dapp)
write some tests
maybe figure out a good scenario which can be used for debugging
etc....
The result should be presentable in multiple short captured screencasts:
The resources we produce should be chunked into parts that are consumable in 5-10 minutes at most for each of the chunks
We can then later use those in online workshops (or documentation) for other people to learn it
the above is meant as a theme (or use case) on which we can show all the different aspects ethereum users might need to think of when using the ecosystem + we can come up with a "story line" that presents all of the remix features - and then split the presentation in small individually presentable chunks :-) ...because in the real world, people want to use existing web services and databases to either fetch some data from or write some new data to.
1st line: oraclize callback
2st line: 2st call smart contract callUserAPI method
3st line: oraclize callback
4st line: 1st call smart contract callUserAPI method, it should don't need to pay any ether, because 1st call for free.
5st line: it is created smart contract transaction.
Bad news is, it is very unstable in test chain. Even I paid 1 ether, it always out of gas. it should don't need so many gas, it is just so simple smart contract. I asked the oraclize team, I am waiting for the their reply.
the function is correct, because not always happened "out of gas", I can get correct callback sometime.
question of privacy (if token is sent over blockchain vs. if all the competition is hosted on centralized server, problem of trust (escrow), problem of transparency (did they pay all contestants?))
don't replace central server with a smartcontract which has an almighty owner
part of workshop: improve concept of contract by thinking through edge cases
(e.g. does the contest happen if only one participant signs up?)
Story
Problem
Lack of trust in NGOs creates problems when trying to raise donations for a cause. With the use of Smart contracts we can make the flow of donations from donors to recipients transparent.
Cause - example
DONORS
Help us promote a healthy lifestyle by incentivizing people to be more active in their daily life.
CONTESTANTS
Win 1.000$ reward for tracking your steps every day for a month. To make it hassle-free for you to get rewarded for staying active, the smart contract automatically syncs your steps from Fitbit. It checks at the end of the month if you hit your step goal every day. If you did, you will receive the full reward, if not, your reward will be reduced by -33$ for every day you didn't manage to hit your goal.
The text was updated successfully, but these errors were encountered:
@todo
beginStep
it's now bound to our contract, so nobody else who would copy the encrypted token could use itkill
andownerWithdrawal
should be removedbeginStep
to show the user his progressbeginDate
and then compare theendDate
to check if the average daily steps were 10.000duration
(like e.g. 5 minutes) when deploying a contract instance, but (by default it's 30 days) => owner should only be allowed to close contest rount AFTER duration is overhttps://alincode.github.io/fitbit-dapp#dev
to show "debug buttons"localStorage.debug = locatin.hash === "#dev"
#dev
mode, display a button to change contract instance address, so app loads with different contracthttps://ninabreznik.github.io/voting-ethereum-contract/
ROPSTEN
test networksteps in the next ${duration} ${unit ="days"} (10.000 steps per day)
The Fitbit Contest ends in ${ duration - (now - start)} ${unit}
"end contest"
(but if duration is not over yetalert('wait for ' + duration - (now - start))
RESULT:
It would:
THIS could be the "baseline scenario" and now we could
The result should be presentable in multiple short captured screencasts:
the above is meant as a theme (or use case) on which we can show all the different aspects ethereum users might need to think of when using the ecosystem + we can come up with a "story line" that presents all of the remix features - and then split the presentation in small individually presentable chunks :-) ...because in the real world, people want to use existing web services and databases to either fetch some data from or write some new data to.
Links:
To try out:
I build a base function for use Integration call api, and Integration dapp.
Good news is work now, even code still ugly.
https://github.com/alincode/devon4
This is the smart contract information page.
https://rinkeby.etherscan.io/address/0x696a92a0d6b36628dc92e32daba92b85df1c5d5c
Bad news is, it is very unstable in test chain. Even I paid 1 ether, it always out of gas. it should don't need so many gas, it is just so simple smart contract. I asked the oraclize team, I am waiting for the their reply.
the function is correct, because not always happened "out of gas", I can get correct callback sometime.
https://github.com/oraclize/ethereum-bridge
https://github.com/oraclize/truffle-starter
The goal is to code a dapp (solidity + frontend) that pulls data from a regular web API.
slides
Prepare the slides
To include:
Story
Problem
Lack of trust in NGOs creates problems when trying to raise donations for a cause. With the use of Smart contracts we can make the flow of donations from donors to recipients transparent.
Cause - example
DONORS
Help us promote a healthy lifestyle by incentivizing people to be more active in their daily life.
CONTESTANTS
Win 1.000$ reward for tracking your steps every day for a month. To make it hassle-free for you to get rewarded for staying active, the smart contract automatically syncs your steps from Fitbit. It checks at the end of the month if you hit your step goal every day. If you did, you will receive the full reward, if not, your reward will be reduced by -33$ for every day you didn't manage to hit your goal.
The text was updated successfully, but these errors were encountered: