Skip to content

Commit be261cf

Browse files
committed
[WIP]: FIX CI
1 parent a65c134 commit be261cf

67 files changed

Lines changed: 135 additions & 490 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

basics/account-data/quasar/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ client = []
2222
debug = []
2323

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

2828
[dev-dependencies]
2929
# Not using the generated client: it depends on quasar_lang::client::DynBytes
3030
# which isn't in the published crate yet. Tests build instruction data manually.
31-
quasar-svm = { version = "0.1" }
31+
quasar-svm = { git = "https://github.com/blueshift-gg/quasar-svm" }
3232
solana-account = { version = "3.4.0" }
3333
solana-address = { version = "2.2.0", features = ["decode"] }
3434
solana-instruction = { version = "3.2.0", features = ["bincode"] }

basics/account-data/quasar/Quasar.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,4 @@ name = "quasar_account_data"
55
type = "solana"
66

77
[testing]
8-
language = "rust"
9-
10-
[testing.rust]
11-
framework = "quasar-svm"
12-
13-
[testing.rust.test]
14-
program = "cargo"
15-
args = [
16-
"test",
17-
"tests::",
18-
]
19-
20-
[clients]
21-
path = "target/client"
22-
languages = ["rust"]
8+
framework = "quasarsvm-rust"
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
use {
2-
crate::state::AddressInfo,
3-
quasar_lang::prelude::*,
2+
crate::state::{AddressInfo, AddressInfoInner},
3+
quasar_lang::{prelude::*, sysvars::Sysvar},
44
};
55

66
/// Accounts for creating a new address info account.
7-
/// Dynamic accounts use owned `Account<T>` rather than `&'info mut Account<T>` because
8-
/// dynamic types carry cached byte offsets that cannot be represented as a pointer cast.
97
#[derive(Accounts)]
108
pub struct CreateAddressInfo {
119
#[account(mut)]
1210
pub payer: Signer,
1311
#[account(mut, init, payer = payer, seeds = AddressInfo::seeds(payer), bump)]
14-
pub address_info: Account<AddressInfo<'_>>,
12+
pub address_info: Account<AddressInfo>,
1513
pub system_program: Program<System>,
1614
}
1715

@@ -23,12 +21,11 @@ pub fn handle_create_address_info(
2321
street: &str,
2422
city: &str,
2523
) -> Result<(), ProgramError> {
24+
let rent = Rent::get()?;
2625
accounts.address_info.set_inner(
27-
house_number,
28-
name,
29-
street,
30-
city,
26+
AddressInfoInner { house_number, name, street, city },
3127
accounts.payer.to_account_view(),
32-
None,
28+
rent.lamports_per_byte(),
29+
rent.exemption_threshold_raw(),
3330
)
3431
}

basics/account-data/quasar/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ mod quasar_account_data {
2525
#[instruction(discriminator = 0)]
2626
pub fn create_address_info(
2727
ctx: Ctx<CreateAddressInfo>,
28-
name: String,
2928
house_number: u8,
30-
street: String,
31-
city: String,
29+
name: String<50>,
30+
street: String<50>,
31+
city: String<50>,
3232
) -> Result<(), ProgramError> {
3333
instructions::handle_create_address_info(&mut ctx.accounts, name, house_number, street, city)
3434
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
use quasar_lang::prelude::*;
22

33
/// Onchain address info account with dynamic string fields.
4-
/// Uses Quasar's `String<P, N>` marker type for variable-length string data.
5-
/// The lifetime `'a` is required because the generated code produces `&'a str` accessors.
6-
///
74
/// Note: Quasar requires all fixed-size fields to precede dynamic (String/Vec) fields.
8-
#[account(discriminator = 1)]
5+
#[account(discriminator = 1, set_inner)]
96
#[seeds(b"address_info", payer: Address)]
10-
pub struct AddressInfo<'a> {
7+
pub struct AddressInfo {
118
pub house_number: u8,
12-
pub name: String<u8, 50>,
13-
pub street: String<u8, 50>,
14-
pub city: String<u8, 50>,
9+
pub name: String<50>,
10+
pub street: String<50>,
11+
pub city: String<50>,
1512
}

basics/checking-accounts/quasar/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ client = []
2222
debug = []
2323

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

2828
[dev-dependencies]
2929
quasar-checking-accounts-client = { path = "target/client/rust/quasar-checking-accounts-client" }
30-
quasar-svm = { version = "0.1" }
30+
quasar-svm = { git = "https://github.com/blueshift-gg/quasar-svm" }
3131
solana-account = { version = "3.4.0" }
3232
solana-address = { version = "2.2.0", features = ["decode"] }
3333
solana-instruction = { version = "3.2.0", features = ["bincode"] }

basics/checking-accounts/quasar/Quasar.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,4 @@ name = "quasar_checking_accounts"
55
type = "solana"
66

77
[testing]
8-
language = "rust"
9-
10-
[testing.rust]
11-
framework = "quasar-svm"
12-
13-
[testing.rust.test]
14-
program = "cargo"
15-
args = [
16-
"test",
17-
"tests::",
18-
]
19-
20-
[clients]
21-
path = "target/client"
22-
languages = ["rust"]
8+
framework = "quasarsvm-rust"

basics/close-account/quasar/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ client = []
2020
debug = []
2121

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

2626
[dev-dependencies]
27-
quasar-svm = { version = "0.1" }
27+
quasar-svm = { git = "https://github.com/blueshift-gg/quasar-svm" }
2828
solana-account = { version = "3.4.0" }
2929
solana-address = { version = "2.2.0", features = ["decode"] }
3030
solana-instruction = { version = "3.2.0", features = ["bincode"] }

basics/close-account/quasar/Quasar.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,4 @@ name = "quasar_close_account"
55
type = "solana"
66

77
[testing]
8-
language = "rust"
9-
10-
[testing.rust]
11-
framework = "quasar-svm"
12-
13-
[testing.rust.test]
14-
program = "cargo"
15-
args = [
16-
"test",
17-
"tests::",
18-
]
19-
20-
[clients]
21-
path = "target/client"
22-
languages = ["rust"]
8+
framework = "quasarsvm-rust"

basics/close-account/quasar/src/instructions/close_user.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use {
2-
crate::state::UserState,
3-
quasar_lang::prelude::*,
4-
};
1+
use {crate::state::UserState, quasar_lang::prelude::*};
52

63
/// Accounts for closing a user account.
74
/// The `close = user` attribute in the Anchor version triggers an automatic epilogue.
@@ -12,7 +9,7 @@ pub struct CloseUser {
129
#[account(mut)]
1310
pub user: Signer,
1411
#[account(mut)]
15-
pub user_account: Account<UserState<'_>>,
12+
pub user_account: Account<UserState>,
1613
}
1714

1815
#[inline(always)]

0 commit comments

Comments
 (0)