Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 05 15:35

    oliviera9 on v0.7.0

    (compare)

  • Dec 05 15:34

    oliviera9 on bump-minor

    (compare)

  • Dec 05 15:34

    oliviera9 on master

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

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

    oliviera9 on bump-minor

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

  • Dec 05 12:45

    oliviera9 on add-sepolia

    (compare)

  • Dec 05 12:45

    oliviera9 on master

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

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

    oliviera9 on add-sepolia

    feat: add Sepolia testnet OAR (compare)

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

    oliviera9 on add-sepolia

    feat: add Sepolia testnet OAR (compare)

  • Oct 29 15:03
    xyzbilal edited #115
  • Oct 29 15:02
    xyzbilal opened #115
  • Oct 02 13:52
    0xcompton90 edited #114
  • Oct 02 13:49
    0xcompton90 opened #114
  • Oct 02 13:41
    0xcompton90 opened #113
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.
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!