Files
sol-trade-sdk/src/trading/common/address_lookup_manager.rs
T
ysq b9fa2f2f0f refactor: optimize instruction builders structure and improve code documentation
- Add structured comment sections with clear code organization
- Improve variable naming and account address calculation logic
- Update comments for better readability across all trading protocols
- Enhance code structure for PumpFun, PumpSwap, and Raydium protocols
2025-09-09 00:50:24 +08:00

18 lines
605 B
Rust
Executable File

use solana_sdk::{message::AddressLookupTableAccount, pubkey::Pubkey};
use crate::common::address_lookup_cache::get_address_lookup_table_account;
/// Get address lookup table account list
/// If lookup_table_key is provided, get the corresponding account, otherwise return empty list
pub async fn get_address_lookup_table_accounts(
lookup_table_key: Option<Pubkey>,
) -> Vec<AddressLookupTableAccount> {
match lookup_table_key {
Some(key) => {
let account = get_address_lookup_table_account(&key).await;
vec![account]
}
None => Vec::new(),
}
}