forked from cerc-io/laconicd-deprecated
imp(ante): refactor for increased AnteHandler performance (#1393)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user