Ganache + Truffle: how to deploy a contract without considering the gas

by Thanh-Quy Nguyen   Last Updated May 17, 2019 15:28 PM

I am working with Ganache and Truffle. I am trying to deploy kind of a huge smart contract, but most of the functions in this smart contract are pre-prod functions, so I do not really worry about real-world migration.

Therefore, I am trying to deploy my smart contract with ganache locally without wanting to worry about gas usage. No matter what I have tried, I still get the error:

"SmartContractName" ran out of gas (using a value you set in your network config or deployment parameters.)

I've been playing with Ganache block-limit and gas price: ganache-cli -g 0 -l 1000000000000 I've been playing with the gas in the migration file return deployer.deploy(SmartContractName, { gas: 400000000000 })

And I've been playing with truffle-config:

development: {
    host: "localhost",
    port: 8545,
    network_id: "*",
    gas: 1000000000,
    gasPrice: 0

So far, nothing has worked. Does anyone have a solution?

Related Questions

Updated February 27, 2019 18:28 PM

Updated March 26, 2019 04:28 AM

Updated March 25, 2019 17:28 PM

Updated June 26, 2019 17:28 PM

Updated March 31, 2018 21:28 PM