Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 08 15:39

    bertani on master

    feat: adds contract api compati… chore: changes supported compil… chore: rm deprecated .value(...… and 1 more (compare)

  • Apr 08 15:39
    bertani closed #98
  • Apr 08 15:19
    allemanfredi synchronize #98
  • Apr 08 15:19

    allemanfredi on solidity_0.6

    chore: rm deprecated .value(...… (compare)

  • Apr 05 18:52
    D-Nice commented #99
  • Apr 01 12:37
    BaldyAsh commented #99
  • Mar 28 20:52
    BaldyAsh opened #99
  • Mar 18 12:23
    allemanfredi synchronize #98
  • Mar 18 12:23

    allemanfredi on solidity_0.6

    chore: changes supported compil… (compare)

  • Mar 18 12:19
    bertani commented #98
  • Mar 18 10:09
    riccardopersiani review_requested #98
  • Mar 17 18:11
    allemanfredi review_requested #98
  • Mar 17 18:11
    allemanfredi opened #98
  • Mar 17 18:08

    allemanfredi on solidity_0.6

    feat: adds contract api compati… (compare)

  • Nov 12 2019 02:08
    emilianobonassi removed as member
  • Nov 12 2019 02:08
    emilianobonassi added as member
  • Sep 12 2019 09:12
    riccardopersiani unassigned #88
  • Jul 23 2019 21:52

    D-Nice on master

    chore(ci): improve pipeline Merge pull request #97 from pro… (compare)

  • Jul 23 2019 21:51
    D-Nice closed #97
  • Jul 23 2019 21:51
    D-Nice commented #97
Oraclize Support
@oraclize-support
@hatshu - if your setup was working in Remix but not in Truffle it suggests that it's likely a truffle configuration issue that you're having, which is beyond our remit here. Check your configuration carefully from top to bottom.
praveen2207
@praveen2207
@oraclize-support Do I have to pay to use oraclize in a test network?
Oraclize Support
@oraclize-support
@praveen2207 yes, but using testnet eth, so it has no real cost but it helps you to test the exact behaviour you would see on mainnets
Sachin Mittal
@thesachinmittal
@oraclize-support How can a deploy matic on provable?
Oraclize Support
@oraclize-support
Hi @thesachinmittal - whilst we don't have a specific integration with Matic, it does appear to be EVM based meaning our ethereum-bridge here: https://github.com/provable-things/ethereum-bridge is very likely to allow you to use the Provable service with Matic. You can see some examples here of how to use the ethereum-bridge : https://github.com/provable-things/ethereum-examples/tree/master/solidity/truffle-examples
Sachin Mittal
@thesachinmittal
@oraclize-support Thanks.
angela gilhotra
@nglglhtr
@oraclize-support I believe as long as a sidechain is EVM based, it is possible to use Provable using the tool , Ethereum-bridge. Wanted to know if this tool is dapp dependent or network dependent?
I mean, should i be contacting the sidechain developers or build and use my own bridge?
Oraclize Support
@oraclize-support
@nglglhtr - it's network dependent but if the network is EVM based it may well work right out of the box!
angela gilhotra
@nglglhtr

@oraclize-support I'm having trouble when connecting the bridge to matic's RPC, node bridge -H https://testnet2.matic.network

Error:

[2020-02-20T20:54:47.047Z] INFO deploying the oraclize connector contract...
Error: Error: Invalid JSON RPC response: "<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx/1.10.3 (Ubuntu)</center>\r\n</body>\r\n</html>\r\n"
@oraclize-support , so you suggest this tool to be run by sidechain network instead of each individual dapp?
Oraclize Support
@oraclize-support
@nglglhtr - does the Matic RPC match the ethereum one. The tool bridges your chain and the Provable service.
angela gilhotra
@nglglhtr
@oraclize-support yeah, the RPC is correct.
@oraclize-support is there a way to make this bridge decentralised?
robertmagier
@robertmagier
Hello, I am testing on Kovan and when I look at my query status it says in progress. For last 3 hours. My query is: ce6778e954220e837bc5172b86cbd87e7ff2b549453a431e442a19b43363cb29 When I check it says A correlated Query ID was found, Query ID: a7057eff7dedb9a3043787af1229b2c2d2d0432465e90d489046e0edd534192c and status still in progress. Any reason for that ? https://app.provable.xyz/home/check_query?id=a7057eff7dedb9a3043787af1229b2c2d2d0432465e90d489046e0edd534192c
Oraclize Support
@oraclize-support
Hello @sani69654, we are looking into it and will report here once we have any update regarding the issue
Oraclize Support
@oraclize-support
@dani69654 everything looks right on our side, could you please provide the queryid or the txid triggering the query? Thanks
robertmagier
@robertmagier
My transactions were processed after few hours. All of them together. Are you able to tell me what happened and if I should expect such problems on main net ?Thank you.
robertmagier
@robertmagier
Another question. Is there any reason why Oracle will call my callback function twice ? First call gives me random number and then oracle calls __callback again. It fails because I check for it in my smartcontract. Any reason why it is happening ? Thank y ou.
robertmagier
@robertmagier
@oraclize-support ?
robertmagier
@robertmagier
Is anybody here at all ?
Oraclize Support
@oraclize-support
@robertmagier yes, as described in the docs best practices you should use the queryid to prevent any potentially damaging behaviour, so just to control any side effect you should mark a query as processed after the first tx has been confirmed. For instance if a callback takes too long to be confirmed we may broadcast it again. Please see the “best practices” section of our docs ;)
robertmagier
@robertmagier
Ok. That's what I do. I am rejecting second callback. I was just curious if it is normal that you call it twice. Thank you.
@oraclize-support How about this other issue? Yesterday few transactions were not processed for few hours on Kovan network. And then at one point they were processed all togethger in one moment. Can I expect such behavior also on main net ? Is it related to gas price or is it something on your side ?
Zhao Yang
@zhaoyang626
@oraclize-support I can't test post using test query tool. Is this example working? json(https://api.postcodes.io/postcodes).status {"postcodes" : ["OX49 5NU", "M32 0JG", "NE30 1DP"]} This displays on the website
Oraclize Support
@oraclize-support
@robertmagier we run more experimental code on testnets, I confirm you can expect a much more reliable behaviour on mainnet
Oraclize Support
@oraclize-support
Hi @zhaoyang626, thank you for reporting the issue, the query performed includes some errors which are now being fixed. If you want to try the working request just type this into your terminal:
\`curl -X POST -H 'Content-type: application/json' '[https://api.provable.xyz/api/v1/query/create](https://api.provable.xyz/api/v1/query/create)' -d '{"datasource":"URL","query":\["json\([https://api.postcodes.io/postcodes).status](https://api.postcodes.io/postcodes).status)","{\\"postcodes\\" : \[\\"OX49 5NU\\", \\"M32 0JG\\", \\"NE30 1DP\\"\]}"\]}'`
fluorostani
@fluorostani
@oraclize-support - do you have any plans to release a Solidity 0.6.0 compatible API please?
fluorostani
@fluorostani
@oraclize-support - I ask as we've upgraded our latest project to 0.6.0 and were hoping to use provable within it but we're deploying the contracts soon so will need to look at other solutions if you don't. Many thanks.
Oraclize Support
@oraclize-support
Hi @fluorostani - we do indeed have plans to support Solidity 0.6, it is in the pipeline as we type.
fluorostani
@fluorostani
@oraclize-support That's good news, thanks. Is it likely to be released within the next few weeks do you know?
Oraclize Support
@oraclize-support
@fluorostani - we sure hope so! We can drop you a message in here once it's out!
Jonah Glasgow
@JonahGlasgow
Hey guys running into some issues with the results of the call back function when trying to add the value to storage
Im trying to add the timestamp after the callback result is converted into uint256
Jonah Glasgow
@JonahGlasgow
however everytime i try and add the timestamp value with a deposit function it always returns timestamp = 0 due to the order of operations
any suggestions?
<3
Oraclize Support
@oraclize-support

Hi @JonahGlasgow - why not just just pass the __callback result to postTimestamp, and in there pass it to the stringToUint function?

```function queryTimestamp(_timestamp: String) internal {
stringToUint(_timestamp);
}

function __callback (bytes32 myid, string result) {
if (msg.sender != oraclize_cbAddress()) {
revert();
}
else {
loyaltyTIME = result;
postTimestamp(result);
}
}```

Jonah Glasgow
@JonahGlasgow
@oraclize-support i tried doing that but the results of the call back is taking too long so the result is 0
Contract A

contract TimeMapper is usingOraclize {

string  private loyaltyTIME;
uint256 public timestamp;

event newUpdatedTime (string description);
event LogTimeUpdated (uint256 CurrentTime);


function queryTimestamp() public payable {
  emit newUpdatedTime('Oraclized query was sent, standing by for current time');
  oraclize_query(60,"URL", "json(http://api.timezonedb.com/v2.1/get-time-zone?key=O07REL7V77PR&format=json&by=position&lat=52.3065&lng=-114.0973).timestamp");
}


function __callback (bytes32 myid, string result) {
  if (msg.sender != oraclize_cbAddress()) {
  revert();
}
else {
  loyaltyTIME = result;
  bytes memory b = bytes(loyaltyTIME);
  uint256 uintResult = 0;
for (uint i = 0; i < b.length; i++) { // c = b[i] was not needed
if  (b[i] >= 48 && b[i] <= 57) {
  uintResult = uintResult * 10 + (uint(b[i]) - 48); // bytes and int are not compatible with the operator -.
  timestamp = uintResult;
  emit LogTimeUpdated(timestamp);

      }
    }
  }
}
}
Contract B im trying to add callback results to this function however it always returns 0 because the results are not sent back in time 

/**
* @dev depositloyalty allows users to deposit tokens and partisipate in POL
* daily reward structure, user must deposit tokens in order to claim rewards
*/

function depositLoyalty( address _miner,  uint256 _value) external nonReentrant() returns (bool LoyaltyAccepted){
Sparkle token = Sparkle (0x9bb1E675CF9D585Cf615382959D74C337d50337F);
ProofOfLoyalty storage POL = loyaltyTimestamp[msg.sender];
uint256 _multiplier = 1.0000000 * 10e7;
uint256 loyaltyRequired = 1000 * (10**8); // @dev token amount required for loyalty contract (optional can be modified)
uint256 loyaltyNeeded = loyaltyRequired; // @dev modify required loyalty
uint256 timeLegnth = 60; //@dev exspected loyalty legnth (optional can be modified by contract owner only )  24 hrs = 86400 seconds
uint256 _timeLegnth = timeLegnth;
  require (timeLegnth == 60, 'loyalty timeLegnths do not match');
  require (_timeLegnth == timeLegnth, 'loyalty timeLegnths do not match');
  require (_multiplier == 1.0000000 * 10e7,'multiplier must not be tampered with');
  require(loyaltyRequired == 1000 * (10**8),'User did not send the minimum loyalty amount');
  require(loyaltyRequired == loyaltyNeeded,'User did not send the minimum loyalty amount');
  require(token == Sparkle(0x9bb1E675CF9D585Cf615382959D74C337d50337F),'Please use the correct token contract');
  require(_value >= loyaltyNeeded,'User did not send the minimum loyalty amount');
  queryTimestamp();  ----->  queryTimestamp function is called here from contract A 
if ( _value >= loyaltyNeeded) {
  currentMiners += 1;
  delete timestampRemoved[msg.sender];
  POL._miner = _miner;
  POL._loyaltyNeeded = true;
  POL._rewardApproved = false; 
  POL._value = POL._value + _value; 
  POL._rewardAmount = 0;
  POL._loyaltyDays = 0;
  POL._multiplier = _multiplier;
  POL._depositTime = block.timestamp;  -----> would like to change block.timestamp to the callback result of contract A  
  POL._rewardTime = _timeLegnth+block.timestamp;
  token.transferFrom(msg.sender, this, _value);
}
else {
  revert ('Unexspected error ');    
  return false;
     }
   }
}
Jonah Glasgow
@JonahGlasgow
im assuming its not possible to call queryTimestamp() function and get the callback results in the same TX?
Seams like i need to call timestamp; 15 times before the value actually changes via the callback results
callAmount.PNG
Jonah Glasgow
@JonahGlasgow
after many call attempts the value eventually changes. Is it normal for the results to take that long?
any information you can provide will help guys <3
Oraclize Support
@oraclize-support

@JonahGlasgow - the query and the callback are necessarily asynchronous, you can't have them in the same block because first the query needs to be mined into a block for the Provable architecture to see the query. Then Provable executes the query and creates the __callback transaction, wit the result. This of course comes in a later block. Such is the nature of the blockchain.

As such, you need to wait for the __callback to get called before you'll have your time stamp.

Jonah Glasgow
@JonahGlasgow
Yeah i figured as much sadly i may need to find another solution, thanks for the quick replies and outstanding support all info given was very helpful!
Oraclize Support
@oraclize-support
@JonahGlasgow - No problem - we hope you can find an elegant solution!!
ftppro
@ftppro
Oraclize Support
@oraclize-support
Hello @ftppro, that api seems to return a json, not xml.. this query works: json(https://www.predictit.org/api/marketdata/markets/3633).id