PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

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/moul/demo/grc20/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / demo / grc20
Files
3 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/moul/demo/grc20/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • contract.gnogno
contract.gnogno
1
package grc20
2
3import (
4 "chain/runtime/unsafe"
5
6 tokens "gno.land/p/nt/grc20/v0"
7)
8
9// test1 receives the initial mint at construction.
10var test1 = address("g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5")
11
12// Token is exported. Other contracts can read it (balances, metadata).
13// privateLedger stays unexported: it grants unrestricted mint/burn/transfer.
14var (
15 Token *tokens.Token
16 privateLedger *tokens.PrivateLedger
17)
18
19func init(cur realm) {
20 // generate the token and mint some tokens to test1.
21 Token, privateLedger = tokens.NewToken("Foo Token", "FOO", 4, 0, cur)
22 privateLedger.Mint(test1, 100000000)
23}
24
25func MyBalance() int64 {
26 return Token.BalanceOf(unsafe.OriginCaller())
27}
28

Functions

  • MyBalance() int64

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

Rendered

RenderedRawgnoweb ↗
This realm does not provide renderable output (vm/qrender → NoRenderDeclError). View on gnoweb ↗

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.