init.gno
0.45 Kb · 10 lines
1package bolo
2
3// init refuses to deploy the registry from its admin's own key (API §3.7, §3.6, ADR
4// D11): the key that deploys under the namespace must not also be the admin, or one
5// stolen key could deploy a malicious version and point the registry at it.
6func init(cur realm) {
7 if cur.Previous().Address() == adminAddr {
8 panic("bolo registry: the admin key may not deploy the registry; deploy from the namespace key, which must not be the admin")
9 }
10}