Stream returns unicode in tokenName

The stream is returning unicode here in the tokenName.

I’ve only seen this in streams so far with this contract address but it doesn’t return this on any other Moralis NFT API endpoints. Not sure it this is a bug on your end or if it’s happening with other contracts.

[03:18:20.872] INFO: new Data - Handled response: /api/v2/transactions/streams-webhook. Logged with pino.
    env: "development"
    confirmed: false
    chainId: "0x1"
    abi: [
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "uint256",
            "name": "tokenId",
            "type": "uint256"
          }
        ],
        "name": "Transfer",
        "type": "event"
      },
      {
        "anonymous": false,
        "inputs": [
          {
            "indexed": true,
            "internalType": "address",
            "name": "operator",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "from",
            "type": "address"
          },
          {
            "indexed": true,
            "internalType": "address",
            "name": "to",
            "type": "address"
          },
          {
            "indexed": false,
            "internalType": "uint256[]",
            "name": "ids",
            "type": "uint256[]"
          },
          {
            "indexed": false,
            "internalType": "uint256[]",
            "name": "values",
            "type": "uint256[]"
          }
        ],
        "name": "TransferBatch",
        "type": "event"
      }
    ]
    streamId: "bdcf9eac...."
    tag: "nft-transfers-dev"
    retries: 2
    block: {
      "number": "16760770",
      "hash": "0x2d50d9bf4b24323271aa529311fb4bc8c311c97c4c334667d21ec52893e9ca54",
      "timestamp": "1678001939"
    }
    logs: [
      {
        "logIndex": "124",
        "transactionHash": "0xa0070cbb928d19a433d8e5c1b2d0d7b01d1866d69187b02d7a4583679bd1cb54",
        "address": "0xadab80cccc70748403a8ad0b365edc80eb699400",
        "data": "0x",
        "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "topic1": "0x00000000000000000000000087b0e72fddb381a630e680b6732d8b0a94e1fc30",
        "topic2": "0x0000000000000000000000007edac4f0251a484a28f757d8f6e83783a1f38285",
        "topic3": "0x00000000000000000000000000000000000000000000000000000000000001f2"
      }
    ]
    txs: []
    txsInternal: []
    erc20Transfers: []
    erc20Approvals: []
    nftTokenApprovals: []
    nftApprovals: {
      "ERC721": [],
      "ERC1155": []
    }
    nftTransfers: [
      {
        "operator": null,
        "from": "0x87b0e72fddb381a630e680b6732d8b0a94e1fc30",
        "to": "0x7edac4f0251a484a28f757d8f6e83783a1f38285",
        "tokenId": "498",
        "amount": "1",
        "transactionHash": "0xa0070cbb928d19a433d8e5c1b2d0d7b01d1866d69187b02d7a4583679bd1cb54",
        "logIndex": "124",
        "contract": "0xadab80cccc70748403a8ad0b365edc80eb699400",
        "tokenName": " \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000/Silks Thoroughbred Racehorses (Unrevealed) 2022",
        "tokenSymbol": "STR2022",
        "tokenContractType": "ERC721"
      }
    ]
    nativeBalances: []

it looks like that is the token name returned by the contract, with those leading zeros

Weird, okay thanks. I’ll just filter it before adding to the database

1 Like