From e8a9ddc26b925d321d4aeb76eec2a3b4f2d2c44a Mon Sep 17 00:00:00 2001 From: piux2 <90544084+piux2@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:47:44 -0800 Subject: [PATCH] Compatible native token denom for Smart Contracts to issue native tokens and easy IBC adoption #393 --- pkgs/std/coin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/std/coin.go b/pkgs/std/coin.go index cab4dd7a809..fa226693efa 100644 --- a/pkgs/std/coin.go +++ b/pkgs/std/coin.go @@ -617,8 +617,9 @@ func (coins Coins) Sort() Coins { // Parsing var ( - // Denominations can be 3 ~ 16 characters long. - reDnmString = `[a-z][a-z0-9]{2,15}` + // Denominations can be 3 ~ 128 characters long and support letters, followed by either + // a letter, a number or a separator ('/', ':', '.', '_' or '-'). + reDnmString = `[a-zA-Z][a-zA-Z0-9/:._-]{2,127}` reAmt = `[[:digit:]]+` reDecAmt = `[[:digit:]]*\.[[:digit:]]+` reSpc = `[[:space:]]*`