1package game_world23import (4 "chain"5 "testing"67 "gno.land/p/nt/uassert/v0"8)910func TestGameWorldInterrealmSecurity(cur realm, t *testing.T) {11 setupGameWorld(cross(cur), t)12 setPolicyForTest(cross(cur), testGameTypeJump, 0, CreationModePublicCreator)1314 testing.SetOriginCaller(testCreator)15 testing.SetOriginSend(chain.Coins{})16 testing.SetRealm(testing.NewCodeRealm("gno.land/r/example/game_world_relay"))17 uassert.AbortsWithMessage(t, cur, "contract calls not allowed: function must be called directly by user", func() {18 CreateGameWorld(cross(cur), testGameTypeJump)19 })2021 testing.SetOriginCaller(testAdmin)22 testing.SetRealm(testing.NewCodeRealm("gno.land/r/example/game_world_admin_relay"))23 uassert.AbortsWithMessage(t, cur, "admin or operator access required", func() {24 AddApprovedCreator(cross(cur), testGameTypeJump, testCreator)25 })26}27AddApprovedCreator(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}, gameType string, creator string)
CreateGameWorld(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}, gameType string) uint64
GetApprovedCreatorCount(gameType string) int
GetGameTypePolicy(gameType string) struct{CreationCost int64; CreationMode gno.land/r/akkadia/beta/game_world.CreationMode}
GetGameWorld(gameWorldID uint64) struct{ID uint64; Owner .uverse.address; GameType string; Status gno.land/r/akkadia/beta/game_world.GameWorldStatus; CreatedHeight int64; RestrictedHeight int64}
GetLatestGameWorldID() uint64
GetListLimit() int
GetRestrictedGameWorldCount() int
HasGameTypePolicy(gameType string) bool
HasGameWorld(gameWorldID uint64) bool
IsApprovedCreator(gameType string, creator string) bool
ListApprovedCreators(gameType string, offset int, count int) [].uverse.address
ListLatestGameWorldsByOwner(owner string) []gno.land/r/akkadia/beta/game_world.GameWorld
ListRestrictedGameWorldIDs(page int, count int) []uint64
RemoveApprovedCreator(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}, gameType string, creator string)
RestrictGameWorld(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}, gameWorldID uint64)
SetApprovedCreators(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}, gameType string, creatorsCSV string, approved bool)
SetGameTypePolicy(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}, gameType string, creationCost int64, mode int)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
Render unavailable
rate limit exceeded — the render query is served by the Gnoland archive RPC.
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.