0

I'm making a computation query to Oraclize:

import "https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.sol"

bytes scriptMultihash = "QmVJyXAmxdfuVgazi2PtnwXJdSiYPpkcvv6EydccQKkiZW";

Buffer.buffer memory cborArgs;
Buffer.init(cborArgs, 64);
cborArgs.startArray();
cborArgs.encodeUInt(9000);
cborArgs.endSequence();

oraclize_query("computation", [scriptMultihash, cborArgs.buf]);

The contents of my python script are simply:

print("hello world")

When I run this with bridge, everything is fine. __callback is called, and "hello world" is returned as result.

However, when I change cborArgs.encodeUInt(9000); to cborArgs.encodeUInt(9000000);, no result is returned. I get "result": ""

The behavior seems to be that if I try to encode a uint larger than 9000000, the python script doesn't run.

Is this a bug with CBOR Buffer.buffer, and/or oraclize_query?

I was able to change my spec and use a lower number, so I don't care for my own personal app at this point. Just being a good citizen and reporting a potential problem.

  • thanks for reporting. I'm with Oraclize, and we will investigate this and see what's going on and then update you here! Do you mind sharing the solc version you used when trying this? And if the contract was deployed on a public testnet, its address may prove useful. – DenisM Apr 29 '18 at 14:23
  • I'm using version 0.4.18 – jazzhole Apr 29 '18 at 18:10
  • This is using a local test network -- bridge / ganache. – jazzhole Apr 29 '18 at 18:11
  • I actually ended up ditching CBOR in favor of using the uint to string oraclize utilites. Was unable to figure out the issue described here: ethereum.stackexchange.com/questions/47001/… – jazzhole Apr 29 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.