Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export GO111MODULE = on

# evmd is a separate module under ./evmd
EVMD_DIR := evmd
EVMD_MAIN_PKG := ./cmd/evmd

###############################################################################
### Build & Install evmd ###
Expand Down Expand Up @@ -91,7 +90,7 @@ endif
build: go.sum $(BUILDDIR)/
@echo "🏗️ Building evmd to $(BUILDDIR)/$(EXAMPLE_BINARY) ..."
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY) $(EVMD_MAIN_PKG)
go build $(BUILD_FLAGS) -o $(BUILDDIR)/$(EXAMPLE_BINARY)

# Cross-compile for Linux AMD64
build-linux:
Expand All @@ -101,7 +100,7 @@ build-linux:
install: go.sum
@echo "🚚 Installing evmd to $(BINDIR) ..."
@cd $(EVMD_DIR) && CGO_ENABLED="1" \
go install $(BUILD_FLAGS) $(EVMD_MAIN_PKG)
go install $(BUILD_FLAGS)

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/
Expand Down
8 changes: 3 additions & 5 deletions ante/cosmos/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/evm/ante/cosmos"
"github.com/cosmos/evm/encoding"
"github.com/cosmos/evm/testutil"
"github.com/cosmos/evm/testutil/constants"
testconfig "github.com/cosmos/evm/testutil/config"
evmtypes "github.com/cosmos/evm/x/vm/types"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -21,12 +21,10 @@ import (
)

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

encodingCfg := encoding.MakeConfig(constants.ExampleChainID.EVMChainID)
encodingCfg := encoding.MakeConfig(testconfig.ExampleChainID.EVMChainID)
txCfg := encodingCfg.TxConfig
testPrivKeys, testAddresses, err := testutil.GeneratePrivKeyAddressPairs(5)
require.NoError(t, err)
Expand Down
22 changes: 11 additions & 11 deletions ante/evm/fee_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/cosmos/evm/ante/evm"
anteinterfaces "github.com/cosmos/evm/ante/interfaces"
evmconfig "github.com/cosmos/evm/config"
"github.com/cosmos/evm/encoding"
"github.com/cosmos/evm/testutil/config"
testconstants "github.com/cosmos/evm/testutil/constants"
testconfig "github.com/cosmos/evm/testutil/config"
"github.com/cosmos/evm/types"
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
evmtypes "github.com/cosmos/evm/x/vm/types"
Expand Down Expand Up @@ -57,10 +57,10 @@ func TestSDKTxFeeChecker(t *testing.T) {
// with extension option
// without extension option
// london hardfork enableness
chainID := uint64(config.EighteenDecimalsChainID)
encodingConfig := encoding.MakeConfig(chainID)
err := config.EvmAppOptions(chainID)

err := evmconfig.NewDefaultEvmConfig(evmtypes.DefaultEvmChainID, false).Apply()
require.NoError(t, err)
encodingConfig := encoding.MakeConfig(evmtypes.DefaultEvmChainID)

evmDenom := evmtypes.GetEVMCoinDenom()
minGasPrices := sdk.NewDecCoins(sdk.NewDecCoin(evmDenom, math.NewInt(10)))
Expand Down Expand Up @@ -110,7 +110,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder()
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10))))
return txBuilder.GetTx()
},
false,
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder()
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10))))
return txBuilder.GetTx()
},
true,
Expand All @@ -172,7 +172,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder()
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))
return txBuilder.GetTx()
},
true,
Expand All @@ -189,7 +189,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder)
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction))))

option, err := codectypes.NewAnyWithValue(&types.ExtensionOptionDynamicFeeTx{})
require.NoError(t, err)
Expand All @@ -210,7 +210,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder)
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))

option, err := codectypes.NewAnyWithValue(&types.ExtensionOptionDynamicFeeTx{
MaxPriorityPrice: math.LegacyNewDec(5).MulInt(evmtypes.DefaultPriorityReduction),
Expand All @@ -233,7 +233,7 @@ func TestSDKTxFeeChecker(t *testing.T) {
func() sdk.FeeTx {
txBuilder := encodingConfig.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder)
txBuilder.SetGasLimit(1)
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconstants.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))
txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin(testconfig.ExampleAttoDenom, math.NewInt(10).Mul(evmtypes.DefaultPriorityReduction).Add(math.NewInt(10)))))

// set negative priority fee
option, err := codectypes.NewAnyWithValue(&types.ExtensionOptionDynamicFeeTx{
Expand Down
8 changes: 4 additions & 4 deletions ante/evm/mono_decorator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

"github.com/cosmos/evm/ante/evm"
evmconfig "github.com/cosmos/evm/config"
"github.com/cosmos/evm/crypto/ethsecp256k1"
"github.com/cosmos/evm/encoding"
"github.com/cosmos/evm/testutil/config"
utiltx "github.com/cosmos/evm/testutil/tx"
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
"github.com/cosmos/evm/x/vm/statedb"
Expand Down Expand Up @@ -144,9 +144,9 @@ func toMsgSlice(msgs []*evmsdktypes.MsgEthereumTx) []sdk.Msg {
}

func TestMonoDecorator(t *testing.T) {
chainID := uint64(config.EighteenDecimalsChainID)
require.NoError(t, config.EvmAppOptions(chainID))
cfg := encoding.MakeConfig(chainID)
evmConfig := evmconfig.NewDefaultEvmConfig(evmsdktypes.DefaultEvmChainID, false)
require.NoError(t, evmConfig.Apply())
cfg := encoding.MakeConfig(evmsdktypes.DefaultEvmChainID)

testCases := []struct {
name string
Expand Down
Loading