fix: migrate all quasar examples to current Quasar API (PR #195 + #196)#11
Merged
mikemaccana merged 45 commits intoquiknode-labs:mainfrom May 6, 2026
Merged
Conversation
added 30 commits
May 3, 2026 15:24
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) refactored the Accounts derive around behaviour modules. - mint::*/token::* namespaced syntax replaced by mint(...) / token(...) behaviour groups; init_if_needed → init(idempotent). - seeds = T::seeds(x), bump → address = T::seeds(x.address()). - has_one = X → has_one(X); close = X → close(dest = X); constraint = expr → constraints(expr). - Program<System>/<Token> → Program<SystemProgram>/<TokenProgram>. - All quasar deps pinned to branch = "master" so they share one source-id (mixing git no-branch + branch=master triggered Token: Id trait failures via dual sources). Tests: cargo test --release → 4/4 pass.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `seeds = ..., bump` with `address = T::seeds(...)` and `Program<System>` with `Program<SystemProgram>`. Pinned quasar-lang to branch = "master" so any future quasar deps (none here) would resolve to the same source-id. Tests: cargo test --release → 3/3 pass.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
… API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
…ar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>`, `seeds = T::seeds(x), bump` with `address = T::seeds(x.address())`, `init_if_needed` with `init(idempotent)`, and `close = X` with `close(dest = X)`. Pinned all quasar deps to branch = "master" so they share one source-id; mixing `{ git = "..." }` with `{ git = "...", branch = "master" }` otherwise resolves to two source-ids of the same crate, breaking trait imports. Build: `quasar build` green.
… Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<System>` with `Program<SystemProgram>` and `seeds = T::seeds(), bump` with `address = T::seeds()`. Pinned quasar-lang to branch = "master" for source-id consistency. Build: `quasar build` green.
…Quasar API Quasar renamed the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic` (re-exported from `quasar_lang::prelude`) as part of the PR solana-developers#195 derive refactor (merged 2026-05-03 at HEAD 3d6fb0d8). Pinned quasar-lang to branch = "master" for source-id consistency. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced the namespaced `mint::decimals = N, mint::authority = X` syntax with the behaviour-style `mint(decimals = N, authority = X, freeze_authority = ..., token_program = ...)`. The token program type moved from `Token` to `TokenProgram` (and `System` to `SystemProgram`). Switched the imports from `quasar_spl::{Mint, Token, TokenCpi}` to `quasar_spl::prelude::*` so the new `TokenProgram` / `SystemProgram` markers are in scope. Pinned all quasar deps to branch = "master" for source-id consistency. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<Token>` / `Program<System>` with `Program<TokenProgram>` / `Program<SystemProgram>`. Switched imports from explicit `Mint, Token, TokenCpi` to `quasar_spl::prelude::*` so the new program-marker types are in scope. Pinned all quasar deps to branch = "master" for source-id consistency. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced the namespaced `mint::` / `token::` / `seeds = ... bump` / `has_one = X` / `close = X` / `Program<Token | System>` syntax with the new behaviour-style `mint(...)`, `token(...)`, `address = T::seeds(...)`, `has_one(X)`, `close(dest = X)`, `Program<TokenProgram | SystemProgram>`. The derive no longer emits a `<Struct>_seeds()` helper for Bumps-based PDA signing, so check_contributions and refund now build the `Seed::from(...)` array inline like the canonical escrow example upstream at quasar/examples/escrow. Pinned all quasar deps to branch = "master" for source-id consistency. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility) replaced the namespaced `mint::*` syntax with the new `mint(...)` behaviour and renamed the program markers `Token`/`System` to `TokenProgram`/`SystemProgram`. Quasar PR solana-developers#196 (metadata crate, merged 2026-05-03 at HEAD 3d6fb0d8) extracted Metaplex Token Metadata from quasar-spl into a separate crate `quasar-metadata`. The `MetadataProgram` marker now lives there and is used as `Program<MetadataProgram>`. Behaviour-style metadata init can't take runtime instruction args (literal/expr-only at parse time), so this instruction keeps the manual `MetadataCpi::create_metadata_accounts_v3` CPI to accept user-supplied name/symbol/uri. Their types are now `PodString<32>`/`<10>`/`<200>` matching Metaplex's onchain limits — bare `String` is no longer valid. Added the previously missing `Quasar.toml` so this example can be covered by the CI matrix, and removed the project from `.ghaignore`. Build: `quasar build` and `cargo build --release` both green.
Quasar PR solana-developers#195 (derive plugin extensibility) replaced `Program<Token>` / `Program<System>` with `Program<TokenProgram>` / `Program<SystemProgram>` and the inline `seeds = [b"..."], bump` form with `address = StructName::seeds()` driven by a separate `#[derive(Seeds)]` type. Added a `MintPda` marker carrying `#[seeds(b"mint")]` so the mint PDA derivation is shared between `CreateMint` and `MintTokens`. Pinned all quasar deps to branch = "master" for source-id consistency. Build: `quasar build` green.
… Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `Program<Token | System>` with `Program<TokenProgram | SystemProgram>` and inline `seeds = [...]` with `address = T::seeds(...)` driven by a separate `#[derive(Seeds)]` type. Added a `UserPda` marker with `#[seeds(b"", user_account: Address)]` to model the (no-prefix, user-account-keyed) PDA the Anchor original used. `Account::set_inner` now requires the `#[account(set_inner)]` opt-in and takes a single `<Name>Inner` struct argument; updated `UserAccount` accordingly. Added the previously missing `Quasar.toml` and removed the project from `.ghaignore`. Build: `quasar build` and `cargo build --release` both green.
… current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…nt Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…ent Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
… Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…ent Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…rrent Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram`. No other changes were needed for this example. Build: `quasar build` green.
…): migrate to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
…ar): migrate to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
… current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
…e to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
…ate to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
…grate to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
…to current Quasar API Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the system-program marker from `System` to `SystemProgram` (and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`). Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the program markers from `System`/`Token` to `SystemProgram`/`TokenProgram` and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`. Inline `seeds = [...]` was replaced with a `#[derive(Seeds)]` marker plus `address = T::seeds()`. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the program markers from `System`/`Token` to `SystemProgram`/`TokenProgram` and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`. Inline `seeds = [...]` was replaced with a `#[derive(Seeds)]` marker plus `address = T::seeds()`. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) renamed the program markers from `System`/`Token` to `SystemProgram`/`TokenProgram` and the dynamic-account CPI helper from `DynCpiCall` to `CpiDynamic`. Inline `seeds = [...]` was replaced with a `#[derive(Seeds)]` marker plus `address = T::seeds()`. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility) replaced the namespaced `mint::*`/`token::*` syntax with behaviour-style `mint(...)`/`token(...)`, `init_if_needed` with `init(idempotent)`, and `Program<Token | System>` with `Program<TokenProgram | SystemProgram>`. Quasar PR solana-developers#196 (metadata crate, merged 2026-05-03 at HEAD 3d6fb0d8) extracted Metaplex Token Metadata into `quasar-metadata`. The `MetadataProgram` marker now lives there and is used as `Program<MetadataProgram>`. The metadata + master-edition behaviour macros only accept compile-time literals for name / symbol / uri, so this instruction (which receives them at runtime) keeps the manual `MetadataCpi` calls. String args are now `PodString<32>`/`<10>`/`<200>` matching Metaplex's onchain limits. Added the previously missing `Quasar.toml` and removed the project from `.ghaignore`. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility) replaced `mint::*`/`token::*` with `mint(...)`/`token(...)`, `init_if_needed` with `init(idempotent)`, inline `seeds = [...]` with `address = T::seeds()` driven by a separate `#[derive(Seeds)]` type, and `Program<Token | System>` with `Program<TokenProgram | SystemProgram>`. Quasar PR solana-developers#196 (metadata crate, merged 2026-05-03 at HEAD 3d6fb0d8) extracted Metaplex Token Metadata into `quasar-metadata`. The `MetadataProgram` marker now lives there and is used as `Program<MetadataProgram>`. Added a shared `MintAuthorityPda` Seeds marker with `#[seeds(b"authority")]`. The metadata + master-edition CPIs (which take runtime-resolved bumps) keep their manual `MetadataCpi` calls; behaviour-style metadata init is parse-time only. Added the previously missing `Quasar.toml` and removed the project from `.ghaignore`. Build: `quasar build` green.
Quasar PR solana-developers#195 (derive plugin extensibility, merged 2026-05-03 at HEAD 3d6fb0d8) replaced `mint::*`/`token::*` with `mint(...)`/`token(...)`, `init_if_needed` with `init(idempotent)`, inline `seeds = [...]`/`bump` with `address = T::seeds(...)` driven by `#[derive(Seeds)]` types, and the program markers `Token`/`System` with `TokenProgram`/`SystemProgram`. Added four PDA seed markers (`AmmPda`, `PoolPda`, `PoolAuthorityPda`, `LiquidityMintPda`). Note: the new `#[seeds]` always emits the literal prefix first, so pool_authority and mint_liquidity now derive with `[b"authority" | b"liquidity", amm, mint_a, mint_b]` instead of the Anchor sibling's `[amm, mint_a, mint_b, b"authority" | b"liquidity"]`. The program is internally consistent (handlers and tests use the new order); on-chain addresses just don't match the Anchor copy. `Account::set_inner` now requires the `#[account(set_inner)]` opt-in and takes a single `<Name>Inner` struct argument. Added the previously missing `Quasar.toml` and removed the project from `.ghaignore`. Build: `quasar build` green.
The project now builds clean after the cargo source-id fix landed in the quasar-full-api-update branch (consistent branch = "master" pin across quasar-lang and quasar-spl); the previous AccountView.data / log_64 breakage was a transient API-mismatch from the dual source-id bug.
…pers#198) Quasar PR solana-developers#198 "idl-redesign-clean" (merged 2026-05-03, rev 096c8f7c) regressed `quasar build` for flat-layout projects. The new IDL flow chdirs to `crate_path.parent()`, which evaluates to an empty PathBuf when the program crate is at the project root (src/lib.rs in `.`), producing a posix_spawn child chdir("") that fails with ENOENT and a bare "Anyhow error" before any compilation begins. This migration was written against quasar rev 3d6fb0d8 (the merge of PRs solana-developers#195 + solana-developers#196 that the migration targets). Pin the CI install to that rev so the example API surface matches the CLI's expectations. Unpin once upstream lands a fix that handles the flat layout that quasar's own `quasar init` produces. Verified locally: 3d6fb0d8 builds basics/transfer-sol/quasar in 2-5s with no edits to the example. 096c8f7c fails it instantly with the "Anyhow error" CI was reproducing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quasar landed two breaking changes on 2026-05-03 (HEAD
3d6fb0d8):mint::*/token::*syntax with behaviour-stylemint(...)/token(...), renamed program markers (Token→TokenProgram,System→SystemProgram), replaced inlineseeds = [...], bumpwithaddress = T::seeds(...)driven by#[derive(Seeds)], replacedinit_if_neededwithinit(idempotent), and renamedDynCpiCalltoCpiDynamic.Stringinstruction args now require an explicit capacity bound (String<N>).quasar-metadatacrate. TheMetadataProgrammarker moved out ofquasar-spl::metadata::*.Together these broke every quasar example in the repo. This PR migrates them to the current API (44 commits, one per example).
What's in the PR
basics/*account-data,checking-accounts,close-account,counter,create-account,cross-program-invocation/{hand,lever},favorites,pda-rent-payer,processing-instructions,program-derived-addresses,realloc,rent,repository-layout,transfer-sol);hello-solanabuilt clean as-istokens/*create-token,escrow,external-delegate-token-master,nft-minter,nft-operations,pda-mint-authority,spl-token-minter,token-fundraiser,token-swap,transfer-tokens)tokens/token-extensions/*basicsandcpi-guardbuilt clean as-is;default-account-state,immutable-owner,interest-bearing,memo-transfer,mint-close-authority,non-transferable,permanent-delegate,transfer-feemigrated.groupstays ignored ("not live");metadatais an empty placeholder dir.tokens/token-extensions/transfer-hook/*compression/*cnft-burn,cnft-vault,cutils)oracles/*pythbuilds clean after the dep source-id fix; removed from.ghaignoreSeveral
tokens/*projects that previously hadCargo.tomlbut noQuasar.toml(and were therefore listed in.github/.ghaignore) now build cleanly and have been added back to CI:spl-token-minter,external-delegate-token-master,nft-minter,nft-operations,token-swap. Theoracles/pyth/quasar"build failed — outdated quasar-lang API" entry was removed for the same reason.Test results
tokens/escrow/quasar— 4/4 tests passtokens/token-fundraiser/quasar— 5/5 tests passbasics/counter/quasar,basics/hello-solana/quasar— passAll other migrated examples have
quasar buildgreen; theirtests.rsfiles don't define new unit tests (most just havesetup()helpers), socargo testreports0 passed; 0 failed— same as before the migration.Cargo dependency hygiene fix
Earlier attempts hit a dual-source-id bug: when one quasar dep was
{ git = "..." }(no branch) and another was{ git = "...", branch = "master" }, Cargo treated them as two distinct sources of the same crate even though they resolved to the same SHA. That broke trait-impl resolution (e.g.Token: Idnot satisfied) because traits were imported from a different source-id.This PR pins all quasar deps in every Cargo.toml to
branch = "master"so they share one source-id.Caveats / divergences from the Anchor siblings
tokens/token-swap/quasarandtokens/external-delegate-token-master/quasar: the new#[derive(Seeds)]always emits the literal prefix first, so a couple of PDAs now derive with the prefix in a different position than the Anchor sibling. The programs are internally consistent (handlers, derive constraints, and tests all use the new order); only the on-chain addresses differ. This is documented in the file comments and the relevant commit messages.nft-minter,nft-operations,spl-token-minterkeep manualMetadataCpicalls for runtime-supplied name/symbol/uri because the behaviour-stylemetadata(...)macro only accepts compile-time literals. Themetadata: UncheckedAccountfield type is preserved (the Metaplex program validates onchain).References
3d6fb0d8Note
Medium Risk
Medium risk due to large-scale refactors across many Quasar examples (PDA derivation/seed ordering, account constraints, token metadata CPI wiring) and CI toolchain pinning; behavior should be equivalent but subtle address/constraint changes could break builds or tests.
Overview
Updates the entire set of
quasarexamples to compile against Quasar breaking changes from upstream PRs solana-developers#195/solana-developers#196, including new derive grammar (address = ...+#[derive(Seeds)]),init(idempotent)in place ofinit_if_needed, renamed program markers (SystemProgram,TokenProgram), newmint(...)/token(...)constraint syntax,CpiDynamicreplacingDynCpiCall, and required bounded instruction strings (String<N>).Adds seed-marker types where inline
seeds = [...]was used and in several programs rebuilds PDA signer seed arrays manually, with some PDAs intentionally changing seed ordering to match the new derive behavior. Metaplex integrations are migrated to the extractedquasar-metadatacrate and metadata creation stays as explicit CPI where runtime values are required.CI is adjusted to pin the Quasar CLI install to a specific upstream revision to avoid a known
quasar buildregression, and.github/.ghaignoreis reduced so more Quasar projects are built/tested again (with newQuasar.tomladded for previously skipped projects).Reviewed by Cursor Bugbot for commit 44f2dbd. Bugbot is set up for automated code reviews on this repo. Configure here.