diff --git a/x/pep/keeper/msg_server_submit_encrypted_tx.go b/x/pep/keeper/msg_server_submit_encrypted_tx.go index 03806c3d..0ee64ed2 100644 --- a/x/pep/keeper/msg_server_submit_encrypted_tx.go +++ b/x/pep/keeper/msg_server_submit_encrypted_tx.go @@ -2,7 +2,6 @@ package keeper import ( "context" - cosmosmath "cosmossdk.io/math" "fairyring/x/pep/types" "fmt" "strconv" @@ -40,13 +39,11 @@ func (k msgServer) SubmitEncryptedTx(goCtx context.Context, msg *types.MsgSubmit minGas := k.MinGasPrice(ctx) - deductedCoin := sdk.NewCoin(minGas.Denom, cosmosmath.NewIntFromUint64(ctx.GasMeter().Limit()).Mul(minGas.Amount)) - err = k.bankKeeper.SendCoinsFromAccountToModule( ctx, senderAddr, types.ModuleName, - sdk.NewCoins(deductedCoin), + sdk.NewCoins(minGas), ) if err != nil { @@ -58,7 +55,7 @@ func (k msgServer) SubmitEncryptedTx(goCtx context.Context, msg *types.MsgSubmit TargetHeight: msg.TargetBlockHeight, Data: msg.Data, Creator: msg.Creator, - ChargedGas: &deductedCoin, + ChargedGas: &minGas, } txIndex := k.AppendEncryptedTx(ctx, encryptedTx) diff --git a/x/pep/types/params.go b/x/pep/types/params.go index 85a97b74..c19e13b1 100644 --- a/x/pep/types/params.go +++ b/x/pep/types/params.go @@ -12,7 +12,7 @@ var _ paramtypes.ParamSet = (*Params)(nil) var ( KeyMinGasPrice = []byte("MinGasPrice") - DefaultMinGasPrice = sdk.NewCoin("frt", cosmosmath.NewInt(1)) + DefaultMinGasPrice = sdk.NewCoin("frt", cosmosmath.NewInt(300000)) ) // ParamKeyTable the param key table for launch module