rindexer icon indicating copy to clipboard operation
rindexer copied to clipboard

Factory contract indexing

Open joshstevens19 opened this issue 1 year ago • 4 comments

Some contracts deploy contracts inside themselves and, in turn, then emit the new address for the indexing to listen out for. For example, Uniswap Pools is a good example, we should allow rindexer to support factory style track, a bit of work has already been done on this in the YAML itself it just needs the code to track it and index the new addresses as they are emitted.

joshstevens19 avatar Jun 25 '24 16:06 joshstevens19

Is there any way currently to add new addresses (contracts) to watch dynamically, during the runtime (without need to restart whole service)?

CC: @joshstevens19

adapt7 avatar Jan 07 '25 13:01 adapt7

I need to add it are you using no-code or rust project?

joshstevens19 avatar Jan 07 '25 15:01 joshstevens19

yaml design

contracts:
  - name: Factory
    details:
      - network: ethereum
        address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
        factories:
          - name: pool
            deployment: 
              event: PoolCreated
              parameter_name: "poolAddress"
            abi: ./abis/uniswap-v3-pool.abi.json
            include_events:
              - Swap
              - Mint
        start_block: 12369621
    abi: ./abis/uniswap-factory.abi.json
    include_events:
      - PoolCreated

joshstevens19 avatar Apr 27 '25 11:04 joshstevens19

@desfero is taking this one

joshstevens19 avatar Apr 28 '25 11:04 joshstevens19

completed in https://github.com/joshstevens19/rindexer/pull/204

joshstevens19 avatar Jun 12 '25 22:06 joshstevens19