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?
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.