Skip to content

feat(fastbreakv1): use references across the board for FastBreakContractV1#294

Merged
chumeston merged 12 commits into
masterfrom
chumeston/feat-fast-break-contract-upgrade
Nov 12, 2025
Merged

feat(fastbreakv1): use references across the board for FastBreakContractV1#294
chumeston merged 12 commits into
masterfrom
chumeston/feat-fast-break-contract-upgrade

Conversation

@chumeston
Copy link
Copy Markdown
Contributor

@chumeston chumeston commented Nov 6, 2025

  • When a FastBreakGame has 10,000 submissions with 5-10 items each, calling getFastBreakGame() no longer copies that entire struct. We get a reference to the original, avoiding the expensive copy operation that was causing computation cost issues.
  • This addresses the Flow team's concern about copying large structs. All getter functions now return references (&) instead of values, so no copying occurs.

#GOLD-517

…age for games and runs. * Introduce helper functions for managing year-specific storage, and update existing methods to support both legacy and new data structures.

* Ensure seamless access to game and run data across different years while maintaining backward compatibility.
@chumeston chumeston requested review from Deewai and loic1 November 6, 2025 19:33
@chumeston chumeston requested a review from a team as a code owner November 6, 2025 19:33
@chumeston chumeston requested a review from EricLin2004 November 6, 2025 19:33
chumeston added 6 commits November 6, 2025 13:36
…es. Adjusted comments to reflect updated contract size and modified digest for asset integrity.
…ntroduced new methods for retrieving and setting games and runs by year, ensuring backward compatibility with legacy data structures. Updated existing scripts to utilize year-based queries for game and run data, improving data management and retrieval efficiency.
…retrieval. Updated methods to utilize a unified approach for accessing game and run data, prioritizing current year, previous year, and legacy storage. Removed deprecated code and improved comments for clarity.
…ed digest for asset integrity. Adjusted comments to reflect the latest changes.
…hods and streamline data retrieval. Updated functions to utilize a unified approach for accessing game and run data, ensuring backward compatibility. Removed deprecated scripts and improved comments for clarity.
… asset data sizes. Adjusted comments for clarity and modified digest values for asset integrity. Streamlined data retrieval methods to enhance performance and maintain backward compatibility.
Comment thread contracts/FastBreakV1.cdc Outdated
…emoving unnecessary type casting. Updated functions to return references directly, enhancing performance and maintaining backward compatibility.
Copy link
Copy Markdown
Contributor

@Deewai Deewai left a comment

Choose a reason for hiding this comment

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

Nice!

@chumeston chumeston changed the title feat(fastbreakv1): enhance FastBreakV1 contract with year-based stor… feat(fastbreakv1): use references across the board for FastBreakContractV1 Nov 7, 2025
chumeston added 2 commits November 7, 2025 13:15
…ed digest for asset integrity. Adjusted comments to reflect the latest changes in asset data size and structure.
…tracts, ensuring compatibility with the latest deployments. Adjusted type casting for submission retrieval to enhance safety and clarity.
Copy link
Copy Markdown
Contributor

@loic1 loic1 left a comment

Choose a reason for hiding this comment

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

nice! just added a few non-blocking questions

Comment thread contracts/FastBreakV1.cdc
Comment thread contracts/FastBreakV1.cdc Outdated
Comment thread contracts/FastBreakV1.cdc
Comment thread contracts/FastBreakV1.cdc Outdated
chumeston added 2 commits November 10, 2025 09:57
…rted contracts, ensuring compatibility with upcoming deployments. This change prepares the contract for integration with the latest versions of dependencies.
…thods with a more efficient key-based approach. Updated comments for clarity and adjusted asset data size and digest for integrity. This change enhances performance and maintains compatibility with existing deployments.
@chumeston chumeston merged commit f353ce3 into master Nov 12, 2025
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.

4 participants