-
Notifications
You must be signed in to change notification settings - Fork 427
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
Provide a constant method to getPrice() to know how much Oraclize is going to charge #35
Comments
Thanks for the suggestion @jchittoda In regards to it, we don't think it's something critical (as you should already be able to do what you need with the implementation as-is), unless you can prove otherwise, so for now, will add this as a todo for a future update. In regards to getting the price, you can do this already without sending any transaction on-chain, by explicitly using call, which should emulate what you're looking for with the constant specifier addition. Consider using the following You will need to setup a helper from within your own contract, that calls getPrice, and then you call that helper using the above method. You may even be able to set the helper itself constant, getting the effect you want, without requiring an update from us. |
We have already been doing this. But during the solidity compilation it give below warning.
The reason why we want this functionality is because at our platform user pay for the USD rate update in our Dapp, for this to happen, we need to fill in the MetaMask with the exact cost that Oraclize will charge our user for this call. |
We agree this is a change we'll add in in a coming update, it's really not more than an annoyance at this point, in that you get that warning message from the compiler. The functionality is still the same. |
I have the same issue with @jchittoda (the only difference is that I am using
Could you suggest any workaround until a fix is implemented? |
We have a new connector we'll be deploying very soon, that has the view specifier applied to it. Once we have it deployed, we'll in tandem update the oraclizeAPI interface. You can already update that part of the oraclizeAPI @chris-chr to overcome the compilation error you've encountered. Change https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol#L42 to
by adding the view specifier to that interface definition. That is the change we'll be doing ourselves to the api upon deployment. |
Hi, I also would be interested in something to easily get the price of a datasource. I am not interested in a function though. Just a public variable on a library, or something I could call, would do for me. Thanks for all the work you are doing. |
I want to know how much is the fee oraclize is going to charge me before I send a transaction or Oraclize API.
For example I want to know How much Oraclize would charge me for "URL" with specific gasLimit and gasPrice.
getPrice("URL", gasLimit, gasPrice) public constant
If I know this before making the actual request on platform. I can send that specific ETH into my transaction. Also we can charge that much of ETH from our customers.
The text was updated successfully, but these errors were encountered: