neume-network / strategies

Indexing strategies for the neume network.
GNU General Public License v3.0
11 stars 7 forks source link

Add strategy to track NFTs curated on present materials #256

Open neatonk opened 2 years ago

neatonk commented 2 years ago

My comments adapted from discord:

neatonk commented 2 years ago

Yet another way to do this would be to get the contract addresses from the present materials contract first and then get metadata for each contract. This approach could lead to a situation where the same contract is reached by multiple strategies—leading to multiple outputs with potentially differing results.

TimDaub commented 2 years ago
  • Since much effort has gone into removing the web3subgraph I imagine, using call-block-logs would be preferred.

yes. But we're open to use other data sources too.

TimDaub commented 2 years ago
neatonk commented 2 years ago

Yep. To be clear this only applies to the contracts curated on https://www.presentmaterial.xyz/ and not other songcamp projects.

neatonk commented 2 years ago

EDIT This comment is incorrect. See https://github.com/neume-network/strategies/issues/256#issuecomment-1258187447


Implementation notes:

neatonk commented 1 year ago

Steps to add zora editions strategies:

Steps to include the zora editions strategies in the active crawl path.

neatonk commented 1 year ago

@TimDaub Does this look legit to you? I'd like to get started on this tonight or tomorrow morning.

TimDaub commented 1 year ago

Add zora-editions-filter-contracts strategy to https://github.com/neume-network/strategies. This should be similar to soundxyz-filter-contracts strategy, which has a transformer, but no extractor. Follow the https://github.com/neume-network/strategies/issues/256#issuecomment-1239922568 above to filter logs and get the contract address for each edition.

I've looked into this and I think it sounds legit. https://etherscan.io/address/0x91A8713155758d410DFAc33a63E193AE3E89F909 This contract essentially emits the edition creation event and basically a different contract handles the edition to tokenId translation, right? As you described to implement it would be a good first step. Happy to advise whereever I can!

neatonk commented 1 year ago

EDIT This comment is incorrect. See https://github.com/neume-network/strategies/issues/256#issuecomment-1258187447


I've looked into this and I think it sounds legit.

Thanks

This contract essentially emits the edition creation event and basically a different contract handles the edition to tokenId translation, right?

For whatever reason, the getEditionAtId funciton is on the proxy contract instead of the implementation, so you won't see it on etherscan unless you look at the "Read Contract" tab... Screen Shot 2022-09-09 at 3 13 59 PM

neatonk commented 1 year ago

Getting started now on the steps described here: https://github.com/neume-network/strategies/issues/256#issuecomment-1241267105

TimDaub commented 1 year ago

Getting started now on the steps described here: #256 (comment)

awesome, looking forward

neatonk commented 1 year ago

@TimDaub Are non-audio NFTs filtered globally or per strategy? If not filtered, most NFTs produced by this strategy will be images.

TimDaub commented 1 year ago

sound, catalog v2 and mintsongs only have music NFTs. And for zora, we filter by catalog v1 ids

neatonk commented 1 year ago

The details provided above were based on the wrong set of contracts. The following values should be used instead.

neatonk commented 1 year ago

The tokenURI method on the drops contracts returns a data URI. To address this I'll:

TimDaub commented 1 year ago

The tokenURI method on the drops contracts returns a data URI.

like this, right:

data:application/json;base64,eyJuYW1lIjogIlByZXZpYSB4IENyYXRlciBMYWtlIDEiLCAiZGVzY3JpcHRpb24iOiAiVG95b3RhIFByZXZpYSBhdCBDcmF0ZXIgTGFrZSBOYXRpb25hbCBQYXJrXG5BdWd1c3QgMzEsIDIwMjAiLCAiaW1hZ2UiOiAiaXBmczovL2JhZnliZWliYzM2dTc0aW00ZDJ4Z3licXp6N2Y3bHZ1Z2NrZXg3eWpwaTN5bTNqbGhuZXF2M2VjbDZxP2lkPTEiLCAicHJvcGVydGllcyI6IHsibnVtYmVyIjogMSwgIm5hbWUiOiAiUHJldmlhIHggQ3JhdGVyIExha2UifX0=
neatonk commented 1 year ago

Yes, although I see that the ZoraNFTCreatorV1 contract has createDrop and createEdition methods which use different metadata renderers. One, which returns a data-uri as described above and one which uses a base uri and token id. The base uri can potentially use any scheme.

This can be addressed in the strategy by looking the tokenURI scheme to determine the message type. Or, it can be addressed in the extraction worker by adding a message type that can handle any URI. I'm leaning towards the latter as it a more generic solution.

neatonk commented 1 year ago

Thezora-drops-get-tokenuri strategy requires some thought. As mentioned above, the uri shceme and metadata format may vary.

For now, I think it is good enough to handle drops which use the EditionMetadataRenderer and ignore the rest. This is helpful because the uri scheme and metadata format are known and can be transformed to match the required schema. Also, this covers all editions created using the https://create.zora.co/create/edition interface and is sufficient to handle the present materials curated contracts.