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

new MOVR/GLMR operation: "account_transactions" #1

Merged
merged 2 commits into from Mar 21, 2022

Conversation

spazcoin
Copy link
Contributor

@spazcoin spazcoin commented Mar 21, 2022

Description

  • support new operation "account_transactions" for retrieving all transactions for an account. Structured so that I think support for filters and skipping can be added later.
  • refactor moonbeam_scraper's "fetch_transactions" so that it can be used to retrieve transactions both for accounts and entire contract method (by pulling processor definition out).
  • a little PEP8 cleanup and reStructured text docstrings for methods

Testing

  • to make sure your "transactions" operation still works, I ran subscrape.py using your example config file and it chugged through Solarbeam transactions. Looks like about 7935 unique addresses, so hopefully that matches your previous results.

Future

  • I'd suggest renaming your "transactions" operation to something like contract_transactions.
  • I'd love to use your filtering module on moonriver/moonbeam, but it looks like you've only integrated it with ParachainScraper so far.

@spazcoin spazcoin requested a review from Tomen March 21, 2022 04:54
@spazcoin
Copy link
Contributor Author

spazcoin commented Mar 21, 2022

my scrape_config.json file is currently:

{
    "kusama": {
        "_skip": true,
        "extrinsics": {
            "_filter": [{"block_timestamp": [{"<":1644796800}]}],
            "system": [
                "remark"
            ]
        }
    },
    "moonriver": {
        "account_transactions": {
            "accounts": [
                "0xDEADBEEF"
            ],
            "_skip": false
        }
    }
}

@spazcoin spazcoin force-pushed the allTxFromOneAccount branch 2 times, most recently from 0824fcc to 2304ec2 Compare March 21, 2022 05:09
* support new operation "account_transactions" for retrieving all
transactions for an account. Structured so that I think support for
filters and skipping can be added later.
* refactor moonbeam_scraper's "fetch_transactions" so that it can be
used to retrieve transactions both for accounts and entire contract
method (by pulling processor definition out).
* a little PEP8 cleanup and reStructured text docstrings for methods

my `scrape_config.json` file is currently:
```
{
    "kusama": {
        "_skip": true,
        "extrinsics": {
            "_filter": [{"block_timestamp": [{"<":1644796800}]}],
            "system": [
                "remark"
            ]
        }
    },
    "moonriver": {
        "account_transactions": {
            "accounts": [
                "0xDEADBEEF"
            ],
            "_skip": false
        }
    }
}
```
@Tomen Tomen merged commit 8368f01 into ChaosDAO-org:main Mar 21, 2022
@spazcoin spazcoin deleted the allTxFromOneAccount branch March 22, 2022 02:05
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

2 participants