Skip to content

Commit

Permalink
Move address_lookup_table_program id declaration to solana_sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Mar 7, 2023
1 parent a78ef39 commit 9202ed8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
4 changes: 1 addition & 3 deletions programs/address-lookup-table/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ serde = { workspace = true, features = ["derive"] }
solana-frozen-abi = { workspace = true }
solana-frozen-abi-macro = { workspace = true }
solana-program = { workspace = true }
thiserror = { workspace = true }

[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-program-runtime = { workspace = true }
solana-sdk = { workspace = true }
thiserror = { workspace = true }

[build-dependencies]
rustc_version = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion programs/address-lookup-table/src/instruction.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use {
crate::id,
serde::{Deserialize, Serialize},
solana_program::{
clock::Slot,
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
system_program,
},
solana_sdk::address_lookup_table_program::id,
};

#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)]
Expand Down
4 changes: 1 addition & 3 deletions programs/address-lookup-table/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(specialization))]
#![cfg_attr(RUSTC_NEEDS_PROC_MACRO_HYGIENE, feature(proc_macro_hygiene))]

use solana_program::declare_id;

pub mod error;
pub mod instruction;
#[cfg(not(target_os = "solana"))]
pub mod processor;
pub mod state;

declare_id!("AddressLookupTab1e1111111111111111111111111");
pub use solana_sdk::address_lookup_table_program::{check_id, id};
4 changes: 4 additions & 0 deletions sdk/program/src/address_lookup_table_program.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//! The address_lookup_table native program
//!
crate::declare_id!("AddressLookupTab1e1111111111111111111111111");
8 changes: 5 additions & 3 deletions sdk/program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ extern crate self as solana_program;

pub mod account_info;
pub mod address_lookup_table_account;
pub mod address_lookup_table_program;
pub mod alt_bn128;
pub(crate) mod atomic_u64;
pub mod big_mod_exp;
Expand Down Expand Up @@ -552,16 +553,17 @@ pub mod config {
pub mod sdk_ids {
use {
crate::{
bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, config, ed25519_program,
feature, incinerator, secp256k1_program, solana_program::pubkey::Pubkey, stake,
system_program, sysvar, vote,
address_lookup_table_program, bpf_loader, bpf_loader_deprecated,
bpf_loader_upgradeable, config, ed25519_program, feature, incinerator,
secp256k1_program, solana_program::pubkey::Pubkey, stake, system_program, sysvar, vote,
},
lazy_static::lazy_static,
};

lazy_static! {
pub static ref SDK_IDS: Vec<Pubkey> = {
let mut sdk_ids = vec![
address_lookup_table_program::id(),
ed25519_program::id(),
secp256k1_program::id(),
system_program::id(),
Expand Down
19 changes: 10 additions & 9 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ pub use signer::signers;
#[cfg(not(target_os = "solana"))]
pub use solana_program::program_stubs;
pub use solana_program::{
account_info, address_lookup_table_account, alt_bn128, big_mod_exp, blake3, borsh, bpf_loader,
bpf_loader_deprecated, bpf_loader_upgradeable, clock, config, custom_heap_default,
custom_panic_default, debug_account_data, declare_deprecated_sysvar_id, declare_sysvar_id,
decode_error, ed25519_program, epoch_schedule, fee_calculator, impl_sysvar_get, incinerator,
instruction, keccak, lamports, loader_instruction, loader_upgradeable_instruction, message,
msg, native_token, nonce, program, program_error, program_memory, program_option, program_pack,
rent, sanitize, sdk_ids, secp256k1_program, secp256k1_recover, serde_varint, serialize_utils,
short_vec, slot_hashes, slot_history, stable_layout, stake, stake_history, syscalls,
system_instruction, system_program, sysvar, unchecked_div_by_const, vote, wasm_bindgen,
account_info, address_lookup_table_account, address_lookup_table_program, alt_bn128,
big_mod_exp, blake3, borsh, bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, clock,
config, custom_heap_default, custom_panic_default, debug_account_data,
declare_deprecated_sysvar_id, declare_sysvar_id, decode_error, ed25519_program, epoch_schedule,
fee_calculator, impl_sysvar_get, incinerator, instruction, keccak, lamports,
loader_instruction, loader_upgradeable_instruction, message, msg, native_token, nonce, program,
program_error, program_memory, program_option, program_pack, rent, sanitize, sdk_ids,
secp256k1_program, secp256k1_recover, serde_varint, serialize_utils, short_vec, slot_hashes,
slot_history, stable_layout, stake, stake_history, syscalls, system_instruction,
system_program, sysvar, unchecked_div_by_const, vote, wasm_bindgen,
};

pub mod account;
Expand Down

0 comments on commit 9202ed8

Please sign in to comment.