[SOLVED] Why is my Moralis stream not sending any data?

I created a new stream (on a paid account) that listens transfer events and hooked it up to a mock server. A transfer event was emitted in the smart contract but I didn’t get any data on my server.

There doesn’t seem to be any indication in the admin panel that the event was picked up or sent. Any idea what could be the issue? It’s a simple transfer event on Mumbai.

it was an ERC20 token or an NFT transfer?

what did you add to that stream config? does it have an ABI and topic?

It was an NFT (ERC721).

I added:

  1. Contract address (just one address)
  2. Description, webhook URL, tag
  3. Selected Mumbai network
  4. Selected Contract Interactions (logs) for parsing
  5. Selected Event Emittance
  6. Added abi
  7. Selected Transfer
  8. Left advanced options empty

Would including my stream id help?

what abi did you add here?

I copied and pasted the contract abi that can be found in the Mumbai explorer (I copied it directly from there). When I did that, I was presented with a list of topics and I chose Transfer.

I did the same thing when syncing to the Moralis server and it’s working there (but I’m hoping to migrate to streams).

I don’t know what account you used, can you get the stream config from this interface?

https://api.moralis-streams.com/api-docs/#/EVM%20Streams

you will need the api key

I will check now.
Do you maybe know if my project API key is included in the headers of the streams request? Or does it contain no header by default?

it is only a signature in that header

I tested now with this abi and it worked without issue:

[
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "name": "to",
        "type": "address"
      },
      {
        "indexed": true,
        "name": "x",
        "type": "uint256"
      }
    ],
    "name": "Transfer",
    "type": "event"
  }
]

Thank you. What kind of request does the stream send? Is it not POST? Maybe that could be the issue.

it is a POST request that you should receive

you could double check the abi

1 Like

Looks like the issue was that the endpoint was expecting a GET request. Changed it to POST and it works now :tada:

1 Like