oliviera9 on v0.7.0
oliviera9 on bump-minor
oliviera9 on master
chore(package.json): bump minor… Merge pull request #117 from pr… (compare)
oliviera9 on bump-minor
chore(package.json): bump minor… (compare)
oliviera9 on add-sepolia
oliviera9 on master
feat: add Sepolia testnet OAR Merge pull request #116 from pr… (compare)
oliviera9 on add-sepolia
feat: add Sepolia testnet OAR (compare)
oliviera9 on add-sepolia
feat: add Sepolia testnet OAR (compare)
Hello @oraclize-support, I am testing a simple query on Remix. The contract compiles and is deployed successfully. However, when I fire the query by clicking on the "update" button I get the following message:
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
execution reverted
I have tried it on Rinkeby and Kovan. Following is the solidity code I am using:
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.6.0;
import "github.com/provable-things/ethereum-api/oraclizeAPI.sol";
contract TempCheck is usingOraclize {
uint public temperature;
event NewTemperature(string description);
event NewOraclizeQuery(string description);
constructor()
public
{
update(); // First check at contract creation...
}
function __callback(bytes32 _myid, string memory _result) public
{
require(msg.sender == oraclize_cbAddress());
emit NewTemperature(_result);
temperature = parseInt(_result); // Let's save it as cents...
// Now do something with the USD Diesel price...
}
function update() public payable{
emit NewOraclizeQuery("query was sent, standing by for the answer...");
oraclize_query("wolframAlfa", "temperature in London");
}
}
update()
function from the constructor. the function fired correctly (the transaction succeeded) once after deploying the contract. however, I did not get any results (temperature of London) back. if i try executing update() again I get the gas estimation error.
Hello @oraclize-support
Did the migration complete correctly? Service is still not working.
Same error on ethereum_bridge.
New error on test_query website. Screenshot: https://imgur.com/a/WykhkEo
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
import "github.com/provable-things/ethereum-api/provableAPI_0.6.sol";
// example of calling an API
contract Example is usingProvable {
struct ApiResult {
string clientSeed;
string serverSeed;
string hash;
}
string public lastResult;
mapping (bytes32 => bool) private validIds;
event LogMessage(string description);
constructor() public {}
function __callback(bytes32 requestId, string memory result) override public {
require(validIds[requestId], "query id is invalid!!!");
require(msg.sender == provable_cbAddress(), "invalid sender detected!!!");
lastResult = result;
}
function getRamdon(string memory clientSeed) public {
require(bytes(clientSeed).length > 0, "client seed is required!!!");
if (provable_getPrice("URL") > address(this).balance) {
emit LogMessage("Contract out of gas!");
} else {
bytes32 requestId = provable_query("URL", string(abi.encodePacked("json(https://oracles.azurewebsites.net/Random/GetRandomHash/", clientSeed, ").path.to[\"clientSeed\", \"serverSeed\", \"hash\"]")));
validIds[requestId] = true;
}
}
}
Hi @oraclize-support , I'm relatively new to smart contract development so I was wondering if you could give me a hand here. I've setup a wallet on the Ropsten Test Network and tried to use your API, but for some reason even though my event logging shows that provable_query was called, the __callback method is never executed. Here's the contract: https://ropsten.etherscan.io/address/0xB303D6E13d2a61C59D95A7E0DF07fac3bAd141Ce#events
And the source code: https://pastebin.com/G03L2ykN