Is there a way to programmatically add a new "Sync and Watch Contract Events"?

  1. Is there a way to programmatically add a new “Sync and Watch Contract Events”?

syncWatchContract({chainID : 1234, topic: “…”, abi : “…”, contract: “0x…”, syncHistorical:true}

  1. Also, can I watch multiple contracts with the same ABI + same topic to track within the same Class “table”?

Thanks!
Terry

you can do it from CLI https://docs.moralis.io/moralis-admin-cli#add-contract

we will expose API for this soon too

Thanks! Can I make these calls from the “Cloud Functions” ?

I discovered that we have a way to do it from cloud function https://docs.moralis.io/transactions-and-balances/realtime-transactions#watch-address-from-code

There is also a Cloud Function which can be called from Cloud Functions or even the front end:
https://docs.moralis.io/transactions-and-balances/realtime-transactions#watch-address-from-code

that’s the watchAddress function. Can that be altered for “sync and watch Contract Events” ?

I’m hoping for the Cloud Function equivalent of this…

got it, we will add a way in the next few weeks, unfortunately currently we only have CLI

1 Like

Hi @ivan , Is this feature already implemented?

Thanks,
Pedro