Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 06 13:36

    gskapka on v0.6.0

    (compare)

  • Sep 06 13:35

    gskapka on solidity-0.8.x

    (compare)

  • Sep 06 13:35

    gskapka on master

    fix(package.json): <- rename gi… chore(packages): <- adds `hardh… feat(interfaces): <- adds dir t… and 34 more (compare)

  • Sep 06 13:35
    gskapka closed #112
  • Sep 02 15:31
    gskapka synchronize #112
  • Sep 02 15:31

    gskapka on solidity-0.8.x

    feat(repo): <- adds copies of t… chore(README.md): <- update tha… chore(package.json): <- bump mi… (compare)

  • Sep 02 15:24
    gskapka synchronize #112
  • Sep 02 15:24

    gskapka on solidity-0.8.x

    feat(repo): <- adds copies of t… chore(README.md): <- update tha… chore(package.json): <- bump mi… (compare)

  • Sep 02 14:51
    gskapka synchronize #112
  • Sep 02 14:51

    gskapka on solidity-0.8.x

    fix(api-v0.8.x): <- rm `__callb… feat(repo): <- adds copies of t… chore(README.md): <- update tha… and 1 more (compare)

  • Sep 02 14:00
    oliviera9 commented #100
  • Sep 02 13:56
    legendaryphoenixicarus commented #100
  • Sep 01 10:41
    gskapka edited as member
  • Sep 01 10:27
    gskapka added as member
  • Sep 01 10:12
    gskapka opened #112
  • Sep 01 10:10

    gskapka on solidity-0.8.x

    fix(package.json): <- rename gi… chore(packages): <- adds `hardh… feat(interfaces): <- adds dir t… and 30 more (compare)

  • Aug 11 23:57
    eduardoamdev commented #102
  • Jul 07 13:58

    oliviera9 on add-polygon-oar

    (compare)

  • Jul 07 13:58

    oliviera9 on master

    feat: add Polygon mainnet OAR Merge pull request #111 from pr… (compare)

  • Jul 07 13:58
    oliviera9 closed #111
Nicolás Siplis
@nicolas-siplis
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.
Nicolás Siplis
@nicolas-siplis

Thanks for clarifying, but I think I didn't get my point accross:

Tuesday, 2pm, a provable_query is scheduled to run 1 hour from now.
Tuesday, 2.30pm, a service interruption like you described happens.
Tueday, 4pm, the service returns to normal and the callback gets executed.

Would this callback contain the result from the query as if it was executed at 3pm (as was expected), 4pm (when service resumed working), or some other time?

Oraclize Support
@oraclize-support
@nicolas - in this case the service interruption was on the __callback side and so the queries would still have been executed at the scheduled time.
Nicolás Siplis
@nicolas-siplis
Ahh, that's great news! Thank you so much for the help, hopefully I'll have something to show for it soon enough
Oraclize Support
@oraclize-support
@nicolas - good luck!!
Nicolás Siplis
@nicolas-siplis
@oraclize-support hey guys, I've been checking Etherscan today, waiting for the callback event to be executed, but it does not appear to have occurred so far. Is the Ropsten network still having issues?
Oraclize Support
@oraclize-support
Do you have the query ID?
Nicolás Siplis
@nicolas-siplis

I believe it should be 21ab5f73bb028b55c1b98ff451796646d94c137dd38397cd8990ffa694567d70
It's logged in the top event for https://ropsten.etherscan.io/address/0x139e1fDaF9FfF5B8909a116858E12D25f107CFd0#events

I looked for it in Provable's Check Query status page, but nothing shows up. Guessing it's because that only works for Mainnet Id's though.

Oraclize Support
@oraclize-support
@nicolas - could you retry sending your query?
Nicolás Siplis
@nicolas-siplis
yep: provable_query(1631283300, "URL", "json(https://www.therocktrading.com/api/ticker/BTCEUR).result.0.last")
Oraclize Support
@oraclize-support
@nicolas - did you retry on chain?
Nicolás Siplis
@nicolas-siplis
I haven't, not sure how to do that tbh. Can you elaborate?
I'm assuming you mean there's a way to retry a query given an existing query ID
Oraclize Support
@oraclize-support
@nicolas - No, just send a new query. However I've realised that yours is time delayed, so you wouldn't have the answer until the delay has passed anyway.
Nicolás Siplis
@nicolas-siplis
I've tried sending the query multiple times on different contracts, all on Ropsten. It's never executed the callback so far. Previously I had a delay of 100 seconds, but I switched to using an absolute timestamp for the method call instead. IIUC, 1631283300 would be interpreted as a timestamp which would have been executed a few hours ago.
Oraclize Support
@oraclize-support
@nicolas-siplis - Does the query work without setting delay?
Nicolás Siplis
@nicolas-siplis
Just created a new contract removing the delay parameter, but still doesn't look like there's a callback:
https://ropsten.etherscan.io/address/0xB77CB3F57446c252E986057B2A9e9F840d682e8a#events
coiny123
@coiny123
hello. how is the best way to get random number using provable?
i tried the example on rinkeby but doesn't seem to work
Oraclize Support
@oraclize-support
@coiny123 if you use the random datasource and shown in the examples it should work fine, what happened on rinkeby exactly? Did you not get the callback or did it fail? Can you share a link to your querying tx please so that we can have a look?
Nicolás Siplis
@nicolas-siplis
@oraclize-support did you guys manage to figure out if something's wrong on the Ropsten network still? If you could send me an example of any deployed contract that's verified to have a working callback in any test network, that would be useful too. I can't think of anything I'm doing wrong to be honest, and I'm not comfortable with testing this on the mainnet without checking that it actually works on a non production environment.
coiny123
@coiny123

@coiny123 if you use the random datasource and shown in the examples it should work fine, what happened on rinkeby exactly? Did you not get the callback or did it fail? Can you share a link to your querying tx please so that we can have a look?

@oraclize-support thank you i figured it out...i needed eth in the deployed smart contract address lol (sorry im new to solidity)

coiny123
@coiny123
@oraclize-support am i right to say both 'WolframAlpha' and the example in "randomExample.sol" can do random number generation? Are there significant differences between both?
Oraclize Support
@oraclize-support
@nicolas-siplis - sorry for the late reply, we are looking into it and let you know
Oraclize Support
@oraclize-support
@coiny123 - yes, both can generate random numbers and the main difference is on trust: in the first case you are trusting Wolphram Alpha on the data provided, whilst in the second you are trusting the TEE manufacturer (STMicroelectronics)
Nicolás Siplis
@nicolas-siplis
@oraclize-support thank you, please keep me in the loop!
coiny123
@coiny123

@oraclize-support cool thank you so much. abit of background we are developing an NFT game and need random number for the minting process. chainlink is out of the question so thankfully there is this option which i think is way better than using block difficulty/hash/timestamp

a few more questions

  1. in randomexample.sol which should be the variables to change in the contract, assuming i need a number between 1 to 1000? is it only the ceiling variable? i suppose we don't mess with these two?
    uint256 constant MAX_INT_FROM_BYTE = 256;
    uint256 constant NUM_RANDOM_BYTES_REQUESTED = 7;

  2. opensea NFT contracts now uses ^0.8.0. can we just change the version number in the contract? will the wolfram/ledger method API work or are there any potential issues?

Nicolás Siplis
@nicolas-siplis
@oraclize-support hi, any updates on the callback issues for Ropsten? If not, can you tell me which test networks is Provable currently running on, so I can try and test them as well?
Oraclize Support
@oraclize-support
Hi @nicolas-siplis - sorry if we didn't get back to you, the ropsten service should be back running. Anyway you can also try on rinkeby and kovan
Nicolás Siplis
@nicolas-siplis

@oraclize-support just tested things on Kovan and it looks like the API is partially working.

The provable_query function which doesn't take a timestamp as parameter: provable_query("URL", "https://foobar.com") is working fine, the callback gets executed without issues instantly.

However, trying to schedule the query into the future by taking a look at the current epoch (https://www.epochconverter.com/) and adding a few minutes to it, that's when the callback fails to execute. I can replicate this on every single testnet, and it kind of discourages me to try things in the mainnet with real money at the moment.

Contract code: https://pastebin.com/DjRhrkZG

Etherscan: https://kovan.etherscan.io/address/0x1d5E0B25A60B6dE63e44457290c8ef50a2189f3c

The 2 successful callbacks were executed by calling provable_query without any timestamp. The unsuccessful call due to lack of funds was also logged correctly, but no logs for the scheduled callback can be seen.

Do you have any idea as to why only scheduled calls to Provable could be failing?

Nevermind!! Just as I finished writing this the callback got executed :D Looks like there was a delay of a few minutes more than I expected, but IIRC the actual result from the query is the one from the specific timestamp, regardless of when the callback actually gets executed, which works perfectly!
Oraclize Support
@oraclize-support
@nicolas-siplis glad you got it working correctly, on mainnet the delay/future-timestamp argument should get processed more accurately, without delays
coiny123
@coiny123
hi @oraclize-support any thoughts on my question above? haha
rawinsonde
@rawinsonde
hi @oraclize-support , getting 0 back as ethusd price for some reason from coinbase API, tx'n hash is 0x781c3650b7b595b0a5a5ba54af60ee10c294a9d220da1748563c3df70d3efe5f
Nicolás Siplis
@nicolas-siplis
Hey @oraclize-support , I was wondering if you had any examples of extracting multiple results in one query? Any format works, JSON/XML/HTML doesn't really matter, I'm just curious how those results get put together as a single string.
Oraclize Support
@oraclize-support
Hi @rawinsonde, the android proof service was having issues which has been solved, so if you can retry everything should work as expected
João Benno
@bennoXav
hello @oraclize-support , i'm having some troubles running a smart contract. the error reads: "Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }".
Oraclize Support
@oraclize-support
@benno - this means your contract is failing to deploy for some reason or another. If you forced the transaction through, you'll see it'll revert somewhere. What are you doing and what is your environment?
João Benno
@bennoXav
the error seems to be with the "payable". Not enough eth on metamask isn't the problem.
I'm testing with the youtube views contract example: https://github.com/provable-things/ethereum-examples/blob/master/solidity/YoutubeViews.sol
pragma solidity >= 0.5.0 < 0.6.0;

import "github.com/provable-things/ethereum-api/provableAPI_0.5.sol";

contract YoutubeViews is usingProvable {

    string public viewsCount;

    event LogYoutubeViewCount(string views);
    event LogNewProvableQuery(string description);


    function __callback(
        bytes32 _myid,
        string memory _result
    )
        public
    {
        require(msg.sender == provable_cbAddress());
        viewsCount = _result;
        emit LogYoutubeViewCount(viewsCount);
        // Do something with viewsCount, like tipping the author if viewsCount > X?
    }

    function update()
        public
        payable
    {
        emit LogNewProvableQuery("Provable query was sent, standing by for the answer...");
        provable_query("URL", 'html(https://www.youtube.com/watch?v=9bZkp7q19f0).xpath(//*[contains(@class, "watch-view-count")]/text())');
    }


    constructor()
        public
    {
        update()
    }

}
Adolfo Soler
@AdolfoSoler_twitter
hello, i am getting an error in the functin __callback saying i need to specify override, how do i fix this?
TypeError: Overriding function is missing "override" specifier.
function callback(
^ (Relevant source part starts here and spans across multiple lines).
github.com/provable-things/ethereum-api/blob/master/provableAPI_0.6.sol:359:5: Overridden function is here:
function
callback(bytes32 _myid, string memory _result) virtual public {
^ (Relevant source part starts here and spans across multiple lines).
Kallol Borah
@kallolborah
@oraclize-support every once in a while, I see a HTTP query error for a URL that is correctly working otherwise. Is this is a provable issue ? Please see the log below from ethereum-bridge 5998c8 HTTP query result:
{
"result": {
"_timestamp": 1632625814,
"id": "cdbf9974417cd837613899afdfe6db6d67443d5587e9a81c99c8f0036f5998c8",
"daterange": [
1632625808,
1632627608
],
"_lock": false,
"id2": "480275701fa7888931d79d0e49ab5ab2662062936b42a14e8a06c70103c47326",
"actions": [],
"interval": 3600,
"checks": [
{
"errors": [
"ReadTimeout",
"parsing_helper.wrong_path"
],
"success": true,
"timestamp": 1632625813,
"results": [
""
],
"proofs": [
null
],
"match": true
}
],
"version": 3,
"_timestamp_creation": 1632625808,
"context": {
"protocol": "eth",
"relative_timestamp": 1632625805, "type": "blockchain",
"name": "eth_9DE4150C94"
},
"active": false,
"hidden": false,
"payload": {
"conditions": [
{
"query": "json(https://via-oracle.azurewebsites.net/rates/er/VXUSD_to_VXEUR).rate",
"proof_type": 0,
"check_op": "tautology",
"datasource": "URL",
"value": null
}
]
}
},
"success": true
}
[2021-09-26T03:10:14.356Z] ERROR HTTP query error
[
"ReadTimeout",
"parsing_helper.wrong_path"
]
Oraclize Support
@oraclize-support
Hello @kallolborah, are you sure that such api call doesn’t timeout (as the error suggests) every now and then? If it sometimes need more than X seconds (20 iirc) provable will fail and return an empty answer. Please make sure the apicall always returns in a short period of time.
Kallol Borah
@kallolborah
@oraclize-support thanks, the API timeout duration is set to 90 secs, but in these http query error cases, they return almost immediately. Not sure what is happening but we will check again. Another question I have is - is OAR required for ropsten/testnet deployment ? For some reason, the oracle service does not seem to be working on testnet.
Deepak Majjiga
@MajjigaDeepak
Guys, Can someone help me with step by step process(by referring docs or blogs) to implement a simple oraclized smart contract.