-
Notifications
You must be signed in to change notification settings - Fork 3
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
Scrape swaps #8
Labels
enhancement
New feature or request
Milestone
Comments
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 12, 2022
* Get token name, symbol, and calculate real transaction values. But this required adding support for the Blockscout API. * adaptive rate limit for subscan.io depending on whether an API key is provided. * migrate URLs to be encapsulated within the block explorer wrappers. contributes to ChaosDAO-org#8 decoding DEX swap transactions
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 12, 2022
* Support most dex swap transactions except "swapETHForTokens" transactions because they don't specify input quantity. contributes to ChaosDAO-org#8 decoding DEX swap transactions
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 12, 2022
* Support most dex swap transactions except "swapETHForTokens" transactions because they don't specify input quantity. contributes to ChaosDAO-org#8 decoding DEX swap transactions
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 14, 2022
Previously, we were able to decode the input data to a contract interaction. But in a DEX exchange, there could be slippage so the actual amount swapped might be slightly different. Therefore, we need to get the actual event logs to see the exact quantities exchanged. This commit uses @yifei_huang's script to decode a transaction log file. Some testing remains, to figure out to handle multiple input values to a swap. contributes to ChaosDAO-org#8
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 21, 2022
moonbeam_scraper.py is now able to retrieve transaction receipts for contract interactions so that it can decode the internal dex 'trace' transactions to determine the exact input and output quantities for swap transactions. Previously, we were using the internal 'Swap' transactions, but those were too difficult to match up for a multi-hop swap (i.e. ROME -> MOVR -> SOLAR). So instead the code now only sums up the Transfer input quantities from the source acct. This is done in a generic way without requiring classes for each DEX contract implementation which works as long as DEX contracts all follow general patterns and naming conventions. contributes to ChaosDAO-org#8
spazcoin
added a commit
to spazcoin/subscrape
that referenced
this issue
Apr 21, 2022
moonbeam_scraper.py is now able to retrieve transaction receipts for contract interactions so that it can decode the internal dex 'trace' transactions to determine the exact input and output quantities for swap transactions. Previously, we were using the internal 'Swap' transactions, but those were too difficult to match up for a multi-hop swap (i.e. ROME -> MOVR -> SOLAR). So instead the code now only sums up the Transfer input quantities from the source acct. This is done in a generic way without requiring classes for each DEX contract implementation which works as long as DEX contracts all follow general patterns and naming conventions. contributes to ChaosDAO-org#8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given an SS58 address and a parachain, swaps shall be scraped.
This varies between parachains. Maybe an adapter solution can be found that generalizes this.
The text was updated successfully, but these errors were encountered: