Search Apps Documentation Source Content File Folder Download Copy Actions Download

render.gno

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