73c9ea218e
* release: v0.17.0 changelog (#1153) * release: v0.17.0 changelog * rm newline * update link * fix(rpc): fix panic on breaking EVM and feemarket params * changelog * fix gosec
24 lines
619 B
Go
24 lines
619 B
Go
package keeper
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/evmos/ethermint/x/evm/types"
|
|
)
|
|
|
|
// GetParams returns the total set of evm parameters.
|
|
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
|
|
// TODO: update once https://github.com/cosmos/cosmos-sdk/pull/12615 is merged
|
|
// and released
|
|
for _, pair := range params.ParamSetPairs() {
|
|
k.paramSpace.GetIfExists(ctx, pair.Key, pair.Value)
|
|
}
|
|
|
|
return params
|
|
}
|
|
|
|
// SetParams sets the evm parameters to the param space.
|
|
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
|
|
k.paramSpace.SetParamSet(ctx, ¶ms)
|
|
}
|