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

feat: data provider bsc token & BABT token holder group #1592

Conversation

0xmme
Copy link
Contributor

@0xmme 0xmme commented Mar 22, 2023

As mentioned in the comments of #1483 here is a new data provider for BSC tokens and NFTs, powered by Ankr.
As their free version has a rate limit it takes a while to generate the group of around 700k BABT holders, but I couldn't find any other free provider that offers the information.

Copy link
Contributor

@MartinGbz MartinGbz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments 😉

@MartinGbz
Copy link
Contributor

As mentioned in the comments of #1483 here is a new data provider for BSC tokens and NFTs, powered by Ankr. As their free version has a rate limit it takes a while to generate the group of around 700k BABT holders, but I couldn't find any other free provider that offers the information.

Yes I understand, maybe we can use other alternatives like bitquery for example (I saw that we can fetch 10 free call per minute, maybe it can do the job?)

But yes it will be surely complicated to find a way to do this without paying a bit

@0xmme
Copy link
Contributor Author

0xmme commented Mar 22, 2023

I found out the one from Ankr can do up to 50req/min with 1000 addresses per request, that's the fastest I found. But I can have another deeper look.

@0xmme
Copy link
Contributor Author

0xmme commented Mar 23, 2023

I checked and another provider could be Moralis, but they expect to use their SDK and require an API key. Do you want to add moralis as depency to the hub and store and API key in a .env ? Otherwise I think 50.000 addresses/min with Ankr is the best I could find. :)

@MartinGbz
Copy link
Contributor

Hey @mme022 I tested the code with a premium version of ankr but the problem still the same.
We can't paralellise multiple requests (for example with a promise.all(), because for each request, it gave us in response a "nextPage" field in order to fetch the next results). So we can't fetch all in once, that's why it takes ~15min to fetch all the data and that's unfortunately too long...

@0xmme
Copy link
Contributor Author

0xmme commented Apr 4, 2023

Wow still 15 mins with the timeout removed? That's sad to hear.

@MartinGbz
Copy link
Contributor

Wow still 15 mins with the timeout removed? That's sad to hear.

May bad! totally forgot this set timeout (was thinking the API was very slow, I'm dumb) 😅😅
I'll merge this in the afternoon! 👍

@0xmme
Copy link
Contributor Author

0xmme commented Apr 4, 2023

Wow still 15 mins with the timeout removed? That's sad to hear.

May bad! totally forgot this set timeout (was thinking the API was very slow, I'm dumb) 😅😅 I'll merge this in the afternoon! 👍

Ah I could've commented that here as well. ;) Nice! Great that it works then!

@MartinGbz MartinGbz changed the base branch from main to data-provider-bsc-token-merge April 5, 2023 07:34
@MartinGbz MartinGbz merged commit af2b04d into sismo-core:data-provider-bsc-token-merge Apr 5, 2023
MartinGbz added a commit that referenced this pull request Apr 5, 2023
* feat: ankr data provider & BABT token holder group (#1592)

* added bsc token provider and babt token holder group

* fix order

* fix according to comments on #1592

* fix: ankr api key premium + remove bsc centric

* fix: manage undefined data + add api keys to .env.example

* fix: data undefined message

* feat: args validity check

* fix: error logs

---------

Co-authored-by: MartinGbz <martin.grabarz@outlook.fr>

* fix: add ANKR_API_KEY env var to serverless, actions and workflows

* fix: add more descritpion to interfaceSchema

* fix: alchemy interfaceSchema

---------

Co-authored-by: mme022 <9083787+mme022@users.noreply.github.com>
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 this pull request may close these issues.

None yet

3 participants