imp(ante): refactor for increased AnteHandler performance (#1393)

This commit is contained in:
Vladislav Varadinov
2022-10-20 13:40:25 +02:00
committed by GitHub
parent 3ab761b8c4
commit 157f188b91
3 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -24,35 +24,35 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
// GetChainConfig returns the chain configuration parameter.
func (k Keeper) GetChainConfig(ctx sdk.Context) types.ChainConfig {
chainCfg := types.ChainConfig{}
var chainCfg types.ChainConfig
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyChainConfig, &chainCfg)
return chainCfg
}
// GetEVMDenom returns the EVM denom.
func (k Keeper) GetEVMDenom(ctx sdk.Context) string {
evmDenom := ""
var evmDenom string
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEVMDenom, &evmDenom)
return evmDenom
}
// GetEnableCall returns true if the EVM Call operation is enabled.
func (k Keeper) GetEnableCall(ctx sdk.Context) bool {
enableCall := false
var enableCall bool
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCall, &enableCall)
return enableCall
}
// GetEnableCreate returns true if the EVM Create contract operation is enabled.
func (k Keeper) GetEnableCreate(ctx sdk.Context) bool {
enableCreate := false
var enableCreate bool
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCreate, &enableCreate)
return enableCreate
}
// GetAllowUnprotectedTxs returns true if unprotected txs (i.e non-replay protected as per EIP-155) are supported by the chain.
func (k Keeper) GetAllowUnprotectedTxs(ctx sdk.Context) bool {
allowUnprotectedTx := false
var allowUnprotectedTx bool
k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyAllowUnprotectedTxs, &allowUnprotectedTx)
return allowUnprotectedTx
}