hello-solana.sol 604 B

123456789101112131415
  1. @program_id("F1ipperKF9EfD821ZbbYjS319LXYiBmjhzkkf5a26rC")
  2. contract hello_solana {
  3. // The constructor is used to create a new account
  4. // Here we create a new account that stores no data and only prints messages to the program logs when the constructor is called.
  5. @payer(payer) // The "payer" pays for the account creation
  6. constructor() {
  7. // We get the program ID by calling 'this';
  8. address programId = address(this);
  9. // Print messages to the program logs
  10. print("Hello, Solana!");
  11. print("Our program's Program ID: {:}".format(programId));
  12. }
  13. }