My objective is to create a webhook with transfer data from NFTs. I manage to make Streams work in the documentation till this point:
curl --request PUT \
--url 'https://api.moralis-streams.com/streams/evm' \
--header 'accept: application/json' \
--header 'X-API-Key: xxx' \
--header 'content-type: application/json' \
--data '
{
"webhookUrl": "https://webhook.site/fe519dd7-b23f-4b79-af5c-24c3648e8ce8",
"description": "aaa",
"tag": "aaa",
"includeContractLogs": true,
"chainIds": [
"0x89"
]
}
Now, I want to be able to include this ABI in the code such that I get only Transfer data:
[
{
"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"
}
]
}
]
I tried to enter some values in the CURL in the documentation but I get the error Could not match the union against any of the items
Does somebody have an input on this?