Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func NewEvermint(

// use custom Ethermint account for contracts
chainApp.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec, keys[authtypes.StoreKey], evertypes.ProtoAccount, maccPerms, sdk.GetConfig().GetBech32AccountAddrPrefix(), authAddr,
appCodec, keys[authtypes.StoreKey], authtypes.ProtoBaseAccount, maccPerms, sdk.GetConfig().GetBech32AccountAddrPrefix(), authAddr,
)
chainApp.BankKeeper = bankkeeper.NewBaseKeeper(
appCodec, keys[banktypes.StoreKey], chainApp.AccountKeeper, chainApp.BlockedAddrs(), authAddr,
Expand Down
12 changes: 2 additions & 10 deletions client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import (
"path/filepath"
"strings"

"github.com/ethereum/go-ethereum/common"

tmconfig "github.com/cometbft/cometbft/config"
tmrand "github.com/cometbft/cometbft/libs/rand"
"github.com/cometbft/cometbft/types"
Expand Down Expand Up @@ -341,10 +339,7 @@ func initTestnetFiles(
}

genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()})
genAccounts = append(genAccounts, &evertypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(addr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})
genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0))

valTokens := sdk.TokensFromConsensusPower(100, evertypes.PowerReduction)
createValMsg, err := stakingtypes.NewMsgCreateValidator(
Expand Down Expand Up @@ -417,10 +412,7 @@ func initTestnetFiles(
sdk.NewCoin(constants.BaseDenom, sdk.TokensFromConsensusPower(1000, evertypes.PowerReduction)),
}
genBalances = append(genBalances, banktypes.Balance{Address: normalAccountAddr.String(), Coins: coins.Sort()})
genAccounts = append(genAccounts, &evertypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(normalAccountAddr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})
genAccounts = append(genAccounts, authtypes.NewBaseAccount(normalAccountAddr, nil, 0, 0))
}

if err := initGenFiles(clientCtx, mbm, args.chainID, constants.BaseDenom, genAccounts, genBalances, genFiles, args.numValidators); err != nil {
Expand Down
9 changes: 1 addition & 8 deletions cmd/evmd/genaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
Expand All @@ -20,9 +19,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"

"github.com/EscanBE/evermint/v12/types"
evmtypes "github.com/EscanBE/evermint/v12/x/evm/types"

appkeyring "github.com/EscanBE/evermint/v12/crypto/keyring"

vestingcli "github.com/EscanBE/evermint/v12/x/vesting/client/cli"
Expand Down Expand Up @@ -202,10 +198,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa
)

default:
genAccount = &types.EthAccount{
BaseAccount: baseAccount,
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
}
genAccount = baseAccount
}

if err := genAccount.Validate(); err != nil {
Expand Down
11 changes: 2 additions & 9 deletions cmd/evmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/cometbft/cometbft/types"
tmtime "github.com/cometbft/cometbft/types/time"
clientconfig "github.com/cosmos/cosmos-sdk/client/config"
"github.com/ethereum/go-ethereum/common"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"net"
Expand Down Expand Up @@ -334,10 +333,7 @@ func initTestnetFiles(
}

genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()})
genAccounts = append(genAccounts, &evertypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(addr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})
genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0))

valTokens := sdk.TokensFromConsensusPower(100, evertypes.PowerReduction)
createValMsg, err := stakingtypes.NewMsgCreateValidator(
Expand Down Expand Up @@ -412,10 +408,7 @@ func initTestnetFiles(
sdk.NewCoin(constants.BaseDenom, sdk.TokensFromConsensusPower(1000, evertypes.PowerReduction)),
}
genBalances = append(genBalances, banktypes.Balance{Address: normalAccountAddr.String(), Coins: coins.Sort()})
genAccounts = append(genAccounts, &evertypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(normalAccountAddr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})
genAccounts = append(genAccounts, authtypes.NewBaseAccount(normalAccountAddr, nil, 0, 0))
}

if err := initGenFiles(clientCtx, mbm, args.chainID, constants.BaseDenom, genAccounts, genBalances, genFiles, args.numValidators); err != nil {
Expand Down
8 changes: 1 addition & 7 deletions ibc/testing/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (

"github.com/stretchr/testify/require"

"github.com/ethereum/go-ethereum/common"

sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand All @@ -21,7 +19,6 @@ import (

"github.com/EscanBE/evermint/v12/crypto/ethsecp256k1"
evertypes "github.com/EscanBE/evermint/v12/types"
evmtypes "github.com/EscanBE/evermint/v12/x/evm/types"
)

// ChainIDPrefix defines the default chain ID prefix for our test chains
Expand Down Expand Up @@ -59,10 +56,7 @@ func NewTestChain(t *testing.T, coord *ibcgotesting.Coordinator, chainID string)

baseAcc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0)

acc := &evertypes.EthAccount{
BaseAccount: baseAcc,
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
}
acc := baseAcc

amount := sdk.TokensFromConsensusPower(1, evertypes.PowerReduction)

Expand Down
25 changes: 0 additions & 25 deletions proto/ethermint/types/v1/account.proto

This file was deleted.

7 changes: 1 addition & 6 deletions testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
tmrand "github.com/cometbft/cometbft/libs/rand"
"github.com/cometbft/cometbft/node"
tmclient "github.com/cometbft/cometbft/rpc/client"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/spf13/cobra"
"google.golang.org/grpc"
Expand Down Expand Up @@ -56,7 +55,6 @@ import (
"github.com/EscanBE/evermint/v12/encoding"
"github.com/EscanBE/evermint/v12/server/config"
evertypes "github.com/EscanBE/evermint/v12/types"
evmtypes "github.com/EscanBE/evermint/v12/x/evm/types"
)

// package-wide network lock to only allow one test network at a time
Expand Down Expand Up @@ -414,10 +412,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {

genFiles = append(genFiles, tmCfg.GenesisFile())
genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: balances.Sort()})
genAccounts = append(genAccounts, &evertypes.EthAccount{
BaseAccount: authtypes.NewBaseAccount(addr, nil, 0, 0),
CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(),
})
genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0))

commission, err := sdk.NewDecFromStr("0.5")
if err != nil {
Expand Down
82 changes: 0 additions & 82 deletions types/account.go

This file was deleted.

Loading