trufflesuite / ganache-ui

Personal blockchain for Ethereum development
https://www.trufflesuite.com/ganache
MIT License
4.67k stars 807 forks source link

remix-ide can not deploy contract to ganache #88

Closed ice09 closed 6 years ago

ice09 commented 7 years ago

Error

When trying to deploy the standard Ballot.sol contract from http://remix.ethereum.org/ with web3 provider connected to ganache at Port 7545 (accounts are read correctly), the following error occurs, independent of chosen gas limit:

creation of browser/ballot.sol:Ballot pending...
creation of browser/ballot.sol:Ballot errored: Error: base fee exceeds gas limit
    at runCall (/Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:63625:17)
    at /Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:16795:24
    at replenish (/Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:13927:17)
    at iterateeCallback (/Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:13912:17)
    at /Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:13887:16
    at /Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:16800:13
    at /Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:59823:16
    at replenish (/Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:59770:25)
    at /Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:59779:9
    at eachLimit (/Volumes/Ganache/Ganache.app/Contents/Resources/app/node_modules/ethereumjs-testrpc/build/lib.node.js:59703:36)

Versions

vsdigitall commented 6 years ago

The same thing but for web3... and everything: testrpc, ganache-cli, ganache. Looks like it is a bug in web3 or testrpc which both ganache & ganache-cli uses. The most intresting thing is that contract is actually deployed!

By the way it happenes not to all smartcontracts but when deploying some of them. Very strange behaviour.

vsdigitall commented 6 years ago

The solution is to start tesrpc/ganache-cli with params

--gasPrice 1 --gasLimit 10000000000 
OR
-g 1 -l 1000000000

This will ensure that you have enought gas for deployment.

ice09 commented 6 years ago

Thanks, I wanted to try it, but in the current version the errors is not reproducible anyways. So, for me it is solved with the current version.