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/akkadia/beta/game_world

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
game_world
Namespace
akkadia / beta
Files
9 (gnomod.toml)
Exported functions
18
Module
gno.land/r/akkadia/beta/game_world
gno
0.9

Files (9)

  • gnomod.tomltoml
  • config.gnogno
  • game_world.gnogno
  • policy.gnogno
  • store.gnogno
  • game_world_test.gnogno
  • policy_test.gnogno
  • security_test.gnogno
  • setup_test.gnogno
  • setup_test.gnogno
    1package game_world23import (4	"chain"5	"chain/banker"6	"testing"78	"gno.land/p/nt/testutils/v0"9	"gno.land/r/akkadia/beta/admin"10)1112var (13	testAdmin        = testutils.TestAddress("gwAdmin")14	testOperator     = testutils.TestAddress("gwOperator")15	testCreator      = testutils.TestAddress("gwCreator")16	testOtherCreator = testutils.TestAddress("gwOtherCreator")17	testRestricted   = testutils.TestAddress("gwRestricted")18	testNoPersonal   = testutils.TestAddress("gwNoPersonal")19	testFeeCollector = testutils.TestAddress("gwFeeCollector")20	testPkgAddr      = chain.PackageAddress("gno.land/r/akkadia/beta/game_world")21	setupDone        bool22)2324const (25	testGameTypeDungeon = "instance_dungeon"26	testGameTypeJump    = "jump_map"27	testGameTypeRace    = "race_map"28	testGameTypeDrop    = "drop_map"29)3031func setupGameWorld(cur realm, t *testing.T) {32	t.Helper()33	resetGameWorldState()34	testing.SetOriginSend(chain.Coins{})3536	if setupDone {37		return38	}39	originalAdmin := admin.GetAdmin()40	testing.SetOriginCaller(originalAdmin)41	testing.SetRealm(testing.NewUserRealm(originalAdmin))42	admin.TransferAdmin(cross(cur), testAdmin)4344	testing.SetOriginCaller(testAdmin)45	testing.SetRealm(testing.NewUserRealm(testAdmin))46	admin.AcceptAdmin(cross(cur))47	admin.SetOperator(cross(cur), testOperator)48	admin.SetFeeCollector(cross(cur), testFeeCollector)49	setupDone = true50}5152func setPolicyForTest(cur realm, gameType string, cost int64, mode CreationMode) {53	testing.SetOriginCaller(testOperator)54	testing.SetRealm(testing.NewUserRealm(testOperator))55	SetGameTypePolicy(cross(cur), gameType, cost, mode)56}5758func createGameWorldForTest(cur realm, creator address, gameType string, coins chain.Coins) uint64 {59	testing.SetOriginCaller(creator)60	testing.SetRealm(testing.NewUserRealm(creator))61	if len(coins) > 0 {62		testing.IssueCoins(testPkgAddr, coins)63	}64	testing.SetOriginSend(coins)65	return CreateGameWorld(cross(cur), gameType)66}6768func ugnotBalanceForTest(addr address) int64 {69	return banker.NewReadonlyBanker().GetCoins(addr).AmountOf("ugnot")70}71

    Functions

    • AddApprovedCreator(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.

    Rendered

    RenderedRawgnoweb ↗

    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.