this is my contract deploy cost of locally. how much $ want to deploy this in main network

   > gas price:           20 gwei

   > Saving migration to chain.
   > Saving artifacts
   > Total cost:           0.6712316 ETH

  • The cost depends on the ether price. You can get the price from any exchange. – Ismael Jan 12 at 22:28
  • Can I get roughly idea – Tharindu Vindula Jan 13 at 2:37
  • From coinmarketcap on 2020-01-13 we have 1 ether = 144.07 usd, now 0.6712 ether wil cost 0.6712 * 144.07 = 96.70 usd – Ismael Jan 13 at 6:01

Your question indicates:

  • Total cost in wei units = 67123160000000000
  • Gas price in wei units = 20000000000

This implies that the amount of gas required is 67123160000000000 / 20000000000 = 3356158.

This amount of gas should be identical on every network (assuming that you're using the same compiler in order to generate the byte-code which you are deploying).

So the only difference which could impact the total cost (between your local network and the main network) is the gas price that you use.

For example, you can use 2 gwei instead of 20 gwei, and the total cost will decrease by a factor of 10 (i.e., will be 10% of 0.6712316 ETH).

The gas price that you use typically determines how fast your transaction is likely to execute (the higher the gas price is, the faster the transaction is likely to execute).

This is of course a matter of supply and demand, hence it constantly changes; you can check the webpage ETH Gas Station before sending your transaction to mainnet, in order to decide what gas price you want to use.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.