I am using Oraclize for randomness. The range of random numbers I want depends on a variable maxNumber, and will be 0 - maxNumber.
If you scroll to the right of my code snippet below, you'll see maxNumber which I intuitively attempted to concat using +.
Off course that doesn't work and I get a compiler error since I cannot concat uint to a bytes32.
What is the proper way to concat in this situation?
bytes32 queryId = oraclize_query(
"nested",
"[URL] ['json(https://api.random.org/json-rpc/1/invoke).result.random[\"data\"]', '\\n{\"jsonrpc\": \"2.0\", \"method\": \"generateIntegers\", \"params\": { \"apiKey\": \"keyGoesHere\"}\", \"n\": 1,\"min\": 0, \"max\":'"+maxNumber-1+"', \"replacement\": true }, \"id\": 14215${[identity] \"}\"}']",
gasForOraclize
);
https://ethereum.stackexchange.com/a/28671/33496 , in that example they use strConcat, and make the oraclize query 3 different strings which they then concatenate
– savard Apr 28 '18 at 22:24