0

I try to deploy a big contract with 800 lines on private network of geth,but the geth report an error: The contract code couldn't be stored, please check your gas amount. undefined

This is my document of creation block : { "config": { "chainId": 10, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "coinbase" : "0x0000000000000000000000000000000000000000", "difficulty" : "0x20000", "extraData" : "", "gasLimit" : "0xffffffff", "nonce" : "0x0000000000000042", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp" : "0x00", "alloc": {} } This is the method I initialize the network: geth init "//home/lsg/Desktop/LSG/./genesis.json" --datadir "//home/lsg/Desktop/LSG/./DN" This is the method I start geth: geth --identity "LSG" --rpc --rpccorsdomain "*" --datadir "//home/lsg/Desktop/LSG/./DN" --port 30303 --nodiscover
--rpcapi "db,eth,net,web3" --networkid 999 console 2>>//home/lsg/Desktop/LSG/DN.log
I can deploy small contract with 400 lines successfully .But the geth report a error: "The contract code couldn't be stored, please check your gas amount."when I deploy my big contract,

Did I make a mistake or does geth not support big contract?

  • please check here: ethereum.stackexchange.com/questions/1106/… this would be useful. – mirg Jun 3 '18 at 15:52
  • That's a generic message for when something is wrong. For example the cause can be an abstract contract, an inaccessible constructor, etc. Since you didn't include your contact there is no way to tell. – rustyx Jun 3 '18 at 17:46
  • What is the size of the bytecode? There are hard limits. As far as I remember it's something around 23k. – ivicaa Jun 4 '18 at 7:29
-1

one of the reasons for this error could be when inheriting an interface and not implementing all interface functions.

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.