processing-instructions.sol 597 B

123456789101112131415161718
  1. @program_id("F1ipperKF9EfD821ZbbYjS319LXYiBmjhzkkf5a26rC")
  2. contract processing_instructions {
  3. @payer(payer) // payer for the data account, required by Solang but not used in this example
  4. constructor() {}
  5. function goToPark(string name, uint32 height) public pure {
  6. // Print messages to the program logs
  7. print("Welcome to the park, {:}".format(name));
  8. if (height >5) {
  9. print("You are tall enough to ride this ride. Congratulations.");
  10. } else {
  11. print("You are NOT tall enough to ride this ride. Sorry mate.");
  12. }
  13. }
  14. }