Interacting with smart contract functions

Yes it did, but the recipient address didnā€™t get the token that was sent

What do you see if you look in a block explorer for that transaction?

what i got.

Did you check the balance to see if it changed for both accounts?

Yes I did, the balance didnā€™t change for both accounts

How did you check? Can you paste the transaction hash?

0xb476b9e5e11a606100f5ee21118f8904bf63dd4416a18314526a9769d5e334e2

Are you sure that 0xb476b9e5e11a606100f5ee21118f8904bf63dd4416a18314526a9769d5e334e2 is a contract address?

Thatā€™s the transaction hash you asked me to send

I asked something else, that address doesnā€™t look like a contract, you have to interact with a contract to send ERC20 tokens

Iā€™m calling the functions from the bnb contract, here is the contract address:
0xB8c77482e45F1F44dE1745F52C74426C631bDD52

That is what I wanted to paste in the first place. It doesnā€™t look like a contract that address.

please what might be stopping the transaction from completing?

If you donā€™t send that transaction to a contract then it is not going to work. You need the contract address for that token.

the contract Iā€™m interacting with is the bnb contract ā€œ0xB8c77482e45F1F44dE1745F52C74426C631bDD52ā€, I did added it in my code as (contractAddress). But in the block explore itā€™s being displayed as the recipient address ā€œ_toā€ after the transaction.

Iā€™m trying to spend BNB on behalf of the user after the user approves the permission, i can use the transferFrom function to send the bnb token to a next recipient.

How do you know that is the bnb contract? What do you mean with bnb contract?

For sending bnb as native currency, you donā€™t need approve. The native currency doesnā€™t work like an erc20 token.

I searched it on etherscanā€¦
Iā€™m really sorry my questions are a bit offā€¦
Can i try this same steps with USDT?

You need the contract address on bsc testnet for an erc20 token, then you can test. Almost the same code works with any erc20 token.