Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

idle/v0 package

Overview

Package idle is a mine that keeps working while you are not looking at it.

Ore accrues at a rate set by your level. Claim banks it, Upgrade spends the bank to dig faster, and at level 10 you may Prestige: start over at level 1 carrying a permanent multiplier. There are no turns, no block hook and no keeper. The realm stores what you had and when, and everything else is arithmetic done at the moment somebody asks.

The three decisions that make it a game rather than a counter:

  1. THE MINE IS SMALL. It holds two hours of production and then spills. Without a ceiling the optimal play is to never log in and claim once at the end, which is not a game, it is a savings account. The ceiling is what makes showing up the skill, and it scales with the rate, so two hours stays two hours at every level.
  2. UPGRADES ARE QUADRATIC AGAINST LINEAR PRODUCTION. Level L costs UpgradeBase*L*L and pays L per period, so the next level always takes about UpgradeBase*L periods to afford: the curve bends without ever stalling. Linear against linear never ends, and exponential against linear dies at level four.
  3. PRESTIGE EXISTS. Without a reset the leaderboard is settled by whoever started first and nobody else has a reason to join. Trading a level-10 mine for a permanent multiplier means a player who starts today has a reachable ceiling.

Time is unix seconds from the block, not block height. A height-denominated economy silently repriced itself every time the chain's block time moved, and gno.land's has moved from about 4.1s to 3.405s inside a month.

Nothing here rolls dice. Everything a player can do is a pure function of when they did it, so there is no block hash to grind and no ordering to front-run, and the page can tell you exactly what an action will produce before you sign it.

The arithmetic is p/moul/x/games/accrual(/p/moul/x/games/accrual/v0), which owns the one rule that makes lazy time honest: how often you claim must not change what you end up with.

Functions

Banked

func Banked(owner address) int64

Banked reports an address's spendable ore.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/idle/v0.Banked()"

Result

Claim

func Claim(cur realm) string

Claim banks whatever the mine has dug since the last claim. Claiming often and claiming rarely pay exactly the same, by construction: see accrual.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Claim" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Claim" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

FullAt

func FullAt(owner address) int64

FullAt reports the unix second at which an address's mine starts wasting what it digs, which is the only deadline in this game.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/idle/v0.FullAt()"

Result

Level

func Level(owner address) (int64, int64)

Level reports an address's level and prestige.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/idle/v0.Level()"

Result

Pending

func Pending(owner address) int64

Pending reports what is sitting in an address's mine right now, unclaimed.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/idle/v0.Pending()"

Result

Prestige

func Prestige(cur realm) string

Prestige resets a level-10 mine to level 1 for a permanent +1 multiplier. Banked and pending ore are burned; the lifetime total is not.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Prestige" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Prestige" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Render

func Render(path string) string

Render shows every mine, or one mine's card at /r/.../idle:<address>.

The numbers move on their own: the same URL renders differently a minute later because the mine kept digging, and nothing wrote to the chain in between. That is the whole point of the accrual pair, and it is why every figure here comes from the read-only view rather than from stored state.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/games/idle/v0.Render()"

Result

Start

func Start(cur realm) string

Start opens a mine for the caller. One per address, forever: Prestige is the only way to start over, and it keeps your lifetime total.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Start" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Start" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Upgrade

func Upgrade(cur realm) string

Upgrade spends banked ore to raise the level, which raises both the rate and the ceiling.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Upgrade" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/games/idle/v0" -func "Upgrade" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx