0

I've got this piece of code:

function mint(uint amount) public payable {
    require(amount <= 10, "token: max of 10 token per mint");
    require(_openMint == true, "token: minting is closed");
    require(msg.value == _price*amount, "token: must send correct price");
    require(_tokenIdTracker.current() + amount <= _max, "token: not enough token left to be mint amount");
    for(uint i = 0; i < amount; i++) {
      _mint(msg.sender, _tokenIdTracker.current());
      _tokenIdTracker.increment();
    }
    IERC20("0x0789fF5bA37f72ABC4D561D00648ac0000970000").safeTransferFrom(msg.sender, owner(), amount);
  }

It mints an ERC721 token with payment in another ERC20 token, and i need to know how muchy ERC20 is being sent. Is there any way to do this?

Pol
  • 39
  • 9

1 Answers1

-1

if you want to know the token amount sent on every transaction, you only have to go on etherscan, search for the contract address, and click the transaction hash of "mint"

if you want to know all amount that was sent, you have to use some tools like thegraph.com

Jacopo Mosconi
  • 972
  • 8
  • 22