lib.rs 586 B

1234567891011121314151617181920212223
  1. use solana_program::{
  2. account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, msg, pubkey::Pubkey,
  3. };
  4. // Tells Solana that the entrypoint to this program
  5. // is the "process_instruction" function.
  6. //
  7. entrypoint!(process_instruction);
  8. // Our entrypoint's parameters have to match the
  9. // anatomy of a transaction instruction (see README).
  10. //
  11. fn process_instruction(
  12. program_id: &Pubkey,
  13. _accounts: &[AccountInfo],
  14. _instruction_data: &[u8],
  15. ) -> ProgramResult {
  16. msg!("Hello, Solana!");
  17. msg!("Our program's Program ID: {}", &program_id);
  18. Ok(())
  19. }