Closed TimDaub closed 1 year ago
I think we can remove the strategy-factory pattern if we pass arguments in crawl path. On the plus side, it will reduce the number of strategies.
I think we can remove the strategy-factory pattern if we pass arguments in crawl path.
I was wrong. It isn't as simple as passing the filterFunc
from crawl path. Suppose we have a single strategy call-tokenuri instead of soundxyz-call-tokenuri and zora-call-tokenuri which we can call twice and pass filterFunc
. But the results will be written to the same file and the upcoming strategies such as soundxyz-get-tokenuri will have to filter from it.
Taking a step back, I don't understand why filterFunc
needs to be added to the crawl path. filterFunc
alone will not make the strategy generic. We have other props also such as signature.
But the results will be written to the same file and the upcoming strategies such as soundxyz-get-tokenuri will have to filter from it.
haha funny that you came to the same conclusions independently because I just created that issue: https://github.com/neume-network/strategies/issues/258
Taking a step back, I don't understand why
filterFunc
needs to be added to the crawl path.filterFunc
alone will not make the strategy generic. We have other props also such as signature.
fair. e.g. here would be a blueprint that filters events using the call-block-logs strategy: https://github.com/neume-network/blueprints/blob/main/src/filter-mint-in-singleton-music-nft-contracts/step.mjs
is this issue still valid? because blueprints were getting out of hand and we don't want to import libraries like eth-fun into crawl path.
I've wrote down some defining qualities here: https://github.com/neume-network/blueprints#differences-blueprints-vs-strategies
I'll be none the less difficult to understand what should be a blueprint or a strategy. Actually let me close this until we found a better problem to work on.
/cc @sirnicolaz as he mentioned this /cc @il3ven because you might be interested in implementing this