New answers tagged

1

When you compile your contracts inside a truffle project, only the modified ones get compiled, if a build exists yet (if you want to recompile all contracts, run truffle compile --all). From the command line, there is no options to just deploy one specific contract, but you can use the flags --f <number> and --to <number> to specify which ...


1

Yes, the migration has failed. This error means you have insufficient Ethers to deploy your contract, you should therefore redeploy with the correct amount of ETH.


0

Another problem is that 'ganache' section is outside 'networks'. networks: { development: { port: 7545, host: "127.0.0.1", network_id: "*" }, ganache: { provider: function() { return new HDWalletProvider(process.env.MNEMONIC, "http://127.0.0.1:7545", MetaMaskAccountIndex) }...


0

In truffle-config.js, gas refers to the maximum amount of gas you are willing to pay for the deployement of your smart contract. Let's assume you contract costs 8 000 000 gas. With the current average gas price of 40 Gwei, the total deployement cost will be 8M * 40 = 320000000 Gwei = 320000000000000000 wei > 111432174000000000 wei (your account balance) ....


Top 50 recent answers are included