Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 88d738f

Browse files
authored
Bump solana-sdk to 1.2.10 (#124)
This allows solana-labs/solana#11015 to build
1 parent 18ca475 commit 88d738f

File tree

12 files changed

+31
-151
lines changed

12 files changed

+31
-151
lines changed

memo/Cargo.lock

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

memo/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ license = "Apache-2.0"
1111
edition = "2018"
1212

1313
[dependencies]
14-
solana-sdk = { version = "1.2.4", default-features = false, features=["program"] }
15-
solana-sdk-bpf-test = { version = "1.2.4", default-features = false }
14+
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
1615

1716
[lib]
1817
name = "spl_memo"

memo/src/processor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn process_instruction<'a>(
1818

1919
// Pulls in the stubs required for `info!()`
2020
#[cfg(not(target_arch = "bpf"))]
21-
solana_sdk_bpf_test::stubs!();
21+
solana_sdk::program_stubs!();
2222

2323
#[cfg(test)]
2424
mod tests {

token-swap/Cargo.lock

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

token-swap/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ edition = "2018"
1414
num-derive = "0.2"
1515
num-traits = "0.2"
1616
remove_dir_all = "=0.5.0"
17-
solana-sdk = { version = "=1.2.0", default-features = false, features=["program"] }
18-
solana-sdk-bpf-test = { path = "../bin/bpf-sdk/rust/test", default-features = false }
17+
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
1918
spl-token = { path = "../token" }
2019
thiserror = "1.0"
2120

token-swap/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use solana_sdk::program::invoke_signed;
77
use solana_sdk::{
88
info,
99
program_error::{PrintProgramError, ProgramError},
10-
program_utils::DecodeError,
10+
decode_error::DecodeError,
1111
};
1212
use thiserror::Error;
1313

token-swap/src/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
use solana_sdk::program::invoke_signed;
99
use solana_sdk::{
1010
account_info::AccountInfo, entrypoint::ProgramResult, info, instruction::Instruction,
11-
program_error::ProgramError, program_utils::next_account_info, pubkey::Pubkey,
11+
program_error::ProgramError, account_info::next_account_info, pubkey::Pubkey,
1212
};
1313
use std::mem::size_of;
1414

@@ -541,7 +541,7 @@ mod tests {
541541

542542
// Pulls in the stubs required for `info!()`
543543
#[cfg(not(target_arch = "bpf"))]
544-
solana_sdk_bpf_test::stubs!();
544+
solana_sdk::program_stubs!();
545545

546546
fn pubkey_rand() -> Pubkey {
547547
Pubkey::new(&rand::random::<[u8; 32]>())

token/Cargo.lock

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

token/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ edition = "2018"
1414
num-derive = "0.2"
1515
num-traits = "0.2"
1616
remove_dir_all = "=0.5.0"
17-
solana-sdk = { version = "=1.2.0", default-features = false, features=["program"] }
18-
solana-sdk-bpf-test = { path = "../bin/bpf-sdk/rust/test", default-features = false }
17+
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
1918
thiserror = "1.0"
2019

2120
[dev-dependencies]

token/inc/token.h

Lines changed: 7 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
*/
2222
#define Token_MIN_SIGNERS 1
2323

24+
/**
25+
* Program state handler.
26+
*/
27+
typedef struct Token_State Token_State;
28+
2429
/**
2530
* Instructions supported by the token program.
2631
*/
@@ -182,12 +187,12 @@ typedef enum Token_TokenInstruction_Tag {
182187
*
183188
* Accounts expected by this instruction:
184189
*
185-
* * Single owner/delegate
190+
* * Single owner
186191
* 0. `[writable]` The account to close.
187192
* 1. '[writable]' The destination account.
188193
* 2. `[signer]` The account's owner.
189194
*
190-
* * Multisignature owner/delegate
195+
* * Multisignature owner
191196
* 0. `[writable]` The account to close.
192197
* 1. '[writable]' The destination account.
193198
* 2. `[]` The account's multisignature owner.
@@ -253,107 +258,3 @@ typedef struct Token_TokenInstruction {
253258
Token_Burn_Body burn;
254259
};
255260
} Token_TokenInstruction;
256-
257-
typedef uint8_t Token_Pubkey[32];
258-
259-
/**
260-
* A C representation of Rust's `std::option::Option`
261-
*/
262-
typedef enum Token_COption_Pubkey_Tag {
263-
/**
264-
* No value
265-
*/
266-
None_Pubkey,
267-
/**
268-
* Some value `T`
269-
*/
270-
Some_Pubkey,
271-
} Token_COption_Pubkey_Tag;
272-
273-
typedef struct Token_Some_Body_Pubkey {
274-
Token_Pubkey _0;
275-
} Token_Some_Body_Pubkey;
276-
277-
typedef struct Token_COption_Pubkey {
278-
Token_COption_Pubkey_Tag tag;
279-
union {
280-
Token_Some_Body_Pubkey some;
281-
};
282-
} Token_COption_Pubkey;
283-
284-
/**
285-
* Mint data.
286-
*/
287-
typedef struct Token_Mint {
288-
/**
289-
* Optional owner, used to mint new tokens. The owner may only
290-
* be provided during mint creation. If no owner is present then the mint
291-
* has a fixed supply and no further tokens may be minted.
292-
*/
293-
Token_COption_Pubkey owner;
294-
/**
295-
* Number of base 10 digits to the right of the decimal place.
296-
*/
297-
uint8_t decimals;
298-
/**
299-
* Is `true` if this structure has been initialized
300-
*/
301-
bool is_initialized;
302-
} Token_Mint;
303-
304-
/**
305-
* Account data.
306-
*/
307-
typedef struct Token_Account {
308-
/**
309-
* The mint associated with this account
310-
*/
311-
Token_Pubkey mint;
312-
/**
313-
* The owner of this account.
314-
*/
315-
Token_Pubkey owner;
316-
/**
317-
* The amount of tokens this account holds.
318-
*/
319-
uint64_t amount;
320-
/**
321-
* If `delegate` is `Some` then `delegated_amount` represents
322-
* the amount authorized by the delegate
323-
*/
324-
Token_COption_Pubkey delegate;
325-
/**
326-
* Is `true` if this structure has been initialized
327-
*/
328-
bool is_initialized;
329-
/**
330-
* Is this a native token
331-
*/
332-
bool is_native;
333-
/**
334-
* The amount delegated
335-
*/
336-
uint64_t delegated_amount;
337-
} Token_Account;
338-
339-
/**
340-
* Multisignature data.
341-
*/
342-
typedef struct Token_Multisig {
343-
/**
344-
* Number of signers required
345-
*/
346-
uint8_t m;
347-
/**
348-
* Number of valid signers
349-
*/
350-
uint8_t n;
351-
/**
352-
* Is `true` if this structure has been initialized
353-
*/
354-
bool is_initialized;
355-
/**
356-
* Signer public keys
357-
*/
358-
Token_Pubkey signers[Token_MAX_SIGNERS];
359-
} Token_Multisig;

0 commit comments

Comments
 (0)