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

pixels state

Back to all declarations

InitialMinX

int64

Value

-32

InitialMaxX

int64

Value

95

InitialMinY

int64

Value

-32

InitialMaxY

int64

Value

95

MaxBoardDim

untyped bigint

Value

(128 <untyped> bigint)

ExpandStep

untyped bigint

Value

(8 <untyped> bigint)

ExpandThresholdPercent

untyped bigint

Value

(80 <untyped> bigint)

CooldownBlocks

untyped bigint

Value

(1 <untyped> bigint)

cellPx

untyped bigint

Value

(8 <untyped> bigint)

FeePerPixelUgnot

untyped bigint

// 0.1 GNOT

Value

(100000 <untyped> bigint)

VandalismFeeUgnot

untyped bigint

// 1 GNOT

Value

(1000000 <untyped> bigint)

MaxBulkPixels

untyped bigint

Value

(10 <untyped> bigint)

MaxCommunityDesignPixels

untyped bigint

Value

(4000 <untyped> bigint)

MaxCommunityDesignNameLen

untyped bigint

Value

(60 <untyped> bigint)

collectionOwner

.uverse.address

Value

<gnolang.StringValue>

minX

int64

Value

-32

maxX

int64

Value

95

minY

int64

Value

-32

maxY

int64

Value

95

placedAtHeight

v0.Tree
Open
OID
09200d…502f:14
placedAtHeight details

Inspect ref

lastPlacedBlock

v0.Tree
Open
OID
09200d…502f:16
lastPlacedBlock details

Inspect ref

placementCounts

v0.Tree

// address.String() -> int64, total successful placements (leaderboard)

Open
OID
09200d…502f:18
placementCounts details

Inspect ref

officialTarget

v0.Tree

// key(x,y) -> int64 colorIndex, owner-curated free-to-place design

Open
OID
09200d…502f:20
officialTarget details

Inspect ref

communityDesigns

v0.Tree

// designID -> encoded "x,y,c;x,y,c;..." string

Open
OID
09200d…502f:22
communityDesigns details

Inspect ref

communityDesignNames

v0.Tree

// designID -> display name

Open
OID
09200d…502f:24
communityDesignNames details

Inspect ref

communityDesignCount

int64

Value

17

totalPlacements

int64

Value

2888

occupiedCells

int64

Value

2669

expansionsCount

int64

Value

0

migrationOpen

bool

Value

true

callerAddress

func() .uverse.address
Open
OID
09200d…502f:32
callerAddress details

Inspect func

getPixel

func(x int64, y int64) int64
Open
OID
09200d…502f:34
getPixel details

Inspect func

inBounds

func(x int64, y int64) bool
Open
OID
09200d…502f:40
inBounds details

Inspect func

recordPlacement

func(x int64, y int64, colorIndex int64, placer .uverse.address, height int64)
Open
OID
09200d…502f:41
recordPlacement details

Inspect func

bumpPlacementCount

func(placer .uverse.address)

bumpPlacementCount counts every successful placement action (including recolors and erasures of an existing cell) toward the leaderboard -- simpler and more transparent than trying to track "cells currently attributed to this address", which is a fuzzy concept on a canvas anyone can recolor.

Open
OID
09200d…502f:42
bumpPlacementCount details

Inspect func

isOfficialTarget

func(x int64, y int64, colorIndex int64) bool
Open
OID
09200d…502f:43
isOfficialTarget details

Inspect func

inOfficialTargetArea

func(x int64, y int64) bool

inOfficialTargetArea reports whether (x, y) has ANY owner-curated target color registered, regardless of what colorIndex is being proposed -- used to tell "wrong color on a logo cell" (vandalism, charged VandalismFeeUgnot) apart from "cell outside the design entirely" (charged the normal FeePerPixelUgnot).

Open
OID
09200d…502f:44
inOfficialTargetArea details

Inspect func

IsOfficialTarget

func(x int64, y int64, colorIndex int64) bool
Open
OID
09200d…502f:45
IsOfficialTarget details

Inspect func

InOfficialTargetArea

func(x int64, y int64) bool
Open
OID
09200d…502f:46
InOfficialTargetArea details

Inspect func

pixelFee

func(x int64, y int64, colorIndex int64) int64

pixelFee returns what a single (x, y, colorIndex) placement costs: free if it matches the official target exactly, VandalismFeeUgnot if the cell is part of the target area but the color is wrong, or the normal FeePerPixelUgnot for anywhere else on the board.

Open
OID
09200d…502f:47
pixelFee details

Inspect func

VandalismFeePerPixel

func() int64
Open
OID
09200d…502f:49
VandalismFeePerPixel details

Inspect func

MaxBulkPixelsPerTx

func() int64
Open
OID
09200d…502f:50
MaxBulkPixelsPerTx details

Inspect func

SetOfficialTarget

func(encoded string)

SetOfficialTarget merges entries into the free-to-place design -- owner-only, additive rather than replacing. Registering the full ~800-cell logo costs real storage deposit (measured ~0.19 GNOT/cell on testnet), enough that doing it in one transaction risks needing the whole amount upfront in a single call; additive means it can be split across as many affordable calls as needed, called repeatedly over time. encoded is "x,y,c;x,y,c;...", matching the CSV-ish convention already used by TopPlacers. Calling this with a coordinate already in the target just overwrites that one entry's color, same as you'd expect.

Open
OID
09200d…502f:51
SetOfficialTarget details

Inspect func

ClearOfficialTarget

func()

ClearOfficialTarget wipes the entire free-to-place design -- owner- only. Split out from SetOfficialTarget now that registration is additive, so "start over from nothing" is still possible but isn't the default behavior of every registration call.

Open
OID
09200d…502f:52
ClearOfficialTarget details

Inspect func

SubmitCommunityDesign

func(name string, encoded string) string

SubmitCommunityDesign registers a new community-submitted design -- anyone can call this, not just the owner. encoded is "x,y,c;x,y,c;...", already in absolute board coordinates (the submitter positions it client-side before submitting). Placing any of these cells still costs the normal FeePerPixelUgnot, same as any other free-form cell -- this just makes the design's shape and position visible on-chain so other visitors' browsers can render a progress bar for it and help fill it in, the same way everyone already helps finish the owner-curated logo.

Open
OID
09200d…502f:53
SubmitCommunityDesign details

Inspect func

ListCommunityDesigns

func() string

ListCommunityDesigns returns "id,name,pixelCount;id,name,pixelCount;..." for every submitted design, in submission order.

Open
OID
09200d…502f:54
ListCommunityDesigns details

Inspect func

GetCommunityDesign

func(id string) string

GetCommunityDesign returns the raw "x,y,c;x,y,c;..." for one design, or "" if id doesn't exist.

Open
OID
09200d…502f:55
GetCommunityDesign details

Inspect func

RemoveCommunityDesign

func(id string)

RemoveCommunityDesign lets the owner delist a design (offensive name, spam, abuse of the free-submission path) -- owner-only moderation hook. Pixels already placed toward it stay exactly as painted (this only removes it from ListCommunityDesigns/GetCommunityDesign, it doesn't touch the grid), and the id is never reused.

Open
OID
09200d…502f:56
RemoveCommunityDesign details

Inspect func

collectPayment

func(feeUgnot int64)

collectPayment verifies at least feeUgnot of ugnot was attached to this call (via the standard "send" field on /vm.m\_call) and forwards exactly that much from the realm's own balance to collectionOwner, leaving any overpayment sitting in the realm's balance rather than dealing with refund complexity -- callers control how much they attach, so overpaying is their own choice, not something to protect against. chain/runtime/unsafe's own doc on OriginSend warns the envelope is shared across the whole call chain, so a malicious intermediate realm could consume it after a naive check passes (TOCTOU) -- the doc recommends pairing OriginSend with AssertOriginCall AND IsUserCall. AssertOriginCall specifically panics if invoked from anywhere but a top-level entry point (its own doc: "panic... when invoked by another method, even from the same realm or package"), so callers (SetPixel, SetPixels) call it themselves before reaching here rather than this helper calling it on their behalf.

Open
OID
09200d…502f:57
collectPayment details

Inspect func

SetPixel

func(x int64, y int64, colorIndex int64)
Open
OID
09200d…502f:58
SetPixel details

Inspect func

SetPixels

func(encoded string)

SetPixels places up to MaxBulkPixels pixels in one transaction. encoded is "x,y,c;x,y,c;...". Cooldown is checked and updated once for the whole batch rather than per pixel -- SetPixel's own per-call cooldown would otherwise reject every entry after the first within the same block, since they all execute in the same transaction/ height. Fee is the sum of pixelFee(x, y, c) across every entry, collected as one payment.

Open
OID
09200d…502f:59
SetPixels details

Inspect func

ImportHistoricalPixel

func(x int64, y int64, colorIndex int64, originalPlacer .uverse.address, originalHeight int64)
Open
OID
09200d…502f:60
ImportHistoricalPixel details

Inspect func

CloseMigrationWindow

func()
Open
OID
09200d…502f:61
CloseMigrationWindow details

Inspect func

GetPixel

func(x int64, y int64) int64
Open
OID
09200d…502f:63
GetPixel details

Inspect func

PlacedBy

func(x int64, y int64) (.uverse.address, int64)
Open
OID
09200d…502f:64
PlacedBy details

Inspect func

Bounds

func() (int64, int64, int64, int64)
Open
OID
09200d…502f:65
Bounds details

Inspect func

TotalPlacements

func() int64
Open
OID
09200d…502f:68
TotalPlacements details

Inspect func

ExpansionsCount

func() int64
Open
OID
09200d…502f:70
ExpansionsCount details

Inspect func

placerCount

type

Value

pixels.placerCount

TopPlacers

func(n int64) string

TopPlacers returns up to n "address,count" pairs, semicolon-separated, sorted by count descending -- the leaderboard. Iterated fresh on every call rather than kept pre-sorted, since contributor counts are small enough (real participants, not per-pixel) for a plain insertion sort to be cheap regardless of how large the canvas itself grows. Gno's "sort" package predates Go's generics-based sort.Slice, so this is hand-rolled rather than using sort.Interface for a one-off local type.

Open
OID
09200d…502f:72
TopPlacers details

Inspect func

CooldownRemaining

func(addr .uverse.address) int64
Open
OID
09200d…502f:73
CooldownRemaining details

Inspect func

canvasDataURI

func() string
Open
OID
09200d…502f:75
canvasDataURI details

Inspect func
InitialMinX : int64 =-32
InitialMaxX : int64 =95
InitialMinY : int64 =-32
InitialMaxY : int64 =95
MaxBoardDim : untyped bigint =(128 <untyped> bigint)
ExpandStep : untyped bigint =(8 <untyped> bigint)
ExpandThresholdPercent : untyped bigint =(80 <untyped> bigint)
CooldownBlocks : untyped bigint =(1 <untyped> bigint)
cellPx : untyped bigint =(8 <untyped> bigint)
FeePerPixelUgnot : untyped bigint =(100000 <untyped> bigint)
VandalismFeeUgnot : untyped bigint =(1000000 <untyped> bigint)
MaxBulkPixels : untyped bigint =(10 <untyped> bigint)
MaxCommunityDesignPixels : untyped bigint =(4000 <untyped> bigint)
MaxCommunityDesignNameLen : untyped bigint =(60 <untyped> bigint)
palette : []string (len=9) Inspect
collectionOwner : .uverse.address =<gnolang.StringValue>
minX : int64 =-32
maxX : int64 =95
minY : int64 =-32
maxY : int64 =95
grid : v0.Tree Inspect
placedBy : v0.Tree Inspect
placedAtHeight : v0.Tree Inspect
lastPlacedBlock : v0.Tree Inspect
placementCounts : v0.Tree Inspect
officialTarget : v0.Tree Inspect
communityDesigns : v0.Tree Inspect
communityDesignNames : v0.Tree Inspect
communityDesignCount : int64 =17
totalPlacements : int64 =2888
occupiedCells : int64 =2669
expansionsCount : int64 =0
migrationOpen : bool =true
key : func(x int64, y int64) string Inspect
callerAddress : func() .uverse.address Inspect
assertOwner : func() Inspect
getPixel : func(x int64, y int64) int64 Inspect
boardArea : func() int64 Inspect
boardWidth : func() int64 Inspect
maybeExpand : func() Inspect
expand : func() Inspect
ForceExpand : func() Inspect
inBounds : func(x int64, y int64) bool Inspect
recordPlacement : func(x int64, y int64, colorIndex int64, placer .uverse.address, height int64) Inspect
bumpPlacementCount : func(placer .uverse.address) Inspect
isOfficialTarget : func(x int64, y int64, colorIndex int64) bool Inspect
inOfficialTargetArea : func(x int64, y int64) bool Inspect
IsOfficialTarget : func(x int64, y int64, colorIndex int64) bool Inspect
InOfficialTargetArea : func(x int64, y int64) bool Inspect
pixelFee : func(x int64, y int64, colorIndex int64) int64 Inspect
FeePerPixel : func() int64 Inspect
VandalismFeePerPixel : func() int64 Inspect
MaxBulkPixelsPerTx : func() int64 Inspect
SetOfficialTarget : func(encoded string) Inspect
ClearOfficialTarget : func() Inspect
SubmitCommunityDesign : func(name string, encoded string) string Inspect
ListCommunityDesigns : func() string Inspect
GetCommunityDesign : func(id string) string Inspect
RemoveCommunityDesign : func(id string) Inspect
collectPayment : func(feeUgnot int64) Inspect
SetPixel : func(x int64, y int64, colorIndex int64) Inspect
SetPixels : func(encoded string) Inspect
ImportHistoricalPixel : func(x int64, y int64, colorIndex int64, originalPlacer .uverse.address, originalHeight int64) Inspect
CloseMigrationWindow : func() Inspect
MigrationOpen : func() bool Inspect
GetPixel : func(x int64, y int64) int64 Inspect
PlacedBy : func(x int64, y int64) (.uverse.address, int64) Inspect
Bounds : func() (int64, int64, int64, int64) Inspect
BoardWidth : func() int64 Inspect
BoardHeight : func() int64 Inspect
TotalPlacements : func() int64 Inspect
OccupiedCells : func() int64 Inspect
ExpansionsCount : func() int64 Inspect
PaletteCSV : func() string Inspect
placerCount : type =pixels.placerCount
TopPlacers : func(n int64) string Inspect
CooldownRemaining : func(addr .uverse.address) int64 Inspect
Snapshot : func() string Inspect
canvasDataURI : func() string Inspect
Render : func(path string) string Inspect