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

Order Zora and Rodeo first for mobile mint ingesting #58

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

agans
Copy link
Contributor

@agans agans commented Oct 1, 2024

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


Description

  • Reordered the ALL_MINT_INGESTORS map in src/ingestors/index.ts to prioritize zora-internal and rodeo for mobile mint ingesting.
  • This change ensures that zora-internal and rodeo are processed first in the ingestion process.

Changes walkthrough 📝

Relevant files
Enhancement
index.ts
Reorder mint ingestors for mobile priority                             

src/ingestors/index.ts

  • Reordered the ALL_MINT_INGESTORS map to prioritize zora-internal and
    rodeo.
  • Moved zora-internal and rodeo to the top of the list.
  • +3/-3     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    qodo-merge-pro bot commented Oct 1, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    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

    Order Dependency
    The reordering of ingestors may introduce order dependency issues. Ensure that this change doesn't negatively impact the functionality of other ingestors or the overall system.

    Copy link

    qodo-merge-pro bot commented Oct 1, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Use an array of tuples to maintain a specific order of ingestors

    Consider using an array of tuples instead of an object for ALL_MINT_INGESTORS to
    maintain a specific order. This approach ensures that the order of ingestors is
    preserved, which seems to be important for your use case. You can then convert this
    array to an object if needed.

    src/ingestors/index.ts [17-27]

    -export const ALL_MINT_INGESTORS: MintIngestionMap = {
    -  'zora-internal': new ZoraInternalIngestor(),
    -  rodeo: new RodeoIngestor(),
    -  'prohibition-daily': new ProhibitionDailyIngestor(),
    -  fxhash: new FxHashIngestor(),
    -  manifold: new ManifoldIngestor(),
    -  rarible: new RaribleIngestor(),
    -  transient: new TransientIngestor(),
    -  highlight: new HighlightIngestor(),
    -  foundation: new FoundationIngestor(),
    -  'coinbase-wallet': new CoinbaseWalletIngestor()
    -};
    +export const ALL_MINT_INGESTORS_ARRAY: [string, MintIngestor][] = [
    +  ['zora-internal', new ZoraInternalIngestor()],
    +  ['rodeo', new RodeoIngestor()],
    +  ['prohibition-daily', new ProhibitionDailyIngestor()],
    +  ['fxhash', new FxHashIngestor()],
    +  ['manifold', new ManifoldIngestor()],
    +  ['rarible', new RaribleIngestor()],
    +  ['transient', new TransientIngestor()],
    +  ['highlight', new HighlightIngestor()],
    +  ['foundation', new FoundationIngestor()],
    +  ['coinbase-wallet', new CoinbaseWalletIngestor()]
    +];
     
    +export const ALL_MINT_INGESTORS: MintIngestionMap = Object.fromEntries(ALL_MINT_INGESTORS_ARRAY);
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion to use an array of tuples ensures the order of ingestors is preserved, which aligns with the PR's intent to reorder them. This approach adds flexibility and clarity in maintaining the order, though it introduces additional complexity by requiring conversion back to an object.

    7

    💡 Need additional feedback ? start a PR chat

    Copy link

    qodo-merge-pro bot commented Oct 1, 2024

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    CI Failure Feedback 🧐

    Action: build

    Failed stage: Run Tests [❌]

    Failed test name: foundation

    Failure summary:

    The action failed due to multiple test failures:

  • foundation test failed in createMintTemplateForUrl because the expected value '7700000000000000' did
    not match the actual value '0'.
  • highlight test failed in supportsUrl because the expected result was true, but the actual result was
    false.
  • Another highlight test failed in createMintTemplateForUrl due to an IncompatibleUrl error.
  • rarible test failed in createMintTemplateForUrl because the expected value '1725163200000' did not
    match the actual value '+0'.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    513:  ✅ Simulation success
    514:  ✔ createMintTemplateForUrl: Returns a mint template for a supported URL (2644ms)
    515:  ✔ createMintForContract: Returns a mint template for a supported contract (1083ms)
    516:  fxhash
    517:  ✔ supportsUrl: Returns false for an unsupported URL
    518:  ✔ supportsUrl: Returns true for a supported URL
    519:  ✔ createMintTemplateForUrl: Returns a mint template for a supported URL with frame contract (473ms)
    520:  ✔ createMintTemplateForUrl: Returns a mint template for a supported URL with fixed price contract (266ms)
    521:  ✔ createMintTemplateForUrl: Throws error if the mint for fxhash is on mainnet or tezos (1767ms)
    522:  ✔ createMintTemplateForUrl: Throws error if incompatible URL
    523:  ✔ createMintTemplateForUrl: Throws error if non-existent project (2108ms)
    524:  ✔ createMintTemplateForContract: Returns a mint template for a supported contract (120ms)
    525:  ✔ createMintTemplateForContract: Throws error for a non supported contract (138ms)
    ...
    
    585:  rarible
    586:  ✔ supportsUrl: Returns false for an unsupported URL
    587:  ✔ supportsUrl: Returns true for a supported URL
    588:  ✔ supportsContract: Returns false for a unsupported contract (1284ms)
    589:  ✔ supportsContract: Returns true for a supported contract (2043ms)
    590:  ✔ supportsContract: Returns false for a non base chain supported contract (739ms)
    591:  ✔ createMintForContract: Returns a mint template for a supported base contract (1242ms)
    592:  6) createMintTemplateForUrl: Returns a mint template for a supported URL
    593:  ✔ createMintTemplateForUrl: Throws error if incompatible URL
    ...
    
    656:  ✔ ERC7160TL stack (928ms)
    657:  ✔ ERC721TL stack (1076ms)
    658:  createMintTemplateForContract: Returns a mint template for a supported contract
    659:  ✔ ERC1155TL contract at 0x7c3a99d4a7adddc04ad05d7ca87f4949c1a62fa8 (383ms)
    660:  ✔ ERC7160TL contract at 0xd2f9c0ef092d7ffd1a5de43b6ee546065461887d (543ms)
    661:  ✔ ERC721TL contract at 0x999f084f06ee49a3deef0c9d1511d2f040da4034 (461ms)
    662:  103 passing (2m)
    663:  1 pending
    664:  6 failing
    665:  1) foundation
    666:  createMintTemplateForUrl: Returns a mint template for a supported URL with frame contract:
    667:  AssertionError: expected '0' to equal '7700000000000000'
    668:  + expected - actual
    669:  -0
    670:  +7700000000000000
    671:  at Context.<anonymous> (test/ingestors/foundation.test.ts:69:42)
    672:  at processTicksAndRejections (node:internal/process/task_queues:95:5)
    673:  2) highlight
    674:  supportsUrl: Returns true for a supported URL:
    675:  AssertionError: expected false to be true
    ...
    
    682:  createMintTemplateForUrl: Returns a mint template for a supported URL:
    683:  IncompatibleUrl: Incompatible URL
    684:  at HighlightIngestor.createMintTemplateForUrl (src/ingestors/highlight/index.ts:140:13)
    685:  at processTicksAndRejections (node:internal/process/task_queues:95:5)
    686:  at async Context.<anonymous> (test/ingestors/highlight.test.ts:57:22)
    687:  4) highlight
    688:  HighlightIngestor-auto
    689:  supportsUrl: Returns true for a supported URL:
    690:  AssertionError: expected false to be true
    ...
    
    697:  HighlightIngestor-auto
    698:  createMintTemplateForUrl: Returns a mint template for a supported URL:
    699:  IncompatibleUrl: Incompatible URL
    700:  at HighlightIngestor.createMintTemplateForUrl (src/ingestors/highlight/index.ts:140:13)
    701:  at processTicksAndRejections (node:internal/process/task_queues:95:5)
    702:  at async Context.<anonymous> (test/shared/basic-ingestor-tests.ts:49:26)
    703:  6) rarible
    704:  createMintTemplateForUrl: Returns a mint template for a supported URL:
    705:  AssertionError: expected +0 to equal 1725163200000
    ...
    
    763:  mint-template-builder.ts   |    71.3 |    65.51 |   53.12 |    71.3 | ...,210-212,215-217,220-222 
    764:  lib/simulation              |   71.07 |    59.25 |      70 |   71.07 |                             
    765:  simulation.ts              |   64.53 |    61.11 |   66.66 |   64.53 | ...0-74,125,127,131,138-141 
    766:  tenderly.ts                |   85.71 |    55.55 |      75 |   85.71 | 52-60                       
    767:  lib/simulation/types        |     100 |      100 |     100 |     100 |                             
    768:  tenderly.types.ts          |     100 |      100 |     100 |     100 |                             
    769:  lib/types                   |     100 |      100 |     100 |     100 |                             
    770:  index.ts                   |     100 |      100 |     100 |     100 |                             
    771:  mint-ingestor-error.ts     |     100 |      100 |     100 |     100 |                             
    772:  mint-ingestor.ts           |     100 |      100 |     100 |     100 |                             
    773:  mint-template.ts           |     100 |      100 |     100 |     100 |                             
    774:  -----------------------------|---------|----------|---------|---------|-----------------------------
    775:  error Command failed with exit code 6.
    776:  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    777:  ##[error]Process completed with exit code 6.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @chrismaddern chrismaddern merged commit ad87d27 into main Oct 1, 2024
    1 check failed
    @chrismaddern chrismaddern deleted the alicia/order-mobile-mint-ingestors branch October 1, 2024 22:04
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants