Error: Updating contract instance failed: 'transfer' in 'nft_review' at {"index":xxxx,"subindex":x} failed with code -42000002

The new index 8460

view

Invocation resulted in success:

  • Energy used: 1926 NRG
  • Return value:
    {
    “all_tokens”: [
    “00000005”,
    “00000006”
    ],
    “state”: [
    [
    {
    “Account”: [
    “3SfHLNkmy61ZUQkAhMvAwKj47EYDBiUPbn3wHghFD6qGr8WDGc”
    ]
    },
    {
    “operators”: ,
    “owned_tokens”: [
    “00000005”,
    “00000006”
    ]
    }
    ]
    ]
    }
    .

tokenmeta for 0000006

  [
      {
          "hash": {
              "None": []
          },
          "url": "https://gist.githubusercontent.com/muniryasir/9e035579ba0b80f28986c7d96dff1f66/raw/c96bc912afbf26b2b2e2a37820529c61cd8f60a8/token-metadata.json00000006"
      }
  ]

.

The error message is still that it cannot pass your metadata file. The metadata file must be a json file. Have you tried to keep the normal .json file ending (it could be a problem to append the tokenId since the file might not be recognized as a json file anymore).

I will try and let you know

The new contract index is 8461, I used without appendment token number, but no change, so I believe I need to change to logic so token number is not appended to meta datalink, please let me know if there is something else, i should also try.

Hello,

I updated the contract code, however the issue persists, contract index 8465

View Output

  • Return value:
    {
    “all_tokens”: [
    “00000001”
    ],
    “state”: [
    [
    {
    “Account”: [
    “3SfHLNkmy61ZUQkAhMvAwKj47EYDBiUPbn3wHghFD6qGr8WDGc”
    ]
    },
    {
    “operators”: ,
    “owned_tokens”: [
    “00000001”
    ]
    }
    ]
    ]
    }

tokenMeta output

  [
      {
          "hash": {
              "None": []
          },
          "url": "https://gist.githubusercontent.com/muniryasir/9e035579ba0b80f28986c7d96dff1f66/raw/53201f3d675f516530d003725ba1c01fd365fa76/token-metadata.json"
      }
  ]

The metadata isn’t valid json.

{
    "name": "Review_NFT_test",
    "description": "a test token structure for reviews",
    "display": {
        "url": "https://silver-tough-swordtail-947.mypinata.cloud/ipfs/QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW"
    },
    "attributes": [
        {
            "name": "Review",
            "type": "string",
            "value": "This is the main review"
        }
        {
            "name": "Reviewer",
            "type": "string",
            "value": "The Reviewer ID"
        }
        {
            "name": "Date",
            "type": "string",
            "value": "This is the date of review"
        }
    ]
}

Attributes is a list, however the elements in the list are not separated with a comma.

1 Like

thx changed but still same issue

{
“name”: “Review_NFT_test”,
“description”: “a test token structure for reviews”,
“display”: {
“url”: “https://silver-tough-swordtail-947.mypinata.cloud/ipfs/QmWHeES4Yt8TaQrbLNgkVzddNwkwV4SDA8CT3bkCGKnhsW
},
“attributes”: [
{
“name”: “Review”,
“type”: “string”,
“value”: “This is the main review”
},
{
“name”: “Reviewer”,
“type”: “string”,
“value”: “The Reviewer ID”
},
{
“name”: “Date”,
“type”: “string”,
“value”: “This is the date of review”
}
]
}

Can you try to validate your JSON here?
When I pasted your new json there it still wasn’t valid JSON?

If I copy from post it throws an error, however, copy from raw link it validates

gist.githubusercontent.com/muniryasir/9e035579ba0b80f28986c7d96dff1f66/raw/93ce9cf2b27b95973df1d248b278883e760ee749/token-metadata.json