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

Add zora constraint #611

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Add zora constraint #611

merged 1 commit into from
Aug 28, 2024

Conversation

PooyaFekri
Copy link
Collaborator

@PooyaFekri PooyaFekri commented Aug 28, 2024

Summary by Sourcery

Add a new constraint 'DidMintZoraNFT' to verify Zora NFT minting, integrate Zora platform support into the constraint system, and update the database schema with necessary migrations.

New Features:

  • Introduce a new constraint 'DidMintZoraNFT' to verify if a user has minted a Zora NFT, including the necessary logic and integration with the existing system.

Enhancements:

  • Add support for the Zora platform in the constraint verification system by updating the ConstraintApp enum and integrating ZoraUtil for handling Zora-related requests.

Build:

  • Add a new environment variable 'ZORA_BASE_URL' to configure the base URL for Zora API requests.

Tests:

  • Add migrations for 'prizetap' and 'tokenTap' apps to include the new 'DidMintZoraNFT' constraint in the database schema.

Copy link
Contributor

sourcery-ai bot commented Aug 28, 2024

Reviewer's Guide by Sourcery

This pull request adds a new Zora constraint to the project, implementing functionality to verify if a user has minted a Zora NFT. The changes include adding new files, modifying existing files, and updating the constraint system to incorporate the new Zora constraint.

File-Level Changes

Change Details Files
Added Zora constraint functionality
  • Created new ZoraUtil class for interacting with Zora API
  • Implemented DidMintZoraNFT constraint class
  • Added Zora to ConstraintApp enum
  • Updated get_constraint function to include DidMintZoraNFT
  • Added ZORA_BASE_URL to config
  • Created migration files to add DidMintZoraNFT constraint to prizetap and tokenTap apps
core/constraints/abstract.py
core/constraints/__init__.py
core/models.py
core/thirdpartyapp/config.py
core/thirdpartyapp/zora.py
core/constraints/zora.py
prizetap/migrations/0077_alter_constraint_name.py
tokenTap/migrations/0063_alter_constraint_name.py
Modified constraint initialization and validation
  • Updated ConstraintVerification init method to include 'obj' parameter
  • Modified constraint initialization in TokenDistributionValidator and RaffleValidator
  • Updated is_observed method calls to include additional parameters
tokenTap/validators.py
prizetap/validators.py
core/constraints/abstract.py
Refactored Subgraph class
  • Renamed 'path' attribute to 'paths'
  • Updated references to use 'paths' instead of 'path'
core/thirdpartyapp/subgraph.py
core/constraints/arbitrum.py
Code cleanup and formatting
  • Removed unnecessary blank lines
  • Improved code formatting and line breaks for better readability
tokenTap/validators.py
prizetap/validators.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @PooyaFekri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@PooyaFekri PooyaFekri merged commit ce00e5e into develop Aug 28, 2024
1 check passed
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.

1 participant