ERC721 NFT transfer error using MetaMask: ERC-20 Token Transfer Error

I have deployed an OpenZeppelin ERC721 contract with the Pauser , Minter role.
On deployment I was able to mint some NFTs to myself.
I can see my 3 NFTs in my account.
I could transfer one to another account using ethers.
I did not find a Transfer function so I use a
transferFrom(my_address, to_address, token_id)

And my NFT got transfered

When I came to transfer the NFT back. I got this error;

ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender

I'm not sure what happened.

I'am curently using the ABI from
"@openzeppelin/contracts": "^3.3.0"
"ethers": "^5.0.24",

The contract was deployed with
@openzeppelin/contracts": "^3.2.0"
"truffle": "^5.1.48",

Contract declaration is the exact same version from the OZ Example ;

The transferFrom function worked from the owner account, I don't see why I could transfer it out but once on another holders account, It won't transfer. Is pause on by default and i have to un pause the transfer? That second transaction to transfer back was made with Metamaks. The first one out was made my my self using ethers.

What am I doing wrong? Do I have to approve something?

.

1 Like

Hi @madeindreams,

I don't know where you are getting the ERC20 error from?

You should just be able to call transferFrom as long as the caller is the holder of the token or is approved.

You could try using the Truffle console (or Hardhat console) to interact.

Well that’s my problem everything from my code is working. I could transfer an NFT. But once received. From a Metamask Wallet, I couldn’t send it and got this error on etherscan. So i thought I needed to unlock something on the contract level.

1 Like

Hi @madeindreams,

How did you try to transfer?
I assume you added your token to MetaMask and did a transfer using MetaMask. As far as I know MetaMask only supports ERC20 which explains the error that you received.

I reproduced by adding an ERC721 to MetaMask and trying to transfer
ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender

You can use a service like https://oneclickdapp.com/ or verify your contract on Etherscan to use the Etherscan contract interface or create your own dapp so that you can call transferFrom.

1 Like

Wow thank you you saved me a lot of trouble. I was sure that Metamask was handling them.
So they are only displaying them.

Thank You!

1 Like