Hi, say I want to do a pre-sale of token A by giving token B to the buyers. Later, at the launch of token A, I want pre-sale buyers to swap their token B for token A at 1:1 ratio then burn the swapped token B in that tx until all token B are swapped to token A so token B total supply will be completely burnt to address(0).
Is there existing library/interface or code example for my use case that I can use? Thank you
Option 1 u ask them to send the token to address 0x000 then u check if the address contains the exact token u asked to burn u can send them the new one
Option 2 u can ask them to send it to the contract address that will automatically swap and burn u can share the code of it so they have a clear understanding