1

I was trying to use Oraclize just for testing. I was facing problems deploying a sample contract from quick-start section of oraclize doc. I tried to use both testrpc and private network for deployment of smart contract.

On connecting remix to testrpc and deploying contract, I was hit by an error stating:

creation of browser/ExampleContract.sol:ExampleContract errored: Error: sender doesn't have enough funds to send tx. The upfront cost is: 1000000000000000000000000000001934427 and the senders account only has: 99999999999990327865
at runCall (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:69347:10)
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11327:24
at replenish (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8420:17)
at iterateeCallback (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8405:17)
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:8380:16
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:11332:13
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64434:16
at replenish (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64381:25)
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64390:9
at eachLimit (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64314:36)
at /usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:65494:16
at VM.AsyncEventEmitter.emit (/usr/local/lib/node_modules/ethereumjs-testrpc/build/cli.node.js:64085:3)

So ideally saying the upfront cost of deploying this contract is 1000000000000000000 ethers.

Now when I tried connecting this to my private network and tried the same, I was git by an error stating:

creation of browser/ExampleContract.sol:ExampleContract errored: Gas required exceeds limit: 2002192.  An important gas estimation might also be the sign of a problem in the contract code. Please check loops and be sure you did not sent value to a non payable function (that's also the reason of strong gas estimation).

In both cases, the gas estimate too high preventing me from deploying contract. I also tried to deploy the same contract using Ethereum-Wallet connected to my private network. But this time instead of importing oraclizeAPI.sol, I pasted it's code above my code (AFAIK, there is no way to import contracts files in ethereum-wallet yet).But here also I was hit by Intrinsic gas too low error.

PS: I have successfully deployed the same contract on Ropsten using MEW. Also I was able to deploy same contract using truffle and testrpc. So what's the problem with remix.

2

I was using the javascript VM and was not getting any error or message. But the

--callback

method was never getting called. I found this answer Why isnt Oraclize working? which kind of indicatest hat JS VM with Oraclize may not work from the browser Remix. So you can use the Oraclize Remix IDE at https://dapps.oraclize.it/browser-solidity/ and get your code tested end to end. I am yet to try out that IDE, will update if I am able to run my code there.

  • Just an update which I forgot earlier. Yup Oraclize works perfectly from its own Remix IDE. – Shashikant Soni Dec 28 '17 at 7:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.