Closed cthulhu-rider closed 1 year ago
The concept of "committee" domain is excessive
agree overall, but what behavior do u expect from methods of ownership like https://pkg.go.dev/github.com/nspcc-dev/neofs-contract/nns#OwnerOf called with TLD? Maybe panic?
@roman-khimov @AnnaShaleva i've updated changes
do u think we need dedicated registerTLD
method? Let me remind u that now register
method takes the domain owner as a parameter, which from now will ignored during TLD registration.
i'm ok to leave register
as it is. With registerTLD
, it'd make sense to ban TLD registrations via register
OwnerOf called with TLD
It's just not a proper domain, so it should behave as if this domain was never registered. I think that's similar to C# NNS behavior for TLDs.
should behave as if this domain was never registered
so smth like
OwnerOf("bob.com") -> Bob
OwnerOf("com") -> panic("domain not exists")
?
or it'd be better to panic with TLD not allowed
?
IIUC inexistent.com
will fail with panic("token not found")
, that's OK for TLD too.
after discussion with @roman-khimov we have approved the behavior of TLD as a non-existent token for which operations like ownerOf
work like with missing tokens. We also settled on the need to provide a dedicated registerTLD
method and make register
to work with "true" tokens, i.e. domains L2+.
@AnnaShaleva ty for the review, some of the discussions will be resolved after update I think
I think we need some
listTLDs
iterator
btw contract provides roots
, this is what you need? I've added test 92aa3edf9ce96fca4b6b06ed974025678c8b5a37
Why is this still a draft?
waited for meaningful discussions to be resolved. Now it seems to be finished, i'll do https://github.com/nspcc-dev/neofs-contract/pull/344#discussion_r1229252443 and open
lets then explicitly denote the layer of top-level domains controlled by the committee. 2nd level domains can be freely registered by anybody. Any deeper level requires owner or admin authorization.