I have been unable to sync any events using the below scripts. I attempted the same inputs on the web3api and it worked just fine. Attaching the curl from swagger at the bottom.
Cloud Func
Moralis.Cloud.beforeConsume("yggfounderstokentoo", (event) => {
log(`beforeConsume - ${event}`)
if( event.args._id != 119180 ) {
return false
}
return true;
});
Topic
TransferSingle(address,address,address,uint256,uint256)
ABI, this is the portion I pulled from etherscan
{
"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": "_id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_value",
"type": "uint256"
}
],
"name": "TransferSingle",
"type": "event"
}
web3api curl, returns unfiltered events
curl 'https://deep-index.moralis.io/api/v2/0xd07dc4262bcdbf85190c01c996b4c06a461d2430/events?chain=eth&from_block=11660388&to_block=13159070&topic=TransferSingle%28address%2Caddress%2Caddress%2Cuint256%2Cuint256%29' \
--data-raw $'{\n "anonymous": false,\n "inputs": [\n {\n "indexed": true,\n "internalType": "address",\n "name": "_operator",\n "type": "address"\n },\n {\n "indexed": true,\n "internalType": "address",\n "name": "_from",\n "type": "address"\n },\n {\n "indexed": true,\n "internalType": "address",\n "name": "_to",\n "type": "address"\n },\n {\n "indexed": false,\n "internalType": "uint256",\n "name": "_id",\n "type": "uint256"\n },\n {\n "indexed": false,\n "internalType": "uint256",\n "name": "_value",\n "type": "uint256"\n }\n ],\n "name": "TransferSingle",\n "type": "event"\n}' \
--compressed