Can anyone see why this code does not lead to a watch being created?
I tried it on a brand new server running 0.0.359: https://kqmvn0wwisqp.usemoralis.com/
const options = {"tableName":"UniswapTwoUniswapPairPairCreated",
"chainID":"0x1",
"address":"0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f",
"topic":"0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9",
"abi":{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},
{"indexed":true,"internalType":"address","name":"token1","type":"address"},
{"indexed":false,"internalType":"address","name":"pair","type":"address"},
{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],
"name":"UniswapPairCreated","type":"event"},
"sync_historical":false}
// unwatch
//const wce = await Parse.Cloud.run("unwatchContractEvent", options, { useMasterKey: true, });
// Watch
const wce = await Parse.Cloud.run("watchContractEvent", options, {useMasterKey: true,});
console.log(wce)
The result is:
"Log":{1 item
"success":boo lfalse
}
The lack of any error message makes it very hard to debug what is happening on the server.
Log Output:
2022-03-21T16:32:12.451Z - Ran cloud function watchContractEvent for user undefined with:
Input: {"tableName":"UniswapTwoUniswapPairPairCreated","chainID":"0x1","address":"0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f","topic":"0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9","abi":{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"UniswapPairCreated","type":"event"},"sync_historical":false}
Result: {"success":false}