-
Notifications
You must be signed in to change notification settings - Fork 7
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: Store swaps #114
Feat: Store swaps #114
Conversation
…tity to be specific for dex stable (general has no fee events and needs to be looked up), regenerate db migration file
… multi path swaps
Sample query:
Sample result: {
"id": "swap_(KSM,KBTC)_0002681725-000012-2842a",
"timestamp": "2023-03-23T03:01:36.212000Z",
"fromAccount": "a3dkY3yWweLMkUjbSSNC2NawWegH3NZkWpYjsnBr2srQsp9LZ",
"toAccount": "a3dkY3yWweLMkUjbSSNC2NawWegH3NZkWpYjsnBr2srQsp9LZ",
"feeRate": "0.0015",
"from": {
"amount": "21370527482",
"amountHuman": "0.021370527482",
"token": {
"__typename": "NativeToken",
"token": "KSM"
}
},
"to": {
"amount": "2538",
"amountHuman": "0.00002538",
"token": {
"__typename": "NativeToken",
"token": "KBTC"
}
}
} It looks a bit awkward to have the from/to account ids outside of the fields I was in two minds whether we should introduce a new type including the account ids, or keep it as is. Slightly leaning towards keeping it so we can better reuse fragments when structuring queries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good, great job implementing this!
Co-authored-by: Peter Slaný <[email protected]>
Resolves #106
Store swap information:
Todo before ready for review: