From 3a5d4f87eef72cebf45f1c48c51c2b786b28f7b6 Mon Sep 17 00:00:00 2001 From: Chase Fleming <1666730+chasefleming@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:28:08 -0800 Subject: [PATCH] Upgrade Cadence access modifiers to meet Cadence 1.0 --- cadence/contracts/HelloWorld.cdc | 3 ++- cadence/scripts/ReadHelloWorld.cdc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 }