-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wind feed Oracle #28
Wind feed Oracle #28
Conversation
Results for the run on kovan is a file, this does not match the expected result of an oracle (which results must be encoded so that they are processed onchain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall very good proposition. An endpoint change is needed to make the result deterministic. Other then that is good for me !
|
||
const url = "https://api.openweathermap.org/data/2.5/weather"; | ||
const query1 = `${url}?lat=${lat}&lon=${long}&appid=${APIKEY1}`; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good but not deterministic. I would suggest replacing lat/lon with lat/lon/time and use the endpoint:
http://history.openweathermap.org/data/2.5/history/city?lat={lat}&lon={lon}&type=hour&start={start}&cnt={cnt}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Amxx
Thanks for your review. But historical data is not for free subscription . https://openweathermap.org/faq#error401
I don't know what to do next.
var nd = new Date(utc + (1000 * results.timezone)); | ||
|
||
|
||
timestamp = nd.getTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If moving from lat/lon to lat/lon/time → use the time as a timestamp (deterministic)
Ok @janus, that will work with live data then! great work by the way. Expect the bounties to be released in two weeks maximum (hopefully before that), thanks! |
@sulliwane |
This is my Wind Feed Oracle.
It is live on kovan and completed.
https://explorer.iex.ec/kovan/deal/0x7c9612d23545e8bef8fa76b9deb64398537c9c7c0ee0c8a8f38b15f7bbecdd42