Add a new token and only allow fees in alnt (#68)

Part of https://www.notion.so/Multiple-tokens-support-and-disable-transfers-for-LSTAKE-1f2a6b22d47280269f87df3fe03e8d64
- Add base token with denoms `alps` and `lps` (`1 lps = 10^18 alps`)
- Keep `alnt` as the staking token and for laconic module ops
- Accept tx fees only in `alnt`

Reviewed-on: cerc-io/laconicd#68
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
prathamesh authored and Nabarun committed 2025-05-13 18:17:38 +05:30
1 parent f4cf8ac744
commit 31ef3afb9a
8 files changed
+136 -26

No files matched your search

+9 -7
View File
@@ -10,11 +10,14 @@ import (
)
const (
CoinUnit = "lnt"
BaseCoinUnit = "alnt"
LntExponent = 18
// Registered token
LpsCoinUnit = "lps"
LpsBaseCoinUnit = "alps"
LpsExponent = 18
DefaultBondDenom = BaseCoinUnit
// Native token, only denominated in alnt
// Used for staking, fees and laconic module ops
CoinUnit = "alnt"
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
Bech32PrefixAccAddr = "laconic"
@@ -39,12 +42,11 @@ func init() {
}
func RegisterDenoms() {
err := sdk.RegisterDenom(CoinUnit, math.LegacyOneDec())
err := sdk.RegisterDenom(LpsCoinUnit, math.LegacyOneDec())
if err != nil {
panic(err)
}
err = sdk.RegisterDenom(BaseCoinUnit, math.LegacyNewDecWithPrec(1, LntExponent))
err = sdk.RegisterDenom(LpsBaseCoinUnit, math.LegacyNewDecWithPrec(1, LpsExponent))
if err != nil {
panic(err)
}