Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to implement this feature in a token for fun. Is there a way to make it so that the only way a wallet can receive tokens is by buying them on a dex, or getting them using a smart contract; not by getting sent tokens from another wallet?
It is possible to control sender and recipient by overriding transfer and transferFrom and deny the operation by reverting.
A token that prevents user from transferring them would be pretty useless or a scam.
Required, but never shown