Documentation ¶
Index ¶
Constants ¶
View Source
const BasketSubModuleName = ecocredit.ModuleName + "-basket"
Variables ¶
View Source
var ( // RegexBasketName requires the first character to be alphabetic, the rest can be alphanumeric. We // reduce length constraints by one to account for the first character being forced to alphabetic. RegexBasketName = fmt.Sprintf(`[a-zA-Z][a-zA-Z0-9]{%d,%d}`, nameMinLen-1, nameMaxLen-1) // RegexBasketDenom requires the first part to match the denom prefix, the second part to match the // format for a credit type abbreviation (with or without an exponent prefix), and the third part to // satisfy the basket name. Each of the three parts must also be separated by a ".". RegexBasketDenom = fmt.Sprintf(`%s.[a-zA-Z]{1,4}.%s`, denomPrefix, RegexBasketName) )
View Source
var (
ErrCantDisableRetire = errors.Register(codespace, 2, "can't disable retirement when taking from this basket")
)
Functions ¶
func FormatBasketDenom ¶
FormatBasketDenom formats denom and display denom: - denom: eco.<exponent-prefix><credit-type-abbrev>.<name> - display denom: eco.<credit-type-abbrev>.<name>
func ValidateBasketDenom ¶
ValidateBasketDenom validates a basket denom. The denom must conform to the format described in FormatBasketDenom. The return is nil if the denom is valid.
func ValidateBasketName ¶
ValidateBasketName validates a basket name. The name must conform to the format described in FormatBasketName. The return is nil if the name is valid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.