Hello!
I am trying to programatically add syncs for SC events to log on the database and notify my GCP service for it to make some updates in other service. I followed this doc. I am trying to add the sync to the SC events with the following code:
let options = {
chainId,
address,
topic,
abi,
limit: 50,
tableName: 'Transfer',
sync_historical: false,
};
const hookResult = await Moralis.Cloud.run('watchContractEvent', options, {
useMasterKey: true,
});
The specific values that I am passing as options are the following.
{
options: {
chainId: '0x1',
address: '0x6b175474e89094c44da98b954eedeac495271d0f',
topic: 'Transfer(address,address,uint256)',
abi: [
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object],
[Object], [Object]
],
limit: 50,
tableName: 'TransferBatchOne',
sync_historical: false
},
hookResult: { success: false }
}
As you can see, I am getting an unsuccessful response. I have tried watching on other chains and it only says it works for rinkeby (chainId: 0x4). But even on rinkeby, I see no table created on the database or events logged there after the tokens are moved. Am I missing something?