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

gems/v1 package

Overview

Package gems6v2 (deployed at .../gems6v2/v5, wired to ../stablev5; v4 with the gemsart3d2 art) is the mint-mechanics half of the gems6v2 candidate design: trait assembly and chain- roster management live here, same as the real gems6/v1. The one real difference is what MintAssembled does with the assembled traits: it never renders anything -- no gemsart.RenderTokenSVG call at all -- it just hands the raw trait fields to ../stable's RecordMint, which writes a cheap sealed placeholder. Rendering happens later, lazily, on a read (see ../stable's currentMetadata). This realm still imports gemsartfab, but only for its roster helper functions (StoneForChain, ColorPaletteSize, ShapeNames, ...) used to pick a valid random combination -- never for the expensive render itself.

Functions

AddChain

func AddChain(cur realm, chainName string)

Param

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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "AddChain" -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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "AddChain" -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
  

ChainRosterCSV

func ChainRosterCSV() string

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.ChainRosterCSV()"

Result

ChainRosterSize

func ChainRosterSize() int64

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.ChainRosterSize()"

Result

ComboProbability

func ComboProbability(chainName string, shapeIdx, colorIdx int, active bool) float64

ComboProbability is the chance (0..1) that one mint draws this piece's look: its stone (the share of roster chains that carry it), its cut (even among the stone's cuts), its colour (the stone's colour odds) and its status (20% active; always active on mainnet). Ring metal and the chain's own name are equally likely for every piece, so they leave the ranking unchanged and are left out.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.ComboProbability(,,,)"

Result

IsTraitComboAvailable

func IsTraitComboAvailable(chainName string, shapeIdx, colorIdx int, metal string, active bool) bool

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.IsTraitComboAvailable(,,,,)"

Result

MaxMintsPerWallet

func MaxMintsPerWallet() int64

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.MaxMintsPerWallet()"

Result

MaxUniqueTraitCombos

func MaxUniqueTraitCombos() int64

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.MaxUniqueTraitCombos()"

Result

MintAssembled

func MintAssembled(cur realm, to address) grc721.TokenID

MintAssembled: assembles a fresh random (chain, shape, color, metal, active) combination, verifies payment against ../stable's discount- adjusted price, then hands the RAW trait fields (not a rendered image) to ../stable.RecordMint -- the render happens later, lazily, on a read. This is the whole fix: nothing shape-dependent runs inside this transaction, so its real gas cost stays small and uniform regardless of which random trait combination gets drawn (confirmed on the throwaway revealpoc spike before this real split-realm version was built).

Param

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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "MintAssembled" -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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "MintAssembled" -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
  

MintingOpen

func MintingOpen() bool

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.MintingOpen()"

Result

MintsByWallet

func MintsByWallet(owner address) int64

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1.MintsByWallet()"

Result

SetMaxMintsPerWallet

func SetMaxMintsPerWallet(cur realm, max int64)

Param

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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "SetMaxMintsPerWallet" -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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "SetMaxMintsPerWallet" -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
  

SetMintingOpen

func SetMintingOpen(cur realm, open bool)

Param

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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "SetMintingOpen" -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/g17cjym5e9hhws46lt6329pv2gtx2ay0503hgems/gems/v1" -func "SetMintingOpen" -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