Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
feb4e74
move sdk setup to root cmd from main
almk-dev Sep 16, 2025
ad89741
refactor evmcoininfo and evmconfigurator
almk-dev Sep 16, 2025
4d0136c
update evmcoininfo usage
almk-dev Sep 16, 2025
4c1b44f
fix test
almk-dev Sep 16, 2025
5e5311a
remove unnecessaty vars
almk-dev Sep 16, 2025
ec24949
var assignments are actually necessary
almk-dev Sep 16, 2025
5596af5
add coin info to toml
almk-dev Sep 16, 2025
02d01f7
add fallback for missing chain id in client.toml
almk-dev Sep 16, 2025
91edb75
refactor server options
almk-dev Sep 16, 2025
24c6f42
lint
almk-dev Sep 16, 2025
517ae7d
add appOptions refactor
almk-dev Sep 16, 2025
fc87a64
add chainconfig replacement
almk-dev Sep 16, 2025
b80b4b7
move constants to config
almk-dev Sep 16, 2025
db26c46
consolidate testutil constants package into config
almk-dev Sep 16, 2025
96530d5
fix testcofig in root
almk-dev Sep 16, 2025
3f1368c
Merge branch 'main' into config-refactor
almk-dev Sep 16, 2025
7fb9074
Merge branch 'main' into config-refactor
almk-dev Sep 17, 2025
b9196e4
pass in coin info flags
almk-dev Sep 17, 2025
3c1f829
move around evmd files
almk-dev Sep 17, 2025
ea492dd
refactor keys package and clean up client dir
almk-dev Sep 17, 2025
2673aaa
remove err logging without nil check
almk-dev Sep 17, 2025
28b6677
add cmd extraction helper
almk-dev Sep 18, 2025
54e765f
fix local node vars
almk-dev Sep 18, 2025
acf25cd
remove duplicate toml
almk-dev Sep 18, 2025
5efe6f0
remove cmd call
almk-dev Sep 18, 2025
e67c604
add genesis changes
almk-dev Sep 22, 2025
268df4b
update infer logic and tests
almk-dev Sep 22, 2025
77dc203
fix and set evmcoininfo
vladjdk Sep 22, 2025
72cdc05
move all options outside of app.go
vladjdk Sep 22, 2025
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
4 changes: 2 additions & 2 deletions ante/cosmos/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
)

func TestAuthzLimiterDecorator(t *testing.T) {
evmConfigurator := evmtypes.NewEVMConfigurator().
evmConfigurator := evmtypes.NewEvmConfig().
WithEVMCoinInfo(constants.ExampleChainCoinInfo[constants.ExampleChainID])
err := evmConfigurator.Configure()
err := evmConfigurator.Apply()
require.NoError(t, err)

encodingCfg := encoding.MakeConfig(constants.ExampleChainID.EVMChainID)
Expand Down
8 changes: 4 additions & 4 deletions config/evm_app_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func EvmAppOptionsWithConfigWithReset(
}

ethCfg := evmtypes.DefaultChainConfig(chainID)
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
if withReset {
// reset configuration to set the new one
configurator.ResetTestConfig()
Expand All @@ -63,7 +63,7 @@ func EvmAppOptionsWithConfigWithReset(
WithChainConfig(ethCfg).
// NOTE: we're using the 18 decimals default for the example chain
WithEVMCoinInfo(coinInfo).
Configure()
Apply()
if err != nil {
return err
}
Expand All @@ -79,13 +79,13 @@ func setBaseDenom(ci evmtypes.EvmCoinInfo) (err error) {
// So when failing because the denom was already registered, we ignore it and set
// the corresponding denom to be base denom
defer func() {
err = sdk.SetBaseDenom(ci.Denom)
err = sdk.SetBaseDenom(ci.GetDenom())
}()
if err := sdk.RegisterDenom(ci.DisplayDenom, math.LegacyOneDec()); err != nil {
return err
}

// sdk.RegisterDenom will automatically overwrite the base denom when the
// new setBaseDenom() units are lower than the current base denom's units.
return sdk.RegisterDenom(ci.Denom, math.LegacyNewDecWithPrec(1, int64(ci.Decimals)))
return sdk.RegisterDenom(ci.GetDenom(), math.LegacyNewDecWithPrec(1, int64(ci.Decimals)))
}
4 changes: 2 additions & 2 deletions ethereum/eip712/preprocess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ type TestCaseStruct struct {
func TestLedgerPreprocessing(t *testing.T) {
// Update bech32 prefix
sdk.GetConfig().SetBech32PrefixForAccount(constants.ExampleBech32Prefix, "")
evmConfigurator := evmtypes.NewEVMConfigurator().
evmConfigurator := evmtypes.NewEvmConfig().
WithEVMCoinInfo(constants.ExampleChainCoinInfo[constants.ExampleChainID])
err := evmConfigurator.Configure()
err := evmConfigurator.Apply()
require.NoError(t, err)

testCases := []TestCaseStruct{
Expand Down
7 changes: 7 additions & 0 deletions evmd/cmd/evmd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import (
// NewRootCmd creates a new root command for evmd. It is called once in the
// main function.
func NewRootCmd() *cobra.Command {
setupSDKConfig()
// we "pre"-instantiate the application for getting the injected/configured encoding configuration
// and the CLI options for the modules
// add keyring to autocli opts
Expand Down Expand Up @@ -156,6 +157,12 @@ func NewRootCmd() *cobra.Command {
return rootCmd
}

func setupSDKConfig() {
config := sdk.GetConfig()
evmdconfig.SetBech32Prefixes(config)
config.Seal()
}

// initCometConfig helps to override default CometBFT Config values.
// return cmtcfg.DefaultConfig if no custom configuration is required for the application.
func initCometConfig() *cmtcfg.Config {
Expand Down
21 changes: 9 additions & 12 deletions evmd/cmd/evmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,21 @@ import (
// chain id
var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{
EighteenDecimalsChainID: {
Denom: ExampleChainDenom,
ExtendedDenom: ExampleChainDenom,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
ExtendedDecimals: evmtypes.EighteenDecimals,
},
// SixDecimalsChainID provides a chain ID which is being set up with 6 decimals
SixDecimalsChainID: {
Denom: "utest",
ExtendedDenom: "atest",
DisplayDenom: "test",
Decimals: evmtypes.SixDecimals,
DisplayDenom: "test",
Decimals: evmtypes.SixDecimals,
ExtendedDecimals: evmtypes.EighteenDecimals,
},
// EVMChainID provides a chain ID used for internal testing
EVMChainID: {
Denom: "atest",
ExtendedDenom: "atest",
DisplayDenom: "test",
Decimals: evmtypes.EighteenDecimals,
DisplayDenom: "test",
Decimals: evmtypes.EighteenDecimals,
ExtendedDecimals: evmtypes.EighteenDecimals,
},
}

Expand Down
9 changes: 0 additions & 9 deletions evmd/cmd/evmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@ import (
evmdconfig "github.com/cosmos/evm/evmd/cmd/evmd/config"

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func main() {
setupSDKConfig()

rootCmd := cmd.NewRootCmd()
if err := svrcmd.Execute(rootCmd, "evmd", evmdconfig.MustGetDefaultNodeHome()); err != nil {
fmt.Fprintln(rootCmd.OutOrStderr(), err)
os.Exit(1)
}
}

func setupSDKConfig() {
config := sdk.GetConfig()
evmdconfig.SetBech32Prefixes(config)
config.Seal()
}
10 changes: 5 additions & 5 deletions evmd/eips/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ In this way, even though the custom activators defined $3$ new EIPs, we are goin
The EVM configuration is the type used to modify the EVM configuration before starting a node. The type is defined as:

```go
type EVMConfigurator struct {
type EvmConfig struct {
extendedEIPs map[int]func(*vm.JumpTable)
extendedDefaultExtraEIPs []int64
sealed bool
Expand All @@ -151,18 +151,18 @@ It is important to notice that the configurator will only allow to append new en
**Cosmos EVM**. The reason behind this choice is to ensure the correct and safe execution of the virtual machine but still
allowing partners to customize their implementation.

The `EVMConfigurator` type should be constructed using the builder pattern inside the `init()` function of the file so
The `EvmConfig` type should be constructed using the builder pattern inside the `init()` function of the file so
that it is run during the creation of the application.

An example of the usage of the configurator is reported below:

```go
configurator := evmconfig.NewEVMConfigurator().
configurator := evmconfig.NewEvmConfig().
WithExtendedEips(customActivators).
WithExtendedDefaultExtraEIPs(defaultEnabledEIPs...).
Configure()
Apply()

err := configurator.Configure()
err := configurator.Apply()
```

Errors are raised when the configurator tries to append an item with the same name of one of the default one. Since
Expand Down
14 changes: 6 additions & 8 deletions evmd/tests/integration/x_vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,20 @@ func BenchmarkGasEstimation(b *testing.B) {
chainConfig := types.DefaultChainConfig(nw.GetEIP155ChainID().Uint64())
// get the denom and decimals set on chain initialization
// because we'll need to set them again when resetting the chain config
denom := types.GetEVMCoinDenom()
extendedDenom := types.GetEVMCoinExtendedDenom()
displayDenom := types.GetEVMCoinDisplayDenom()
decimals := types.GetEVMCoinDecimals()
extendedDecimals := types.GetEVMCoinExtendedDecimals()

configurator := types.NewEVMConfigurator()
configurator := types.NewEvmConfig()
configurator.ResetTestConfig()
err := configurator.
WithChainConfig(chainConfig).
WithEVMCoinInfo(types.EvmCoinInfo{
Denom: denom,
ExtendedDenom: extendedDenom,
DisplayDenom: displayDenom,
Decimals: decimals,
DisplayDenom: displayDenom,
Decimals: decimals,
ExtendedDecimals: extendedDecimals,
}).
Configure()
Apply()
require.NoError(b, err)

// Use simple transaction args for consistent benchmarking
Expand Down
4 changes: 2 additions & 2 deletions precompiles/common/balance_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func setupBalanceHandlerTest(t *testing.T) {
t.Helper()

sdk.GetConfig().SetBech32PrefixForAccount(testconstants.ExampleBech32Prefix, "")
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
require.NoError(t, configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.ExampleChainID]).Configure())
require.NoError(t, configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.ExampleChainID]).Apply())
}

func TestParseAddress(t *testing.T) {
Expand Down
14 changes: 6 additions & 8 deletions tests/integration/ante/ante_test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,20 @@
// get the denom and decimals set when initialized the chain
// to set them again
// when resetting the chain config
denom := evmtypes.GetEVMCoinDenom()
extendedDenom := evmtypes.GetEVMCoinExtendedDenom()
displayDenom := evmtypes.GetEVMCoinDisplayDenom()
decimals := evmtypes.GetEVMCoinDecimals()
extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning test

This definition of extendedDecimals is never used.

Copilot Autofix

AI about 1 month ago

The function assigns the result of evmtypes.GetEVMCoinExtendedDecimals() to the extendedDecimals variable and then immediately uses it as a field value in the struct evmtypes.EvmCoinInfo. Thereafter, the variable is never referenced, so its assignment is superfluous. The best fix is to eliminate the extendedDecimals variable completely, and directly use the function call as the value for the ExtendedDecimals field in evmtypes.EvmCoinInfo. Only the affected lines around the variable definition and struct literal need to be changed. No imports or other changes are required.


Suggested changeset 1
tests/integration/ante/ante_test_suite.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tests/integration/ante/ante_test_suite.go b/tests/integration/ante/ante_test_suite.go
--- a/tests/integration/ante/ante_test_suite.go
+++ b/tests/integration/ante/ante_test_suite.go
@@ -118,7 +118,6 @@
 	// when resetting the chain config
 	displayDenom := evmtypes.GetEVMCoinDisplayDenom()
 	decimals := evmtypes.GetEVMCoinDecimals()
-	extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()
 
 	configurator := evmtypes.NewEvmConfig()
 	configurator.ResetTestConfig()
@@ -127,7 +126,7 @@
 		WithEVMCoinInfo(evmtypes.EvmCoinInfo{
 			DisplayDenom:     displayDenom,
 			Decimals:         decimals,
-			ExtendedDecimals: extendedDecimals,
+			ExtendedDecimals: evmtypes.GetEVMCoinExtendedDecimals(),
 		}).
 		Apply()
 	s.Require().NoError(err)
EOF
@@ -118,7 +118,6 @@
// when resetting the chain config
displayDenom := evmtypes.GetEVMCoinDisplayDenom()
decimals := evmtypes.GetEVMCoinDecimals()
extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()

configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
@@ -127,7 +126,7 @@
WithEVMCoinInfo(evmtypes.EvmCoinInfo{
DisplayDenom: displayDenom,
Decimals: decimals,
ExtendedDecimals: extendedDecimals,
ExtendedDecimals: evmtypes.GetEVMCoinExtendedDecimals(),
}).
Apply()
s.Require().NoError(err)
Copilot is powered by AI and may make mistakes. Always verify output.

configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
err := configurator.
WithChainConfig(chainConfig).
WithEVMCoinInfo(evmtypes.EvmCoinInfo{
Denom: denom,
ExtendedDenom: extendedDenom,
DisplayDenom: displayDenom,
Decimals: decimals,
DisplayDenom: displayDenom,
Decimals: decimals,
ExtendedDecimals: extendedDecimals,
}).
Configure()
Apply()
s.Require().NoError(err)
}

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/ante/test_evm_unit_04_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@
s.Run(fmt.Sprintf("%s, %s", chainID.ChainID, tc.name), func() {
// Call the configurator to set the EVM coin required for the
// function to be tested.
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
s.Require().NoError(configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[chainID]).Configure())
s.Require().NoError(configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[chainID]).Apply())

// If decimals is not 18 decimals, we have to convert txFeeInfo to original
// decimals representation.
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/precompiles/werc20/test_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func TestPrecompileIntegrationTestSuite(t *testing.T, create network.CreateEvmAp
customGenesis[feemarkettypes.ModuleName] = feemarketGenesis

// Reset evm config here for the standard case
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
Expect(configurator.
WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[chainId]).
Configure()).To(BeNil(), "expected no error setting the evm configurator")
Apply()).To(BeNil(), "expected no error setting the evm configurator")

opts := []network.ConfigOption{
network.WithChainID(chainId),
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/x/precisebank/test_burn_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,10 @@ func (s *KeeperIntegrationTestSuite) TestBurnCoinsRandomValueMultiDecimals() {
}

func FuzzBurnCoins(f *testing.F) {
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.SixDecimalsChainID])
err := configurator.Configure()
err := configurator.Apply()
require.NoError(f, err)

f.Add(int64(0))
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/x/precisebank/test_mint_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,10 @@ func (s *KeeperIntegrationTestSuite) TestMintCoinsRandomValueMultiDecimals() {
}

func FuzzMintCoins(f *testing.F) {
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.SixDecimalsChainID])
err := configurator.Configure()
err := configurator.Apply()
require.NoError(f, err)

f.Add(int64(0))
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/x/precisebank/test_send_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,10 +796,10 @@ func (s *KeeperIntegrationTestSuite) TestSendCoinsRandomValueMultiDecimals() {
}

func FuzzSendCoins(f *testing.F) {
configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
configurator.WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.SixDecimalsChainID])
err := configurator.Configure()
err := configurator.Apply()
require.NoError(f, err)

f.Add(uint64(100), uint64(0), uint64(2))
Expand Down
14 changes: 6 additions & 8 deletions tests/integration/x/vm/keeper_test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,19 @@
}
// get the denom and decimals set on chain initialization
// because we'll need to set them again when resetting the chain config
denom := evmtypes.GetEVMCoinDenom()
extendedDenom := evmtypes.GetEVMCoinExtendedDenom()
displayDenom := evmtypes.GetEVMCoinDisplayDenom()
decimals := evmtypes.GetEVMCoinDecimals()
extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning test

This definition of extendedDecimals is never used.

Copilot Autofix

AI about 1 month ago

The best way to fix the problem is to remove the assignment to the local variable extendedDecimals, and instead use the function call to evmtypes.GetEVMCoinExtendedDecimals() directly in the assignment for the struct field ExtendedDecimals. Specifically, in the file tests/integration/x/vm/keeper_test_suite.go, in method SetupTest, remove line 108:

108: 	extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()

and, in the struct initialization, replace:

117: 			ExtendedDecimals: extendedDecimals,

with:

117: 			ExtendedDecimals: evmtypes.GetEVMCoinExtendedDecimals(),

No new methods, imports, or definitions are necessary.


Suggested changeset 1
tests/integration/x/vm/keeper_test_suite.go

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tests/integration/x/vm/keeper_test_suite.go b/tests/integration/x/vm/keeper_test_suite.go
--- a/tests/integration/x/vm/keeper_test_suite.go
+++ b/tests/integration/x/vm/keeper_test_suite.go
@@ -105,7 +105,6 @@
 	// because we'll need to set them again when resetting the chain config
 	displayDenom := evmtypes.GetEVMCoinDisplayDenom()
 	decimals := evmtypes.GetEVMCoinDecimals()
-	extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()
 
 	configurator := evmtypes.NewEvmConfig()
 	configurator.ResetTestConfig()
@@ -114,7 +113,7 @@
 		WithEVMCoinInfo(evmtypes.EvmCoinInfo{
 			DisplayDenom:     displayDenom,
 			Decimals:         decimals,
-			ExtendedDecimals: extendedDecimals,
+			ExtendedDecimals: evmtypes.GetEVMCoinExtendedDecimals(),
 		}).
 		Apply()
 	s.Require().NoError(err)
EOF
@@ -105,7 +105,6 @@
// because we'll need to set them again when resetting the chain config
displayDenom := evmtypes.GetEVMCoinDisplayDenom()
decimals := evmtypes.GetEVMCoinDecimals()
extendedDecimals := evmtypes.GetEVMCoinExtendedDecimals()

configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
@@ -114,7 +113,7 @@
WithEVMCoinInfo(evmtypes.EvmCoinInfo{
DisplayDenom: displayDenom,
Decimals: decimals,
ExtendedDecimals: extendedDecimals,
ExtendedDecimals: evmtypes.GetEVMCoinExtendedDecimals(),
}).
Apply()
s.Require().NoError(err)
Copilot is powered by AI and may make mistakes. Always verify output.

configurator := evmtypes.NewEVMConfigurator()
configurator := evmtypes.NewEvmConfig()
configurator.ResetTestConfig()
err := configurator.
WithChainConfig(chainConfig).
WithEVMCoinInfo(evmtypes.EvmCoinInfo{
Denom: denom,
ExtendedDenom: extendedDenom,
DisplayDenom: displayDenom,
Decimals: decimals,
DisplayDenom: displayDenom,
Decimals: decimals,
ExtendedDecimals: extendedDecimals,
}).
Configure()
Apply()
s.Require().NoError(err)
}
15 changes: 7 additions & 8 deletions tests/integration/x/vm/test_grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,12 @@ func (s *KeeperTestSuite) TestQueryBaseFee() {
chainConfig.CancunTime = &maxInt
chainConfig.PragueTime = &maxInt

configurator := types.NewEVMConfigurator()
configurator := types.NewEvmConfig()
configurator.ResetTestConfig()
err := configurator.
WithChainConfig(chainConfig).
WithEVMCoinInfo(testconstants.ExampleChainCoinInfo[testconstants.ExampleChainID]).
Configure()
Apply()
s.Require().NoError(err)
},
true,
Expand All @@ -1632,10 +1632,9 @@ func (s *KeeperTestSuite) TestQueryBaseFee() {

// Save initial configure to restore it between tests
coinInfo := types.EvmCoinInfo{
Denom: types.GetEVMCoinDenom(),
ExtendedDenom: types.GetEVMCoinExtendedDenom(),
DisplayDenom: types.GetEVMCoinDisplayDenom(),
Decimals: types.GetEVMCoinDecimals(),
DisplayDenom: types.GetEVMCoinDisplayDenom(),
Decimals: types.GetEVMCoinDecimals(),
ExtendedDecimals: types.GetEVMCoinExtendedDecimals(),
}
chainConfig := types.DefaultChainConfig(s.Network.GetEIP155ChainID().Uint64())

Expand All @@ -1658,12 +1657,12 @@ func (s *KeeperTestSuite) TestQueryBaseFee() {
s.Require().Error(err)
}
s.Require().NoError(s.Network.NextBlock())
configurator := types.NewEVMConfigurator()
configurator := types.NewEvmConfig()
configurator.ResetTestConfig()
err = configurator.
WithChainConfig(chainConfig).
WithEVMCoinInfo(coinInfo).
Configure()
Apply()
s.Require().NoError(err)
})
}
Expand Down
14 changes: 6 additions & 8 deletions testutil/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ import (
// chain id
var ChainsCoinInfo = map[uint64]evmtypes.EvmCoinInfo{
EighteenDecimalsChainID: {
Denom: ExampleChainDenom,
ExtendedDenom: ExampleChainDenom,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
ExtendedDecimals: evmtypes.EighteenDecimals,
},
EVMChainID: {
Denom: ExampleChainDenom,
ExtendedDenom: ExampleChainDenom,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
DisplayDenom: ExampleDisplayDenom,
Decimals: evmtypes.EighteenDecimals,
ExtendedDecimals: evmtypes.EighteenDecimals,
},
}

Expand Down
Loading
Loading