anyone can help me, how to write tax fee only in buy and sell not in sendtransaction 🤔

Dec 20, 2022, 8:40 AM
override transfer functions and put it into an if...

if(sender == liqPool) {
_transferWithFees(...);
} else {
_transfer(...);
}
Dec 20, 2022, 8:42 AM
so i must know and setting the liquidity address first?
and update the smart contract using proxy?
Dec 20, 2022, 8:44 AM
depends ur contract, its liquidity generator type contract ?
Dec 20, 2022, 8:44 AM
no it's BEP20 standart
Dec 20, 2022, 8:44 AM
dm i sent you source code
Dec 20, 2022, 8:45 AM
Is it a proxy contract?
(no offense but by the type of question you ask I would stay away from proxy contracts until more experience are there)
Dec 20, 2022, 8:45 AM
right now still not proxy, just in case if need it i still learn it
Dec 20, 2022, 8:47 AM
Ok so afterwards you cant do it ofc if it is not a proxy...

so it depends go with @PrimeDi solution. But to learn do it the hard way and code it for your self :D
Dec 20, 2022, 8:49 AM
thanks i DM you
Dec 20, 2022, 8:50 AM
*but yeah you will need in any case the LP address to identify the buys/sells (my answer was wrong you also need to check if the receiver is an lp... dont know over saw the sell part)
Dec 20, 2022, 8:51 AM
yea the logic is, if the sender or receiver is LP tax will be added if not LP address tax is zero
Dec 20, 2022, 8:53 AM

© 2024 Draquery.com All rights reserved.