Curiosity: Is it possible?

Hello guys!

I’ve searched for a while though the Internet and this forum, but haven’t found the answer to my question.
Is there a way to restrict token’s smart contract to interact with only particular contract for any exchange/transfer action? For example, I want to implement a token which shall be only exchangable (including any transfer) with PancakeSwap router contract.

Do you know any solution for that? :slight_smile:

You can create a whitelist of EOA and smart contract addresses that are allowed in your designed functions.