-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improve how to estimate what to pay for Oracle requests/callbacks #3163
Comments
I vote for refund |
Refund or slippage. I remember that there was some issue with refunds. Was it a security problem? I can't recall it |
If the oracle sign more data to waste the gas, you will lose all of them |
I like to see that my opinion was the same hahah #1982 (comment) |
Good, refund is a good feature and solution. |
In the game of duplicates, older ones win to me, let's move this discussion into #1982. |
Summary or problem description
Imagine that you have a smart contract with two methods:
Before calling the
request
method, how can I estimate how much GAS thecallback
cost that I can accurately specify to therequest
method (more specifically, thegasForResponse
param)?It's not possible to call
invokescript
or other methods because the first line ofcallback
usesRuntime.getCallingScriptHash()
, even if the developer knows what theresponse
will look like (i.e., the size of it).Do you have any solution you want to propose?
Instead of providing an accurate way to estimate how much GAS the
callback
would cost, a better solution would be to issue a "refund" back to those who requested the Oracle call. For example, if a higher amount was specified on thegasForResponse
param, then the remainder will be refunded.FYI: @shargon @Jim8y @superboyiii @mialbu
The text was updated successfully, but these errors were encountered: