Search Apps Documentation Source Content File Folder Download Copy Actions Download

z4a_register_app_filetest.gno

0.64 Kb · 20 lines
 1// PKGPATH: gno.land/r/aib/main
 2package main
 3
 4import (
 5	appstesting "gno.land/r/aib/ibc/apps/testing"
 6	"gno.land/r/aib/ibc/core"
 7)
 8
 9// RegisterApp success
10func main(cur realm) {
11	core.RegisterApp(cross(cur), "app1", appstesting.NewApp(cross(cur)))
12	core.RegisterApp(cross(cur), "app2", appstesting.NewApp(cross(cur)))
13
14	println("----------- assert render apps")
15	println(core.Render("apps"))
16}
17
18// Output:
19// ----------- assert render apps
20// [{"port_id":"app1","pkg_path":"gno.land/r/aib/main","address":"g1gjs8nfdrd55z3xu9gjcatnj29vkwuyx4ffqxd9"},{"port_id":"app2","pkg_path":"gno.land/r/aib/main","address":"g1gjs8nfdrd55z3xu9gjcatnj29vkwuyx4ffqxd9"}]