Closed Shirlines closed 5 years ago
I even tried OraclizeAPI_0.4.sol with solidity version 0.4.18, still get the error
This error is something that would arise from the solc version, and should not show on the solc versions you mentioned. Are you sure you're using the compilers mentioned? Truffle normally comes with its own solc bundled. My recommendations is to downgrade to Truffle 4.1.3, which ships with solc 0.4.19 iirc.
This needs to be addressed before solc 0.5, though. Because this will fail, all uses of keccak256(a, b)
need to be changed to keccak256(abi.encodePacked(a,b))
according to the solidity docs
Should be a straightforward pull request, let me know if you want me to take a pass.
We were going to wait for 0.5 to come out before releasing the needed changes, as there would be lots of breaking changes. However, since 0.4.25 unexpectedly came out, but understandably for the circumstances, based on requests we did make a 0.4.25 version (actually compatible down to 0.4.22), which should silence all the compiler warnings in that range and drop deprecated methods. https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.4.25.sol
I'm getting this error using OraclizeAPI_0.5.sol, I've tried solidity versions 0.4.18 to 0.4.20, Can you please help me out?
truffle/contracts/OraclizeAPI_0.5.sol:962:50: Warning: This function only accepts a single "bytes" argument. Please use "abi.encodePacked(...)" or a similar function to encode the data. oraclize_randomDS_setCommitment(queryId, keccak256(delay_bytes8_left, args[1], sha256(args[0]), args[2]));