1. Dry run deploy
Migrations dry-run (simulation)
.....
> Total deployments: 2
> Final cost: 0.058258696 ETH
That's $83.83
2. Do I have $83.83? Yes I do.
3. Double check mainNet configs ( truffle-config.js
):
Plug these numbers in:
mainnet: {
provider: () =>
new HDWalletProvider({
mnemonic: { phrase: process.env.MNEMONIC },
providerOrUrl: process.env.RPC_URL_1,
}),
network_id: 1,
from: process.env.DEPLOYERS_ADDRESS,
gas: 58258696000000000,
gasPrice: 105000000000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: false,
},
4. Time to deploy
truffle migrate --network mainnet
Result:
Error: *** Deployment Failed ***
"Migrations" could not deploy due to insufficient funds
So, I've...
Is there anything I'm missing here?
Your Gas value looks incorrect. Check Dry Run Output , you will see > gas used: 4390736
(example number) or deploy contract to a test network or https://remix.ethereum.org to have an idea of gas used, then update gas
in truffle-config.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.