I want want to be able to send an ERC20 token to a smart contract and be able to track which address sent the ERC20 token and for what amount. For example, an address sends X tokens to a smart contract and once they make the transfer the address can now run a function in the smart contract to say register a domain name. Said function would not be able to run without the deposit of the ERC20 token. Note there are two smart contract calls, one to transfer the tokens, and one on the smart contract receiving the ERC20 token.
When I read the ERC20 Solidity smart contract code I see a mapping of balances. I do not understand how I can track who sent what amounts.