Skip to content

Merge next into main#78

Closed
starknetdev wants to merge 86 commits intomainfrom
next
Closed

Merge next into main#78
starknetdev wants to merge 86 commits intomainfrom
next

Conversation

@starknetdev
Copy link
Member

Summary

  • Comprehensive architecture refactor: 3-layer component pattern, domain-grouped packages, consolidated interfaces
  • New features: SVG renderer, agent skills, batch minting, token metadata traits, GameDetail felt252 struct
  • Metagame extensions: ticket_booth, entry_fee, prize, registration, entry_requirement components
  • Economy package: Ekubo TWAMM buyback and stream token distribution
  • Gas optimizations: StorePacking with u128-aligned DivRem (~64% savings), selective unpacking
  • CI: split into main-ci/pr-ci, matrix-based parallel testing with coverage
  • Fix: cap felt252_to_byte_array at 31 bytes to prevent overflow

Test plan

  • All 16 module tests pass in CI matrix
  • Coverage does not decrease
  • scarb build compiles cleanly

🤖 Generated with Claude Code

starknetdev and others added 30 commits January 23, 2026 18:14
* feat: add metagame callback extension with SRC5 support

- Add MetagameCallbackComponent with hooks pattern for receiving token state change callbacks (score update, game over, objectives completed)
- Restructure tests directory from packages/test_starknet to tests/
- Add registry package with MinigameRegistryComponent
- Various gas optimizations and code restructuring
- Change from multi-objective to single objective model.
- Add batch operations
- Removed unnecessary event emissions (ScoreUpdate, GameOver, TokenMinted, TokenMetadataUpdate)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Dependencies:
- Upgrade scarb 2.14.0 → 2.15.1, starknet-foundry 0.53.0 → 0.55.0
- Upgrade cairo/starknet 2.13.1 → 2.15.1
- Upgrade openzeppelin v3.0.0-alpha.3 → v3.0.0 (stable)
- Upgrade alexandria v0.7.0 → v0.9.0
- Update graffiti to provable-games fork

Cleanup:
- Remove unused sierra-replace-ids settings
- Remove unused imports (get_contract_address, CheatSpan, cheat_caller_address)
- Add settings_exist_batch/settings_details_batch to mock for interface compliance
- Add **/snfoundry_trace/ to .gitignore and remove from tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tokenomics package includes:
- BuybackComponent: Autonomous token buybacks via Ekubo TWAMM
- StreamComponent: ERC20 token streaming with burn support
- Presets: AutonomousBuyback and StreamToken contracts
- Factory: StreamTokenFactory for deploying stream tokens

Interfaces package provides:
- IBuyback, IBuybackAdmin interfaces and config structs
- IStreamToken, IStreamTokenSetup, IStreamTokenFactory interfaces


Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Split into separate lint and test jobs
- Add needs: lint so test is skipped if lint fails
- Add concurrency control to cancel redundant runs
- Add job timeouts (5min lint, 15min test)
- Combine version extraction into single step
- Add save-always to scarb cache for faster recovery

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Migrate all interface definitions from game-components packages to the existing packages/interfaces package, following OpenZeppelin's pattern. This creates a single source of truth for interfaces, eliminates circular dependencies, and enables external consumers to depend only on interfaces.

Changes:
- Create struct definitions in interfaces package (metagame, minigame,
  leaderboard, registry, token)
- Create interface modules for metagame, minigame, token, registry
- Update original packages to re-export from interfaces package
- Add game_components_interfaces dependency to all packages

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
increases net coverage of packages from 81% to 85%.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Split workspace tests into 8 parallel matrix jobs (one per package)
- Add per-package coverage flags for granular Codecov reporting
- Configure after_n_builds to wait for all jobs before posting status
- Add option for per package fuzz rounds, use less for tokens to balance total run time
- Add option for per package runner size, use larger runner for tokens package to balance total run time.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for preminting tokens to specified addresses during StreamToken deployment. Premints are minted directly to recipients in the constructor, alongside existing registry and factory allocations.

Changes:
- Add PremintAllocation struct to interfaces
- Add Preminted event to StreamComponent
- Update initializer to validate premint allocations
- Update StreamToken constructor to mint premints to recipients
- Update factory to include premint_total in supply calculation
- Add comprehensive test coverage (8 tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add an idempotent deployment script for StreamTokenFactory using sncast CLI.

Features:
- Declares StreamToken and StreamTokenFactory contracts
- Verifies contracts on Voyager
- Deploys factory with Ekubo integration addresses
- Handles already-declared contracts gracefully
- Saves deployment info to JSON

Environment variables:
- SNCAST_ACCOUNT (required) - sncast account name
- FACTORY_OWNER (required) - factory owner address
- SKIP_VERIFICATION - skip Voyager verification
- VERBOSE - enable detailed output

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…21)

Add end-to-end tests verifying that update_game() in core_token correctly
dispatches IMetagameCallback callbacks (on_score_update, on_game_over,
on_objective_complete) to metagame contracts. Previously, this code path
was never exercised because metagame mocks didn't implement the callback
interface.

- Extend metagame_starknet_mock with MetagameCallbackComponent and
  tracking storage for test assertions
- Add 5 integration tests covering score updates, game over transitions,
  transition guards, objective completion, and non-callback minters
- Scope mock_call to 1 invocation so real SRC5 checks are used for
  callback support detection

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Fix build/test commands: replace non-existent `packages/test_starknet`
  with correct `snforge test -p <package>` syntax
- Fix CI matrix fuzzer runs: token=32, minigame=64 (not 50/256)
- Add callback system to architecture diagrams and lifecycle docs
- Add missing packages to README: leaderboard, registry, tokenomics,
  presets, interfaces, testing infrastructure
- Add deploy_stream_token_factory.sh, remove empty create_objectives.sh
  from scripts section
- Add Registry to MinigameToken architecture (multi-game mode)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat: widen score type from u32 to u64 across all packages

Allows scores to exceed the u32 max (4,294,967,295), supporting games
that need larger score ranges.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
#25)

Remove initial_tick from LiquidityConfig struct and have StreamToken calculate it internally using Ekubo's sqrt_ratio_to_tick utility.

This simplifies token deployment by:
- Users no longer need to calculate ticks manually
- Users don't need to know the token address to determine tick sign
- Eliminates redundant data - tick is derived from token amounts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- fixed attributes of TokenMetadata are now packed inside the token_id
- separate mutable state storage for dynamic variables
- collision prevention system form tx_hash and salt input
---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
starknetdev and others added 26 commits February 24, 2026 16:47
…ta (#58)

Expose previously-dropped GameMetadata fields (publisher, genre) as NFT
traits for marketplace discoverability. Add objective_name parameter to
create_custom_metadata so callers can pass the resolved objective name
for display alongside the objective ID.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Reduce runner size from ubuntu-latest-32 to ubuntu-latest-4 for
minigame, metagame, and registry test modules to avoid runner queue
bottlenecks. Token tests remain on ubuntu-latest-32.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the static full-matrix test job with the same dynamic
path-filter + transitive-dependency logic used in PR CI. Only packages
affected by a push are tested, saving runner minutes on partial merges.
workflow_dispatch still runs the full suite.

Also update the infra-validate module count check to count add() calls
in pr-ci.yml (the canonical module catalog) since main-ci.yml no longer
has a static matrix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The config.cairo constants (MINTER_ENABLED, OBJECTIVES_ENABLED, etc.)
were never imported or used in production code. The actual feature toggle
mechanism is the Optional Trait / NoOp Trait pattern, where contracts
choose real vs NoOp component impls at the contract level. Remove the
dead code and update documentation to describe the actual pattern.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add mint_batch_recipients for batch minting to multiple addresses

Adds a convenience function that takes shared mint parameters and an
array of recipients, auto-incrementing the salt for each recipient so
clients don't need to manage salt offsets in multicall scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>


---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add token_full_state_batch to IMinigameToken for optimized batch queries

Adds TokenFullState struct and token_full_state_batch to the core token
interface, enabling the viewer to fetch full token state via a single
cross-contract dispatch instead of 5N dispatches per batch. The component
implementation caches game address lookups per unique game_id.

Also changes create_default_svg/create_custom_metadata token_id param
from u64 to felt252 to match the packed token ID type used throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: scarb fmt formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add token_full_state_batch stub to ticket_booth mock

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: recompute IMINIGAME_TOKEN_ID for updated IMinigameToken trait

Recomputed via src5_rs after adding token_full_state_batch and
mint_batch_recipients to the trait.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: enhance default SVG renderer with badges, bordered panels, and 3D card effect

- Add 4 status badge mini-panels flanking game logo (STATUS, BINDING,
  PAYMASTER, OBJECTIVE) with descriptive labels, colored accent strips,
  and clear active/inactive states
- Add word-wrapped game description (up to 3 lines, 55 chars/line)
- Wrap Timeline and Context sections in bordered panels matching
  Player/Score/Settings/Objective panel style
- Add royalty percentage display in footer (basis points to %)
- Add 3D card thickness with split left/right animated edge paths
- Change border gradient from white sweep to accent-colored glow
- Redistribute Y coordinates to fill unused bottom space

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add supporting changes for SVG renderer phase 3

- Add Clone derive to GameSettingDetails and GameObjectiveDetails structs
- Add font.cairo utility module
- Update test_renderer.cairo with expanded test coverage
- Update full_token_contract examples for new token features
- Update utils AGENTS.md and README.md documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: separate renderer module + SVG card enhancements

Move the SVG renderer from utils into its own top-level renderer module
with svg, font, and tests submodules. Update all import paths accordingly.

SVG card improvements:
- Enlarged viewBox (590x680) for more dramatic 3D tilt padding
- Thicker accent border (stroke-width 20) with inward clip-path
- Solid 3D card edges (#3a3a42) instead of two-layer gradient
- Thicker top/bottom dividers at 0.5 opacity
- More spacing between header, description, and content panels
- Added DEVELOPER and GENRE labels in header
- Token name and symbol replace GAME # in header top-right
- Minted timestamp made more readable (larger, brighter)
- EMBEDDABLE GAME STANDARD text moved to card bottom
- Badge label improvements: SOULBOUND, FREE GAS/PAID GAS,
  NOT COMPLETE
- Removed glow filter from border

CI: Add renderer module to test matrices (16 modules total).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: remove unused glow filter from SVG renderer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add agent_skills to GameMetadata, registry, and token

Allow games to declare agent skills (e.g. "combat,navigation,trading")
at registration time. Adds agent_skills view to both IMinigameRegistry
(by game_id) and IMinigameToken (by token_id). Recomputes SRC5
interface IDs for both interfaces.

- Add agent_skills: ByteArray to GameMetadata struct
- Add agent_skills: Option<ByteArray> param to register_game (defaults "")
- Add agent_skills() view to IMinigameRegistry and IMinigameToken
- Update IMINIGAME_REGISTRY_ID and IMINIGAME_TOKEN_ID
- Propagate through minigame component, examples, mocks, and all tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add missing agent_skills to IMinigameToken impls in metagame tests

Add the agent_skills stub to 5 mock IMinigameToken implementations in
metagame test files that were missed in the initial change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add missing agent_skills to ticket_booth test mock

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update agent_skills description to reflect actual usage

The field carries game-specific agent skill definitions, not just a
comma-separated list of skill names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
* feat: enhance SVG badge states, icons, and remove perspective

- Status badge: 4 states (Active/Game Over/Expired/Not Started) with
  distinct icons (play/skull/hourglass/pause) and colors
- Ownership badge: unified header, purple lock for soulbound, green
  transfer arrows for transferable
- Objective badge: 3 states (Complete/Pending/None) with green/amber/grey
- Remove perspective from tilt animation for consistent rendering
- 3D edge paths extend to 1px from card top/bottom

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: improve assert_playable error messages with specific reasons

Split single generic assertion into specific checks for game_over,
completed_objective, not started, and expired states with descriptive
error messages including timestamps for lifecycle failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add public assert_is_playable to IMinigameToken interface

Add assert_is_playable to the token's public interface, delegating to
the internal assert_playable which provides specific error messages for
each failure reason. Update minigame lib to call this instead of
is_playable + local assert.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
* feat: rework SVG card layout and add client_url view function

- Replace token name/symbol with player name in header top-right
- Remove image optimization styles, keep foreignObject for URL+data URI support
- Add link icon symbol and client_url panel (SCORE | CLIENT URL row)
- Reorder panels: SCORE | CLIENT URL, SETTINGS | OBJECTIVE
- Remove token_name/token_symbol params from create_default_svg
- Add client_url view to IMinigameToken (token storage → game_metadata fallback)
- Add TODO comments for planned improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: accept client_url as separate param in create_default_svg

The resolved client URL (token storage → game_metadata fallback)
is now passed explicitly rather than read from game_metadata inside
the SVG function, enabling callers to resolve it beforehand.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
…eter (#67)

Objectives are now standalone — on the same level as settings — with no
built-in association. External apps decide how to relate them.

- Remove settings_id from create_objective across interfaces, components, libs
- Remove objective_settings_id / objective_settings_id_batch from IMinigameObjectivesDetails
- Remove settings validation block from token-side ObjectivesComponent
- Remove settings_id from ObjectiveCreated event
- Delete settings association tests (SA-U-001 through SA-U-005)
- Recalculate IMINIGAME_TOKEN_OBJECTIVES_ID via src5_rs
- Update mock contracts and test helpers
- Document src5_rs interface ID computation procedure in AGENTS.md

Co-authored-by: Claude <noreply@anthropic.com>
Change GameSetting, GameObjective, and GameContext name/value fields
from ByteArray to felt252 to increase event capacity (2 felts per pair
instead of 6+). Restructure SettingsCreated, ObjectiveCreated, and
TokenContextUpdate events to embed full details structs directly
instead of destructuring into flat fields or serializing to JSON.

Co-authored-by: Claude <noreply@anthropic.com>
…69)

* feat: refactor agent_skills from ByteArray to ContractAddress-based SkillsComponent

Replace the agent_skills ByteArray field with a ContractAddress-based extension system
mirroring the existing renderer pattern. This enables per-token skills address overrides
with fallback to registry-level defaults.

- Add IAgentSkills and IMinigameTokenSkills interfaces
- Add SkillsComponent extension with per-token storage and fallback
- Add OptionalSkills trait with NoOpSkills for minimal contracts
- Update GameMetadata.agent_skills (ByteArray) → skills_address (ContractAddress)
- Add skills_address parameter to mint/mint_game across all components
- Update all mock contracts, test files, and examples
- Replace deprecated contract_address_const::<0>() with 0.try_into().unwrap()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add SkillsComponent test suite and fix misplaced comments

- Create comprehensive test_skills.cairo with 25 tests covering:
  get/set, has_custom, reset (owner-only), batch operations,
  events, SRC5 interface, integration, and fuzz tests
- Add skills methods to IMinigameTokenMixin for test accessibility
- Fix 15 misplaced "// renderer_address" comments that should be
  "// skills_address" across test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Settings infrastructure and soulbound transfer hooks are fully
implemented and tested elsewhere — these TODOs are no longer relevant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace TODO with a concise explanation of the SRC5 constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a metallic gold pin strip at the bottom of the token card,
evoking a game cartridge aesthetic. Pins are rendered inside the
existing card boundary using a repeating pattern with a brass gradient.

Co-authored-by: Claude <noreply@anthropic.com>
* feat: inline SVG icons and replace base64 with URL-encoded data URI

- Remove all 14 <symbol> definitions from <defs> block
- Replace 19 <use> references with inline <svg> elements at each use site
- Add helper functions (icon_check, icon_x, icon_target, icon_flag) for
  icons used 2+ times to avoid duplicating path strings
- Replace base64 encoding with url_encode_hash (#→%23) for data URI,
  eliminating ~33% size inflation from base64

Reduces SVG gas cost by removing unused icon definitions from output
and avoiding expensive base64 encoding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: include all pending changes from next branch

Includes renderer refactoring (metadata extraction, font removal),
registry updates, minigame/metagame test additions, interface changes,
and example contract updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: use data:image/svg+xml;utf8 instead of url_encode_hash

Remove the byte-by-byte url_encode_hash function and use
data:image/svg+xml;utf8, prefix instead, avoiding any runtime
encoding cost entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: use data:image/svg+xml;charset=utf-8 data URI prefix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
…utility (#72)

GameDetail now uses felt252 fields (name, value) matching GameSetting/GameObjective
pattern. Added u128_to_ascii_felt for converting numbers to ASCII short strings,
with a 31-digit limit check for felt252 safety.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…zzer to 32

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
#74)

ByteArray.append_word requires len <= 31, but U256BytesUsedTraitImpl::bytes_used
can return 32 for felt252 values where the u256 high limb is non-zero (any
felt252 >= 2^248). This causes a 'bad append len' panic in token_uri rendering
for tokens with large felt252 game detail values or player names.

Cap the length at 31 in felt252_to_byte_array and replace inline
append_word + bytes_used calls in metadata.cairo and svg.cairo with
felt252_to_byte_array to centralize the fix.

Co-authored-by: Claude <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5a196786-dc51-4c02-b581-fae545188e87

📥 Commits

Reviewing files that changed from the base of the PR and between 21a52e1 and 372b00d.

📒 Files selected for processing (300)
  • .env.dev
  • .env.mainnet
  • .env.sepolia
  • .env.slot
  • .github/prompts/cairo-review.md
  • .github/prompts/general-purpose.md
  • .github/pull_request_template.md
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml
  • .github/workflows/main-ci.yml
  • .github/workflows/pr-ci.yml
  • .github/workflows/test.yml
  • .gitignore
  • .tool-versions
  • AGENTS.md
  • README.md
  • Scarb.toml
  • codecov.yml
  • packages/economy/Scarb.toml
  • packages/economy/src/lib.cairo
  • packages/economy/src/tokenomics.cairo
  • packages/economy/src/tokenomics/AGENTS.md
  • packages/economy/src/tokenomics/CLAUDE.md
  • packages/economy/src/tokenomics/GEMINI.md
  • packages/economy/src/tokenomics/README.md
  • packages/economy/src/tokenomics/buyback.cairo
  • packages/economy/src/tokenomics/buyback/buyback.cairo
  • packages/economy/src/tokenomics/constants.cairo
  • packages/economy/src/tokenomics/factory.cairo
  • packages/economy/src/tokenomics/factory/stream_token_factory.cairo
  • packages/economy/src/tokenomics/stream.cairo
  • packages/economy/src/tokenomics/stream/stream.cairo
  • packages/economy/src/tokenomics/tests.cairo
  • packages/economy/src/tokenomics/tests/fixtures.cairo
  • packages/economy/src/tokenomics/tests/fixtures/constants.cairo
  • packages/economy/src/tokenomics/tests/helpers.cairo
  • packages/economy/src/tokenomics/tests/helpers/deployment.cairo
  • packages/economy/src/tokenomics/tests/mocks.cairo
  • packages/economy/src/tokenomics/tests/mocks/mock_erc20.cairo
  • packages/economy/src/tokenomics/tests/mocks/mock_registry.cairo
  • packages/economy/src/tokenomics/tests/mocks/test_autonomous_buyback.cairo
  • packages/economy/src/tokenomics/tests/mocks/test_stream_token.cairo
  • packages/economy/src/tokenomics/tests/test_buyback.cairo
  • packages/economy/src/tokenomics/tests/test_constants.cairo
  • packages/economy/src/tokenomics/tests/test_factory.cairo
  • packages/economy/src/tokenomics/tests/test_factory_fork.cairo
  • packages/economy/src/tokenomics/tests/test_premint.cairo
  • packages/economy/src/tokenomics/tests/test_preset.cairo
  • packages/economy/src/tokenomics/tests/test_stream.cairo
  • packages/economy/src/tokenomics/tests/test_stream_burn.cairo
  • packages/economy/src/tokenomics/tests/test_stream_fork.cairo
  • packages/economy/src/tokenomics/tests/test_stream_lifecycle.cairo
  • packages/embeddable_game_standard/Scarb.toml
  • packages/embeddable_game_standard/src/lib.cairo
  • packages/embeddable_game_standard/src/metagame.cairo
  • packages/embeddable_game_standard/src/metagame/AGENTS.md
  • packages/embeddable_game_standard/src/metagame/CLAUDE.md
  • packages/embeddable_game_standard/src/metagame/GEMINI.md
  • packages/embeddable_game_standard/src/metagame/README.md
  • packages/embeddable_game_standard/src/metagame/extensions.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/callback.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/callback/callback.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/callback/interface.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/context.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/context/context.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/context/interface.cairo
  • packages/embeddable_game_standard/src/metagame/extensions/context/structs.cairo
  • packages/embeddable_game_standard/src/metagame/interface.cairo
  • packages/embeddable_game_standard/src/metagame/metagame.cairo
  • packages/embeddable_game_standard/src/metagame/metagame_component.cairo
  • packages/embeddable_game_standard/src/metagame/structs.cairo
  • packages/embeddable_game_standard/src/metagame/tests.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_callback.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_context_component.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_fuzz_mint_parameters.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_libs.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_metagame_component.cairo
  • packages/embeddable_game_standard/src/metagame/tests/test_tournament_flow.cairo
  • packages/embeddable_game_standard/src/minigame.cairo
  • packages/embeddable_game_standard/src/minigame/AGENTS.md
  • packages/embeddable_game_standard/src/minigame/CLAUDE.md
  • packages/embeddable_game_standard/src/minigame/GEMINI.md
  • packages/embeddable_game_standard/src/minigame/README.md
  • packages/embeddable_game_standard/src/minigame/extensions.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/objectives.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/objectives/interface.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/objectives/libs.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/objectives/objectives.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/objectives/structs.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/settings.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/settings/interface.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/settings/libs.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/settings/settings.cairo
  • packages/embeddable_game_standard/src/minigame/extensions/settings/structs.cairo
  • packages/embeddable_game_standard/src/minigame/interface.cairo
  • packages/embeddable_game_standard/src/minigame/minigame.cairo
  • packages/embeddable_game_standard/src/minigame/minigame_component.cairo
  • packages/embeddable_game_standard/src/minigame/structs.cairo
  • packages/embeddable_game_standard/src/minigame/tests.cairo
  • packages/embeddable_game_standard/src/minigame/tests/mocks.cairo
  • packages/embeddable_game_standard/src/minigame/tests/mocks/mock_minigame_contract.cairo
  • packages/embeddable_game_standard/src/minigame/tests/mocks/mock_objectives_contract.cairo
  • packages/embeddable_game_standard/src/minigame/tests/mocks/mock_settings_contract.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_libs.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_minigame_component.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_objectives_component.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_objectives_libs.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_settings_component.cairo
  • packages/embeddable_game_standard/src/minigame/tests/test_settings_libs.cairo
  • packages/embeddable_game_standard/src/registry.cairo
  • packages/embeddable_game_standard/src/registry/AGENTS.md
  • packages/embeddable_game_standard/src/registry/CLAUDE.md
  • packages/embeddable_game_standard/src/registry/GEMINI.md
  • packages/embeddable_game_standard/src/registry/README.md
  • packages/embeddable_game_standard/src/registry/interface.cairo
  • packages/embeddable_game_standard/src/registry/registry.cairo
  • packages/embeddable_game_standard/src/registry/registry_component.cairo
  • packages/embeddable_game_standard/src/registry/registry_store.cairo
  • packages/embeddable_game_standard/src/registry/store.cairo
  • packages/embeddable_game_standard/src/registry/tests.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks/minigame_mock.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks/mock_registry_contract.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks/mock_registry_with_custom_hooks.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks/mock_registry_with_erc721.cairo
  • packages/embeddable_game_standard/src/registry/tests/mocks/mock_registry_with_rejecting_hook.cairo
  • packages/embeddable_game_standard/src/registry/tests/test_batch_views.cairo
  • packages/embeddable_game_standard/src/registry/tests/test_registry_component.cairo
  • packages/embeddable_game_standard/src/registry/tests/test_registry_store.cairo
  • packages/embeddable_game_standard/src/token.cairo
  • packages/embeddable_game_standard/src/token/AGENTS.md
  • packages/embeddable_game_standard/src/token/CLAUDE.md
  • packages/embeddable_game_standard/src/token/GEMINI.md
  • packages/embeddable_game_standard/src/token/README.md
  • packages/embeddable_game_standard/src/token/extensions.cairo
  • packages/embeddable_game_standard/src/token/extensions/context.cairo
  • packages/embeddable_game_standard/src/token/extensions/context/context.cairo
  • packages/embeddable_game_standard/src/token/extensions/context/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/minter.cairo
  • packages/embeddable_game_standard/src/token/extensions/minter/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/minter/minter.cairo
  • packages/embeddable_game_standard/src/token/extensions/objectives.cairo
  • packages/embeddable_game_standard/src/token/extensions/objectives/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/objectives/objectives.cairo
  • packages/embeddable_game_standard/src/token/extensions/renderer.cairo
  • packages/embeddable_game_standard/src/token/extensions/renderer/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/renderer/renderer.cairo
  • packages/embeddable_game_standard/src/token/extensions/settings.cairo
  • packages/embeddable_game_standard/src/token/extensions/settings/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/settings/settings.cairo
  • packages/embeddable_game_standard/src/token/extensions/skills.cairo
  • packages/embeddable_game_standard/src/token/extensions/skills/interface.cairo
  • packages/embeddable_game_standard/src/token/extensions/skills/skills.cairo
  • packages/embeddable_game_standard/src/token/interface.cairo
  • packages/embeddable_game_standard/src/token/noop_traits.cairo
  • packages/embeddable_game_standard/src/token/structs.cairo
  • packages/embeddable_game_standard/src/token/tests.cairo
  • packages/embeddable_game_standard/src/token/tests/examples.cairo
  • packages/embeddable_game_standard/src/token/tests/examples/full_token_contract.cairo
  • packages/embeddable_game_standard/src/token/tests/examples/minigame_registry_contract.cairo
  • packages/embeddable_game_standard/src/token/tests/examples/minimal_optimized_example.cairo
  • packages/embeddable_game_standard/src/token/tests/examples/single_game_token_contract.cairo
  • packages/embeddable_game_standard/src/token/tests/libs.cairo
  • packages/embeddable_game_standard/src/token/tests/mocks.cairo
  • packages/embeddable_game_standard/src/token/tests/setup.cairo
  • packages/embeddable_game_standard/src/token/tests/test_additional_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_address_utils.cairo
  • packages/embeddable_game_standard/src/token/tests/test_batch_views.cairo
  • packages/embeddable_game_standard/src/token/tests/test_component_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_context.cairo
  • packages/embeddable_game_standard/src/token/tests/test_context_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_core_token.cairo
  • packages/embeddable_game_standard/src/token/tests/test_core_token_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_events.cairo
  • packages/embeddable_game_standard/src/token/tests/test_examples_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_extensions.cairo
  • packages/embeddable_game_standard/src/token/tests/test_full_token_contract.cairo
  • packages/embeddable_game_standard/src/token/tests/test_fuzz.cairo
  • packages/embeddable_game_standard/src/token/tests/test_integration.cairo
  • packages/embeddable_game_standard/src/token/tests/test_lifecycle.cairo
  • packages/embeddable_game_standard/src/token/tests/test_minimal_optimized.cairo
  • packages/embeddable_game_standard/src/token/tests/test_minter.cairo
  • packages/embeddable_game_standard/src/token/tests/test_noop_traits.cairo
  • packages/embeddable_game_standard/src/token/tests/test_objectives.cairo
  • packages/embeddable_game_standard/src/token/tests/test_packed_token_id.cairo
  • packages/embeddable_game_standard/src/token/tests/test_renderer.cairo
  • packages/embeddable_game_standard/src/token/tests/test_settings.cairo
  • packages/embeddable_game_standard/src/token/tests/test_skills.cairo
  • packages/embeddable_game_standard/src/token/tests/test_structs_coverage.cairo
  • packages/embeddable_game_standard/src/token/tests/test_token_state.cairo
  • packages/embeddable_game_standard/src/token/token.cairo
  • packages/embeddable_game_standard/src/token/token/address_utils.cairo
  • packages/embeddable_game_standard/src/token/token/lifecycle.cairo
  • packages/embeddable_game_standard/src/token/token/token_state.cairo
  • packages/embeddable_game_standard/src/token/token_component.cairo
  • packages/embeddable_game_standard/src/token/traits.cairo
  • packages/interfaces/.gitignore
  • packages/interfaces/Scarb.toml
  • packages/interfaces/src/AGENTS.md
  • packages/interfaces/src/CLAUDE.md
  • packages/interfaces/src/GEMINI.md
  • packages/interfaces/src/README.md
  • packages/interfaces/src/distribution.cairo
  • packages/interfaces/src/entry_fee.cairo
  • packages/interfaces/src/entry_requirement.cairo
  • packages/interfaces/src/leaderboard.cairo
  • packages/interfaces/src/lib.cairo
  • packages/interfaces/src/metagame.cairo
  • packages/interfaces/src/metagame/callback.cairo
  • packages/interfaces/src/metagame/context.cairo
  • packages/interfaces/src/metagame/core.cairo
  • packages/interfaces/src/minigame.cairo
  • packages/interfaces/src/minigame/core.cairo
  • packages/interfaces/src/minigame/objectives.cairo
  • packages/interfaces/src/minigame/settings.cairo
  • packages/interfaces/src/prize.cairo
  • packages/interfaces/src/registration.cairo
  • packages/interfaces/src/registry.cairo
  • packages/interfaces/src/structs.cairo
  • packages/interfaces/src/structs/leaderboard.cairo
  • packages/interfaces/src/structs/metagame.cairo
  • packages/interfaces/src/structs/minigame.cairo
  • packages/interfaces/src/structs/registry.cairo
  • packages/interfaces/src/structs/token.cairo
  • packages/interfaces/src/token.cairo
  • packages/interfaces/src/token/context.cairo
  • packages/interfaces/src/token/core.cairo
  • packages/interfaces/src/token/minter.cairo
  • packages/interfaces/src/token/objectives.cairo
  • packages/interfaces/src/token/renderer.cairo
  • packages/interfaces/src/token/settings.cairo
  • packages/interfaces/src/token/skills.cairo
  • packages/interfaces/src/tokenomics.cairo
  • packages/interfaces/src/tokenomics/buyback.cairo
  • packages/interfaces/src/tokenomics/stream.cairo
  • packages/leaderboard/Scarb.toml
  • packages/leaderboard/src/interface.cairo
  • packages/leaderboard/src/leaderboard_component.cairo
  • packages/leaderboard/tests/lib.cairo
  • packages/metagame/Scarb.toml
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_fuzz_test_fuzz_mint_parameters_test_fuzz_mint_parameters.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_fuzz_test_fuzz_mint_parameters_test_fuzz_player_names.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_fuzz_test_fuzz_mint_parameters_test_property_token_id_monotonicity.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_integration_test_tournament_flow_test_tournament_flow.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_context_with_100_items.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_context_with_empty_array.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_get_context_nonexistent_token.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_get_context_valid_token.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_has_context_no_context.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_has_context_valid_token.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_initialize_context_component.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_mint_with_context_external_provider.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_context_component_test_mint_with_context_self_provider.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_assert_game_registered_fails_unregistered.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_assert_game_registered_success.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_assert_game_registered_zero_address.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_context_address_view_when_none.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_context_address_view_when_set.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_initialization_with_both_addresses.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_initialization_with_token_only.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_minigame_token_address_view.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_minimal.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_with_all_parameters.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_with_context_no_provider.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_with_context_provider_set.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_with_instant_game.json
  • packages/metagame/snfoundry_trace/game_components_metagame_tests_unit_test_metagame_component_test_mint_with_max_objectives.json
  • packages/metagame/src/entry_fee.cairo
  • packages/metagame/src/entry_fee/AGENTS.md
  • packages/metagame/src/entry_fee/CLAUDE.md
  • packages/metagame/src/entry_fee/README.md
  • packages/metagame/src/entry_fee/entry_fee.cairo
  • packages/metagame/src/entry_fee/entry_fee_component.cairo
  • packages/metagame/src/entry_fee/entry_fee_store.cairo
  • packages/metagame/src/entry_fee/libs/share_math.cairo
  • packages/metagame/src/entry_fee/store.cairo
  • packages/metagame/src/entry_fee/structs.cairo
  • packages/metagame/src/entry_fee/tests.cairo
  • packages/metagame/src/entry_fee/tests/mocks.cairo
  • packages/metagame/src/entry_fee/tests/mocks/entry_fee_mock.cairo
  • packages/metagame/src/entry_fee/tests/test_claim_types.cairo
  • packages/metagame/src/entry_fee/tests/test_entry_fee_store.cairo
  • packages/metagame/src/entry_fee/tests/test_packed_additional_shares.cairo
  • packages/metagame/src/entry_fee/tests/test_storage_gas.cairo
  • packages/metagame/src/entry_requirement.cairo
  • packages/metagame/src/entry_requirement/AGENTS.md
  • packages/metagame/src/entry_requirement/CLAUDE.md
  • packages/metagame/src/entry_requirement/README.md
  • packages/metagame/src/entry_requirement/entry_requirement.cairo
  • packages/metagame/src/entry_requirement/entry_requirement_component.cairo
  • packages/metagame/src/entry_requirement/entry_requirement_store.cairo
  • packages/metagame/src/entry_requirement/store.cairo
  • packages/metagame/src/entry_requirement/structs.cairo
  • packages/metagame/src/entry_requirement/tests.cairo
  • packages/metagame/src/entry_requirement/tests/mocks.cairo
  • packages/metagame/src/entry_requirement/tests/mocks/accepting_limited_entry_validator_mock.cairo
  • packages/metagame/src/entry_requirement/tests/mocks/entry_requirement_mock.cairo
  • packages/metagame/src/entry_requirement/tests/mocks/entry_validator_mock.cairo
  • packages/metagame/src/entry_requirement/tests/mocks/erc721_mock.cairo
  • packages/metagame/src/entry_requirement/tests/mocks/rejecting_entry_validator_mock.cairo

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch next

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 86.43216% with 54 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../src/tokenomics/factory/stream_token_factory.cairo 60.27% 29 Missing ⚠️
...ackages/economy/src/tokenomics/stream/stream.cairo 89.28% 15 Missing ⚠️
...kages/economy/src/tokenomics/buyback/buyback.cairo 92.95% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gemini-code-assist
Copy link

Warning

Gemini is experiencing higher than usual traffic and was unable to create the summary. Please try again in a few hours by commenting /gemini summary.

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