hey , freezy, i am working on a rewards distribution token, which distributes pegged ada ,

Buy and sell everything works fine, but as soon as the swapTokensAtAmount is reached, trying to sell from a non owner account , throws an error : problem with token.

Now, the issues is narrowed down to the if statement where this amount is checked.
Within this if statement, some token are being sent to marketing wallet , and some token are being converted to ada to be distributed.

This is where i reached the end of my investigation. i checked the swap codes and sending to marketing code , it all seems correct.
I am unable to locate the problem point.
Any idea what could be causing a problem ?

What do you suggest should be my next step ? how do i further debug it.


Sorry for wall of text, and thanks in anticipation .

Jul 28, 2021, 10:26 PM
will be grateful if anyone can help out.
🙏🙏
the problem is somewhere in the _transfer fucntion, when the canswap variable turns from false to true.
this contract is already depolyed and running, yet i am facing issue in testing same contract on testnet.
Jul 28, 2021, 10:34 PM

© 2024 Draquery.com All rights reserved.