Skip to content

Migrate rodeo -> rodeo new GraphQL#70

Merged
chrismaddern merged 1 commit intomainfrom
chris/fix-rodeo
Mar 17, 2025
Merged

Migrate rodeo -> rodeo new GraphQL#70
chrismaddern merged 1 commit intomainfrom
chris/fix-rodeo

Conversation

@chrismaddern
Copy link
Contributor

@chrismaddern chrismaddern commented Mar 17, 2025

User description

Mint Ingestor:

Functionality Supported

  • Ingesting from URL: Yes / No
  • Ingesting from Contract address: Yes / No
  • Supported Networks: Base / Ethereum / Arbitrum / Zora / Polygon / Others..

Before you submit

  • Ensure your generated MintTemplate works 😄
  • Ensure that your code is restricted to a single folder in src/ingestors
  • Ensure that all required assets are included (e.g. ABIs)
  • Ensure ABIs are trimmed to include only methods (1) used in the ingestor or (2) required to mint
  • Ensure that all exported methods are prefixed with the name of your ingestor e.g. myMintingPlatformGetContractDetails
  • Ensure that a test exists for generating a MintTemplate that will always succeed
  • Ensure that your code accesses no external resources except those passed in the resources object

PR Type

Enhancement, Bug fix


Description

  • Updated GraphQL endpoint for Rodeo API integration.

  • Fixed syntax issues in setMintOutputContract and setMintDetails.

  • Improved code formatting and consistency in index.ts.


Changes walkthrough 📝

Relevant files
Bug fix
index.ts
Fix syntax and improve formatting in `index.ts`                   

src/ingestors/rodeo/index.ts

  • Fixed syntax issue with setMintDetails method.
  • Improved formatting by removing unnecessary spaces.
  • Added a comma for consistency in setMintDetails.
  • +2/-2     
    Enhancement
    offchain-metadata.ts
    Update Rodeo GraphQL endpoint in metadata file                     

    src/ingestors/rodeo/offchain-metadata.ts

  • Updated GraphQL endpoint to https://api.rodeo.club/graphql.
  • Replaced outdated Foundation API URL.
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @chrismaddern chrismaddern merged commit bcd4cd7 into main Mar 17, 2025
    1 check failed
    @chrismaddern chrismaddern deleted the chris/fix-rodeo branch March 17, 2025 16:29
    @qodo-code-review
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    API Change Validation

    The GraphQL endpoint has been changed from Foundation API to Rodeo API. Verify that the new endpoint supports the same query structure and returns compatible data format.

    const url = 'https://api.rodeo.club/graphql';

    @qodo-code-review
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix undefined variable reference

    The contractParams string contains a reference to an undefined variable address.
    This will cause a runtime error when the code attempts to interpolate this
    variable into the string. You should replace it with the appropriate parameter.

    src/ingestors/rodeo/index.ts [90-99]

     mintBuilder.setMintDetails({
       chainId,
       contractAddress: mintAddress,
       contractMethod: 'mintFromFixedPriceSale',
    -  contractParams: `[${sale_terms_id}, quantity, address, "${user.address}"]`,
    +  contractParams: `[${sale_terms_id}, quantity, "${user.address}", "${user.address}"]`,
       abi: RODEO_ABI,
       priceWei: totalPrice,
       mintFeePerTokenWei: totalPrice,
       supportsQuantity: true,
       tokenId: tokenIdNum,
     });

    [To ensure code accuracy, apply this suggestion manually]

    Suggestion importance[1-10]: 9

    __

    Why: The suggestion correctly identifies a critical bug where an undefined variable 'address' is being used in the contractParams string. Replacing it with the actual user address string literal will prevent a runtime error that would cause the mint operation to fail.

    High
    • More

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    1 participant