Handling Factory Contract
In many cases, there is a factory contract that is responsible to create multiple actual contracts. The typical example is UniswapV3Factory, every time a pool is created, an PoolCreated
event is emitted.
In this case, you could use Dynamic Processor Creationto handle this case. In this very concrete uniswap case, you'd first create a factory processor to track PoolCreated
event:
Note this monitors the total # of pools created. It uses poolTemplate
to track the actual swap
Events.
Notice the template must be declared in the top level of your processor file to be successfully registered.
Last updated