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

zones/v0 package

Overview

Package zones is a curated registry of gno.land networks: mainnet, the testnets, staging chains, anybody's gnodev. Each zone carries what a node or a wallet needs to join it (chain id, RPC, gnoweb, genesis) plus a growing list of endpoints: RPCs, seeds and peers, indexers, faucets, explorers.

Curation is the point. Anybody may propose a zone and register endpoints on an approved one (on a pending one, its proposer or a curator; a zone's own main RPC and gnoweb, only them); a curator approves or rejects a proposal, retires a zone that stopped running, and verifies or flags an endpoint. The latest decision on each is recorded with who made it and when, and a rejection, a retirement, a flag or an edit to an approved zone must also say why, on the zone's page. Nothing is hidden while it waits: proposals and unverified endpoints are listed, and labelled.

This realm only manages the information and answers questions about it. The read helpers (GetZone, ListZones, GetEndpoint, ListEndpoints, ListAddresses, IsCurator, Curators, IsInvited, Invited) take plain values so they work from `gnokey query vm/qeval` as well as from another realm, and turning them into a node's config.toml is a separate realm's job.

The model, its validation and its state machine are p/moul/zones. This realm owns only who may write.

Function

RemoveZone

func RemoveZone(cur realm, slug string, revision int64)

RemoveZone deletes a pending or rejected zone and its endpoints. revision is the zone's Revision you read: a removal meant for one proposal fails on another proposed again under the same slug. A curator may remove any pending or rejected zone. The proposer may withdraw their own only while it is pending, ReviewWindow blocks after it was proposed or last edited (so withdrawing and proposing again cannot dodge the edit wait), while every endpoint on it is theirs (the deposit is refunded to whoever signs the removal, so removing somebody else's endpoints would collect what they paid) and each one is one they could withdraw on its own (RemoveEndpoint): removing the zone must not wipe a curator's flag or unverify, or skip an endpoint's own wait. A rejected zone is the curators' record: only a curator removes it, or newer rejections push it out, and the rejection's deposit, paid by the curator, is not the proposer's to collect. A zone that was ever official is never removed this way: an approved one is retired, and a retired one is kept until newer retirements push it out.

Params

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/zones/v0" -func "RemoveZone" -args $'' -args $'' -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/zones/v0" -func "RemoveZone" -args $'' -args $'' -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