-
Notifications
You must be signed in to change notification settings - Fork 805
/
params.go
48 lines (37 loc) · 1.14 KB
/
params.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package keeper
import (
"math/big"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/sei-protocol/sei-chain/utils"
"github.com/sei-protocol/sei-chain/x/evm/config"
"github.com/sei-protocol/sei-chain/x/evm/types"
)
const BaseDenom = "usei"
func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
k.Paramstore.SetParamSet(ctx, ¶ms)
}
func (k *Keeper) GetParams(ctx sdk.Context) types.Params {
params := types.Params{}
k.Paramstore.GetParamSet(ctx, ¶ms)
return params
}
func (k *Keeper) GetBaseDenom(ctx sdk.Context) string {
return BaseDenom
}
func (k *Keeper) GetPriorityNormalizer(ctx sdk.Context) sdk.Dec {
return k.GetParams(ctx).PriorityNormalizer
}
func (k *Keeper) GetBaseFeePerGas(ctx sdk.Context) sdk.Dec {
return k.GetParams(ctx).BaseFeePerGas
}
func (k *Keeper) GetMinimumFeePerGas(ctx sdk.Context) sdk.Dec {
return k.GetParams(ctx).MinimumFeePerGas
}
func (k *Keeper) ChainID(ctx sdk.Context) *big.Int {
if k.EthReplayConfig.Enabled || k.EthBlockTestConfig.Enabled {
// replay is for eth mainnet so always return 1
return utils.Big1
}
// return mapped chain ID
return config.GetEVMChainID(ctx.ChainID())
}