Can anyone tell me the point of Address.sol in OpenZepplin and why would I want to check if an address is a contract, please?

Can’t find any info online

I see a ton of coins do: Using Address for address;

Feb 20, 2021, 4:21 PM
There are some cases where you want to make sure that the receiver of tokens is not a contract (or is a contract).
For example contracts may not be able to handle tokens and it's more sure to only transfer them to EOAs
Feb 20, 2021, 4:44 PM
So instead of making the sender lose their tokens it gives them an error instead? Is there a reason why someone would send tokens to a non EOA?
Feb 20, 2021, 4:54 PM
Some contracts are able to handle tokens. And no, the point is probably not to give an error, but to not do the transfer at all - maybe do something else instead
Feb 20, 2021, 5:18 PM
Thanks
Feb 20, 2021, 5:38 PM

© 2024 Draquery.com All rights reserved.