Impl
typeImpl is the contract an implementation realm must satisfy. This interface is the one thing here that can never change: it is compiled into every caller.
Value
v0.Impl
prefix
untyped stringprefix is the only gate. An implementation must live under it. gno ships p/nt/nestedpkg/v0 for exactly this check, but its AssertCallerIsSubPath wants the implementation nested UNDER the facade's own path, and with the version segment last (facade/v0, impl/v0) no sibling is a sub-path of another. IsSameNamespace is the other shipped option and is far too loose: it would let any realm in the whole namespace seize this one. Hence an explicit prefix.
Value
"gno.land/r/moul/x/upgrade/selfreg/impl/"
StageOpen
untyped bigint// any realm under the prefix takes over by deploying
Value
(0 <untyped> bigint)
StageSealed
untyped bigint// nothing may register again, the live implementation is final
Value
(1 <untyped> bigint)
live
v1.greeter- OID
- 0a1d42…bb1e:8
live details
livePath
stringValue
"gno.land/r/moul/x/upgrade/selfreg/impl/v1"
stage
intValue
0
Register
func(impl v0.Impl)Register makes the calling realm the live implementation. Called from the implementation's own init, so deploying IS the upgrade.
- OID
- 0cf1dd…8f81:6
Register details
Seal
func()Seal ends this realm's upgradeability, forever. Callable only by the implementation currently serving, because with no owner that is the only actor the facade already trusts. It grants nothing new: whoever could deploy under the prefix could already take the realm over, and this only lets them make that the last word. One-way, and there is no rung above it.
- OID
- 0cf1dd…8f81:8
Seal details
Stage
func() intStage is the rung this realm is on. It only ever goes up.
- OID
- 0cf1dd…8f81:9
Stage details
StageName
func() stringStageName is Stage as the word a caller reads in Render.
- OID
- 0cf1dd…8f81:10
StageName details
Live
func() stringLive is the package path currently serving, or "" before the first deploy.
- OID
- 0cf1dd…8f81:11
Live details
Greet
func(name string) stringGreet forwards to the live implementation.
- OID
- 0cf1dd…8f81:12
Greet details
Version
func() stringVersion reports the live implementation's own version string.
- OID
- 0cf1dd…8f81:13
Version details
assertLive
func()- OID
- 0cf1dd…8f81:14
assertLive details
Render
func(string) string- OID
- 0cf1dd…8f81:15