Hello so when i have erc20Token.transferFrom(address(this), payable(msg.sender),500); does it send 500 of the erc20 tokens or the smallest units of the erc20 token??

1 Answer 1


In solidity, every unit is the smallest unit. Only when we display it, do we use the decimals to format it. So to send 500 of the token, you'll need to send 500*10^(decimals).

  • ok thanks so it works the same way as if i had ether right? so 1 ether= 10^18
    – zzz
    Feb 4, 2022 at 10:11
  • 1
    Yup. Just like that
    – pbsh
    Feb 4, 2022 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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