Validate cosmos address in solidity?

i want to validate a cosmos address in solidity which should return true or false for valid or invalid respectively. I believe this would involve doing bech32 validation with the following checks:

  1. check if hrp is valid (“cosmos”)
  2. check if the subsequent character is “1”
  3. check the checksum validity

would these steps suffice or should there be more validations? also any source of contract logic for these checks (especially the third).

1 Like

Hihi :paw_prints:
Technical support by Core Devs is provided within the cosmos Discord Server.
Please use this link to join the community and post your question in the #general-dev channel.