1

What is the function of approveFrom method in the ERC20Token interface and how do the functions approve and allowance relate to approveFrom?

1

approveFrom does not exist. You might be referring to transferFrom.

transferFrom() allows a 3rd party, which could be another person or even another contract to transfer tokens from someone's balance to someone else.

Of course, given this is a public function, if anyone could transferFrom anyone's account to another account, any amount of tokens, the system would be broken.

That's where approve() comes in. Approve allows the owner of the balance to set a maximum number of tokens the approved party may use on his behalf. This would allow, for example, for me to approve a contract to spend x tokens on my behalf.

allowance() is just a function to read how many tokens x account has approved y account to use on his behalf.

0

You will find a answer in ERC: Token standard. Hope it helps~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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