I'm trying to migrate my contract to a mainnet fork using ganache-cli:
ganache-cli -f https://mainnet.infura.io/v3/{infuraKey} -l 8000000000000 --defaultBalanceEther 1000000000 --allowUnlimitedContractSize
Using these configurations:
development: {
network_id: '*',
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
gas: 8000000000000,
},
Whenever I run truffle migrate
, I get this error:
2_deploy_contracts.js
=====================
Deploying '{contractName}'
------------------------
Error: *** Deployment Failed ***
"{contractName}" ran out of gas (using a value you set in your network config or deployment parameters.)
* Block limit: 8000000000000 (0x746a5288000)
* Gas sent: 8000000000000 (0x746a5288000)
As you can see, I've increased the block limit and gas limit to an extremely high amount and I'm still running out of gas, any advice?