PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/g1j4ehkkrqcr53a233wamtvqggt3skr86c6777xd/guardians_pilot_v1

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
guardians_pilot_v1
Namespace
g1j4ehkkrqcr53a233wamtvqggt3skr86c6777xd
Files
8 (gnomod.toml)
Exported functions
72
Module
gno.land/r/g1j4ehkkrqcr53a233wamtvqggt3skr86c6777xd/guardians_pilot_v1
gno
0.9

Files (8)

  • gnomod.tomltoml
  • allowlist.gnogno
  • extensions.gnogno
  • guardians.gnogno
  • marketplace.gnogno
  • mint.gnogno
  • reveal.gnogno
  • sale.gnogno
  • extensions.gnogno
    1package guardians_pilot_v123import (4	"gno.land/p/nt/grc721/enumerable/v0"5	"gno.land/p/nt/grc721/metadata/v0"6	"gno.land/p/nt/grc721/royalty/v0"7	"gno.land/p/nt/grc721/v0"

    Functions

    • ActivatePilotSale(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

    • Admin() string

    • AdminMint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, quantity int)

    • AllowlistEnd() int64

    • AllowlistLeaf(owner string, allowance int, unitPrice int64) string

    • AllowlistMinted(owner string) int

    • AllowlistPrice() int64

    • AllowlistRoot() string

    • AllowlistRootLocked() bool

    • AllowlistStart() int64

    • AllowlistWalletLimit() int

    • ApplyRevealBatch(startTokenID int64, quantity int)

    • Approve(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, tokenID string)

    • AuthorizedMarketplace() string

    • BalanceOf(owner string) int64

    • CollectionID() string

    • ComputeRevealCommitment(secret string) string

    • ConfigureReveal(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, provenance string, commitment string, baseURI string, deadline int64)

    • ConfigureSale(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, allowlistStart int64, allowlistEnd int64, publicStart int64, publicEnd int64, allowlistPrice int64, publicPrice int64, allowlistLimit int, publicLimit int, treasury string)

    • DefaultRoyalty() (string, int64)

    • EnumerableSupply() int64

    • FinalBaseURI() string

    • FreezeMetadata(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

    • GetApproved(tokenID string) string

    • IsApprovedForAll(owner string, operator string) bool

    • MarketplaceTransfer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, seller string, buyer string, tokenID string, grossPrice int64, nonce int64)

    • MaxSupply() int64

    • MetadataID(tokenID int64) int64

    • Mint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, freeQuantity int, paidQuantity int, allowance int, unitPrice int64, proof string)

    • MintAllowlist(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, quantity int, allowance int, unitPrice int64, proof string)

    • MintPublic(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, quantity int)

    • Name() string

    • NextSaleTimestamp() int64

    • OwnerOf(tokenID string) string

    • PilotVersion() string

    • ProvenanceRoot() string

    • PublicEnd() int64

    • PublicMinted(owner string) int

    • PublicPrice() int64

    • PublicStart() int64

    • PublicWalletLimit() int

    • Render(path string) string

    • Reveal(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, secret string)

    • RevealCommitment() string

    • RevealDeadline() int64

    • RevealOverdue() bool

    • RevealProcessed() int64

    • RevealSeedHash() string

    • RevealState() string

    • RevealTarget() int64

    • RoyaltyInfo(tokenID string, salePrice int64) (string, int64)

    • RoyaltyMaxBps() int64

    • SaleConfigured() bool

    • SalePaused() bool

    • SalePhase() string

    • SalePhaseAt(unixTime int64) string

    • SaleTreasury() string

    • SetAllowlistRoot(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, root string)

    • SetApprovalForAll(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, operator string, approved bool)

    • SetAuthorizedMarketplace(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, marketplace string)

    • SetDefaultRoyalty(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, receiver string, bps int64)

    • SetSalePaused(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, paused bool)

    • SetVeiledURI(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, uri string)

    • Status() string

    • Symbol() string

    • TokenByIndex(index int64) string

    • TokenOfOwnerByIndex(owner string, index int64) string

    • TokenURI(tokenID string) string

    • TotalSupply() int64

    • TransferFrom(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, from string, to string, tokenID string)

    • VeiledURI() string

    • VerifyAllowlist(owner string, allowance int, unitPrice int64, proof string) bool

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.

    8
    )
    9
    10const (
    11 defaultRoyaltyBps = int64(400) // 4% creator royalty on marketplace sales.
    12 royaltyMaxBps = int64(1000) // Permanent collection cap: 10%.
    13)
    14
    15// Replace this value through SetVeiledURI before the first public mint.
    16// The explicit placeholder prevents an unfinished CID from looking production-ready.
    17var veiledURI = "ipfs://REPLACE_WITH_VEILED_METADATA_CID/metadata.json"
    18
    19var (
    20 metadataView *metadata.Metadata
    21 metadataLedger *metadata.Ledger
    22 enumerableView *enumerable.Enumerable
    23 enumerableLedger *enumerable.Ledger
    24 royaltyView *royalty.Royalty
    25 royaltyLedger *royalty.Ledger
    26)
    27
    28// attachExtensions must run before the first mint so the enumerable index and
    29// metadata hooks observe every token from genesis.
    30func attachExtensions(coreLedger *grc721.PrivateLedger) {
    31 metadataView, metadataLedger = metadata.NewMetadata(coreLedger)
    32 enumerableView, enumerableLedger = enumerable.NewEnumerable(coreLedger)
    33 royaltyView, royaltyLedger = royalty.NewRoyalty(coreLedger, royaltyMaxBps)
    34
    35 if err := royaltyLedger.SetDefaultRoyalty(localAdmin, defaultRoyaltyBps); err != nil {
    36 panic(err)
    37 }
    38}
    39
    40// Metadata / veil facade.
    41
    42func VeiledURI() string { return veiledURI }
    43
    44func TokenURI(tokenID string) string {
    45 uri, err := metadataView.TokenURI(grc721.TokenID(tokenID))
    46 if err != nil {
    47 panic(err)
    48 }
    49 return uri
    50}
    51
    52// SetVeiledURI allows the final placeholder CID to be configured once before
    53// minting begins. Existing token URIs are never silently rewritten.
    54func SetVeiledURI(cur realm, uri string) {
    55 assertAdmin(cur.Previous().Address())
    56 supply := token.TotalSupply()
    57 if !canConfigureVeiledURI(uri, supply) {
    58 if supply != 0 {
    59 panic("guardians: veiled uri is locked after the first mint")
    60 }
    61 panic("guardians: veiled uri cannot be empty")
    62 }
    63 veiledURI = uri
    64}
    65
    66func validVeiledURI(uri string) bool { return uri != "" }
    67
    68func canConfigureVeiledURI(uri string, supply int64) bool {
    69 return supply == 0 && validVeiledURI(uri)
    70}
    71
    72func setInitialTokenURI(tokenID grc721.TokenID) {
    73 if err := metadataLedger.SetTokenURI(tokenID, veiledURI); err != nil {
    74 panic(err)
    75 }
    76}
    77
    78// Enumerable facade.
    79
    80func EnumerableSupply() int64 { return enumerableView.TotalSupply() }
    81
    82func TokenByIndex(index int64) string {
    83 tokenID, err := enumerableView.TokenByIndex(index)
    84 if err != nil {
    85 panic(err)
    86 }
    87 return tokenID.String()
    88}
    89
    90func TokenOfOwnerByIndex(owner address, index int64) string {
    91 tokenID, err := enumerableView.TokenOfOwnerByIndex(owner, index)
    92 if err != nil {
    93 panic(err)
    94 }
    95 return tokenID.String()
    96}
    97
    98// Royalty facade. This is EIP-2981-style royalty information. Actual payment
    99// enforcement belongs in the project marketplace settlement realm.
    100
    101func RoyaltyMaxBps() int64 { return royaltyView.MaxBps() }
    102
    103func DefaultRoyalty() (address, int64) {
    104 info, ok := royaltyView.DefaultRoyalty()
    105 if !ok {
    106 return address(""), 0
    107 }
    108 return info.Receiver, info.Bps
    109}
    110
    111func RoyaltyInfo(tokenID string, salePrice int64) (address, int64) {
    112 receiver, amount, err := royaltyView.RoyaltyInfo(grc721.TokenID(tokenID), salePrice)
    113 if err != nil {
    114 panic(err)
    115 }
    116 return receiver, amount
    117}
    118
    119func SetDefaultRoyalty(cur realm, receiver address, bps int64) {
    120 assertAdmin(cur.Previous().Address())
    121 if !validRoyaltyBps(bps) {
    122 panic("guardians: royalty bps out of range")
    123 }
    124 if err := royaltyLedger.SetDefaultRoyalty(receiver, bps); err != nil {
    125 panic(err)
    126 }
    127}
    128
    129func validRoyaltyBps(bps int64) bool {
    130 return bps >= 0 && bps <= royaltyMaxBps
    131}
    132