Transferfrom function question

Hi guys , good weekend , sorry to bother at weekend, I have a small question at contract function transferfrom
Look , user address A approve busd amount 10 to another address B , Address B can call contract of busd to use transferfrom Function and private key to transfer 10 busd to Address C .
But when B address is a contract, address A approve to contract B , then how can I transfer the 10 busd to C address . ? Contract B doesn’t have private key .
I am working at frontend . Thank you in advance

Where did you read that private key is needed?
If Alice approve contract B to spend her Busd, B can call transferFrom and send Alice Busd to Carl

Thank you for answering.I mean when B is an address , address B MetaMask connects to web3 , then write in contract BUSD transfer from A 10 BUSD to C . Then in B MetaMask wallet input password to confirm the transaction,This wallet password I understand as private key .
So when B is a contract, I can’t login B into MetaMask . How can I transfer from A to C ?

If B is a contract you can use another address D in order to call the function on contract B

I am sorry but I can't understand what you mean. Metamask wallet password is not the private key

Ok , if B is a contract , who to call the function of transfer from ?

The contract B has to call it

The problem is how B contract to call the transfer function in frontend ?

Call from B contract admin account?

yes, thats it, could have also just read what I sent.

But A approve to B contract, I think only B contract can call ? D address can’t call . I tried at admin of B contract, it won’t works , show $130 about 0.4 BNB gas fee

If B has approval for funds of A then D can call the function of B without problem. You can share your codee if you want and then I can take a look

Yeah , I already deploy on bsc chain . Here is the code https://bscscan.com/address/0xa859d52FC56Dc07768646C43F35160AafabFCeaD#code#L1
Thank you very much

Hi my friend , did you check the code ?

well idk, which part but I already explained how it works so guess you need to find out how I meant it. :smile: