thank for guys time .
if i want write a contract A
and account 1 can call contract A to appove token (eg:usdt) to another contract B and C together .
That's not possible. However depending on what you're trying to do, maybe account 1 can approve contract A, which would itself handle the transfers to contracts B and C instead of having account 1 interact with contracts B and C
Thank you for your answer, may I ask you how can override approve function With openzepelin , so that I can rename the function but didn’t change the function .
Just make a function with the name you want that calls the approve() function? Or am i misunderstanding your question?
Yeah , make function with new name . I am working in front end ,when I try to call approve function , there is always with a red words to show risk warning at wallet side , so the users maybe think there is something wrong , it is hard for us to make project , so I am think if I can rename of function , so that the risk warning won’t be show at wallet . E.g. I have creat a token A , now I wanna approve to contract B, rename to be join , it won’t show the risk warning . Thanks for your help in advance
Well yeah it's perfectly doable, just rename the function in the source code. But it's a really bad idea, because it's gonna break pretty much every protocol (like DEXes such as uniswap) that expect your approve function to be called approve.
Thank you for your advice, but I wanna try , my project is not dex , can you help me to override the function , such as I wanna for bep20 usdt or busd .
I understand that your project isnt a dex, but if you want your token to be able to be traded on DEXes like pancakeswap or uniswap (which you probably do) you can't change the name of your approve function. What you can do though is to create another function that calls your approve function behind the scenes. Dm me if you need help with that
yes my friend , I need your help with contract . I DM you , but I didn’t go reply . Sorry to bother you