Files
Basalt2/node_modules/shiki/samples/cadence.sample
Robert Jelic 31787b0e9b Fix
2025-02-16 18:04:24 +01:00

19 lines
499 B
Plaintext

pub contract HelloWorld {
// Declare a public field of type String.
//
// All fields must be initialized in the init() function.
pub let greeting: String
// The init() function is required if the contract contains any fields.
init() {
self.greeting = "Hello, World!"
}
// Public function that returns our friendly greeting!
pub fun hello(): String {
return self.greeting
}
}
// From https://docs.onflow.org/cadence/tutorial/02-hello-world/