Currently I am creating syncs for erc20, erc721 and erc1155. ERC20 and erc721 work as charm, but when it comes to erc1155 it creates the sync and the table, but the server never populates it. My server is https://mtpuogs4dqvh.usemoralis.com:2053/server and below there is a log of the options used for creating the hook.
ERC1155
{
"options": {
"chainId": "0x1",
"address": "0x36aa43ab431a988892113ab2b1d5518c1f202eb3",
"topic": "TransferSingle",
"abi": {
"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"
},
"limit": 2000000,
"tableName": "myTableNFT",
"sync_historical": true
}
}
await Moralis.Cloud.run('watchContractEvent', options, {
useMasterKey: true,
});
ERC20
"options": {
"chainId": "0x1",
"address": "0x147faF8De9d8D8DAAE129B187F0D02D819126750",
"topic": "Transfer",
"abi": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
"limit": 2000000,
"tableName": "myTableToken",
"sync_historical": true
}
await Moralis.Cloud.run('watchContractEvent', options, {
useMasterKey: true,
});