Every time I try to deploy truffle migrate --reset
my Organization.sol contract, I get the following error
Error encountered, bailing. Network state unknown. Review successful transactions manually.
I Googled the error and apparently this is due to contract size. My Organization.sol is not even that big; I’ve seen bigger contracts before.
Here is my contract: https://github.com/ulixir/eth-task-contracts/blob/master/contracts/Organization.sol
Any clues?
Do you also see an error this error Error: insufficient funds for gas * price + value
? In that case, the ethereum account you are trying to use may not have enough ether to perform the migration.
Ether can be added to an account by calling miner.start()
from the geth console or by allocating ether to the account using the genesis.json file. You can read more about it here.
If you decide to use the genesis file, take the following steps after allocating data to your ethereum account:
1. remove the old geth db using geth --datadir "<your datadir>" removedb
.
2. Reinitialize your geth node using the modified genesis file geth <your other params here> init <yourGenesisFile>
3. within the geth console of the new node, make sure you start the miner miner.start()
When done, try the migration again, it should work now.
If you decided to mine ether without modifying the genesis file, start the mining and give your ethereum account some time to mine enough ether. How long would this take?....... That depends on the difficulty level you set on your genesis file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With