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.