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

Fetch dapp staking user transactions history from SubsSquid Giant Squid #102

Merged
merged 5 commits into from
Aug 29, 2023

Conversation

bobo-k2
Copy link
Contributor

@bobo-k2 bobo-k2 commented Aug 25, 2023

Currently we have indexer which indexes dapp staking user transactions history for Astar, but we don't have it for Shiden and Shibuya. Since process of testing/debugging/indexing is a quite time consuming I decided to use SubsSquid data to fetch the history for all our networks. @gluneau thanks for the idea, you did the same for gas station.

This PR contains logic to fetch and transform SubSquid transactions data to data format already used by Token API

@bobo-k2 bobo-k2 requested review from gluneau and impelcrypto August 25, 2023 15:18
@github-actions
Copy link

github-actions bot commented Aug 25, 2023

Visit the preview URL for this PR (updated for commit e996b5e):

https://astar-token-api--pr102-feat-giant-squid-afm79aro.web.app

(expires Tue, 05 Sep 2023 07:06:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f99fa4f4f8f3bb450e6e842f7e1c7783d6d896a3

Copy link
Contributor

@gluneau gluneau left a comment

Choose a reason for hiding this comment

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

Are there some tests for this? Or is it not needed?

Is this a good endpoint to test the veracity of the response?
curl 'http://127.0.0.1:5001/astar-token-api/us-central1/app/api/v1/astar/dapps-staking/stats/user/{userAddress}/90%20days

src/containertypes.ts Outdated Show resolved Hide resolved
@impelcrypto
Copy link
Member

It seems that stats history for Shiden is not working. I staked 10 mins ago, but the API hasn't updated for the transaction yet.

https://astar-token-api--pr102-feat-giant-squid-afm79aro.web.app/api/v1/shiden/dapps-staking/stats/user/YyaqqvoACtudUvrqBXp7RxyAHkccvtj5BuESchUWY8EvBMF/1%20years

https://shiden.subscan.io/extrinsic/4753455-2

image

Copy link
Contributor

@gluneau gluneau left a comment

Choose a reason for hiding this comment

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

Lgtm

@bobo-k2 bobo-k2 merged commit 66c1550 into prod Aug 29, 2023
@bobo-k2 bobo-k2 deleted the feat/giant-squid branch August 29, 2023 09:22
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.

3 participants