Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
19ff75e
fix(tokens/escrow/quasar): migrate to current Quasar API
May 3, 2026
aae713d
fix(basics/counter/quasar): migrate to current Quasar API
May 3, 2026
60c412f
fix(basics/account-data/quasar): migrate to current Quasar API
May 3, 2026
236b904
fix(basics/checking-accounts/quasar): migrate to current Quasar API
May 3, 2026
101e6b6
fix(basics/close-account/quasar): migrate to current Quasar API
May 3, 2026
6c41363
fix(basics/create-account/quasar): migrate to current Quasar API
May 3, 2026
e47dacb
fix(basics/favorites/quasar): migrate to current Quasar API
May 3, 2026
73e8e9b
fix(basics/pda-rent-payer/quasar): migrate to current Quasar API
May 3, 2026
4e67072
fix(basics/processing-instructions/quasar): migrate to current Quasar…
May 3, 2026
eddb6df
fix(basics/program-derived-addresses/quasar): migrate to current Quas…
May 3, 2026
76e350a
fix(basics/realloc/quasar): migrate to current Quasar API
May 3, 2026
5500b91
fix(basics/rent/quasar): migrate to current Quasar API
May 3, 2026
1d63f51
fix(basics/repository-layout/quasar): migrate to current Quasar API
May 3, 2026
710b5da
fix(basics/transfer-sol/quasar): migrate to current Quasar API
May 3, 2026
3e074c6
fix(basics/cross-program-invocation/quasar/lever): migrate to current…
May 3, 2026
111c702
fix(basics/cross-program-invocation/quasar/hand): migrate to current …
May 3, 2026
477f010
fix(tokens/create-token/quasar): migrate to current Quasar API
May 3, 2026
689fd1a
fix(tokens/transfer-tokens/quasar): migrate to current Quasar API
May 3, 2026
2c3e54c
fix(tokens/token-fundraiser/quasar): migrate to current Quasar API
May 3, 2026
297db0f
fix(tokens/spl-token-minter/quasar): migrate to current Quasar API
May 3, 2026
a77246f
fix(tokens/pda-mint-authority/quasar): migrate to current Quasar API
May 3, 2026
a8a46c5
fix(tokens/external-delegate-token-master/quasar): migrate to current…
May 3, 2026
8943cb6
fix(tokens/token-extensions/default-account-state/quasar): migrate to…
May 3, 2026
5a01991
fix(tokens/token-extensions/immutable-owner/quasar): migrate to curre…
May 3, 2026
f556465
fix(tokens/token-extensions/interest-bearing/quasar): migrate to curr…
May 3, 2026
97493e9
fix(tokens/token-extensions/memo-transfer/quasar): migrate to current…
May 3, 2026
e63e3e8
fix(tokens/token-extensions/mint-close-authority/quasar): migrate to …
May 3, 2026
40d0c9d
fix(tokens/token-extensions/non-transferable/quasar): migrate to curr…
May 3, 2026
e93d69d
fix(tokens/token-extensions/permanent-delegate/quasar): migrate to cu…
May 3, 2026
ce55384
fix(tokens/token-extensions/transfer-fee/quasar): migrate to current …
May 3, 2026
e648833
fix(tokens/token-extensions/transfer-hook/account-data-as-seed/quasar…
May 3, 2026
90ec21e
fix(tokens/token-extensions/transfer-hook/allow-block-list-token/quas…
May 3, 2026
06dd45d
fix(tokens/token-extensions/transfer-hook/counter/quasar): migrate to…
May 3, 2026
5425c21
fix(tokens/token-extensions/transfer-hook/hello-world/quasar): migrat…
May 3, 2026
5a792d0
fix(tokens/token-extensions/transfer-hook/transfer-cost/quasar): migr…
May 3, 2026
8ae4182
fix(tokens/token-extensions/transfer-hook/transfer-switch/quasar): mi…
May 3, 2026
46707bb
fix(tokens/token-extensions/transfer-hook/whitelist/quasar): migrate …
May 3, 2026
f7a96d2
fix(compression/cutils/quasar): migrate to current Quasar API
May 3, 2026
c7a461b
fix(compression/cnft-burn/quasar): migrate to current Quasar API
May 3, 2026
6b04fd7
fix(compression/cnft-vault/quasar): migrate to current Quasar API
May 3, 2026
7022331
fix(tokens/nft-minter/quasar): migrate to current Quasar API
May 3, 2026
d1057a6
fix(tokens/nft-operations/quasar): migrate to current Quasar API
May 3, 2026
c0c91e2
fix(tokens/token-swap/quasar): migrate to current Quasar API
May 3, 2026
8eff4a2
fix(ci): re-enable oracles/pyth/quasar in CI
May 3, 2026
44f2dbd
fix(ci): pin quasar-cli install to rev 3d6fb0d8 (pre-PR #198)
mikemaccana-edwardbot May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/.ghaignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@ tokens/token-extensions/group/quasar
# CPI quasar project uses subdirectories (hand/ and lever/) instead of a root Quasar.toml
basics/cross-program-invocation/quasar

# has Cargo.toml but no Quasar.toml
tokens/spl-token-minter/quasar
tokens/external-delegate-token-master/quasar
tokens/nft-minter/quasar
tokens/nft-operations/quasar
tokens/token-swap/quasar

# build failed - outdated quasar-lang API (no AccountView.data, no log_64)
oracles/pyth/quasar


# error in tests
tokens/external-delegate-token-master/anchor
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/quasar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,16 @@ jobs:
with:
solana-cli-version: stable
- name: Install Quasar CLI
run: cargo install --git https://github.com/blueshift-gg/quasar quasar-cli --locked
# Pinned to quasar rev 3d6fb0d8 (the HEAD this migration was written
# against, immediately after PRs #195 + #196). The next merged PR
# (#198 "idl-redesign-clean", 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 `.`),
# causing posix_spawn child chdir("") to fail with ENOENT before
# any compilation begins. Symptom in CI is a bare "Anyhow error".
# Unpin once upstream lands a fix that handles the flat layout.
run: cargo install --git https://github.com/blueshift-gg/quasar --rev 3d6fb0d8 quasar-cli --locked
- name: Build and Test with Stable
run: |
source build_and_test.sh
Expand Down
2 changes: 1 addition & 1 deletion basics/account-data/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions basics/account-data/quasar/src/instructions/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use {
pub struct CreateAddressInfo {
#[account(mut)]
pub payer: Signer,
#[account(mut, init, payer = payer, seeds = AddressInfo::seeds(payer), bump)]
#[account(mut, init, payer = payer, address = AddressInfo::seeds(payer.address()))]
pub address_info: Account<AddressInfo>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/checking-accounts/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use quasar_lang::prelude::*;
/// Demonstrates Quasar's account type constraints:
/// - `Signer`: automatically verified as a transaction signer
/// - `UncheckedAccount`: no runtime checks (opt-in unchecked access)
/// - `Program<System>`: verified as the system program (executable + address check)
/// - `Program<SystemProgram>`: verified as the system program (executable + address check)
///
/// Note: Anchor's `#[account(owner = id())]` owner constraint is not directly available
/// in Quasar. Owner checks can be done manually in the instruction body if needed.
Expand All @@ -18,7 +18,7 @@ pub struct CheckAccounts {
#[account(mut)]
pub account_to_change: UncheckedAccount,
/// Checks the account is executable and matches the system program address.
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/close-account/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
12 changes: 6 additions & 6 deletions basics/close-account/quasar/src/instructions/close_user.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
use {crate::state::UserState, quasar_lang::prelude::*};

/// Accounts for closing a user account.
/// The `close = user` attribute in the Anchor version triggers an automatic epilogue.
/// In Quasar, we call `close()` explicitly — it zeros the discriminator, drains lamports
/// to the destination, reassigns the owner to the system program, and resizes to 0.
/// The `close(dest = user)` attribute mirrors Anchor's `close = user`: at the
/// derive epilogue Quasar zeroes the discriminator, drains lamports to the
/// destination, reassigns the owner to the system program, and resizes to 0.
#[derive(Accounts)]
pub struct CloseUser {
#[account(mut)]
pub user: Signer,
#[account(mut)]
#[account(mut, close(dest = user))]
pub user_account: Account<UserState>,
}

#[inline(always)]
pub fn handle_close_user(accounts: &mut CloseUser) -> Result<(), ProgramError> {
accounts.user_account.close(accounts.user.to_account_view())
pub fn handle_close_user(_accounts: &mut CloseUser) -> Result<(), ProgramError> {
Ok(())
}
4 changes: 2 additions & 2 deletions basics/close-account/quasar/src/instructions/create_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use {
pub struct CreateUser {
#[account(mut)]
pub user: Signer,
#[account(mut, init, payer = user, seeds = UserState::seeds(user), bump)]
#[account(mut, init, payer = user, address = UserState::seeds(user.address()))]
pub user_account: Account<UserState>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/counter/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions basics/counter/quasar/src/instructions/initialize_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use quasar_lang::prelude::*;
pub struct InitializeCounter {
#[account(mut)]
pub payer: Signer,
#[account(mut, init, payer = payer, seeds = Counter::seeds(payer), bump)]
#[account(mut, init, payer = payer, address = Counter::seeds(payer.address()))]
pub counter: Account<Counter>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/create-account/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct CreateSystemAccount {
pub payer: Signer,
#[account(mut)]
pub new_account: Signer,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/cross-program-invocation/quasar/hand/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn handle_pull_lever(accounts: &PullLever, name: &str) -> Result<(), Program
i += 1;
}

let mut cpi = DynCpiCall::<1, 128>::new(accounts.lever_program.address());
let mut cpi = CpiDynamic::<1, 128>::new(accounts.lever_program.address());
cpi.push_account(accounts.power.to_account_view(), false, true)?;
cpi.set_data(&data[..data_len])?;
cpi.invoke()
Expand Down
2 changes: 1 addition & 1 deletion basics/cross-program-invocation/quasar/lever/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use {
pub struct InitializeLever {
#[account(mut)]
pub payer: Signer,
#[account(mut, init, payer = payer, seeds = PowerStatus::seeds(), bump)]
#[account(mut, init, payer = payer, address = PowerStatus::seeds())]
pub power: Account<PowerStatus>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/favorites/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions basics/favorites/quasar/src/instructions/set_favorites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use {
pub struct SetFavorites {
#[account(mut)]
pub user: Signer,
#[account(mut, init_if_needed, payer = user, seeds = Favorites::seeds(user), bump)]
#[account(mut, init(idempotent), payer = user, address = Favorites::seeds(user.address()))]
pub favorites: Account<Favorites>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/pda-rent-payer/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
use quasar_lang::{prelude::*, sysvars::Sysvar};
use {
crate::instructions::init_rent_vault::RentVault,
quasar_lang::{prelude::*, sysvars::Sysvar},
};

/// Accounts for creating a new account funded by the rent vault PDA.
/// The rent vault signs the create_account CPI via PDA seeds.
#[derive(Accounts)]
pub struct CreateNewAccount {
#[account(mut)]
pub new_account: Signer,
#[account(mut, seeds = [b"rent_vault"], bump)]
#[account(mut, address = RentVault::seeds())]
pub rent_vault: UncheckedAccount,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
11 changes: 9 additions & 2 deletions basics/pda-rent-payer/quasar/src/instructions/init_rent_vault.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
use quasar_lang::prelude::*;

/// PDA seed marker for the rent-vault account. With the new derive grammar
/// (`address = <expr>`) we need a `Seeds` impl to validate the address;
/// `seeds = [b"rent_vault"]` is no longer accepted.
#[derive(Seeds)]
#[seeds(b"rent_vault")]
pub struct RentVault;

/// Accounts for funding the rent vault PDA.
/// Transfers lamports from the payer to the vault via system program CPI.
/// When lamports are sent to a new address, the system program creates
Expand All @@ -8,9 +15,9 @@ use quasar_lang::prelude::*;
pub struct InitRentVault {
#[account(mut)]
pub payer: Signer,
#[account(mut, seeds = [b"rent_vault"], bump)]
#[account(mut, address = RentVault::seeds())]
pub rent_vault: UncheckedAccount,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/processing-instructions/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion basics/program-derived-addresses/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use {
pub struct CreatePageVisits {
#[account(mut)]
pub payer: Signer,
#[account(mut, init, payer = payer, seeds = PageVisits::seeds(payer), bump)]
#[account(mut, init, payer = payer, address = PageVisits::seeds(payer.address()))]
pub page_visits: Account<PageVisits>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/realloc/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion basics/realloc/quasar/src/instructions/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct Initialize {
pub payer: Signer,
#[account(mut, init, payer = payer)]
pub message_account: Account<MessageAccount>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/realloc/quasar/src/instructions/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct Update {
pub payer: Signer,
#[account(mut)]
pub message_account: Account<MessageAccount>,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/rent/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct CreateSystemAccount {
pub payer: Signer,
#[account(mut)]
pub new_account: Signer,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion basics/repository-layout/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion basics/transfer-sol/quasar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ client = []
debug = []

[dependencies]
quasar-lang = { git = "https://github.com/blueshift-gg/quasar" }
quasar-lang = { git = "https://github.com/blueshift-gg/quasar", branch = "master" }
solana-instruction = { version = "3.2.0" }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct TransferSolWithCpi {
pub payer: Signer,
#[account(mut)]
pub recipient: UncheckedAccount,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion compression/cnft-burn/quasar/src/instructions/burn_cnft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct BurnCnft {
/// mpl-bubblegum program.
#[account(address = MPL_BUBBLEGUM_ID)]
pub bubblegum_program: UncheckedAccount,
pub system_program: Program<System>,
pub system_program: Program<SystemProgram>,
}

pub fn handle_burn_cnft(accounts: &mut BurnCnft, data: &[u8], remaining: RemainingAccounts<'_>) -> Result<(), ProgramError> {
Expand Down
Loading
Loading