anonymousvoting
anonymousvoting copied to clipboard
callback contain no result Gas required exceeds limit: 3000000

I was trying to deploy this contract to ropsten using remix and meta mask, but I ran into the error callback contain no result Gas required exceeds limit: 3000000
.
I'm surprised you got the code to load in remix! It always froze for me!
I remember creating the contract required around 3.7m gas. I'd recommend setting the gas limit to 4.7m and then deploy it. That error is saying the gas limit in remix is set to 3m (which isn't enough).
It seems to break even with a higher gas limit, I put some additional details here:
https://medium.com/@s.matthew.english/smart-contract-deployment-dame-mas-gasolina-ddf8ca792e
Hey.
I recommend using Ethereum wallet for deploying contracts. Remix doesn't like big contracts like this one. I put it in Ethereum wallet and it is estimating 4,619,006 gas:

It also caught two "unused variables" which might stop it compiling. This is because Solidity has had an update where it won't let you deploy contracts with unused variables. Easy fix is just re-assigning the variable to itself. i.e. bit = bit. The variables are used but inside the assembly {} brackets which Solidity compiler seems to ignore.
I just updated AnonymousVoting.sol to do the re-assignment. Maybe that is what remix was really complaining about.
I am also getting an error when trying to run it.
This is the error:
Then it simply fails. I am using remix connected to MetaMask.