ava-labs / ava-labs/avalanche-cli
[Bug]: When using avalanche key transfer to send a bridged ERC20 it works only in one direction
- Dominant language
- Go
- Stars
- 132
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I've correctly deploy my ictt to bridge an ERC20 from the c-chain to my L1 and I've made a transfer as expected. When I try to send back to the C-chain my tokens i execute the same commands with the corresponding transferrer address and i get the error no contract code at given address:
avalanche key transfer
✔ Fuji Testnet
✔ Blockchain ispcktest
✔ C-Chain
What is the RPC endpoint for ispcktest: http://127.0.0.1:9650/ext/bc/adotdG*****gt7Y117xvkxraQoj3X4Uxpcny4RU/rpc
Enter the address of the Token Transferrer on ispcktest: 0xE95a9D93895------Ea0aCe32767961D2538AF
Enter the address of the Token Transferrer on C-Chain: 0x546526F78-----aa8Ac5682b8c181E3A
✔ avafuji
✔ Key
✔ avafuji
Amount to send (TOKEN units): 0.0000000000001
Amount to send (TOKEN units): 0.0000000000001
Error: no contract code at given address
**If I execute the transfer the other way aroung it works perfectly**, so it isn't something related to the addresses, maybe I'm missing something.
I've also noticed that today the command avalanche key list to get the balance does not show my actual balance (yesterday it did it correctly) for this token meanwhile for a custom ERC20 it works perfectly. As before I'm sure this is not ad address issue because with the same arguments I've correctly executed a transfer so they are correct.
Yesterday:

Today:

**Expected behavior**
I would expect that i could send tokens L1 -> C-Chain and C-Chain -> L1 using the same transferrer contracts
**Operating System**
Linux
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with `avalanche key transfer` in both directions using the listed C-Chain and L1 transferrer addresses, then compare `avalanche key list` balances for the bridged ERC20 and a custom ERC20. Trace the CLI's transfer and balance paths from those commands; done means transfers work in both directions and the bridged token balance is reported correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- blockchain, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100