Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion lang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ base64 = "0.21"
bincode = "1"
borsh = "0.10.3"
bytemuck = "1"
solana-program = "2"
solana-program = "2.3.0"
solana-sdk-ids = "2.2.1"
thiserror = "1"
2 changes: 1 addition & 1 deletion lang/src/accounts/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
use solana_program::account_info::AccountInfo;
use solana_program::instruction::AccountMeta;
use solana_program::pubkey::Pubkey;
use solana_program::system_program;
use solana_sdk_ids::system_program;
use std::collections::BTreeSet;
use std::fmt;
use std::ops::{Deref, DerefMut};
Expand Down
2 changes: 1 addition & 1 deletion lang/src/accounts/interface_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
use solana_program::account_info::AccountInfo;
use solana_program::instruction::AccountMeta;
use solana_program::pubkey::Pubkey;
use solana_program::system_program;
use solana_sdk_ids::system_program;
use std::collections::BTreeSet;
use std::fmt;
use std::ops::{Deref, DerefMut};
Expand Down
2 changes: 1 addition & 1 deletion lang/src/accounts/system_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::error::ErrorCode;
use crate::*;
use solana_program::system_program;
use solana_sdk_ids::system_program;
use std::ops::Deref;

/// Type validating that the account is owned by the system program
Expand Down
4 changes: 2 additions & 2 deletions lang/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::prelude::{Id, System};
use crate::Result;
use solana_program::account_info::AccountInfo;
use solana_program::system_program;
use solana_sdk_ids::system_program;

pub fn close<'info>(info: AccountInfo<'info>, sol_destination: AccountInfo<'info>) -> Result<()> {
// Transfer tokens from the account to the sol_destination.
Expand All @@ -11,7 +11,7 @@ pub fn close<'info>(info: AccountInfo<'info>, sol_destination: AccountInfo<'info
**info.lamports.borrow_mut() = 0;

info.assign(&system_program::ID);
info.realloc(0, false).map_err(Into::into)
info.resize(0).map_err(Into::into)
}

pub fn is_closed(info: &AccountInfo) -> bool {
Expand Down
Loading