Wanting to have my dapp automatically setup "Sync and watch contract events" plugins

My dapp potentially deploys a new nft contract for each user that mints nfts. It looks like this should be possible, but is there an example anywhere in the videos etc?

1 Like

Hi JFFDanno,

Adding “sync and watch contract event” plugins dynamically at run-time is not currently supported. Right now the server instance needs to be restarted for new plug-ins to take effect. However, if the new NFT contracts being deployed all have the same events then you can create a single plugin for each event but leave the contract address blank. The plugin would then sync ALL events with that topic hash. This is a much cleaner approach. The caveate here is that the event topics must be unique to your project or else it will sync events from random contracts not related to your project.

1 Like

Thank you Jeremy,

that should work.

1 Like

This would be really awesome, if it was possible to create a plugin without inputting an address.

But it is not.

What is the workaround please? Looks like the EventSync contains data relative to sync jobs - is this where I remove the address?

It would be nice if indeed it works like this that you removed the requirement for inputting in an address when creating the Sync