[Solved] How to get your smart contract to accept UNI Token?

Shubhangi Dargarh Asks: How to get your smart contract to accept UNI Token?
I’m working on creating a simple contract which will receive UNI tokens from an external account and swap it for ether from UniSwap.

I’m having a very hard time understanding the documents. Can anyone please help me with how to setup the contract so that it can accept the UNI token, and I can interact with it directly in remix. I went through the interfaces written too at github.com/Uniswap/uniswap-v2-core/blob/master/contracts/interfaces/IUniswapV2Callee.sol

But I’m not able to set it up. what is it end-to-end that I need to setup for it to receive token and make it available in the smart contract?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.