dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
92 stars 52 forks source link

Add filter by contract code hash to operation index #530

Closed m-kus closed 1 year ago

m-kus commented 1 year ago

What feature would you like to see in DipDup?

Allow to filter operations by contract code hash instead of spawning template indexes per each new origination.

Why do you need this feature, what's the use case?

For cases like TZProfiles.

Is there a workaround currently?

Spawn indexes from template in runtime for every new origination where contract has a certain code.

Configuration spec

contracts:
    a:
       address?: kt1
       code_hash?: kt1 | int
       typename: my_contract_filter

indexes:
   tzp:
       contracts: [ a ]
       handlers:
           - pattern:
                 - destination: a

Implementation notes Codegen: prioritize code_hash over address, check that at least one of these fields exists Fetcher & matcher: use referenced filter as is, even if both code_hash and address present

veqtor commented 1 year ago

This will be extremely useful

royscheeren commented 1 year ago

Is there a time window on the release for this? We're eagerly awaiting this feature as currently it doesn't really seem workable with a large amount of indexes. :)

droserasprout commented 1 year ago

Hi @royscheeren! This one's scheduled for 6.4 at the end of December. Well, at least an RC.