Search Apps Documentation Source Content File Folder Download Copy Actions Download

render.gno

0.66 Kb ยท 45 lines
 1package admin
 2
 3import (
 4	"gno.land/p/nt/ufmt"
 5)
 6
 7func Render(path string) string {
 8	return renderHome()
 9}
10
11func renderHome() string {
12	operators := GetOperators()
13	operatorList := ""
14	for _, addr := range operators {
15		operatorList += "* " + addr.String() + "\n"
16	}
17	if operatorList == "" {
18		operatorList = "(none)\n"
19	}
20
21	output := ufmt.Sprintf(`# AKKADIA on Gno
22
23## Introduction
24
25AKKADIA is a blockchain-based game like Minecraft.
26
27this contract is managing the admin of the AKKADIA game.
28
29## Admin
30
31* **Address**: %s
32
33## Operators
34
35%s
36## Fee Collector
37
38* **Address**: %s
39
40## Protocol
41
42* **Address**: %s
43`, admin, operatorList, feeCollectorAddr, protocolAddr)
44	return output
45}