Names minter contract forbids "--" at 2-4 position of name due to DNS spec.
https://github.com/public-awesome/names/blob/main/contracts/name-minter/src/contract.rs#L307
This restriction is in there by reason - this space is reserved for identifying that name is punycode encoded (basically that it contains unicode like emojis).
By just forbidding to put -- there, we also forbid using punycode (aka use emojis in names, etc).
We need to forbid only if it doesn't start from "xn--", so if it is not punycode.
So we basically need to add one more condition to if statement: !name[0..4].contains("xn--").
It will allow emoji names/domains, however not breaking DNS spec as punycode is fully supported there.
Names minter contract forbids "--" at 2-4 position of name due to DNS spec. https://github.com/public-awesome/names/blob/main/contracts/name-minter/src/contract.rs#L307 This restriction is in there by reason - this space is reserved for identifying that name is punycode encoded (basically that it contains unicode like emojis). By just forbidding to put -- there, we also forbid using punycode (aka use emojis in names, etc). We need to forbid only if it doesn't start from "xn--", so if it is not punycode. So we basically need to add one more condition to if statement:
!name[0..4].contains("xn--")
. It will allow emoji names/domains, however not breaking DNS spec as punycode is fully supported there.