-
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
Not getting the __callback() #100
Comments
I still don't get any callbacks.. |
hey @lhoenig , |
Hi @nft1126, I asked on Gitter about the issue, and in the end it wasn't a problem with our code but something on Provable's side on Rinkeby. They fixed something interally and then everything worked. What was wrong exactly, I dont know :) |
Oh, thank you so much. |
No problem! :) |
hey @lhoenig , |
At the bottom of the page it says "Our encryption system also permits users to encrypt any of the supported datasource options." |
Ok. Thank you. |
@lhoenig I am trying the same code but the call back function is not being called. |
Hello @legendaryphoenixicarus, you can reach us here for support https://gitter.im/provable/ethereum-api (please indicate the input transaction calling your contract). |
I have tried the code snippet provided in samples before and it worked. Also I tried my own contract with oraclized for GET and POST requests and it worked. But recently I noticed that the callback function is not being called in any of those previously worked samples.
I tried increasing the gas price upto 1000 GEWI for the callback and the result was the same.
I have been trying on Ropsten test network.
Following is a code snipped that is supposed to work, but does not receive a callback. I have imported the proper oraclized solidity file from a file and copied all the content from provable things github to that file.
`pragma solidity ^0.4.22;
import "./oracleService.sol";
contract ExampleContract is usingProvable {
string public ETHUSD;
event LogConstructorInitiated(string nextStep);
event LogPriceUpdated(string price);
event LogNewProvableQuery(string description);
function ExampleContract() payable {
provable_setCustomGasPrice(10000000000);
LogConstructorInitiated("Constructor was initiated. Call 'updatePrice()' to send the Provable Query.");
}
function __callback(bytes32 myid, string result) {
if (msg.sender != provable_cbAddress()) revert();
ETHUSD = result;
LogPriceUpdated(result);
}
function updatePrice() payable {
if (provable_getPrice("URL") > this.balance) {
LogNewProvableQuery("Provable query was NOT sent, please add some ETH to cover for the query fee");
} else {
LogNewProvableQuery("Provable query was sent, standing by for the answer..");
bytes32 queryId = provable_query("URL",
"json(https://www.therocktrading.com/api/ticker/BTCEUR).result.0.last");
}
}
}`
The text was updated successfully, but these errors were encountered: