Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ENS #5

Open
technophile-04 opened this issue Jan 16, 2025 · 4 comments · May be fixed by #7
Open

Handle ENS #5

technophile-04 opened this issue Jan 16, 2025 · 4 comments · May be fixed by #7
Assignees

Comments

@technophile-04
Copy link
Member

Description:

We already have ens row for builder which is optional and we are not filing it because:

// TODO: Add ENS lookup: ChainDoesNotSupportContract: Chain "mainnet" does not support contract "ensUniversalResolver".

We need to explore this or we could also even use https://ensdata.net/

@damianmarti
Copy link
Member

The issue with adding the ENS when the builder is added is that if the builders change the ENS later, it will still appear as the old one. It's true that the ENS names are not changed often.

The names are resolved using the address component when the members are shown now. Since there are a limited number of members, this is not a current issue, right? And the sites where we show the members are not heavy on traffic. Maybe if we are thinking about other projects with a lot of members using our stream platform makes more sense this change.

Anyway, if we decide to add this, I can work on it!

@carletex
Copy link
Contributor

Hey @damianmarti

Some context: We are using the GraphQL endpoint to get the data for some internal scripts (like getting the amount withdrawn for each person on a given period of time). So for those, after the data comes back from ponder, we need to fetch the ENS for them to know who is who (which is not very efficient haha)

Adding the ENS here would be like a caching mechanism.

when the builder is added is that if the builders change the ENS later, it will still appear as the old one. It's true that the ENS names are not changed often.

Yes, but we don't really care, right? Since this is internal, even if they change the ENS we'd know who they are by their old ENS :D


Also: is there a standard way to run migrations/scripts on Ponder?? Like if we add this functionality, it will work for new builders but the old ones won't be updated (unless Ponder deletes everything and starts again every time we deploy... which I'm not sure).

@damianmarti assigning it to you!

@damianmarti
Copy link
Member

Hey @damianmarti

Some context: We are using the GraphQL endpoint to get the data for some internal scripts (like getting the amount withdrawn for each person on a given period of time). So for those, after the data comes back from ponder, we need to fetch the ENS for them to know who is who (which is not very efficient haha)

Adding the ENS here would be like a caching mechanism.

when the builder is added is that if the builders change the ENS later, it will still appear as the old one. It's true that the ENS names are not changed often.

Yes, but we don't really care, right? Since this is internal, even if they change the ENS we'd know who they are by their old ENS :D

Thanks for the explanation @carletex

Also: is there a standard way to run migrations/scripts on Ponder?? Like if we add this functionality, it will work for new builders but the old ones won't be updated (unless Ponder deletes everything and starts again every time we deploy... which I'm not sure).

I will take a look at it, I think that we need to ask Ponder to reindex all the data...

@damianmarti assigning it to you!

Thanks!

@damianmarti
Copy link
Member

Also: is there a standard way to run migrations/scripts on Ponder?? Like if we add this functionality, it will work for new builders but the old ones won't be updated (unless Ponder deletes everything and starts again every time we deploy... which I'm not sure).

After changing the indexed code, Ponder flushes all the data and reindexs all again, so no migration is needed and the ens field will be populated to all the builders. There is an open Issue to avoid this behaviour ponder-sh/ponder#934

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants