Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 26 2022 07:11
    aurelienchev opened #118
  • Dec 05 2022 15:35

    oliviera9 on v0.7.0

    (compare)

  • Dec 05 2022 15:34

    oliviera9 on bump-minor

    (compare)

  • Dec 05 2022 15:34

    oliviera9 on master

    chore(package.json): bump minor… Merge pull request #117 from pr… (compare)

  • Dec 05 2022 15:34
    oliviera9 closed #117
  • Dec 05 2022 15:31
    gskapka review_requested #117
  • Dec 05 2022 14:41
    oliviera9 opened #117
  • Dec 05 2022 14:41

    oliviera9 on bump-minor

    chore(package.json): bump minor… (compare)

  • Dec 05 2022 12:45

    oliviera9 on add-sepolia

    (compare)

  • Dec 05 2022 12:45

    oliviera9 on master

    feat: add Sepolia testnet OAR Merge pull request #116 from pr… (compare)

  • Dec 05 2022 12:45
    oliviera9 closed #116
  • Dec 05 2022 11:33
    oliviera9 synchronize #116
  • Dec 05 2022 11:33

    oliviera9 on add-sepolia

    feat: add Sepolia testnet OAR (compare)

  • Dec 05 2022 11:29
    oliviera9 review_requested #116
  • Dec 05 2022 11:29
    oliviera9 opened #116
  • Dec 05 2022 11:29

    oliviera9 on add-sepolia

    feat: add Sepolia testnet OAR (compare)

  • Oct 29 2022 15:03
    xyzbilal edited #115
  • Oct 29 2022 15:02
    xyzbilal opened #115
  • Oct 02 2022 13:52
    0xcompton90 edited #114
  • Oct 02 2022 13:49
    0xcompton90 opened #114
MutΞdTommy.Ξth on L2
@hr12rtk_twitter
@oraclize-support the problem was due to update() called in the constructor. apparently, it can be called only once before it starts throwing the "gas estimation" error. I deployed the contract after removing the 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.
💜 Mel, Educadora Infantil 💜
@Mel_Elices_twitter

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

Oraclize Support
@oraclize-support
@hr12rkt - the first query is free, hence why subsequent queries are throwing the error - your contract is probably not funded.
1 reply
@mel_elices - the migration is almost complete, at which point your bridge will spring back to life.
Oraclize Support
@oraclize-support
Hello everyone, the migration has been completed, we sincerely apologies for the incovenience
MutΞdTommy.Ξth on L2
@hr12rtk_twitter
@oraclize-support is the OraclizeAPI avaialble for latest versions of Solidity?
Oraclize Support
@oraclize-support
@hr12rtk you'll find the available versions here: github.com/provable-things/ethereum-api
cworth33
@cworth33
How do I handle the callback with using path.to to map multiple properties in api response back
i see the __callback in is getting called in the contract but lastResult is not set after the call back
i want to get my result into an ApiResult structure instead of storing the entire json
cworth33
@cworth33
// 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;
        }
    }

}
cworth33
@cworth33
also is there a preference for using oraclizeAPI vs provableAPI? they both seem to be able to do what I'm trying to do
not sure if there is a gas difference
Oraclize Support
@oraclize-support
provableAPI is the latest updated version
cworth33
@cworth33
what about mapping more than 1 value in the json to the callback?
can't seem to format a query that will return anything usable beside entire json or 1 property
I know you said it can be done before I've seen it in chat history but it's not working for me
a working example would be AMAZING
cworth33
@cworth33
image.png
I've tried this in test query and not working
Oraclize Support
@oraclize-support
"path.to" was meant to be a placeholder for the actual path, that's why it doesn't work for you
Have you tried with json(https://oracles.azurewebsites.net/Random/GetRandomHash/test).["clientSeed","serverSeed","hash"] ?
cworth33
@cworth33
I tired that and get no response
do I need to escape the double quotes?
when I've escaped the double quotes it return but appear to be empty message does that mean I need to decode it?
cworth33
@cworth33
perhaps I need a wrapper object?
cworth33
@cworth33
I've created some functions to parse my json...not preferred but it kept me moving for now
Ghost
@ghost~611e11f06da037398483786c
I deployed the ETH query example from the docs, but updatePrice gets reverted... what could cause this?
Oraclize Support
@oraclize-support
@simplemachine92 do you have enough eth to pay for the oracle fee? check the pricing section in the docs
Ghost
@ghost~611e11f06da037398483786c
I solved that issue, but now I'm wondering, how do you include headers in a POST request?
Ghost
@ghost~611e11f06da037398483786c
Am I able to use the url-requests sol in the repo, as my request just needs to include header data and json data?
Oraclize Support
@oraclize-support
Ghost
@ghost~611e11f06da037398483786c
Will I be able to specify my header, and my data using that ds?
Also, does it support POST method?
Oraclize Support
@oraclize-support
that UrlRequests.sol file shows different ways to use it, so absolutely, you can use GET/POST and your own custom headers as shown in the different examples of that file
Ghost
@ghost~611e11f06da037398483786c
I see that the header works there, but can I supply JSON data beside that header?
Oraclize Support
@oraclize-support
@simplemachine92 - as you can see from that example, you'r enow running code via a python and so can do whatever you want!
Dhanush
@Dhanush49294653_twitter
hi
Screen Shot 2021-09-08 at 5.35.53 PM.png
how to handle the error?
Oraclize Support
@oraclize-support
@dhanush - is your ethereum client running and with the account 0 unlocked?
Nicolás Siplis
@nicolas-siplis

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

Might need to disable adblocker to see the pastebin, don't know what's up with that
Dhanush
@Dhanush49294653_twitter
@oraclize-support - well i am using matic rpc so there is no account 0 there.
Oraclize Support
@oraclize-support
@nicolas - there seems to have been a service interruption in Ropsten overnight, it's catching up queries now. Your __callback will get called shortly and future queries will work as expected.
@Dhanush - you'll have to dive into the matic documentation to learn how to interact with its accounts.
Nicolás Siplis
@nicolas-siplis
@oraclize-support thanks for the response! quick followup question then: would the result from the callback contain the response from last night, or be delayed and thus return a more recent response instead? is this a common occurrence in the mainnet?
Oraclize Support
@oraclize-support
@nicolas - __callbacks are unique, you can even track them via their queryIds. This is not a common occurrence on mainnet: For obvious reasons, most of our resources are invested there, and the testnets are more for, well, testing new features etc.