Gas Fee Estimation

Hey, I am trying to deploy a contract on mainnet with injected metamask in mainnet. It is almost asking from a range of 0.7 to 0.1 ETH which is approx equal to 160$ (amount + gas fee). Is it an average gas fee or is it way too much? (because in testnet it was around 0.005 ETH) Also, I have been testing things on the testnet (rinkeby) and my worry on production is when the user of my application is on mainnet, for NFT operations such as transaction or sell etc, will he/she have to pay such high prices (gas fee) for only the transactions?
Also, please guide me which amount is this reference to is this for the website from whom I am deploying the contract i.e. remix ethereum?

You can check gas here and do some tests.

You could also use another chain e.g. Polygon.

My only purpose through the contract is minting. And there is nothing related to ERC721 minting gas fee
@alex. Can you tell that an average gas fee on mainnet for minting the metadata through the Dapp (android/ios)
However this is my contract:

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

import "";
import "";

contract MyNFT is ERC721URIStorage{ 
    using Counters for Counters.Counter;
    address payable OwnerAddress = payable(xxxxxx);
    Counters.Counter private _tokenIds;
    constructor() ERC721("x","x"){}
    mapping(address => uint) public lastMintedId;
    function mintToken(string memory tokenURI)
        require (msg.value == 0.1 ether);
        uint256 newItemId=_tokenIds.current();
        lastMintedId[msg.sender] = newItemId;

If I were to deploy your contract it would cost 0.018 ETH right now. You can try deploying a different time when the network isn’t so busy.

I don’t know that average price. For minting, you could check some other contracts to see how much it would cost. There is only so much you can do, high fees are something you have to accept if you want to use Ethereum mainnet.

1 Like