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

v1 source realm

Package logic is version 1 of the logic realm of the "state realm + swappable logic" upgrade pattern (pattern C of th...

Readme View source

gno.land/r/moul/x/upgrade/store/logic/v1

Version 1 of the logic realm of pattern C. Same shape as v0, different rule (step 1000), same data. The upgrade changed the code without touching a byte of state.

See the pattern and the exploration.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/moul/x/upgrade/store/logic/v1 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package logic is version 1 of the logic realm of the "state realm + swappable logic" upgrade pattern (pattern C of the exploration; see ../../README.md).

Same shape as v0, different rule. The counter it reads and writes is the same one v0 was using: the upgrade changed the code without touching the data.

Constants 1

const Step

1const Step = 1000
source

Step is this version's business rule: the change that justified the upgrade.

Functions 3

func Get

Action
1func Get() int
source

Get reads the shared counter, including everything v0 wrote.

func Inc

crossing Action
1func Inc(cur realm) int
source

Inc applies this version's rule to the shared counter.

Imports 2

Source Files 4