Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refine the default gas #147

Merged
merged 2 commits into from
Mar 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions x/gashub/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,78 +69,78 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
// DefaultParams returns a default set of parameters.
func DefaultParams() Params {
defaultMsgGasParamsSet := []*MsgGasParams{
NewMsgGasParamsWithFixedGas("/cosmos.authz.v1beta1.MsgExec", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.authz.v1beta1.MsgRevoke", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.bank.v1beta1.MsgSend", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.feegrant.v1beta1.MsgRevokeAllowance", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.gov.v1.MsgDeposit", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.authz.v1beta1.MsgExec", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.authz.v1beta1.MsgRevoke", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.bank.v1beta1.MsgSend", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.feegrant.v1beta1.MsgRevokeAllowance", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.gov.v1.MsgDeposit", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.gov.v1.MsgSubmitProposal", 2e8),
NewMsgGasParamsWithFixedGas("/cosmos.gov.v1.MsgVote", 2e7),
NewMsgGasParamsWithFixedGas("/cosmos.gov.v1.MsgVoteWeighted", 2e7),
NewMsgGasParamsWithFixedGas("/cosmos.oracle.v1.MsgClaim", 1e3),
NewMsgGasParamsWithFixedGas("/cosmos.slashing.v1beta1.MsgUnjail", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgBeginRedelegate", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.slashing.v1beta1.MsgUnjail", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgBeginRedelegate", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgCreateValidator", 2e8),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgDelegate", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgDelegate", 1.2e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgEditValidator", 2e7),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgUndelegate", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.bridge.MsgTransferOut", 12e3),
NewMsgGasParamsWithFixedGas("/cosmos.staking.v1beta1.MsgUndelegate", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.bridge.MsgTransferOut", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.sp.MsgCreateStorageProvider", 2e8),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.sp.MsgDeposit", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.sp.MsgDeposit", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.sp.MsgEditStorageProvider", 2e7),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.sp.MsgUpdateSpStoragePrice", 2e7),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateBucket", 24e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteBucket", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorBucket", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgUpdateBucketInfo", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgSealObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgRejectSealObject", 12e4),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCopyObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCancelCreateObject", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateGroup", 24e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteGroup", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgLeaveGroup", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgUpdateGroupMember", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorGroup", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgPutPolicy", 24e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeletePolicy", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgCreatePaymentAccount", 2e6),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgDeposit", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgWithdraw", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgDisableRefund", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.challenge.MsgSubmit", 12e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateBucket", 2.4e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteBucket", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorBucket", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgUpdateBucketInfo", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgSealObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgRejectSealObject", 1.2e4),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCopyObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCancelCreateObject", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgCreateGroup", 2.4e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeleteGroup", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgLeaveGroup", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgUpdateGroupMember", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgMirrorGroup", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgPutPolicy", 2.4e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.storage.MsgDeletePolicy", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgCreatePaymentAccount", 2e5),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgDeposit", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgWithdraw", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.payment.MsgDisableRefund", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.challenge.MsgSubmit", 1.2e3),
NewMsgGasParamsWithFixedGas("/bnbchain.greenfield.challenge.MsgAttest", 1e2),
NewMsgGasParamsWithDynamicGas(
"/cosmos.authz.v1beta1.MsgGrant",
&MsgGasParams_GrantType{
GrantType: &MsgGasParams_DynamicGasParams{
FixedGas: 8e3,
GasPerItem: 8e3,
FixedGas: 8e2,
GasPerItem: 8e2,
},
},
),
NewMsgGasParamsWithDynamicGas(
"/cosmos.bank.v1beta1.MsgMultiSend",
&MsgGasParams_MultiSendType{
MultiSendType: &MsgGasParams_DynamicGasParams{
FixedGas: 8e3,
GasPerItem: 8e3,
FixedGas: 8e2,
GasPerItem: 8e2,
},
},
),
NewMsgGasParamsWithDynamicGas(
"/cosmos.feegrant.v1beta1.MsgGrantAllowance",
&MsgGasParams_GrantAllowanceType{
GrantAllowanceType: &MsgGasParams_DynamicGasParams{
FixedGas: 8e3,
GasPerItem: 8e3,
FixedGas: 8e2,
GasPerItem: 8e2,
},
},
),
Expand Down