Hi, guys, I am writing BEP20 token contract, how can I take bnb as commission in token contract when user swap bnb for token?

Nov 19, 2021, 5:17 AM
you need to be on a BNB network and that's gonna be your native currency and the rest should be the same as usual erc20
Nov 19, 2021, 5:51 AM
I am also doing on BSC network now, not sure how to get BNB in my BEP20 contract.
Nov 19, 2021, 5:52 AM
Go read existing token contracts that have taxes
Nov 19, 2021, 5:52 AM
As my understanding, these taxes are my token, not a BNB. I want to get these fee from BNB amount which user purchased by BNB.
Nov 19, 2021, 5:54 AM
Yes, you are correct, the taxes are taken in the token whose contract you are deploying and users are trading. How does someone typically go from a token to BNB?
(this approach is taken in many contracts for doing things like periodically adding liquidity using taxes)
Nov 19, 2021, 5:55 AM
inbox me
Nov 19, 2021, 5:57 AM
ok
Nov 19, 2021, 5:57 AM

© 2024 Draquery.com All rights reserved.