Invalid annotations are permitted in address literals
According to http://tezos.gitlab.io/whitedoc/michelson.html#syntax, %*&||%}{&&%o${echo \"s\"}
is not a valid annotation. However, it looks like "KT1QbdJ7M7uAQZwLpvzerUyk7LYkJWDL7eDh%*&||%}{&&%o${echo \"s\"}"
is a valid addresss. To be more precise, it's a valid value of the address
type, but you can't do anything useful with it. I was able to originate a smart contract doing PUSH address "KT1QbdJ7M7uAQZwLpvzerUyk7LYkJWDL7eDh%*&||%}{&&%o${echo \"s\"}"
: https://you.better-call.dev/carthagenet/KT1Et4WvjKo9nqBDM5ZH3U72XWvvuspAmNcJ/code
I wonder why such an address is considered valid. It's impossible to have an entrypoint with %*&||%}{&&%o${echo \"s\"}
annotation, so apparently such an address can't be useful in practice. Am I missing something? If the idea is to permit any string including useless ones, why is KT1QbdJ7M7uAQZwLpvzerUyk7LYkJWDL7eDh%default
prohibited?
P. S. I realize that restricting entrypoint names in address to valid annotations is a breaking change and maybe it's not sufficiently important to make. Also since it's a breaking change it may take a long time to be included into mainnet. But I still wanted to bring it up because this behavior looks weird.