1

When I want to migrate a contract to rinkeby network using the command:

truffle.cmd migrate --network rinkeby

I get the error:

Using network 'rinkeby'. Running migration: 1_initial_migration.js Deploying Migrations... ... undefined Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: insufficient funds for gas * price + value at Object.InvalidResponse (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\errors.js:38:1) at C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\requestmanager.js:86:1 at C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\~\truffle-migrate\index.js:225:1 at C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-provider\wrapper.js:134:1 at XMLHttpRequest.request.onreadystatechange (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\web3\lib\web3\httpprovider.js:128:1) at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:64:1) at XMLHttpRequest._setReadyState (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:354:1) at XMLHttpRequest._onHttpResponseEnd (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:509:1) at IncomingMessage. (C:\Users\korys\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\xhr2\lib\xhr2.js:469:1) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

My truffle.js code:

 module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    },
    rinkeby: {
      host: "localhost", // Connect to geth on the specified
      port: 8545,
      from: "0x9eb9afe773757fa175116ae1ba10a23a87fa8f52", // default address to use for any transaction Truffle makes during migrations
      network_id: 4,
      gas: 4612388 // Gas limit used for deploys
    },
    mainnet: {
      host: "localhost", // Connect to geth on the specified
      port: 8545,
      from: "0x0", // default address to use for any transact$
      network_id: 1,
      gas: 4712388, // Gas limit used for deploys
      gasPrice: 100000000000
    }
  }
};

1 Answer 1

0

You don't have enough Rinkeby test ether in your account. Make sure that the account deploying them has some money to spend. Here's a faucet: https://faucet.rinkeby.io/

9

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.