PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidators

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/gnoswap/community_pool/v1

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v1
Namespace
gnoswap / community_pool
Files
5 (README)(gnomod.toml)
Exported functions
3
Module
gno.land/r/gnoswap/community_pool/v1
gno
0.9

Files (5)

  • README.mdmarkdown
  • gnomod.tomltoml
  • community_pool.gnogno
  • doc.gnogno
  • render.gnogno
render.gnogno
1package community_pool23import (4	prbac "gno.land/p/gnoswap/rbac/v1"5	"gno.land/p/moul/md/v0"6	"gno.land/p/moul/mdtable/v0"7	ufmt "gno.land/p/nt/ufmt/v0"89	"gno.land/r/gnoswap/access/v1"10	"gno.land/r/gnoswap/halt/v1"11)1213// Render shows the authorities and withdrawal gate used by treasury transfers.14func Render(path string) string {15	if path != "" {16		return "404\n"17	}1819	out := md.H1("Gnoswap Community Pool") +20		"\n" +21		md.Paragraph(22			"The community treasury holds tokens for ecosystem funding.\n"+23				"Balances are queried per token; this page does not report a total treasury value.",24		) +25		md.H2("Transfers") +26		"\n" +27		md.Paragraph("Transfers require the admin or governance role and are blocked when withdrawals are halted.")2829	statusTable := mdtable.Table{30		Headers: []string{"Restriction", "Enabled"},31		Rows: [][]string{32			{"Withdrawals halted", ufmt.Sprintf("%t", halt.IsHaltedWithdraw())},33		},34	}35	out += statusTable.String() + "\n"3637	out += md.H2("Transfer authorities") + "\n"38	authorityTable := mdtable.Table{39		Headers: []string{"Role", "Address"},40	}41	for _, role := range []prbac.SystemRole{prbac.ROLE_ADMIN, prbac.ROLE_GOVERNANCE} {42		value := "Unassigned"43		if addr, ok := access.GetAddress(role.String()); ok {44			value = md.InlineCode(addr.String())45		}46		authorityTable.Append([]string{role.String(), value})47	}48	return out + authorityTable.String()49}50

Functions

  • GetBalanceOf(tokenPath string) (int64, interface {Error func() string})

  • Render(path string) string

  • TransferToken(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}, tokenPath string, to string, amount int64)

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.