Skip to content

Commit

Permalink
Upgrade Cadence access modifiers to meet Cadence 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Jan 8, 2024
1 parent 6ad44e0 commit 3a5d4f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cadence/contracts/HelloWorld.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion cadence/scripts/ReadHelloWorld.cdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "HelloWorld"

pub fun main(): String {
access(all)
fun main(): String {
return HelloWorld.greeting
}

0 comments on commit 3a5d4f8

Please sign in to comment.