0

I'm working on a smart contract for minting NFTs. when I deployed it on the rinkby test network and tested the minting function, Metamask gives me 82$ as an estimation for gas fees even though it takes only 20$ when I confirm the transaction. I think it will look scary for users to see what they don't know what to pay for, the cost of the nft is only 10$

There is any solution to show the exact gas fees to pay?

This is the mint function

function mint(address _account, uint256 _quantity) external payable callerIsUser{
        uint price = PRICE;
        require(price != 0, "price connot be 0");
        require((totalSupply() + _quantity) <= MAX_SUPPLY, "Y :: Beyond Max Supply");
        require(msg.value >= (PRICE * _quantity), "Y :: not enough funds ");
        _safeMint(_account, _quantity);
    }

enter image description here

David Jay
  • 301
  • 1
  • 8

0 Answers0