diff --git a/app/app.go b/app/app.go index e00bff067..65dca31b5 100644 --- a/app/app.go +++ b/app/app.go @@ -149,14 +149,6 @@ func NewNibiruApp( app.SetProcessProposal(handler.ProcessProposalHandler()) }) - baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mp := mempool.NoOpMempool{} - app.SetMempool(mp) - handler := baseapp.NewDefaultProposalHandler(mp, app) - app.SetPrepareProposal(handler.PrepareProposalHandler()) - app.SetProcessProposal(handler.ProcessProposalHandler()) - }) - bApp := baseapp.NewBaseApp( appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) diff --git a/eth/chain_id_test.go b/eth/chain_id_test.go index 136bb97bb..39890acf6 100644 --- a/eth/chain_id_test.go +++ b/eth/chain_id_test.go @@ -4,9 +4,10 @@ import ( "math/big" "testing" - "github.com/NibiruChain/nibiru/app/appconst" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/app/appconst" ) func TestParseChainID_Happy(t *testing.T) { diff --git a/eth/rpc/rpcapi/eth_api_test.go b/eth/rpc/rpcapi/eth_api_test.go index 8bea4d52f..782374063 100644 --- a/eth/rpc/rpcapi/eth_api_test.go +++ b/eth/rpc/rpcapi/eth_api_test.go @@ -11,11 +11,6 @@ import ( "strings" "testing" - "github.com/NibiruChain/nibiru/app/appconst" - fixture "github.com/NibiruChain/nibiru/eth/rpc/rpcapi/fixture" - nibiCommon "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/evm/evmtest" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" @@ -26,6 +21,12 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/status-im/keycard-go/hexutils" + "github.com/NibiruChain/nibiru/app/appconst" + fixture "github.com/NibiruChain/nibiru/eth/rpc/rpcapi/fixture" + nibiCommon "github.com/NibiruChain/nibiru/x/common" + "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/app" @@ -191,7 +192,6 @@ func (s *IntegrationSuite) Test_SuggestGasPrice() { // TODO: the backend method is stubbed to 0 _, err := s.ethClient.SuggestGasPrice(context.Background()) s.NoError(err) - } // Test_SimpleTransferTransaction EVM method: eth_sendRawTransaction @@ -204,7 +204,8 @@ func (s *IntegrationSuite) Test_SimpleTransferTransaction() { senderBalanceBefore, err := s.ethClient.BalanceAt( context.Background(), s.fundedAccEthAddr, nil, ) - recipientAddr := ethCommon.BytesToAddress(testutilcli.NewAccount(s.network, "recepient")) + s.NoError(err) + recipientAddr := ethCommon.BytesToAddress(testutilcli.NewAccount(s.network, "recipient")) recipientBalanceBefore, err := s.ethClient.BalanceAt(context.Background(), recipientAddr, nil) s.NoError(err) s.Equal(int64(0), recipientBalanceBefore.Int64()) @@ -291,7 +292,7 @@ func (s *IntegrationSuite) Test_SmartContract() { GasPrice: big.NewInt(1), Data: input, }) - + s.NoError(err) err = s.ethClient.SendTransaction(context.Background(), tx) s.NoError(err) s.NoError(s.network.WaitForNextBlock()) diff --git a/x/evm/keeper/config.go b/x/evm/keeper/config.go deleted file mode 100644 index a5f0880ae..000000000 --- a/x/evm/keeper/config.go +++ /dev/null @@ -1,30 +0,0 @@ -package keeper - -import ( - "math/big" - - "github.com/NibiruChain/nibiru/x/evm/statedb" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// EVMConfig creates the EVMConfig based on current state -func (k *Keeper) EVMConfig(ctx sdk.Context, proposerAddress sdk.ConsAddress, chainID *big.Int) (*statedb.EVMConfig, error) { - params := k.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(chainID) - - // get the coinbase address from the block proposer - coinbase, err := k.GetCoinbaseAddress(ctx, proposerAddress) - if err != nil { - return nil, errorsmod.Wrap(err, "failed to obtain coinbase address") - } - - baseFee := k.GetBaseFee(ctx, ethCfg) - return &statedb.EVMConfig{ - Params: params, - ChainConfig: ethCfg, - CoinBase: coinbase, - BaseFee: baseFee, - }, nil -} diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index d51f93d41..5185b642e 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -7,14 +7,8 @@ import ( "errors" "fmt" "math/big" - "time" - "github.com/ethereum/go-ethereum/common/hexutil" - - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm/statedb" - grpccodes "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" @@ -23,7 +17,12 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/x/evm/statedb" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" @@ -31,8 +30,6 @@ import ( "github.com/ethereum/go-ethereum/eth/tracers/logger" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm" - cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" )