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