I have built a contract that works successfully on ganache in a bsc-mainnet-fork. I can add liquidity, exchange tokens, etc. all via the console and/or with scripts. However, my contract has transaction tax so if I do not use the SupportingFeeOnTransferTokens variation of the swap functions the transactions fail (as expected).
How does the uniswap/pancakeswap front end know to use the SupportingFeeOnTransferTokens functions when interacting with my contract? Furthermore, is there a way to fork pancakeswap v2 to do this kind of local testing? I know that there is no front-end test net to use
I also need to know how to make Uniswap call the SupportingFeeOnTransferTokens function whenever a user swaps my token using the uniswap UI. How exactly does the UI know my token needs to use the SupportingFeeOnTransferTokens version of their swapping function? Where am I overriding this functionality in my contract code?
Why is this information impossible to find an answer to? It's crazy how fragmented so much info is with all these libraries/apis/technologies all mingled together.
Cleary OP and I are missing fundamentals when it comes to solidity uniswap contracts but man you would think a question like this would easily be found via google, uniswap docs, github contract comments, telegram solidity channels, discord uniswap channels. But nope!