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

gnomod.toml

module = "gno.land/r/g1zkzjmyveh7euq83h5zhnhj6mg0d7kr35nphzd2/racksol"
gno = "0.9"

[addpkg]
  creator = "g1zkzjmyveh7euq83h5zhnhj6mg0d7kr35nphzd2"
  height = 1457908
  max_deposit = "100000000ugnot"

racksol.gno

// Package racksol reserves the prize through the posted ledger.
package racksol

import (
	"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
	"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/rack"
)

// Solve writes the reservation with a method call on the leaked tree.
func Solve(cur realm) {
	rack.Ledger.Reserved.Set("g1zkzjmyveh7euq83h5zhnhj6mg0d7kr35nphzd2", rack.Prize)
	rack.Collect(cross(cur))
	hall.Claim(cross(cur), "rack")
}