iExecBlockchainComputing / iexec-apps

Dockerfile of all iExec apps
18 stars 23 forks source link

Add Soccer Live Scores #17

Closed erazhu31 closed 4 years ago

erazhu31 commented 4 years ago

Add Soccer Live Scores

Amxx commented 4 years ago

Hi @erazhu31,

Thanks for submitting your pull request. Sorry for the delay reviewing it, we were all pretty busy these days.

So I looked at your code, and here is my feedback:

  1. Dont leave fragments of http query in the variables (APIKEY) https://github.com/iExecBlockchainComputing/iexec-apps/pull/17/files#diff-f98a4099c66131dd9736b27422b0b496R15 [MUST BE FIXED]

  2. Don't just encode the JSON response to send it back to the contracts. You have to parse it, extract whatever is meaningful and encode it in the app. The smart contract has to be able to decode it and extract meaningful info from it (for instance, each team’s score should be encoded as an integer using ABIencode) https://github.com/iExecBlockchainComputing/iexec-apps/pull/17/files#diff-f98a4099c66131dd9736b27422b0b496R74 [MUST BE FIXED]

  3. Add a readme that explains what the app does, and how it works (here is an example) [MUST BE FIXED]

  4. Avoid duplicated files (ex: SoccerLiveScores/src/oracle.js & SoccerLiveScores/oracle.js) [NICE TO FIX]

  5. Indentation consistency (ex: https://github.com/iExecBlockchainComputing/iexec-apps/pull/17/files#diff-f98a4099c66131dd9736b27422b0b496R74) [NICE TO FIX]

  6. Rename the smart contract and modify it to store meaningful results that can be processed onchain. https://github.com/iExecBlockchainComputing/iexec-apps/pull/17/files#diff-27ecb2f393d7af6d4f1b610043a81b8eR7 [MUST BE FIXED]

Please let me know if anything isn’t clear! As soon as these are fixed, the bounty is yours. Best, Hadrien

erazhu31 commented 4 years ago

Hello just commit with all fix

/ deploy app/ ✔ Deployed new app at address 0x23d365a8A73B49b0becA2C2aa6600d53c843DF31 app:0xC8dEE26645D4b25DFCbA81F182D5d10eA263bc2A

/ contract solidity/ LiveScoreOracle deployed at address: 0x77065EAb413D1D128CcE48390b32Fb6537CDD5b6

thanks