Skip to content

Commit 6778955

Browse files
committed
rm names verified upgradeability
1 parent a15dd2c commit 6778955

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

examples/gno.land/r/sys/names/verifier.gno

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ type verifierFunc func(address std.Address, name string) bool
1818
var (
1919
Ownable = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul > dropped in genesis via Enable
2020

21-
checkFunc = defaultVerifier // Callback for the namespace check
22-
enabled = false // set to true in genesis
21+
enabled = false // set to true in genesis
2322
)
2423

2524
// IsAuthorizedAddressForName ensures that the given address has ownership of the given name.
2625
func IsAuthorizedAddressForName(address std.Address, name string) bool {
27-
return checkFunc(enabled, address, name)
26+
return verifier(enabled, address, name)
2827
}
2928

3029
// Enable enables the namespace check and drops centralized ownership of this realm.
@@ -44,7 +43,7 @@ func IsEnabled() bool {
4443
// defaultVerifyFunction checks the store to see that the
4544
// user has properly registered the given name.
4645
// This function considers as valid an `address` that matches the `name`.
47-
func defaultVerifier(enabled bool, address std.Address, name string) bool {
46+
func verifier(enabled bool, address std.Address, name string) bool {
4847
if !enabled {
4948
return true // only in pre-genesis cases
5049
}
@@ -69,13 +68,3 @@ func defaultVerifier(enabled bool, address std.Address, name string) bool {
6968

7069
return userData.Addr() == address
7170
}
72-
73-
// NewVerifyCallExecutor allows updating the verifier function via a GovDAO proposal
74-
func NewVerifyCallExecutor(newVerifyCall func(enabled bool, address std.Address, name string) bool) dao.Executor {
75-
callback := func() error {
76-
checkFunc = newVerifyCall
77-
return nil
78-
}
79-
80-
return bridge.GovDAO().NewGovDAOExecutor(callback)
81-
}

0 commit comments

Comments
 (0)