Bump solana-sdk to 1.2.10 (#124)
This allows https://github.com/solana-labs/solana/pull/11015 to build
This commit is contained in:
parent
18ca475bd6
commit
88d738f9d2
|
@ -219,7 +219,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-sdk"
|
||||
version = "1.2.4"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -236,18 +236,13 @@ dependencies = [
|
|||
"serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk-macro 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk-macro 1.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thiserror 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-bpf-test"
|
||||
version = "1.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-macro"
|
||||
version = "1.2.4"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -260,8 +255,7 @@ dependencies = [
|
|||
name = "spl-memo"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"solana-sdk 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk-bpf-test 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"solana-sdk 1.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -337,9 +331,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum serde_bytes 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)" = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9"
|
||||
"checksum serde_derive 1.0.112 (registry+https://github.com/rust-lang/crates.io-index)" = "bf0343ce212ac0d3d6afd9391ac8e9c9efe06b533c8d33f660f6390cc4093f57"
|
||||
"checksum sha2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
|
||||
"checksum solana-sdk 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "14b628fa500e0b83df3e96f7cc21dc998d8841a994f1c2109475273e6448afd4"
|
||||
"checksum solana-sdk-bpf-test 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d1e668937b3fc2ecb13ad0285f318b0f81ba06c1b923d4cbc4d9868fb09d39d8"
|
||||
"checksum solana-sdk-macro 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "da5f311e7735323eb0ad348c68170c2503a2c56cfa1a261646d8182b373fa670"
|
||||
"checksum solana-sdk 1.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "3869d4a4784d10fc0db91fc666a7ccb916fd47e74636e37c328df5a3b7f8157f"
|
||||
"checksum solana-sdk-macro 1.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d3fba494b48ee7d1b1c9cfd2df292d9dad69ccfd1f2b107eb030e29601cc4103"
|
||||
"checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
|
||||
"checksum syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "b5304cfdf27365b7585c25d4af91b35016ed21ef88f17ced89c7093b43dba8b6"
|
||||
"checksum thiserror 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08"
|
||||
|
|
|
@ -11,8 +11,7 @@ license = "Apache-2.0"
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
solana-sdk = { version = "1.2.4", default-features = false, features=["program"] }
|
||||
solana-sdk-bpf-test = { version = "1.2.4", default-features = false }
|
||||
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
|
||||
|
||||
[lib]
|
||||
name = "spl_memo"
|
||||
|
|
|
@ -18,7 +18,7 @@ fn process_instruction<'a>(
|
|||
|
||||
// Pulls in the stubs required for `info!()`
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
solana_sdk_bpf_test::stubs!();
|
||||
solana_sdk::program_stubs!();
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
|
@ -456,9 +456,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-sdk"
|
||||
version = "1.2.0"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b4ce21779c6854ad5719df2e173304728e24953343751aee91ae039d34a9fd6"
|
||||
checksum = "3869d4a4784d10fc0db91fc666a7ccb916fd47e74636e37c328df5a3b7f8157f"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"bs58",
|
||||
|
@ -478,15 +478,11 @@ dependencies = [
|
|||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-bpf-test"
|
||||
version = "1.2.3"
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-macro"
|
||||
version = "1.2.8"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c73f60cbe0da09ce760dafd9625d270659fbf6779f5c066900aa7a2748b071f6"
|
||||
checksum = "d3fba494b48ee7d1b1c9cfd2df292d9dad69ccfd1f2b107eb030e29601cc4103"
|
||||
dependencies = [
|
||||
"bs58",
|
||||
"proc-macro2 1.0.18",
|
||||
|
@ -503,7 +499,6 @@ dependencies = [
|
|||
"num-traits",
|
||||
"remove_dir_all",
|
||||
"solana-sdk",
|
||||
"solana-sdk-bpf-test",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
|
@ -517,7 +512,6 @@ dependencies = [
|
|||
"rand",
|
||||
"remove_dir_all",
|
||||
"solana-sdk",
|
||||
"solana-sdk-bpf-test",
|
||||
"spl-token",
|
||||
"thiserror",
|
||||
]
|
||||
|
|
|
@ -14,8 +14,7 @@ edition = "2018"
|
|||
num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
remove_dir_all = "=0.5.0"
|
||||
solana-sdk = { version = "=1.2.0", default-features = false, features=["program"] }
|
||||
solana-sdk-bpf-test = { path = "../bin/bpf-sdk/rust/test", default-features = false }
|
||||
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
|
||||
spl-token = { path = "../token" }
|
||||
thiserror = "1.0"
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use solana_sdk::program::invoke_signed;
|
|||
use solana_sdk::{
|
||||
info,
|
||||
program_error::{PrintProgramError, ProgramError},
|
||||
program_utils::DecodeError,
|
||||
decode_error::DecodeError,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
use solana_sdk::program::invoke_signed;
|
||||
use solana_sdk::{
|
||||
account_info::AccountInfo, entrypoint::ProgramResult, info, instruction::Instruction,
|
||||
program_error::ProgramError, program_utils::next_account_info, pubkey::Pubkey,
|
||||
program_error::ProgramError, account_info::next_account_info, pubkey::Pubkey,
|
||||
};
|
||||
use std::mem::size_of;
|
||||
|
||||
|
@ -541,7 +541,7 @@ mod tests {
|
|||
|
||||
// Pulls in the stubs required for `info!()`
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
solana_sdk_bpf_test::stubs!();
|
||||
solana_sdk::program_stubs!();
|
||||
|
||||
fn pubkey_rand() -> Pubkey {
|
||||
Pubkey::new(&rand::random::<[u8; 32]>())
|
||||
|
|
|
@ -456,9 +456,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "solana-sdk"
|
||||
version = "1.2.0"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b4ce21779c6854ad5719df2e173304728e24953343751aee91ae039d34a9fd6"
|
||||
checksum = "3869d4a4784d10fc0db91fc666a7ccb916fd47e74636e37c328df5a3b7f8157f"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"bs58",
|
||||
|
@ -478,15 +478,11 @@ dependencies = [
|
|||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-bpf-test"
|
||||
version = "1.2.3"
|
||||
|
||||
[[package]]
|
||||
name = "solana-sdk-macro"
|
||||
version = "1.2.4"
|
||||
version = "1.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da5f311e7735323eb0ad348c68170c2503a2c56cfa1a261646d8182b373fa670"
|
||||
checksum = "d3fba494b48ee7d1b1c9cfd2df292d9dad69ccfd1f2b107eb030e29601cc4103"
|
||||
dependencies = [
|
||||
"bs58",
|
||||
"proc-macro2 1.0.18",
|
||||
|
@ -504,7 +500,6 @@ dependencies = [
|
|||
"rand",
|
||||
"remove_dir_all",
|
||||
"solana-sdk",
|
||||
"solana-sdk-bpf-test",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@ edition = "2018"
|
|||
num-derive = "0.2"
|
||||
num-traits = "0.2"
|
||||
remove_dir_all = "=0.5.0"
|
||||
solana-sdk = { version = "=1.2.0", default-features = false, features=["program"] }
|
||||
solana-sdk-bpf-test = { path = "../bin/bpf-sdk/rust/test", default-features = false }
|
||||
solana-sdk = { version = "=1.2.10", default-features = false, features=["program"] }
|
||||
thiserror = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
*/
|
||||
#define Token_MIN_SIGNERS 1
|
||||
|
||||
/**
|
||||
* Program state handler.
|
||||
*/
|
||||
typedef struct Token_State Token_State;
|
||||
|
||||
/**
|
||||
* Instructions supported by the token program.
|
||||
*/
|
||||
|
@ -182,12 +187,12 @@ typedef enum Token_TokenInstruction_Tag {
|
|||
*
|
||||
* Accounts expected by this instruction:
|
||||
*
|
||||
* * Single owner/delegate
|
||||
* * Single owner
|
||||
* 0. `[writable]` The account to close.
|
||||
* 1. '[writable]' The destination account.
|
||||
* 2. `[signer]` The account's owner.
|
||||
*
|
||||
* * Multisignature owner/delegate
|
||||
* * Multisignature owner
|
||||
* 0. `[writable]` The account to close.
|
||||
* 1. '[writable]' The destination account.
|
||||
* 2. `[]` The account's multisignature owner.
|
||||
|
@ -253,107 +258,3 @@ typedef struct Token_TokenInstruction {
|
|||
Token_Burn_Body burn;
|
||||
};
|
||||
} Token_TokenInstruction;
|
||||
|
||||
typedef uint8_t Token_Pubkey[32];
|
||||
|
||||
/**
|
||||
* A C representation of Rust's `std::option::Option`
|
||||
*/
|
||||
typedef enum Token_COption_Pubkey_Tag {
|
||||
/**
|
||||
* No value
|
||||
*/
|
||||
None_Pubkey,
|
||||
/**
|
||||
* Some value `T`
|
||||
*/
|
||||
Some_Pubkey,
|
||||
} Token_COption_Pubkey_Tag;
|
||||
|
||||
typedef struct Token_Some_Body_Pubkey {
|
||||
Token_Pubkey _0;
|
||||
} Token_Some_Body_Pubkey;
|
||||
|
||||
typedef struct Token_COption_Pubkey {
|
||||
Token_COption_Pubkey_Tag tag;
|
||||
union {
|
||||
Token_Some_Body_Pubkey some;
|
||||
};
|
||||
} Token_COption_Pubkey;
|
||||
|
||||
/**
|
||||
* Mint data.
|
||||
*/
|
||||
typedef struct Token_Mint {
|
||||
/**
|
||||
* Optional owner, used to mint new tokens. The owner may only
|
||||
* be provided during mint creation. If no owner is present then the mint
|
||||
* has a fixed supply and no further tokens may be minted.
|
||||
*/
|
||||
Token_COption_Pubkey owner;
|
||||
/**
|
||||
* Number of base 10 digits to the right of the decimal place.
|
||||
*/
|
||||
uint8_t decimals;
|
||||
/**
|
||||
* Is `true` if this structure has been initialized
|
||||
*/
|
||||
bool is_initialized;
|
||||
} Token_Mint;
|
||||
|
||||
/**
|
||||
* Account data.
|
||||
*/
|
||||
typedef struct Token_Account {
|
||||
/**
|
||||
* The mint associated with this account
|
||||
*/
|
||||
Token_Pubkey mint;
|
||||
/**
|
||||
* The owner of this account.
|
||||
*/
|
||||
Token_Pubkey owner;
|
||||
/**
|
||||
* The amount of tokens this account holds.
|
||||
*/
|
||||
uint64_t amount;
|
||||
/**
|
||||
* If `delegate` is `Some` then `delegated_amount` represents
|
||||
* the amount authorized by the delegate
|
||||
*/
|
||||
Token_COption_Pubkey delegate;
|
||||
/**
|
||||
* Is `true` if this structure has been initialized
|
||||
*/
|
||||
bool is_initialized;
|
||||
/**
|
||||
* Is this a native token
|
||||
*/
|
||||
bool is_native;
|
||||
/**
|
||||
* The amount delegated
|
||||
*/
|
||||
uint64_t delegated_amount;
|
||||
} Token_Account;
|
||||
|
||||
/**
|
||||
* Multisignature data.
|
||||
*/
|
||||
typedef struct Token_Multisig {
|
||||
/**
|
||||
* Number of signers required
|
||||
*/
|
||||
uint8_t m;
|
||||
/**
|
||||
* Number of valid signers
|
||||
*/
|
||||
uint8_t n;
|
||||
/**
|
||||
* Is `true` if this structure has been initialized
|
||||
*/
|
||||
bool is_initialized;
|
||||
/**
|
||||
* Signer public keys
|
||||
*/
|
||||
Token_Pubkey signers[Token_MAX_SIGNERS];
|
||||
} Token_Multisig;
|
||||
|
|
|
@ -5,7 +5,7 @@ use num_traits::FromPrimitive;
|
|||
use solana_sdk::{
|
||||
info,
|
||||
program_error::{PrintProgramError, ProgramError},
|
||||
program_utils::DecodeError,
|
||||
decode_error::DecodeError,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use crate::{
|
|||
};
|
||||
use solana_sdk::{
|
||||
account_info::AccountInfo, entrypoint::ProgramResult, info, program_error::ProgramError,
|
||||
program_utils::next_account_info, pubkey::Pubkey,
|
||||
account_info::next_account_info, pubkey::Pubkey,
|
||||
};
|
||||
use std::mem::size_of;
|
||||
|
||||
|
@ -550,7 +550,7 @@ pub trait IsInitialized {
|
|||
|
||||
// Pulls in the stubs required for `info!()`.
|
||||
#[cfg(not(target_arch = "bpf"))]
|
||||
solana_sdk_bpf_test::stubs!();
|
||||
solana_sdk::program_stubs!();
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
|
Loading…
Reference in New Issue