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

Feature/web3 holder provider #137

Merged
merged 39 commits into from
Feb 3, 2024
Merged

Conversation

lucasmenendez
Copy link
Collaborator

@lucasmenendez lucasmenendez commented Jan 17, 2024

Changelog

  • Code restructured:
    • lexer, queue, roundedcensus & strategyoperators packages moved to internal package.
    • Renamed and reimplemented service' package to scanner'.
    • Move state package to scanner/providers/web3 and reimplement.
    • Minor renaming.
  • ERC20, ERC721 & ERC777 implementation of holders_provider.go.
    • Re-implemented in scanner/providers/web3/ercXXX_provider.go.
    • Removed unused code from old contract support.
    • Now the tokens also store in the database the number of transfers that has been analyzed to scan it.
  • Holder scanner reimplemented:
    • Code base simplified and standardized to holders_provider.go interface.
    • Redundant structures removed.
    • Block number bounds iteration bug fixed.
    • Background process to keep the latests block numbers updated for every available network, and reduce the number of web3 calls.
  • Removed unused database tables and queries.
  • New service reference file with components description.

Summary by CodeRabbit

Release Notes:

  • New Feature: Added support for ERC20, ERC721, and ERC777 tokens in holders_provider.go.
  • Bug Fix: Fixed a bug related to block number bounds iteration in the holder scanner.
  • Refactor: Codebase has been restructured for better organization and readability. Unused database tables and queries have been removed.
  • Documentation: Updated service reference file with component descriptions and improved instructions for running the service using Docker Compose.
  • Chore: Database schema and queries have been updated, including modifications to the 'censuses' and 'tokens' tables.

@lucasmenendez lucasmenendez added the enhancement New feature or request label Jan 17, 2024
@lucasmenendez lucasmenendez self-assigned this Jan 17, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 8bf73fb and 8827087 commits.
Files selected (3)
  • .github/workflows/ai-pr-reviewer.yml (1)
  • db/migrations/0001_census3.sql (6)
  • db/migrations/0002_census3.sql (1)
Files skipped from review due to trivial changes (1)
  • db/migrations/0002_census3.sql
Review comments generated (6)
  • Review: 5
  • LGTM: 1

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

… a range of blocks that exceed the last block of the network, this commit includes a check to ensure that both range bounds are valid blocks
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 8827087 and a1a80f1 commits.
Files selected (1)
  • scanner/providers/web3/web3_provider.go (1)
Review comments generated (5)
  • Review: 2
  • LGTM: 3

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@lucasmenendez lucasmenendez merged commit 631e965 into main Feb 3, 2024
7 checks passed
@lucasmenendez lucasmenendez deleted the feature/web3_holder_provider branch February 3, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants