mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
fix
This commit is contained in:
parent
f8d5f29078
commit
4917eb5976
@ -29,6 +29,7 @@ import (
|
|||||||
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
||||||
|
vestingkeeper "github.com/cosmos/cosmos-sdk/x/auth/vesting/keeper"
|
||||||
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
|
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/authz"
|
"github.com/cosmos/cosmos-sdk/x/authz"
|
||||||
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
|
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
|
||||||
@ -736,6 +737,8 @@ func NewApp(
|
|||||||
keys[counciltypes.StoreKey], appCodec, app.stakingKeeper,
|
keys[counciltypes.StoreKey], appCodec, app.stakingKeeper,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
app.vestingKeeper = vestingkeeper.NewVestingKeeper(app.accountKeeper, app.bankKeeper, keys[vestingtypes.StoreKey])
|
||||||
|
|
||||||
// create the module manager (Note: Any module instantiated in the module manager that is later modified
|
// create the module manager (Note: Any module instantiated in the module manager that is later modified
|
||||||
// must be passed by reference here.)
|
// must be passed by reference here.)
|
||||||
app.mm = module.NewManager(
|
app.mm = module.NewManager(
|
||||||
@ -757,7 +760,7 @@ func NewApp(
|
|||||||
upgrade.NewAppModule(&app.upgradeKeeper),
|
upgrade.NewAppModule(&app.upgradeKeeper),
|
||||||
evidence.NewAppModule(app.evidenceKeeper),
|
evidence.NewAppModule(app.evidenceKeeper),
|
||||||
transferModule,
|
transferModule,
|
||||||
vesting.NewAppModule(app.accountKeeper, app.bankKeeper),
|
vesting.NewAppModule(app.accountKeeper, app.vestingKeeper),
|
||||||
authzmodule.NewAppModule(appCodec, app.authzKeeper, app.accountKeeper, app.bankKeeper, app.interfaceRegistry),
|
authzmodule.NewAppModule(appCodec, app.authzKeeper, app.accountKeeper, app.bankKeeper, app.interfaceRegistry),
|
||||||
issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.bankKeeper),
|
issuance.NewAppModule(app.issuanceKeeper, app.accountKeeper, app.bankKeeper),
|
||||||
bep3.NewAppModule(app.bep3Keeper, app.accountKeeper, app.bankKeeper),
|
bep3.NewAppModule(app.bep3Keeper, app.accountKeeper, app.bankKeeper),
|
||||||
|
@ -1,21 +1,11 @@
|
|||||||
package chaincfg
|
package chaincfg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tendermint/tendermint/libs/log"
|
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CustomInflationCalculateFn(ctx sdk.Context, minter minttypes.Minter, params minttypes.Params, bondedRatio sdk.Dec) sdk.Dec {
|
func NextInflationRate(ctx sdk.Context, minter minttypes.Minter, params minttypes.Params, bondedRatio sdk.Dec, circulatingRatio sdk.Dec) sdk.Dec {
|
||||||
logger := ctx.Logger()
|
|
||||||
if logger == nil {
|
|
||||||
panic("logger is nil")
|
|
||||||
}
|
|
||||||
return customInflationCalculateFn(logger, minter, params, bondedRatio)
|
|
||||||
}
|
|
||||||
|
|
||||||
func customInflationCalculateFn(logger log.Logger, minter minttypes.Minter, params minttypes.Params, bondedRatio sdk.Dec) sdk.Dec {
|
|
||||||
// The target annual inflation rate is recalculated for each previsions cycle. The
|
// The target annual inflation rate is recalculated for each previsions cycle. The
|
||||||
// inflation is also subject to a rate change (positive or negative) depending on
|
// inflation is also subject to a rate change (positive or negative) depending on
|
||||||
// the distance from the desired ratio (67%). The maximum rate change possible is
|
// the distance from the desired ratio (67%). The maximum rate change possible is
|
||||||
@ -37,9 +27,10 @@ func customInflationCalculateFn(logger log.Logger, minter minttypes.Minter, para
|
|||||||
inflation = params.InflationMin
|
inflation = params.InflationMin
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info(
|
ctx.Logger().Debug(
|
||||||
"calculated new annual inflation",
|
"calculated new annual inflation",
|
||||||
"bondedRatio", bondedRatio,
|
"bondedRatio", bondedRatio,
|
||||||
|
"circulatingRatio", circulatingRatio,
|
||||||
"inflation", inflation,
|
"inflation", inflation,
|
||||||
"params", params,
|
"params", params,
|
||||||
"minter", minter,
|
"minter", minter,
|
||||||
|
@ -16,7 +16,7 @@ userMnemonic="news tornado sponsor drastic dolphin awful plastic select true liz
|
|||||||
# 0x7Bbf300890857b8c241b219C6a489431669b3aFA
|
# 0x7Bbf300890857b8c241b219C6a489431669b3aFA
|
||||||
# kava10wlnqzyss4accfqmyxwx5jy5x9nfkwh6qm7n4t
|
# kava10wlnqzyss4accfqmyxwx5jy5x9nfkwh6qm7n4t
|
||||||
|
|
||||||
relayerMnemonic="never reject sniff east arctic funny twin feed upper series stay shoot vivid adapt defense economy pledge fetch invite approve ceiling admit gloom exit"
|
vestingMnemonic="never reject sniff east arctic funny twin feed upper series stay shoot vivid adapt defense economy pledge fetch invite approve ceiling admit gloom exit"
|
||||||
# 0xa2F728F997f62F47D4262a70947F6c36885dF9fa
|
# 0xa2F728F997f62F47D4262a70947F6c36885dF9fa
|
||||||
# kava15tmj37vh7ch504px9fcfglmvx6y9m70646ev8t
|
# kava15tmj37vh7ch504px9fcfglmvx6y9m70646ev8t
|
||||||
|
|
||||||
@ -64,11 +64,11 @@ $BINARY add-genesis-account $evmFaucetKeyName 1000000000000000000000ua0gi
|
|||||||
|
|
||||||
userKeyName="user"
|
userKeyName="user"
|
||||||
printf "$userMnemonic\n" | $BINARY keys add $userKeyName --eth --recover
|
printf "$userMnemonic\n" | $BINARY keys add $userKeyName --eth --recover
|
||||||
$BINARY add-genesis-account $userKeyName 1000000000000000000000ua0gi,1000000000usdx
|
$BINARY add-genesis-account $userKeyName 1000000000000000000000ua0gi
|
||||||
|
|
||||||
relayerKeyName="relayer"
|
vestingKeyName="vesting"
|
||||||
printf "$relayerMnemonic\n" | $BINARY keys add $relayerKeyName --eth --recover
|
printf "$vestingMnemonic\n" | $BINARY keys add $vestingKeyName --eth --recover
|
||||||
$BINARY add-genesis-account $relayerKeyName 1000000000000000000000ua0gi
|
$BINARY add-genesis-account $vestingKeyName 1000000000000000000000ua0gi --vesting-amount 1000000000000000000000ua0gi --vesting-start-time 1717200000 --vesting-end-time 1719791999
|
||||||
|
|
||||||
storageContractAcc="0g1vsjpjgw8p5f4x0nwp8ernl9lkszewcqqss7r5d"
|
storageContractAcc="0g1vsjpjgw8p5f4x0nwp8ernl9lkszewcqqss7r5d"
|
||||||
$BINARY add-genesis-account $storageContractAcc 1000000000000000000000ua0gi
|
$BINARY add-genesis-account $storageContractAcc 1000000000000000000000ua0gi
|
||||||
|
Loading…
Reference in New Issue
Block a user