Trouble sending ERC-1155

I am having the same issue sending over ERC1155 tokens. Any solution on this?

3 Likes

Hi @tired ,

Can you please share the details of what you’re trying to do and what is not working so we can help?

Thanks!

1 Like

I am sending over an NFT ERC1155 from one address to another. I am using Alchemy and this is my code once the alchemy has been set. The transfer is successful, the issue is why is Metamask showing undefined.

 const nameContract = new web3.eth.Contract(ERC1155TransferABI, data.contractAddress);
 const result = await nameContract.methods
   .safeTransferFrom(data.sender, data.receiver, `${data.tokenId}`, data.amount, '0x')
   .send({ from: data.sender, value: '0', to: data.receiver });

And in metamask this is the issue - undefined
0z3shljooRxNV6L0

Contract:
goerli - 0x36fdd590be9011c3c82d052f1732425e9da84ce6#code

1 Like

Thanks for this detail! Is it on mobile or extension?

Firefox MetaMask extension and also Chrome MetaMask extension.

Hm, thanks!

If you review this thread (some answers in it) does this help resolve at all? ethereum - How to fix "Unidentified contract"? OpenSea is unable to “understand” ERC1155 - Stack Overflow

I tried setting up the string public name = "Custom Name"; but I still see undefined when doing a safeTransferFrom. It did not help.

Hi @tired.

According to the following article, MetaMask does not yet support sending ERC-1155 tokens and you would have to use another platform that supports ERC-1155 transfers, like Opensea.

Not sure if this might help you with clarifying the issue, or if it’s the reason you are getting an undefined fee when transfering.

I have found this while searching for solutions. Although it is an old tutorial/article, maybe it can help. Not ERC-1155 specific, but could be inspiration? Let us know.

4 Likes