How to run sync and watch address programatically?

I want to sync and watch an address that a user can choose without verifying through web3. I don’t want to have to access the Moralis dashboard for each address that we want to watch though…

Is there a way that I can run the sync and watch address plugin programatically, by calling it directly from front end, or setting up a cloud code function which can call the plugin?

Edit**

I tried a bit of a work around by using

Moralis.Web3.link('adddress')

But we seem to need a user to link the address to.
Is there a way we can create an _EthAddress and run all the historical, and sync new transactions without assigning the _EthAddress to a user?

Yes, you can define them in your cloud functions like this:

const address = "0x4670565222894929fba3b6C91e92B4FFeB3F52FF"
Moralis.Cloud.run("watchEthAddress", {address});
1 Like

I also go over this in the first video of the Cloning Etherscan series. This is exactly how it does searching by address.

1 Like