Skip to content

Commit 3663934

Browse files
added comment
1 parent 521ed68 commit 3663934

File tree

3 files changed

+20
-33
lines changed

3 files changed

+20
-33
lines changed

basics/transfer-sol/steel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ bytemuck = "1.14"
1818
num_enum = "0.7"
1919
solana-program = "1.18"
2020
# steel = { version = "1.3", features = ["spl"] }
21-
steel = { git = "https://github.com/regolith-labs/steel", version = "1.4.0" }
21+
steel = "2.1"
2222
thiserror = "1.0"

basics/transfer-sol/steel/program/src/with_cpi.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ pub fn process_with_cpi(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
2828
],
2929
)?;
3030

31+
// collect?
32+
3133
Ok(())
3234
}

basics/transfer-sol/steel/program/tests/test.rs

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,6 @@ async fn setup() -> (BanksClient, Keypair, Hash) {
2121
program_test.start().await
2222
}
2323

24-
fn create_system_program_account_info() -> AccountInfo<'static> {
25-
let mut data = vec![];
26-
let mut lamports = 0;
27-
AccountInfo::new(
28-
&system_program::ID,
29-
false,
30-
false,
31-
&mut lamports,
32-
&mut data,
33-
&system_program::ID,
34-
true,
35-
0,
36-
)
37-
}
38-
3924
// let system_program_id = &system_program::ID;
4025
// let key = Rc::new(*system_program_id);
4126
// let lamports = Rc::new(RefCell::new(0));
@@ -80,23 +65,23 @@ async fn run_test() {
8065
// assert_eq!(counter_account.owner, transfer_sol_api::ID);
8166
// assert_eq!(counter.value, 0);
8267

83-
// Generate a new keypair to create an account owned by our program
84-
let program_owned_account = Keypair::new();
85-
let system_program_account = create_system_program_account_info();
86-
87-
create_account(
88-
&program_owned_account,
89-
&system_program_account,
90-
&payer.pubkey(),
91-
&program::ID,
92-
&[&payer, &system_program_account],
93-
)?;
94-
95-
// Submit transfer with program transaction.
96-
let ix = with_program(payer.pubkey(), recipient.pubkey(), amount);
97-
let tx = Transaction::new_signed_with_payer(&[ix], Some(&payer.pubkey()), &[&payer], blockhash);
98-
let res = banks.process_transaction(tx).await;
99-
assert!(res.is_ok());
68+
// // Generate a new keypair to create an account owned by our program
69+
// let program_owned_account = Keypair::new();
70+
// let system_program_account = create_system_program_account_info();
71+
72+
// create_account(
73+
// &program_owned_account,
74+
// &system_program_account,
75+
// &payer.pubkey(),
76+
// &program::ID,
77+
// &[&payer, &system_program_account],
78+
// )?;
79+
80+
// // Submit transfer with program transaction.
81+
// let ix = with_program(payer.pubkey(), recipient.pubkey(), amount);
82+
// let tx = Transaction::new_signed_with_payer(&[ix], Some(&payer.pubkey()), &[&payer], blockhash);
83+
// let res = banks.process_transaction(tx).await;
84+
// assert!(res.is_ok());
10085

10186
// // Verify counter was incremented.
10287
// let counter_account = banks.get_account(counter_address).await.unwrap().unwrap();

0 commit comments

Comments
 (0)