opensea-erc1155
opensea-erc1155 copied to clipboard
What actually it costs when deploying ERC1155 contracts onto mainnet.
I saw one sentence in README.md said:
"Deploying to the mainnet Ethereum network. Make sure your wallet has at least a few dollars worth of ETH in it. Then run:"
I understand that this README.md is committed 16 month ago when the gas fee and ETH price is way lower than today, but I can't imagine that the price is ridiculously high (or am I making mistakes?).
Following is what I experience several hours ago.
Background: I already deployed & minted & tested all of my NFT in ERC1155 on rinkeby. Now I want to deploy then onto mainnet. So I executed:
truffle migrate --network live
Then the script compile and deployed 2 contracts: "1_initial_migration.js" -> "Migration.sol" "2_deploy_contracts.js" -> "MyCollectible.sol"
After deploying "Migration.sol", the console warns that my wallet is out of balance to provide more gas for step two. I review the log, and found the calculation of gas is like this:
Deploying 'Migrations'
gas used: 226537 (0x374e9) gas price: 44.153401637 gwei value sent: 0 ETH total cost: 0.010002379146641069 ETH
This means the migration contract already cost me almost $25 USD to deploy the first part.
Reviewing the rest part of "MyCollectible", it is estimated to use 74***** gas which means another 0.33ETH for deploy the contract?
That is a HUGE cost !!!!
So please
- Anyone firstly review my operations to check if I wasted gas on unnecessary / incorrect operations.
- If I didn't do anything wrong, how can I recover the deployment process after storing enough ETH in my wallet? e.g. to avoid deploying "Migrations" other than simply executing
truffle migrate --network live
again.