Skip to content
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

Open
nurajc opened this issue Sep 1, 2020 · 11 comments
Open

Not getting the __callback() #100

nurajc opened this issue Sep 1, 2020 · 11 comments

Comments

@nurajc
Copy link

nurajc commented Sep 1, 2020

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");
}
}
}`

@lhoenig
Copy link

lhoenig commented May 12, 2021

I still don't get any callbacks..
Edit: fixed after interaction with Support.

@tj327
Copy link

tj327 commented Jun 8, 2021

hey @lhoenig ,
nice to meet you.
I am having same issues so would you please help me with that?
how did you fix that?

@lhoenig
Copy link

lhoenig commented Jun 8, 2021

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 :)
Now, everything works perfectly on Rinkeby. The other testnets I didn't check.

@tj327
Copy link

tj327 commented Jun 8, 2021

Oh, thank you so much.
Actually, I was having tests on kovan but will switch over rinkeby.

@lhoenig
Copy link

lhoenig commented Jun 8, 2021

No problem! :)

@tj327
Copy link

tj327 commented Jun 15, 2021

hey @lhoenig ,
Is it possible to use encryption service with computation?
https://docs.provable.xyz/#ethereum-advanced-topics-encrypted-queries

@lhoenig
Copy link

lhoenig commented Jun 15, 2021

At the bottom of the page it says "Our encryption system also permits users to encrypt any of the supported datasource options."
I have never tried it myself though.

@tj327
Copy link

tj327 commented Jun 15, 2021

Ok. Thank you.

@vishnu-rai
Copy link

@lhoenig I am trying the same code but the call back function is not being called.
Can you tell me how to fix that

@oliviera9
Copy link
Contributor

The same issue here. I tested on Rinkeby testnet. Perhaps, the Provable stopped support for some testnets?

Hello @legendaryphoenixicarus, you can reach us here for support https://gitter.im/provable/ethereum-api (please indicate the input transaction calling your contract).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@lhoenig @oliviera9 @tj327 @vishnu-rai @nurajc and others