render.gno

0.45 Kb ยท 23 lines
 1package txfees
 2
 3import (
 4	"std"
 5	"strings"
 6)
 7
 8func Render(path string) string {
 9	banker := std.NewBanker(std.BankerTypeReadonly)
10	realmAddr := std.CurrentRealm().Address()
11	balance := banker.GetCoins(realmAddr).String()
12
13	if strings.TrimSpace(balance) == "" {
14		balance = "\\<empty\\>"
15	}
16
17	var output string
18	output += "# Transaction Fees\n"
19	output += "Balance: " + balance + "\n\n"
20
21	output += "Bucket address: " + realmAddr.String() + "\n"
22	return output
23}