#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
use {
crate::{error::SinglePoolError, processor::Processor},
solana_account_info::AccountInfo,
solana_msg::msg,
solana_program_entrypoint::{entrypoint, ProgramResult},
solana_pubkey::Pubkey,
solana_security_txt::security_txt,
};
entrypoint!(process_instruction);
fn process_instruction(
program_id: &Pubkey,
accounts: &[AccountInfo],
instruction_data: &[u8],
) -> ProgramResult {
if let Err(error) = Processor::process(program_id, accounts, instruction_data) {
msg!(error.to_str::<SinglePoolError>());
Err(error)
} else {
Ok(())
}
}
security_txt! {
name: "SPL Single-Validator Stake Pool",
project_url: "https://www.solana-program.com/docs/single-pool",
contacts: "link:https://github.com/solana-program/single-pool/security/advisories/new,email:security@anza.xyz,discord:https://discord.gg/solana",
policy: "https://github.com/solana-program/single-pool/blob/main/SECURITY.md",
preferred_languages: "en",
source_code: "https://github.com/solana-program/single-pool/tree/main/program",
source_release: concat!("program@v", env!("CARGO_PKG_VERSION")),
auditors: "https://www.solana-program.com/docs/single-pool#security-audits"
}