Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

Playground

fisharr.gno

package fisharr

const capFish = 128

type fish struct {
	owner address
	name  string
	bite  int
	on    bool
}

var (
	minted int
	roster [capFish + 1]fish
)

func Version() string { return "arr-1" }

func Plant(caller address) int {
	if minted >= capFish {
		panic("full")
	}
	minted++
	roster[minted].owner = caller
	roster[minted].name = "Bubble"
	roster[minted].bite = 24
	roster[minted].on = true
	return minted
}

gnomod.toml

module = "gno.land/r/g10ragdr3cjqkael8rslpw4y6rlelhev4h0fswcx/fisharr"
gno = "0.9"

[addpkg]
  creator = "g10ragdr3cjqkael8rslpw4y6rlelhev4h0fswcx"
  height = 329407
  max_deposit = "10000000ugnot"