Einsatz auf Vertrag im Hauptnetz - Fehler: Unzureichende Mittel für Gas * Preis + Wert

Betrieb

geth v 1.7.3

Trüffel 4.0.5

truffle-config.js

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    },
    live: {
      host: "localhost",
      port: 8545,
      network_id: "1",
      from: "0x2cd02c6bfb7d36be9c98be275c5c30aa8d3848b8",
      gas:5000000
    }
   }
};

1_initial_migration.js

var Migrations = artifacts.require("./Migrations.sol");

module.exports = function(deployer) {
  deployer.deploy(Migrations, {gas:7987299});
};

2_deploy_contracts.js

var DevContest = artifacts.require("./DevContest.sol");

module.exports = function(deployer) {

  deployer.deploy(DevContest, "0xf7B098298f7C69Fc14610bf71d5e02c60792894C", 4942901, 4977461, {gas:7987299});

};

Der Fehler, den ich bekomme, ist in der Migrationsdatei, wie es scheint -

mokn$ truffle migrate --network live --reset
Using network 'live'.

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 (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:41483:16)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:330353:36
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:176198:11
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:326008:9
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:329052:7)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176427:18)
    at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176717:12)
    at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176872:12)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176832:24)
    at IncomingMessage.emit (events.js:165:20)

Ich habe überprüft, wie viel der Vertrag in Remix kosten sollte - nicht mehr als 3,5 Millionen. Weiß jemand was hier los ist? Danke dir

UPDATE - Scheint die Migrationen bereitgestellt zu haben, aber der zweite Vertrag wird nicht abgeschlossen. Ist es möglich, dass ich nicht genug Eth auf dem Konto habe? Der Migrationsvertrag ist nicht sehr groß und kostet 300.000 Benzin.

Jetzt bekomme ich dieses Problem -

mokn$ truffle migrate --network live --reset
Using network 'live'.

Running migration: 1_initial_migration.js
  Deploying Migrations...
  ... 0x92cc08d87aac4ea464d2b1bfe89a747fbb52e4cf8bdade1c5d992705cffcad3c
  Migrations: 0x12613c93ae25f51d956cf9fcd80edc05babdc2fc
Saving successful migration to network...
  ... undefined
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: insufficient funds for gas * price + value
    at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:41483:16)
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:330353:36
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:176198:11
    at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:326008:9
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:329052:7)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176427:18)
    at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176717:12)
    at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176872:12)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:176832:24)
    at IncomingMessage.emit (events.js:165:20)
Ich habe das gleiche Problem.

Antworten (1)

Ich verwende infura und habe das Problem gelöst, indem ich den Migrationscode wie folgt in 1_initial_migrations.js kombiniert habe:

var Migrations = artifacts.require("./Migrations.sol");
var Kratoken = artifacts.require("./Kratoken.sol");

module.exports = function(deployer) {
  deployer.deploy(Migrations)
    .then(() => Migrations.deployed())
    .then(kratoken => new Promise(resolve => setTimeout(() => resolve(kratoken), 60000)))
    .then(kratoken => deployer.deploy(Kratoken))
};