Skip to content Search Apps Documentation Source Content 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.

nslogic/v2 package

Overview

Package nslogic is the swappable "business rules" half of the split (NOTES.md §9t). It holds every piece of policy that might reasonably change — pricing, character validation, payment/refund, freeze rules, transfer restrictions — and no persistent records of its own. (One throttle, not a record: when each bounded price setting last moved, timelock.gno's lastTweak. A logic swap starts it empty and loses nothing.)

Every mutation here ends by calling into nsdata's narrow Record/Raw API via cross(cur). nsdata trusts whichever address is currently wired up as trustedLogic to have done its own authorization checks correctly, so THIS realm is where "is the caller allowed to do this" actually lives. If a bug is found here, admin deploys a fixed nslogic and re-points the vault at it (ProposeTrustedLogicGrant, then ExecutePending after the timelock) — no data migration, records and config untouched.

Deliberately reads config fresh from nsdata on every call rather than caching it. The one thing that cannot be read fresh is a COMPILED regex — avl trees store the pattern string, not the compiled object — so that one value is cached, and the cache is validated against nsdata on every use.

Function

FreeLabelAllowed

func FreeLabelAllowed(label string) bool
Ask AI Claude ChatGPT

FreeLabelAllowed reports whether a label may be ISSUED on the free tier.

ISSUED, and never renewed. This is called by GrantFreeName and by nothing else, deliberately: if the minimum length rises from three to five, somebody who already holds a three-character free name keeps it and keeps renewing it free. Tightening a rule must not reach backwards and take away what was already given — that is the single fastest way to make a giveaway cost more trust than it ever bought.

A name that LAPSES and is registered again is a new issuance, and gets whatever the rules say that day. That is not retroactive; it is a different name event.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-mnsrehearsal001/nslogic/v2.FreeLabelAllowed()"

Result