diff --git a/cadence/contracts/HelloWorld.cdc b/cadence/contracts/HelloWorld.cdc index 54d7fd4..ed25bdc 100644 --- a/cadence/contracts/HelloWorld.cdc +++ b/cadence/contracts/HelloWorld.cdc @@ -2,7 +2,8 @@ pub contract HelloWorld { pub var greeting: String - pub fun changeGreeting(newGreeting: String) { + access(all) + fun changeGreeting(newGreeting: String) { self.greeting = newGreeting } diff --git a/cadence/scripts/ReadHelloWorld.cdc b/cadence/scripts/ReadHelloWorld.cdc index 4cdff63..9d5d7df 100644 --- a/cadence/scripts/ReadHelloWorld.cdc +++ b/cadence/scripts/ReadHelloWorld.cdc @@ -1,5 +1,6 @@ import "HelloWorld" -pub fun main(): String { +access(all) +fun main(): String { return HelloWorld.greeting }