Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

app.gno

0.54 Kb · 18 lines
 1package core
 2
 3import (
 4	"gno.land/p/onbloc/ibc/union/app"
 5	"gno.land/p/onbloc/ibc/union/types"
 6	core "gno.land/r/onbloc/ibc/union/core"
 7)
 8
 9// app.gno: the IBC application registry. RegisterApp installs the calling realm's
10// app under its package path; re-registration is rejected by the store.
11func (c *coreV1) RegisterApp(_ int, rlm realm, a app.IApp) {
12	assertIsRlmCurrent(0, rlm)
13
14	caller := rlm.Previous().PkgPath()
15	portId := types.Bytes(caller)
16	c.store.RegisterAppAtPort(0, rlm, portId, a)
17	core.EmitAppRegistered(0, rlm, portId, caller, false)
18}