Migrations ran out of gas

0 votes

I have unboxed pet-shop. Then inside the contracts folder, I made a file Election.sol which has the code -

pragma solidity ^0.5.8;


contract Election{
    string public candidate;
    constructor() public{
        candidate = "candidate 1"; //state var

    }   
}

Then inside migrations folder, I made 2_deploy_contract.js which has the code -

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

module.exports = function(deployer) {
  deployer.deploy(Election );
};

When I do truffle migrate, I get this error. - truffle migrate

Compiling your contracts...

Everything is up to date, there is nothing to compile.

Migrations dry-run (simulation)

Network name: 'development-fork' Network id: 1 Block gas limit: 0x1388

1_initial_migration.js

Deploying 'Migrations'


Error: Error: Error: * Deployment Failed *

"Migrations" ran out of gas (using Truffle's estimate.) * Block limit: 0x50e7c * Gas sent: undefined * Try: + Setting a higher gas estimate multiplier for this contract + Using the solc optimizer settings in 'truffle-config.js' + Making your contract smaller + Making your contract constructor more efficient + Setting a higher network block limit if you are on a private network or test client (like ganache).

at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-migrate/index.js:92:1)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

Truffle v5.0.22 (core: 5.0.22) Node v8.10.0

Jun 25, 2019 in Blockchain by anonymous
1,090 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

0 votes
1 answer

Truffle "Migrations" ran out of gas error

This error is caused because the amount ...READ MORE

answered Jan 17, 2019 in Blockchain by Omkar
• 69,220 points
4,072 views
+1 vote
4 answers

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

Could be due to previously set values. ...READ MORE

answered Jan 31, 2019 in Blockchain by Omkar
• 69,220 points
8,293 views
0 votes
1 answer

What if Gas required in my program exceeds the limit of 3000000?

Going through your code, I noticed that  you ...READ MORE

answered May 29, 2018 in Blockchain by Perry
• 17,100 points
804 views
0 votes
1 answer

Transfer the gas value of contract to my own address

Works fine for me: pragma solidity ^0.4.0; contract Test ...READ MORE

answered Oct 10, 2018 in Blockchain by Omkar
• 69,220 points
576 views
0 votes
1 answer

"Migrations" exceeded the block limit (with a gas value you set).

In the error you have posted, in ...READ MORE

answered Jan 17, 2019 in Blockchain by Omkar
• 69,220 points
6,029 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,426 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP