Skip to content

Commit 3ba8ff8

Browse files
authored
Merge pull request #35 from KiFoundation/update-gov-and-gas-params
Update gov and gas params
2 parents 4258918 + 0b0cca7 commit 3ba8ff8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

app/app.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"os"
99
"path/filepath"
1010
"strings"
11+
"time"
1112

1213
"github.com/cosmos/cosmos-sdk/baseapp"
1314
"github.com/cosmos/cosmos-sdk/client"
@@ -706,6 +707,31 @@ func NewKitoolsApp(
706707
params.CodeUploadAccess = wasmtypes.AllowNobody
707708
app.WasmKeeper.SetParams(ctx, params)
708709

710+
// Update max gas and max bytes params
711+
consensusParams := app.BaseApp.GetConsensusParams(ctx)
712+
consensusParams.Block.MaxGas = 75_000_000
713+
714+
app.BaseApp.StoreConsensusParams(ctx, consensusParams)
715+
716+
// Update governance deposit and voting params
717+
var (
718+
MinDepositTokens = sdk.NewInt(500_000_000_000) // 500K
719+
)
720+
721+
const (
722+
DepositPeriod time.Duration = time.Hour * 24 * 7 // 7 days
723+
VotingPeriod time.Duration = time.Hour * 24 * 3 // 3 days
724+
)
725+
726+
govParams := app.GovKeeper.GetVotingParams(ctx)
727+
govParams.VotingPeriod = VotingPeriod
728+
app.GovKeeper.SetVotingParams(ctx, govParams)
729+
730+
govDepositParams := app.GovKeeper.GetDepositParams(ctx)
731+
govDepositParams.MinDeposit = sdk.NewCoins(sdk.NewCoin(govDepositParams.MinDeposit[0].Denom, MinDepositTokens)) // TODO: Works because we have only one deposit Token.
732+
govDepositParams.MaxDepositPeriod = DepositPeriod
733+
app.GovKeeper.SetDepositParams(ctx, govDepositParams)
734+
709735
return newVM, err
710736
},
711737
)

0 commit comments

Comments
 (0)