wallet_watchAsset on Unity3D throws Exception: Asset of type ERC1155 not supported

I’m trying to check if user have a specific NFT on his wallet.

var NFTOptions = new NFTOptions {Address = "0x495f947276749Ce646f68AC8c248420045cb7b5e", TokenId = "93553805463198430290004851486618852087775489268271343392262497829197497599648"};
var MetaMaskNFTCheck = new MetaMaskNFTCheck {Type = "ERC1155", Options = NFTOptions};
var request = new MetaMaskEthereumRequest {Method = "wallet_watchAsset",
Parameters = MetaMaskNFTCheck};
await MetaMaskUnity.Instance.Wallet.Request(request);

This creates the following request:
{“jsonrpc”:“2.0”,“id”:“(my id)”,“method”:“wallet_watchAsset”,“params”:{“type”:“ERC1155”,“options”:{“address”:“0x495f947276749Ce646f68AC8c248420045cb7b5e”,“tokenId”:“93553805463198430290004851486618852087775489268271343392262497829197497599648”}}}

And error:
On Failure: System.Exception: -32603
Exception: Asset of type ERC1155 not supported

Unity MetaMask SDK 1.2.0

How to fix this?

Hi were you able to resolved this, where did you get this code I don’t think 1155 is supported


I added a couple of lines of code to make the query correct, but something still isn’t working.

1 Like

Would you mind opening a new issue please Issues · MetaMask/metamask-sdk · GitHub

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.