forked from cerc-io/laconicd
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:
1 parent
f4cf8ac744
commit
31ef3afb9a
8 files changed
+136
-26
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user