github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/examples/gno.land/r/x/manfred_upgrade_patterns/upgrade_c/root/root.gno (about)

     1  package root
     2  
     3  var (
     4  	counter               int
     5  	currentImplementation = "gno.land/r/x/manfred_upgrade_patterns/upgrade_c/v1"
     6  )
     7  
     8  func Inc() int {
     9  	// TODO: if caller is currentImplementation
    10  	counter++
    11  	return counter
    12  }
    13  
    14  func Get() int {
    15  	return counter
    16  }
    17  
    18  func UpdateCurrentImplementation(address string) {
    19  	// TODO: if is admin
    20  	currentImplementation = address
    21  }