Get Stream - contract address not showing in streams response -

As you can see from this pic of the admin dashboard I have created a Streams webhook that listens to a certain address.

However, when I input that stream Id to the Get Stream API in swagger the response does not contain the contract address:

{
  "id": "81ff36f7-dc76-4d71-a16c-e1c0a8c81b2e",
  "webhookUrl": "https://webhook.site/fe519dd7-b23f-4b79-af5c-24c3648e8ce8",
  "description": "Demo stream",
  "tag": "demo",
  "demo": true,
  "topic0": [
    "Transfer(address,address,uint256)"
  ],
  "allAddresses": false,
  "includeNativeTxs": true,
  "includeContractLogs": true,
  "includeInternalTxs": false,
  "getNativeBalances": [],
  "triggers": [],
  "abi": [
    {
      "type": "event",
      "anonymous": false,
      "name": "Transfer",
      "inputs": [
        {
          "type": "address",
          "name": "from",
          "indexed": true
        },
        {
          "type": "address",
          "name": "to",
          "indexed": true
        },
        {
          "type": "uint256",
          "name": "tokenId",
          "indexed": true
        }
      ]
    },
    {
      "type": "event",
      "anonymous": false,
      "name": "Approval",
      "inputs": [
        {
          "type": "address",
          "name": "owner",
          "indexed": true
        },
        {
          "type": "address",
          "name": "approved",
          "indexed": true
        },
        {
          "type": "uint256",
          "name": "tokenId",
          "indexed": true
        }
      ]
    },
    {
      "type": "event",
      "anonymous": false,
      "name": "ApprovalForAll",
      "inputs": [
        {
          "type": "address",
          "name": "owner",
          "indexed": true
        },
        {
          "type": "address",
          "name": "operator",
          "indexed": true
        },
        {
          "type": "bool",
          "name": "approved"
        }
      ]
    }
  ],
  "advancedOptions": null,
  "chainIds": [
    "0x89",
    "0x13881"
  ],
  "status": "active",
  "statusMessage": "Stream is active"
}

why does this happen?

1 Like

Hi @daniel1

This stream is still in a demo state. Toggle this switch to prod to receive data to your webhook.
image

This should fix your issue.

1 Like

I created an stream with demo = false, but when I get the stream, the contract address of the streams the webhook is listening to is still not visible:

{
  "id": "0a7194bd-4404-4fec-ab80-9410636a7860",
  "webhookUrl": "https://sport-nft.bubbleapps.io/version-test/api/1.1/wf/webhook-moralis/initialize",
  "description": "dcccua",
  "tag": "kkhb",
  "demo": false,
  "topic0": [
    "Transfer(address,address,uint256)"
  ],
  "allAddresses": false,
  "includeNativeTxs": true,
  "includeContractLogs": true,
  "includeInternalTxs": false,
  "getNativeBalances": [],
  "triggers": [],
  "abi": [
    {
      "type": "event",
      "anonymous": false,
      "name": "Transfer",
      "inputs": [
        {
          "type": "address",
          "name": "from",
          "indexed": true
        },
        {
          "type": "address",
          "name": "to",
          "indexed": true
        },
        {
          "type": "uint256",
          "name": "tokenId",
          "indexed": true
        }
      ]
    },
    {
      "type": "event",
      "anonymous": false,
      "name": "Approval",
      "inputs": [
        {
          "type": "address",
          "name": "owner",
          "indexed": true
        },
        {
          "type": "address",
          "name": "approved",
          "indexed": true
        },
        {
          "type": "uint256",
          "name": "tokenId",
          "indexed": true
        }
      ]
    },
    {
      "type": "event",
      "anonymous": false,
      "name": "ApprovalForAll",
      "inputs": [
        {
          "type": "address",
          "name": "owner",
          "indexed": true
        },
        {
          "type": "address",
          "name": "operator",
          "indexed": true
        },
        {
          "type": "bool",
          "name": "approved"
        }
      ]
    }
  ],
  "advancedOptions": null,
  "chainIds": [
    "0x89",
    "0x13881"
  ],
  "status": "active",
  "statusMessage": "Stream is active"
}

The issues is if I want to add a new contract address to the stream how can I know whether the contract address is already being listened by the stream?

thanks

there is an endpoint to list the addresses associated with a stream id:
https://api.moralis-streams.com/api-docs/#/EVM%20Streams/GetAddresses

here you will see the list of addresses added to a stream

1 Like