-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Better oracle interfaces #16 #971
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
Conversation
…eppelin-solidity into better_oracle_interfaces_16
|
Hi @miktam, thanks for your contribution! I think this is not receiving enough attention because the code may be a bit complex and unintuitive (an I have two suggestions for you (feel free to follow either!):
What do you think? |
|
@nventuro, thank you for the feedback! let's try with the splitting it to the smaller chunks (p1), so we could test ideas from practical perspective faster. |
|
Awesome! I look forward to reviewing those :) |
…eppelin-solidity into better_oracle_interfaces_16
|
I'd just like to remark that there is a draft EIP about oracles being discussed over at ethereum/EIPs#1161 |
|
Thanks for letting us know @cag! Could you provide us with a rough estimate on how long you think that EIP might take until it's finalized? Not sure how I feel about this PR now that I know that discussion is taking place: the contract proposed here is a bit more complex than the minimal EIP interface (e.g. it adds rewards). @frangio @shrugs care to share thoughts on this? |
|
I would prefer that we implement as base contract that conforms to the eventual standard, as well as any enhancements via inheritance/composability. |
|
@miktam good question, it's always a hard choice. If you don't think the interface will deviate much, I'd say go for it, otherwise wait for it to settle. Usually there just ends up being one or two small issues holding an EIP back, so you can make a judgement call on it and start implementing, eventually updating it. But totally up to you :) |
|
@cag could you please take a look if current implementation covers the draft version of EIP 1154?
|
|
@miktam Hey, thanks for considering the EIP! As you may be aware, the proposal's still pretty unstable. I hope this is fine for you, as you may have to make some updates. For example, there is an additional I want to note two changes that will affect this PR:
That statement means whether or not a report is acceptable is up to the For example, lets say you have some sort of |
|
@cag great, thank you for the update, it will be reflected in the PR! |
Changed result from bytes32 to bytes
|
It seems there's an implementation for @cag's EIP here => https://github.com/levelkdev/tidbit. Shall we still aim to introduce same oracle interfaces to Open-Zeppelin too? |
|
I think them being in tidbit makes sense, unless @cwhinfrey would rather us merge it here and handle maintenance? |
|
I'll leave it up to you guys to decide then! Closing this for now, but feel free to open a separate PR to bring those contracts here :) |
Fixes #16
🚀 Description
Introduces ability to designate the oracle, with ability to fund the contract to be pulled by oracle if data was submitted according to the predefined rules: frequency of the update and amount of updates.
Flow:
3a) if oracle followed frequency rules, it could claim the reward
3b) if oracle missed the maximum frequency (was late), owner could claim funds back
npm run lint:all:fix).