[−][src]Macro solana_sdk::declare_program
Convenience macro to declare a native program
bs58_string: bs58 string representation the program's id
name: Name of the program, must match the library name in Cargo.toml
entrypoint: Program's entrypoint, must be of type Entrypoint
Examples
use solana_sdk::account::KeyedAccount; use solana_sdk::instruction::InstructionError; use solana_sdk::pubkey::Pubkey; use solana_sdk::declare_program; fn my_process_instruction( program_id: &Pubkey, keyed_accounts: &mut [KeyedAccount], data: &[u8], ) -> Result<(), InstructionError> { // Process an instruction Ok(()) } solana_sdk::declare_program!( "My!!!11111111111111111111111111111111111111", solana_my_program, my_process_instruction );