SumoKichi
SumoKichi

Reputation: 1

How ERC20 token set tax mount when buy/sell on Pancake Swap?

I created ERC20 (just basic with Openzepplin), I can add liquid to Pancake. Buy, what I need is:

I've research and found that: in function _transfer, we can detect from/to is pancake pair address, then we know client is buying or selling. Buy I dont know how to transfer tax to another address (ex Owner address).

Thank you.

Upvotes: 0

Views: 954

Answers (1)

You can make the transfer function to payable and write your logic in to transfer the percentage.

Upvotes: 0

Related Questions