← Back to Realms

Realm

gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home

Overview

Realm Path
gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/home
Exported Functions
30
State Entries
14
Source Files
6
Total Package Entries
65

Exported Functions

30 exported functions

State

14 state entries

Source Code

FILES
export_test.gno
go
1package home
2
3import (
4	"gno.land/p/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/upgradeable/v0"
5	"gno.land/p/nt/avl/v0"
6)
7
8// Test hooks. Realm globals live for the whole test binary, so every test
9// that reads Render or Manifest starts from a known tree and a fresh proxy.
10
11// ResetForTest clears all realm state.
12func ResetForTest() {
13	slots = avl.NewTree()
14	rev = 0
15	lastHeight = 0
16	proxy = upgradeable.New(upgradeable.NewAddrAuthority(Admin))
17}
18
19// SeedForTest writes a slot without the authority check.
20func SeedForTest(slug, body string) {
21	rev++
22	slots.Set(slug, &Slot{Body: body, Rev: rev, Height: 0})
23}
24
25// ReservedSlugsForTest exposes the reserved names.
26func ReservedSlugsForTest() []string { return reservedSlugs }
27

Raw Package Data

Raw JSON data