forked from cerc-io/laconicd
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b575b3ba93 |
@ -10,11 +10,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CoinUnit = "lnt"
|
CoinUnit = "photon"
|
||||||
BaseCoinUnit = "alnt"
|
|
||||||
LntExponent = 18
|
|
||||||
|
|
||||||
DefaultBondDenom = BaseCoinUnit
|
DefaultBondDenom = CoinUnit
|
||||||
|
|
||||||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
||||||
Bech32PrefixAccAddr = "laconic"
|
Bech32PrefixAccAddr = "laconic"
|
||||||
@ -43,11 +41,6 @@ func RegisterDenoms() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = sdk.RegisterDenom(BaseCoinUnit, math.LegacyNewDecWithPrec(1, LntExponent))
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetAddressPrefixes() {
|
func SetAddressPrefixes() {
|
||||||
|
@ -70,7 +70,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
else
|
else
|
||||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run this to allow requests from any origin
|
# Run this to allow requests from any origin
|
||||||
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
||||||
|
|
||||||
@ -86,12 +86,10 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Allocate genesis accounts (cosmos formatted addresses)
|
# Allocate genesis accounts (cosmos formatted addresses)
|
||||||
# 10^30 alnt | 10^12 lnt
|
|
||||||
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000alnt --keyring-backend $KEYRING
|
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000alnt --keyring-backend $KEYRING
|
||||||
|
|
||||||
# Sign genesis transaction
|
# Sign genesis transaction
|
||||||
# 10^24 alnt | 10^6 lnt
|
laconicd genesis gentx $KEY 10000000000000000000000000alnt --keyring-backend $KEYRING --chain-id $CHAINID
|
||||||
laconicd genesis gentx $KEY 1000000000000000000000000alnt --keyring-backend $KEYRING --chain-id $CHAINID
|
|
||||||
|
|
||||||
# Collect genesis tx
|
# Collect genesis tx
|
||||||
laconicd genesis collect-gentxs
|
laconicd genesis collect-gentxs
|
||||||
|
@ -324,7 +324,7 @@ func (kts *KeeperTestSuite) createAuctionAndCommitBid(commitBid bool) (*types.Au
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create funded account(s)
|
// Create funded account(s)
|
||||||
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(1000000))
|
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(100))
|
||||||
|
|
||||||
params, err := k.GetParams(ctx)
|
params, err := k.GetParams(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -49,7 +49,7 @@ func (kts *KeeperTestSuite) createBond() (*bondTypes.Bond, error) {
|
|||||||
ctx := kts.SdkCtx
|
ctx := kts.SdkCtx
|
||||||
|
|
||||||
// Create a funded account
|
// Create a funded account
|
||||||
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(1000000000000))
|
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(100000000000))
|
||||||
|
|
||||||
bond, err := kts.BondKeeper.CreateBond(ctx, kts.accounts[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000000))))
|
bond, err := kts.BondKeeper.CreateBond(ctx, kts.accounts[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000000))))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -13,10 +13,9 @@ import (
|
|||||||
var (
|
var (
|
||||||
DefaultCommitsDuration = 5 * time.Minute
|
DefaultCommitsDuration = 5 * time.Minute
|
||||||
DefaultRevealsDuration = 5 * time.Minute
|
DefaultRevealsDuration = 5 * time.Minute
|
||||||
|
DefaultCommitFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||||
DefaultCommitFee = sdkmath.NewInt(1000) // 10^3 alnt
|
DefaultRevealFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||||
DefaultRevealFee = sdkmath.NewInt(1000) // 10^3 alnt
|
DefaultMinimumBid = sdk.Coin{Amount: sdkmath.NewInt(1000), Denom: sdk.DefaultBondDenom}
|
||||||
DefaultMinimumBid = sdkmath.NewInt(1000000) // 10^6 alnt
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
||||||
@ -34,9 +33,9 @@ func DefaultParams() Params {
|
|||||||
return Params{
|
return Params{
|
||||||
CommitsDuration: DefaultCommitsDuration,
|
CommitsDuration: DefaultCommitsDuration,
|
||||||
RevealsDuration: DefaultRevealsDuration,
|
RevealsDuration: DefaultRevealsDuration,
|
||||||
CommitFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultCommitFee),
|
CommitFee: DefaultCommitFee,
|
||||||
RevealFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultRevealFee),
|
RevealFee: DefaultRevealFee,
|
||||||
MinimumBid: sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinimumBid),
|
MinimumBid: DefaultMinimumBid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// DefaultMaxBondAmountTokens are the default parameter values.
|
// DefaultMaxBondAmountTokens are the default parameter values.
|
||||||
var DefaultMaxBondAmountTokens = sdkmath.NewInt(1000000000000) // 10^12 alnt
|
var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000)
|
||||||
|
|
||||||
func NewParams(maxBondAmount sdk.Coin) Params {
|
func NewParams(maxBondAmount sdk.Coin) Params {
|
||||||
return Params{MaxBondAmount: maxBondAmount}
|
return Params{MaxBondAmount: maxBondAmount}
|
||||||
|
@ -11,21 +11,21 @@ import (
|
|||||||
// Default parameter values.
|
// Default parameter values.
|
||||||
var (
|
var (
|
||||||
// DefaultRecordRent is the default record rent for 1 time period (see expiry time).
|
// DefaultRecordRent is the default record rent for 1 time period (see expiry time).
|
||||||
DefaultRecordRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
DefaultRecordRent = sdkmath.NewInt(1000000)
|
||||||
|
|
||||||
// DefaultRecordExpiryTime is the default record expiry time (1 year).
|
// DefaultRecordExpiryTime is the default record expiry time (1 year).
|
||||||
DefaultRecordExpiryTime = time.Hour * 24 * 365
|
DefaultRecordExpiryTime = time.Hour * 24 * 365
|
||||||
|
|
||||||
DefaultAuthorityRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
DefaultAuthorityRent = sdkmath.NewInt(1000000)
|
||||||
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
||||||
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
||||||
|
|
||||||
DefaultAuthorityAuctionEnabled = false
|
DefaultAuthorityAuctionEnabled = false
|
||||||
DefaultCommitsDuration = time.Hour * 24
|
DefaultCommitsDuration = time.Hour * 24
|
||||||
DefaultRevealsDuration = time.Hour * 24
|
DefaultRevealsDuration = time.Hour * 24
|
||||||
DefaultCommitFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
DefaultCommitFee = sdkmath.NewInt(1000000)
|
||||||
DefaultRevealFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
DefaultRevealFee = sdkmath.NewInt(1000000)
|
||||||
DefaultMinimumBid = sdkmath.NewInt(5000000) // 5 * 10^6 alnt
|
DefaultMinimumBid = sdkmath.NewInt(5000000)
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewParams creates a new Params instance
|
// NewParams creates a new Params instance
|
||||||
|
Loading…
Reference in New Issue
Block a user