0

I was finally able to get some ether funded and geth/mist working and now i am getting the following error when attempting to deploy my contracts to the rinkeby test network. My project is based on the dotta-license project https://github.com/cryppadotta/dotta-license but i am using the standard migrate and deploy scripts instead of the typescript ones in the project

The contract code couldn't be stored, please check your gas amount.

Ive been googling and it seems that the problem could be literally anything. Can anyone give me some help tracking down the issue?

Truffle.js

 module.exports = {
      networks: {
    development: {
      host: 'localhost',
      port: 9545,
      network_id: '*' // Match any network id
    },
    rinkeby: {
      host: 'localhost', // Connect to geth on the specified
      port: 8545,
      from: 'xxxxxxxxxxxxxxxx', // default address to use for any transaction Truffle makes during migrations
      network_id: 4,
      gas: 4700000, // Gas limit used for deploys
      gasPrice: 30000000000 // 30 gwei
    },
  },
};
7
  • 1
    Do you have a transaction ID? Commented Aug 3, 2018 at 15:24
  • txhash: 0x5bf94a7c2b3d0a951aeb2db3335c5dc6840e03f09981a7339022bb2aa64cba34
    – Rick james
    Commented Aug 3, 2018 at 15:31
  • Looks like you might be running out of gas, try raising your gas limit. Commented Aug 3, 2018 at 15:34
  • should that be set in the truffle.js file?
    – Rick james
    Commented Aug 3, 2018 at 15:36
  • Change gas: 4700000 to something larger Commented Aug 3, 2018 at 15:37

1 Answer 1

0

Your failing transaction is using 4700000/4700000 gas, which likely points to an out of gas situation, which is supported by :

  1. having a contract deployment take such a perfectly round amount of gas is unlikely
  2. the geth trace does not contain any op codes that would indicate a failure in the constructor computation
  3. The code at the contract address is empty (0x)

Try increasing your gas limit for the rinkeby network (but keep it <=7400000, or you will exceed the network block gas limit).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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