Skip to content

refactor: group examples by use case and framework#108

Merged
dhruvja merged 5 commits into
mainfrom
dhruvja/refactor/group-examples-by-framework
Jul 7, 2026
Merged

refactor: group examples by use case and framework#108
dhruvja merged 5 commits into
mainfrom
dhruvja/refactor/group-examples-by-framework

Conversation

@dhruvja

@dhruvja dhruvja commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes: #106

Summary

Refactors the examples repo so each top-level folder represents a use case, with framework-specific implementations nested underneath.

Examples:

  • counter/anchor
  • counter/pinocchio
  • counter/native-rust
  • private-counter/anchor
  • private-counter/pinocchio
  • roll-dice/anchor
  • roll-dice/pinocchio

Changes

  • Moves active examples into the new use-case/framework folder layout.
  • Keeps stable test/CI project IDs like anchor-counter, pinocchio-counter, and pinocchio-roll-dice.
  • Updates local test scripts to resolve project IDs to their new paths.
  • Updates package scripts for the new relative paths.
  • Updates root README links and adds lightweight grouping READMEs.
  • Leaves 00-LEGACY_EXAMPLES, private-payments, binary-prediction, and oracle-priced-purchase unchanged.

Follow-Up

After this merges, update links in the docs repo that still point to the old flat example paths.

Testing

  • FAIL_FAST=1 bash scripts/test-locally.sh
    • 15 passed, 0 failed
  • bash -n scripts/projects.sh scripts/test-example.sh scripts/test-locally.sh scripts/check-prettier.sh scripts/update-sdk-versions.sh
  • git diff --check
  • Parsed all non-legacy package.json files
  • Verified every project ID resolves to an existing directory
  • Verified README local links

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

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

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7a9044d5-ba22-4948-ba3c-6be6b3d8aca6

📥 Commits

Reviewing files that changed from the base of the PR and between b6de512 and 3cf6290.

⛔ Files ignored due to path filters (67)
  • binary-prediction/anchor/Cargo.lock is excluded by !**/*.lock
  • binary-prediction/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • binary-prediction/anchor/tests/fixtures/dlp.so is excluded by !**/*.so
  • binary-prediction/anchor/tests/fixtures/ephemeral_oracle.so is excluded by !**/*.so
  • binary-prediction/anchor/tests/fixtures/ephemeral_token_program.so is excluded by !**/*.so
  • binary-prediction/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • counter/anchor/Cargo.lock is excluded by !**/*.lock
  • counter/anchor/app/package-lock.json is excluded by !**/package-lock.json
  • counter/anchor/app/public/favicon.ico is excluded by !**/*.ico
  • counter/anchor/app/public/magicblock_white.png is excluded by !**/*.png
  • counter/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • counter/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • counter/native-rust/Cargo.lock is excluded by !**/*.lock
  • counter/native-rust/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • counter/pinocchio/tests-rs/fixtures/dlp.so is excluded by !**/*.so
  • counter/pinocchio/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • crank-counter/anchor/Cargo.lock is excluded by !**/*.lock
  • crank-counter/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • delegation-actions/anchor/Cargo.lock is excluded by !**/*.lock
  • delegation-actions/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • ephemeral-account-chats/anchor/Cargo.lock is excluded by !**/*.lock
  • ephemeral-account-chats/anchor/package-lock.json is excluded by !**/package-lock.json
  • ephemeral-account-chats/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • magic-actions/anchor/Cargo.lock is excluded by !**/*.lock
  • magic-actions/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • oncurve-delegation/client/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • oracle-priced-purchase/anchor/Cargo.lock is excluded by !**/*.lock
  • oracle-priced-purchase/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • private-counter/anchor/Cargo.lock is excluded by !**/*.lock
  • private-counter/anchor/app/public/favicon.ico is excluded by !**/*.ico
  • private-counter/anchor/app/public/magicblock_white.png is excluded by !**/*.png
  • private-counter/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • private-counter/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • private-counter/pinocchio/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • rewards-delegated-vrf/anchor/Cargo.lock is excluded by !**/*.lock
  • rewards-delegated-vrf/anchor/dashboard/package-lock.json is excluded by !**/package-lock.json
  • rewards-delegated-vrf/anchor/dashboard/public/magicblock-logomark-white.svg is excluded by !**/*.svg
  • rewards-delegated-vrf/anchor/dashboard/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • rewards-delegated-vrf/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • rock-paper-scissor/anchor/Cargo.lock is excluded by !**/*.lock
  • rock-paper-scissor/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • rock-paper-scissor/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • roll-dice/anchor/Cargo.lock is excluded by !**/*.lock
  • roll-dice/anchor/app/package-lock.json is excluded by !**/package-lock.json
  • roll-dice/anchor/app/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • roll-dice/anchor/app/public/placeholder-logo.png is excluded by !**/*.png
  • roll-dice/anchor/app/public/placeholder-logo.svg is excluded by !**/*.svg
  • roll-dice/anchor/app/public/placeholder-user.jpg is excluded by !**/*.jpg
  • roll-dice/anchor/app/public/placeholder.jpg is excluded by !**/*.jpg
  • roll-dice/anchor/app/public/placeholder.svg is excluded by !**/*.svg
  • roll-dice/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • roll-dice/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • roll-dice/pinocchio/Cargo.lock is excluded by !**/*.lock
  • roll-dice/pinocchio/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • session-keys/anchor/Cargo.lock is excluded by !**/*.lock
  • session-keys/anchor/app/package-lock.json is excluded by !**/package-lock.json
  • session-keys/anchor/app/public/favicon.ico is excluded by !**/*.ico
  • session-keys/anchor/app/public/magicblock_white.png is excluded by !**/*.png
  • session-keys/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • session-keys/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • spl-tokens/anchor/Cargo.lock is excluded by !**/*.lock
  • spl-tokens/anchor/app/public/favicon.ico is excluded by !**/*.ico
  • spl-tokens/anchor/app/public/magicblock_white.png is excluded by !**/*.png
  • spl-tokens/anchor/app/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
  • spl-tokens/anchor/tests/fixtures/dlp.so is excluded by !**/*.so
  • spl-tokens/anchor/tests/fixtures/ephemeral_token_program.so is excluded by !**/*.so
  • spl-tokens/anchor/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (527)
  • README.md
  • binary-prediction/anchor/Anchor.toml
  • binary-prediction/anchor/Cargo.toml
  • binary-prediction/anchor/README.md
  • binary-prediction/anchor/app/index.html
  • binary-prediction/anchor/app/package.json
  • binary-prediction/anchor/app/src/App.tsx
  • binary-prediction/anchor/app/src/components/PriceChart.tsx
  • binary-prediction/anchor/app/src/idl/binary_prediction.json
  • binary-prediction/anchor/app/src/lib/binaryPrediction.ts
  • binary-prediction/anchor/app/src/main.tsx
  • binary-prediction/anchor/app/src/polyfills.ts
  • binary-prediction/anchor/app/src/styles.css
  • binary-prediction/anchor/app/src/vite-env.d.ts
  • binary-prediction/anchor/app/tsconfig.json
  • binary-prediction/anchor/app/vite.config.ts
  • binary-prediction/anchor/package.json
  • binary-prediction/anchor/programs/binary-prediction/Cargo.toml
  • binary-prediction/anchor/programs/binary-prediction/src/error.rs
  • binary-prediction/anchor/programs/binary-prediction/src/lib.rs
  • binary-prediction/anchor/programs/binary-prediction/src/state.rs
  • binary-prediction/anchor/programs/binary-prediction/src/utils.rs
  • binary-prediction/anchor/tests/binary-prediction.ts
  • binary-prediction/anchor/tsconfig.json
  • counter/README.md
  • counter/anchor/.env.example
  • counter/anchor/.gitignore
  • counter/anchor/Anchor.toml
  • counter/anchor/Cargo.toml
  • counter/anchor/README.md
  • counter/anchor/app/.env.example
  • counter/anchor/app/LICENSE.md
  • counter/anchor/app/README.md
  • counter/anchor/app/craco.config.js
  • counter/anchor/app/package.json
  • counter/anchor/app/public/index.html
  • counter/anchor/app/public/manifest.json
  • counter/anchor/app/src/App.tsx
  • counter/anchor/app/src/components/Active.scss
  • counter/anchor/app/src/components/Active.tsx
  • counter/anchor/app/src/components/Alert.tsx
  • counter/anchor/app/src/components/Button.tsx
  • counter/anchor/app/src/components/Square.scss
  • counter/anchor/app/src/components/Square.tsx
  • counter/anchor/app/src/components/Wallet.tsx
  • counter/anchor/app/src/idl/public_counter.json
  • counter/anchor/app/src/index.css
  • counter/anchor/app/src/index.tsx
  • counter/anchor/app/tsconfig.json
  • counter/anchor/package.json
  • counter/anchor/programs/public-counter/Cargo.toml
  • counter/anchor/programs/public-counter/src/lib.rs
  • counter/anchor/target/deploy/public_counter-keypair.json
  • counter/anchor/tests/advanced-magic.ts
  • counter/anchor/tests/public-counter.ts
  • counter/anchor/tsconfig.json
  • counter/native-rust/.gitignore
  • counter/native-rust/Cargo.toml
  • counter/native-rust/LICENSE
  • counter/native-rust/README.md
  • counter/native-rust/archive/advanced-magic.ts
  • counter/native-rust/archive/initializeKeypair.ts
  • counter/native-rust/archive/rust-counter.ts
  • counter/native-rust/archive/schema.ts
  • counter/native-rust/env.example
  • counter/native-rust/package.json
  • counter/native-rust/src/entrypoint.rs
  • counter/native-rust/src/instruction.rs
  • counter/native-rust/src/lib.rs
  • counter/native-rust/src/processor.rs
  • counter/native-rust/src/state.rs
  • counter/native-rust/tests/kit/advanced-magic.test.ts
  • counter/native-rust/tests/kit/initializeKeypair.ts
  • counter/native-rust/tests/kit/rust-counter.test.ts
  • counter/native-rust/tests/kit/schema.ts
  • counter/native-rust/tests/web3js/advanced-magic.test.ts
  • counter/native-rust/tests/web3js/initializeKeypair.ts
  • counter/native-rust/tests/web3js/rust-counter.test.ts
  • counter/native-rust/tests/web3js/schema.ts
  • counter/native-rust/tsconfig.json
  • counter/native-rust/vitest.config.ts
  • counter/pinocchio/.env.example
  • counter/pinocchio/.gitignore
  • counter/pinocchio/Cargo.toml
  • counter/pinocchio/LICENSE
  • counter/pinocchio/README.md
  • counter/pinocchio/package.json
  • counter/pinocchio/src/entrypoint.rs
  • counter/pinocchio/src/lib.rs
  • counter/pinocchio/src/processor.rs
  • counter/pinocchio/src/state.rs
  • counter/pinocchio/tests-rs/delegate_counter.rs
  • counter/pinocchio/tests-rs/increase_counter.rs
  • counter/pinocchio/tests-rs/initialize_counter.rs
  • counter/pinocchio/tests-rs/utils.rs
  • counter/pinocchio/tests/kit/initializeKeypair.ts
  • counter/pinocchio/tests/kit/pinocchio-counter.test.ts
  • counter/pinocchio/tests/kit/schema.ts
  • counter/pinocchio/tests/web3js/initializeKeypair.ts
  • counter/pinocchio/tests/web3js/pinocchio-counter.test.ts
  • counter/pinocchio/tests/web3js/schema.ts
  • counter/pinocchio/tsconfig.json
  • counter/pinocchio/vitest.config.ts
  • crank-counter/anchor/.gitignore
  • crank-counter/anchor/.prettierignore
  • crank-counter/anchor/Anchor.toml
  • crank-counter/anchor/Cargo.toml
  • crank-counter/anchor/README.md
  • crank-counter/anchor/migrations/deploy.ts
  • crank-counter/anchor/package.json
  • crank-counter/anchor/programs/crank-counter/Cargo.toml
  • crank-counter/anchor/programs/crank-counter/src/lib.rs
  • crank-counter/anchor/tests/crank-counter.ts
  • crank-counter/anchor/tsconfig.json
  • delegation-actions/anchor/.gitignore
  • delegation-actions/anchor/.prettierignore
  • delegation-actions/anchor/Anchor.toml
  • delegation-actions/anchor/Cargo.toml
  • delegation-actions/anchor/README.md
  • delegation-actions/anchor/migrations/deploy.ts
  • delegation-actions/anchor/package.json
  • delegation-actions/anchor/programs/delegation-actions/Cargo.toml
  • delegation-actions/anchor/programs/delegation-actions/src/lib.rs
  • delegation-actions/anchor/tests/delegation-actions-local.ts
  • delegation-actions/anchor/tests/delegation-actions.ts
  • delegation-actions/anchor/tsconfig.json
  • ephemeral-account-chats/anchor/.prettierignore
  • ephemeral-account-chats/anchor/Anchor.toml
  • ephemeral-account-chats/anchor/Cargo.toml
  • ephemeral-account-chats/anchor/README.md
  • ephemeral-account-chats/anchor/package.json
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/Cargo.toml
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/errors.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/append_message.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/close_conversation.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/close_profile.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/create_conversation.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/create_profile.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/delegate_profile.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/extend_conversation.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/mod.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/top_up_profile.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/instructions/undelegate_profile.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/lib.rs
  • ephemeral-account-chats/anchor/programs/ephemeral-account-chats/src/state.rs
  • ephemeral-account-chats/anchor/rust-toolchain.toml
  • ephemeral-account-chats/anchor/target/deploy/ephemeral_account_chats-keypair.json
  • ephemeral-account-chats/anchor/target/idl/ephemeral_account_chats.json
  • ephemeral-account-chats/anchor/target/types/ephemeral_account_chats.ts
  • ephemeral-account-chats/anchor/tests/ephemeral-account-chats.ts
  • ephemeral-account-chats/anchor/tsconfig.json
  • magic-actions/anchor/.gitignore
  • magic-actions/anchor/.prettierignore
  • magic-actions/anchor/Anchor.toml
  • magic-actions/anchor/Cargo.toml
  • magic-actions/anchor/README.md
  • magic-actions/anchor/migrations/deploy.ts
  • magic-actions/anchor/package.json
  • magic-actions/anchor/programs/magic-actions/Cargo.toml
  • magic-actions/anchor/programs/magic-actions/src/lib.rs
  • magic-actions/anchor/tests/magic-actions-local.ts
  • magic-actions/anchor/tests/magic-actions.ts
  • magic-actions/anchor/tsconfig.json
  • oncurve-delegation/client/.gitignore
  • oncurve-delegation/client/README.md
  • oncurve-delegation/client/package.json
  • oncurve-delegation/client/tests/kit/initializeKeypair.ts
  • oncurve-delegation/client/tests/kit/oncurve-delegation.test.ts
  • oncurve-delegation/client/tests/web3js/initializeKeypair.ts
  • oncurve-delegation/client/tests/web3js/oncurve-delegation.test.ts
  • oncurve-delegation/client/vitest.config.ts
  • oracle-priced-purchase/anchor/Anchor.toml
  • oracle-priced-purchase/anchor/Cargo.toml
  • oracle-priced-purchase/anchor/README.md
  • oracle-priced-purchase/anchor/package.json
  • oracle-priced-purchase/anchor/programs/oracle-priced-purchase/Cargo.toml
  • oracle-priced-purchase/anchor/programs/oracle-priced-purchase/src/lib.rs
  • oracle-priced-purchase/anchor/tests/fixtures/accounts/sol-usd-100.json
  • oracle-priced-purchase/anchor/tests/fixtures/accounts/sol-usd-50.json
  • oracle-priced-purchase/anchor/tests/oracle-priced-purchase.ts
  • oracle-priced-purchase/anchor/tsconfig.json
  • private-counter/README.md
  • private-counter/anchor/.env.example
  • private-counter/anchor/.gitignore
  • private-counter/anchor/Anchor.toml
  • private-counter/anchor/Cargo.toml
  • private-counter/anchor/README.md
  • private-counter/anchor/app/craco.config.js
  • private-counter/anchor/app/package.json
  • private-counter/anchor/app/public/index.html
  • private-counter/anchor/app/public/manifest.json
  • private-counter/anchor/app/src/App.tsx
  • private-counter/anchor/app/src/components/Active.scss
  • private-counter/anchor/app/src/components/Active.tsx
  • private-counter/anchor/app/src/components/Alert.tsx
  • private-counter/anchor/app/src/components/Button.tsx
  • private-counter/anchor/app/src/components/Square.scss
  • private-counter/anchor/app/src/components/Square.tsx
  • private-counter/anchor/app/src/components/Wallet.tsx
  • private-counter/anchor/app/src/idl/private_counter.json
  • private-counter/anchor/app/src/index.css
  • private-counter/anchor/app/src/index.tsx
  • private-counter/anchor/app/tsconfig.json
  • private-counter/anchor/package.json
  • private-counter/anchor/programs/private-counter/Cargo.toml
  • private-counter/anchor/programs/private-counter/src/lib.rs
  • private-counter/anchor/tests/private-counter.ts
  • private-counter/anchor/tsconfig.json
  • private-counter/pinocchio/.env.example
  • private-counter/pinocchio/.gitignore
  • private-counter/pinocchio/.yarnrc.yml
  • private-counter/pinocchio/Cargo.toml
  • private-counter/pinocchio/LICENSE
  • private-counter/pinocchio/README.md
  • private-counter/pinocchio/package.json
  • private-counter/pinocchio/src/entrypoint.rs
  • private-counter/pinocchio/src/lib.rs
  • private-counter/pinocchio/src/processor.rs
  • private-counter/pinocchio/src/state.rs
  • private-counter/pinocchio/tests/pinocchio-private-counter.test.ts
  • private-counter/pinocchio/tsconfig.json
  • rewards-delegated-vrf/anchor/.gitignore
  • rewards-delegated-vrf/anchor/.prettierignore
  • rewards-delegated-vrf/anchor/Anchor.toml
  • rewards-delegated-vrf/anchor/Cargo.toml
  • rewards-delegated-vrf/anchor/README.md
  • rewards-delegated-vrf/anchor/dashboard/.env.local.example
  • rewards-delegated-vrf/anchor/dashboard/.gitignore
  • rewards-delegated-vrf/anchor/dashboard/app/globals.css
  • rewards-delegated-vrf/anchor/dashboard/app/layout.tsx
  • rewards-delegated-vrf/anchor/dashboard/app/page.tsx
  • rewards-delegated-vrf/anchor/dashboard/app/providers.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/AdminActions.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/CopyableAddress.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/DelegationActions.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/DistributorCard.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/DistributorSwitcher.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/ErrorMessage.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/Header.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/LoadingSpinner.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/NftActions.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/RewardListCard.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/RewardsTable.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/TokenActions.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/TransactionHistory.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/TransactionModal.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/TransactionResponse.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/WalletConnect.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/WalletInfo.tsx
  • rewards-delegated-vrf/anchor/dashboard/components/index.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/index.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useCluster.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useDiscoverDistributors.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useGlobalTransactionHistory.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useRewardData.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useTokenMetadata.ts
  • rewards-delegated-vrf/anchor/dashboard/hooks/useTransaction.ts
  • rewards-delegated-vrf/anchor/dashboard/idl/rewards_delegated_vrf.json
  • rewards-delegated-vrf/anchor/dashboard/idl/rewards_delegated_vrf.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/api.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/clusterContext.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/constants.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/eTokenConstants.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/endpoints.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/admin.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/delegation.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/ephemeralBalance.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/nft.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/rewards.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/sponsoredLamports.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/tokens.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/instructions/types.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/pda.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/program.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/refresh.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/sendTransaction.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/tokenAccounts.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/types.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/utils.ts
  • rewards-delegated-vrf/anchor/dashboard/lib/vrfConstants.ts
  • rewards-delegated-vrf/anchor/dashboard/next-env.d.ts
  • rewards-delegated-vrf/anchor/dashboard/next.config.js
  • rewards-delegated-vrf/anchor/dashboard/package.json
  • rewards-delegated-vrf/anchor/dashboard/postcss.config.js
  • rewards-delegated-vrf/anchor/dashboard/public/devnet_idl.json
  • rewards-delegated-vrf/anchor/dashboard/tailwind.config.ts
  • rewards-delegated-vrf/anchor/dashboard/tsconfig.json
  • rewards-delegated-vrf/anchor/package.json
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/Cargo.toml
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/constants.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/errors.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/helpers.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/add_reward.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/admin_transfer.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/consume_random_reward.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/delegate_reward_list.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/initialize_reward_distributor.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/initialize_transfer_lookup_table.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/mod.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/remove_reward.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/request_random_reward.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/set_admins.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/set_reward_list.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/set_whitelist.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/shared.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/transfer_programmable_nft.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/transfer_spl_token.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/undelegate_reward_list.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/update_reward.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/instructions/whitelist_transfer.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/lib.rs
  • rewards-delegated-vrf/anchor/programs/rewards-delegated-vrf/src/state.rs
  • rewards-delegated-vrf/anchor/tests/constants.ts
  • rewards-delegated-vrf/anchor/tests/fixtures/1001.json
  • rewards-delegated-vrf/anchor/tests/fixtures/merch-collection.json
  • rewards-delegated-vrf/anchor/tests/fixtures/nft-mints.json
  • rewards-delegated-vrf/anchor/tests/fixtures/user-keypair.json
  • rewards-delegated-vrf/anchor/tests/helpers.ts
  • rewards-delegated-vrf/anchor/tests/pdas.ts
  • rewards-delegated-vrf/anchor/tests/rewards-delegated-vrf.ts
  • rewards-delegated-vrf/anchor/tests/setup.ts
  • rewards-delegated-vrf/anchor/tsconfig.json
  • rock-paper-scissor/anchor/.gitignore
  • rock-paper-scissor/anchor/Anchor.toml
  • rock-paper-scissor/anchor/Cargo.toml
  • rock-paper-scissor/anchor/README.md
  • rock-paper-scissor/anchor/app/.env.example
  • rock-paper-scissor/anchor/app/.gitignore
  • rock-paper-scissor/anchor/app/README.md
  • rock-paper-scissor/anchor/app/index.html
  • rock-paper-scissor/anchor/app/package.json
  • rock-paper-scissor/anchor/app/src/App.tsx
  • rock-paper-scissor/anchor/app/src/components/ActivityLog.tsx
  • rock-paper-scissor/anchor/app/src/components/Arena.tsx
  • rock-paper-scissor/anchor/app/src/components/ChoicePicker.tsx
  • rock-paper-scissor/anchor/app/src/components/GamePage.tsx
  • rock-paper-scissor/anchor/app/src/components/Home.tsx
  • rock-paper-scissor/anchor/app/src/components/ShareCard.tsx
  • rock-paper-scissor/anchor/app/src/components/TopUp.tsx
  • rock-paper-scissor/anchor/app/src/components/Withdraw.tsx
  • rock-paper-scissor/anchor/app/src/hooks/useGameMachine.ts
  • rock-paper-scissor/anchor/app/src/idl/anchor_rock_paper_scissor.json
  • rock-paper-scissor/anchor/app/src/idl/anchor_rock_paper_scissor.ts
  • rock-paper-scissor/anchor/app/src/lib/config.ts
  • rock-paper-scissor/anchor/app/src/lib/rps.ts
  • rock-paper-scissor/anchor/app/src/lib/wallet.ts
  • rock-paper-scissor/anchor/app/src/main.tsx
  • rock-paper-scissor/anchor/app/src/polyfills.ts
  • rock-paper-scissor/anchor/app/src/styles.css
  • rock-paper-scissor/anchor/app/src/vite-env.d.ts
  • rock-paper-scissor/anchor/app/tsconfig.json
  • rock-paper-scissor/anchor/app/vite.config.ts
  • rock-paper-scissor/anchor/package.json
  • rock-paper-scissor/anchor/programs/anchor-rock-paper-scissor/Cargo.toml
  • rock-paper-scissor/anchor/programs/anchor-rock-paper-scissor/src/lib.rs
  • rock-paper-scissor/anchor/tests/rock-paper-scissor.ts
  • rock-paper-scissor/anchor/tsconfig.json
  • roll-dice/README.md
  • roll-dice/anchor/.gitignore
  • roll-dice/anchor/.prettierignore
  • roll-dice/anchor/Anchor.toml
  • roll-dice/anchor/Cargo.toml
  • roll-dice/anchor/README.md
  • roll-dice/anchor/app/.eslintrc.json
  • roll-dice/anchor/app/.gitignore
  • roll-dice/anchor/app/app/delegated/page.tsx
  • roll-dice/anchor/app/app/globals.css
  • roll-dice/anchor/app/app/layout.tsx
  • roll-dice/anchor/app/app/page.tsx
  • roll-dice/anchor/app/components.json
  • roll-dice/anchor/app/components/dice.tsx
  • roll-dice/anchor/app/components/solana-address.tsx
  • roll-dice/anchor/app/components/theme-provider.tsx
  • roll-dice/anchor/app/components/ui/accordion.tsx
  • roll-dice/anchor/app/components/ui/alert-dialog.tsx
  • roll-dice/anchor/app/components/ui/alert.tsx
  • roll-dice/anchor/app/components/ui/aspect-ratio.tsx
  • roll-dice/anchor/app/components/ui/avatar.tsx
  • roll-dice/anchor/app/components/ui/badge.tsx
  • roll-dice/anchor/app/components/ui/breadcrumb.tsx
  • roll-dice/anchor/app/components/ui/button.tsx
  • roll-dice/anchor/app/components/ui/calendar.tsx
  • roll-dice/anchor/app/components/ui/card.tsx
  • roll-dice/anchor/app/components/ui/carousel.tsx
  • roll-dice/anchor/app/components/ui/chart.tsx
  • roll-dice/anchor/app/components/ui/checkbox.tsx
  • roll-dice/anchor/app/components/ui/collapsible.tsx
  • roll-dice/anchor/app/components/ui/command.tsx
  • roll-dice/anchor/app/components/ui/context-menu.tsx
  • roll-dice/anchor/app/components/ui/dialog.tsx
  • roll-dice/anchor/app/components/ui/drawer.tsx
  • roll-dice/anchor/app/components/ui/dropdown-menu.tsx
  • roll-dice/anchor/app/components/ui/form.tsx
  • roll-dice/anchor/app/components/ui/hover-card.tsx
  • roll-dice/anchor/app/components/ui/input-otp.tsx
  • roll-dice/anchor/app/components/ui/input.tsx
  • roll-dice/anchor/app/components/ui/label.tsx
  • roll-dice/anchor/app/components/ui/menubar.tsx
  • roll-dice/anchor/app/components/ui/navigation-menu.tsx
  • roll-dice/anchor/app/components/ui/pagination.tsx
  • roll-dice/anchor/app/components/ui/popover.tsx
  • roll-dice/anchor/app/components/ui/progress.tsx
  • roll-dice/anchor/app/components/ui/radio-group.tsx
  • roll-dice/anchor/app/components/ui/resizable.tsx
  • roll-dice/anchor/app/components/ui/scroll-area.tsx
  • roll-dice/anchor/app/components/ui/select.tsx
  • roll-dice/anchor/app/components/ui/separator.tsx
  • roll-dice/anchor/app/components/ui/sheet.tsx
  • roll-dice/anchor/app/components/ui/sidebar.tsx
  • roll-dice/anchor/app/components/ui/skeleton.tsx
  • roll-dice/anchor/app/components/ui/slider.tsx
  • roll-dice/anchor/app/components/ui/sonner.tsx
  • roll-dice/anchor/app/components/ui/switch.tsx
  • roll-dice/anchor/app/components/ui/table.tsx
  • roll-dice/anchor/app/components/ui/tabs.tsx
  • roll-dice/anchor/app/components/ui/textarea.tsx
  • roll-dice/anchor/app/components/ui/toast.tsx
  • roll-dice/anchor/app/components/ui/toaster.tsx
  • roll-dice/anchor/app/components/ui/toggle-group.tsx
  • roll-dice/anchor/app/components/ui/toggle.tsx
  • roll-dice/anchor/app/components/ui/tooltip.tsx
  • roll-dice/anchor/app/components/ui/use-mobile.tsx
  • roll-dice/anchor/app/components/ui/use-toast.ts
  • roll-dice/anchor/app/hooks/use-mobile.tsx
  • roll-dice/anchor/app/hooks/use-toast.ts
  • roll-dice/anchor/app/lib/config.ts
  • roll-dice/anchor/app/lib/idl/random_dice.json
  • roll-dice/anchor/app/lib/idl/random_dice_delegated.json
  • roll-dice/anchor/app/lib/solana-utils.ts
  • roll-dice/anchor/app/lib/types.ts
  • roll-dice/anchor/app/lib/utils.ts
  • roll-dice/anchor/app/next-env.d.ts
  • roll-dice/anchor/app/next.config.mjs
  • roll-dice/anchor/app/package.json
  • roll-dice/anchor/app/postcss.config.mjs
  • roll-dice/anchor/app/styles/globals.css
  • roll-dice/anchor/app/tailwind.config.ts
  • roll-dice/anchor/app/tsconfig.json
  • roll-dice/anchor/migrations/deploy.ts
  • roll-dice/anchor/package.json
  • roll-dice/anchor/programs/roll-dice-delegated/Cargo.toml
  • roll-dice/anchor/programs/roll-dice-delegated/src/lib.rs
  • roll-dice/anchor/programs/roll-dice/Cargo.toml
  • roll-dice/anchor/programs/roll-dice/src/lib.rs
  • roll-dice/anchor/target/deploy/roll_dice-keypair.json
  • roll-dice/anchor/tests/roll-dice-delegated.ts
  • roll-dice/anchor/tests/roll-dice.ts
  • roll-dice/anchor/tsconfig.json
  • roll-dice/pinocchio/.gitignore
  • roll-dice/pinocchio/.prettierignore
  • roll-dice/pinocchio/Cargo.toml
  • roll-dice/pinocchio/README.md
  • roll-dice/pinocchio/package.json
  • roll-dice/pinocchio/programs/roll-dice-delegated/Cargo.toml
  • roll-dice/pinocchio/programs/roll-dice-delegated/src/entrypoint.rs
  • roll-dice/pinocchio/programs/roll-dice-delegated/src/lib.rs
  • roll-dice/pinocchio/programs/roll-dice-delegated/src/processor.rs
  • roll-dice/pinocchio/programs/roll-dice-delegated/src/state.rs
  • roll-dice/pinocchio/programs/roll-dice/Cargo.toml
  • roll-dice/pinocchio/programs/roll-dice/src/entrypoint.rs
  • roll-dice/pinocchio/programs/roll-dice/src/lib.rs
  • roll-dice/pinocchio/programs/roll-dice/src/processor.rs
  • roll-dice/pinocchio/programs/roll-dice/src/state.rs
  • roll-dice/pinocchio/tests/roll-dice-delegated.ts
  • roll-dice/pinocchio/tests/roll-dice.ts
  • roll-dice/pinocchio/tests/utils.ts
  • roll-dice/pinocchio/tsconfig.json
  • scripts/projects.sh
  • scripts/test-example.sh
  • scripts/test-locally.sh
  • session-keys/anchor/.gitignore
  • session-keys/anchor/Anchor.toml
  • session-keys/anchor/Cargo.toml
  • session-keys/anchor/README.md
  • session-keys/anchor/app/LICENSE.md
  • session-keys/anchor/app/README.md
  • session-keys/anchor/app/craco.config.js
  • session-keys/anchor/app/package.json
  • session-keys/anchor/app/public/index.html
  • session-keys/anchor/app/public/manifest.json
  • session-keys/anchor/app/src/App.tsx
  • session-keys/anchor/app/src/components/Active.scss
  • session-keys/anchor/app/src/components/Active.tsx
  • session-keys/anchor/app/src/components/Alert.tsx
  • session-keys/anchor/app/src/components/Button.tsx
  • session-keys/anchor/app/src/components/Square.scss
  • session-keys/anchor/app/src/components/Square.tsx
  • session-keys/anchor/app/src/components/Wallet.tsx
  • session-keys/anchor/app/src/idl/anchor_counter_session.json
  • session-keys/anchor/app/src/index.css
  • session-keys/anchor/app/src/index.tsx
  • session-keys/anchor/app/tsconfig.json
  • session-keys/anchor/package.json
  • session-keys/anchor/programs/anchor-counter-session/Cargo.toml
  • session-keys/anchor/programs/anchor-counter-session/src/lib.rs
  • session-keys/anchor/tests/advanced-magic.ts
  • session-keys/anchor/tests/anchor-counter-session.ts
  • session-keys/anchor/tsconfig.json
  • session-keys/anchor/utils/initializeKeypair.ts
  • spl-tokens/anchor/.gitignore
  • spl-tokens/anchor/Anchor.toml
  • spl-tokens/anchor/Cargo.toml
  • spl-tokens/anchor/README.md
  • spl-tokens/anchor/app/LICENSE
  • spl-tokens/anchor/app/README.md
  • spl-tokens/anchor/app/app/package.json
  • spl-tokens/anchor/app/craco.config.js
  • spl-tokens/anchor/app/example.env
  • spl-tokens/anchor/app/package.json
  • spl-tokens/anchor/app/public/index.html
  • spl-tokens/anchor/app/public/manifest.json
  • spl-tokens/anchor/app/src/App.tsx
  • spl-tokens/anchor/app/src/components/Active.scss
  • spl-tokens/anchor/app/src/components/Active.tsx
  • spl-tokens/anchor/app/src/components/Alert.tsx
  • spl-tokens/anchor/app/src/components/Button.tsx
  • spl-tokens/anchor/app/src/components/Square.scss
  • spl-tokens/anchor/app/src/components/Square.tsx
  • spl-tokens/anchor/app/src/components/Wallet.tsx
  • spl-tokens/anchor/app/src/index.css
  • spl-tokens/anchor/app/src/index.tsx
  • spl-tokens/anchor/app/tsconfig.json
  • spl-tokens/anchor/package.json
  • spl-tokens/anchor/programs/spl-tokens/Cargo.toml
  • spl-tokens/anchor/programs/spl-tokens/src/lib.rs
  • spl-tokens/anchor/tests/spl-tokens.ts
  • spl-tokens/anchor/tsconfig.json

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
  • Commit unit tests in branch dhruvja/refactor/group-examples-by-framework

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.

@dhruvja dhruvja requested a review from jonasXchen July 2, 2026 11:50
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
binary-prediction-demo Error Error Jul 7, 2026 12:12pm
counter-session-keys Error Error Jul 7, 2026 12:12pm
er-rolldice Error Error Jul 7, 2026 12:12pm
magicblock-counter-example Error Error Jul 7, 2026 12:12pm
magicblock-engine-examples Error Error Jul 7, 2026 12:12pm
magicblock-rewards-dashboard Error Error Jul 7, 2026 12:12pm
rps-example Error Error Jul 7, 2026 12:12pm
spl-tokens Error Error Jul 7, 2026 12:12pm

Request Review

@jonasXchen jonasXchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm! we need to make sure that docs and skills are synced!

@dhruvja

dhruvja commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

The CI is failing since the paths have been updated. The solution would be to merge this to main and then update the paths on the vercel.

…p-examples-by-framework

# Conflicts:
#	README.md
#	dummy-token-transfer/Cargo.toml
#	dummy-token-transfer/anchor/Anchor.toml
#	dummy-token-transfer/anchor/Cargo.lock
#	dummy-token-transfer/anchor/Cargo.toml
#	dummy-token-transfer/anchor/README.md
#	dummy-token-transfer/anchor/package-lock.json
#	dummy-token-transfer/anchor/package.json
#	dummy-token-transfer/anchor/programs/dummy-transfer/Cargo.toml
#	dummy-token-transfer/anchor/programs/dummy-transfer/src/lib.rs
#	dummy-token-transfer/anchor/tests/dummy-transfer-local.ts
#	dummy-token-transfer/anchor/tests/dummy-transfer.ts
#	dummy-token-transfer/anchor/tsconfig.json
#	dummy-token-transfer/anchor/yarn.lock
#	dummy-token-transfer/package.json
#	dummy-token-transfer/programs/dummy-transfer/Cargo.toml
#	ephemeral-account-chats/anchor/.prettierignore
#	oracle-priced-purchase/Cargo.toml
#	oracle-priced-purchase/package.json
#	oracle-priced-purchase/programs/oracle-priced-purchase/Cargo.toml
@dhruvja dhruvja merged commit 3108896 into main Jul 7, 2026
18 of 29 checks passed
dhruvja added a commit to magicblock-labs/docs that referenced this pull request Jul 8, 2026
## Merge order

Depends on
magicblock-labs/magicblock-engine-examples#108.

Do not merge this PR until
magicblock-labs/magicblock-engine-examples#108 is merged, otherwise
these links will point to paths that do not exist on `main`.

## Summary

Updates docs links to `magicblock-engine-examples` after the example
repo refactor that groups implementations by use case and framework.

## Changes

- Update example links across English, Chinese, Japanese, and Korean
docs/snippets.
- Point framework-specific examples to their new paths, such as:
  - `anchor-counter` -> `counter/anchor`
  - `rust-counter` -> `counter/native-rust`
  - `pinocchio-counter` -> `counter/pinocchio`
  - `magic-actions` -> `magic-actions/anchor`
  - `roll-dice` -> `roll-dice/anchor`
- Update visible path labels where they referenced moved folders.

## Validation

- `git diff --check`
- Custom stale moved example URL scan
- `npx -y mintlify validate`

## Breaking changes

None for the docs site after
magicblock-labs/magicblock-engine-examples#108 is merged. Before that
dependency merges, the updated external links target paths that are not
yet on the examples repo `main` branch.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated many example and quick-access links across English, Chinese,
Japanese, Korean, and general docs to point to more specific, current
example locations.
* Improved references for Anchor, Native Rust, Pinocchio, Magic Actions,
private counter examples, and other templates so users reach the
intended repository pages more easily.
* Several payments, crank, and delegation-related links were also
refreshed to match the latest example paths.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

refactor: group examples by use case and framework

2 participants