Skip to content

Commit

Permalink
resolve lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed Feb 8, 2024
1 parent 096ffe9 commit 9988fb9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions x/evm/testutil/suite.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package testutil

import (
_ "embed"
"encoding/json"
"math"
"math/big"
Expand Down Expand Up @@ -31,7 +30,6 @@ import (
ethermint "github.com/evmos/ethermint/types"
"github.com/evmos/ethermint/x/evm/statedb"
"github.com/evmos/ethermint/x/evm/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
"github.com/evmos/ethermint/x/evm/vm"

"github.com/ethereum/go-ethereum/common"
Expand All @@ -47,8 +45,6 @@ import (
"github.com/tendermint/tendermint/version"
)

var testTokens = sdkmath.NewIntWithDecimal(1000, 18)

type TestSuite struct {
suite.Suite

Expand Down Expand Up @@ -206,7 +202,7 @@ func (suite *TestSuite) SetupAppWithT(checkTx bool, t require.TestingT) {
suite.ClientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig)
suite.EthSigner = ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID())
suite.AppCodec = encodingConfig.Codec
suite.Denom = evmtypes.DefaultEVMDenom
suite.Denom = types.DefaultEVMDenom
}

func (suite *TestSuite) EvmDenom() string {
Expand All @@ -219,7 +215,7 @@ func (suite *TestSuite) EvmDenom() string {
func (suite *TestSuite) Commit() {
_ = suite.App.Commit()
header := suite.Ctx.BlockHeader()
header.Height += 1
header.Height++
suite.App.BeginBlock(abci.RequestBeginBlock{
Header: header,
})
Expand Down Expand Up @@ -250,15 +246,16 @@ func (suite *TestSuite) DeployTestContract(t require.TestingT, owner common.Addr

nonce := suite.App.EvmKeeper.GetNonce(suite.Ctx, suite.Address)

data := append(types.ERC20Contract.Bin, ctorArgs...)
data := types.ERC20Contract.Bin
data = append(data, ctorArgs...)
args, err := json.Marshal(&types.TransactionArgs{
From: &suite.Address,
Data: (*hexutil.Bytes)(&data),
})
require.NoError(t, err)
res, err := suite.QueryClient.EstimateGas(ctx, &types.EthCallRequest{
Args: args,
GasCap: uint64(config.DefaultGasCap),
GasCap: config.DefaultGasCap,
ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress,
})
require.NoError(t, err)
Expand Down Expand Up @@ -366,7 +363,7 @@ func (suite *TestSuite) DeployTestMessageCall(t require.TestingT) common.Address

res, err := suite.QueryClient.EstimateGas(ctx, &types.EthCallRequest{
Args: args,
GasCap: uint64(config.DefaultGasCap),
GasCap: config.DefaultGasCap,
ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress,
})
require.NoError(t, err)
Expand Down

0 comments on commit 9988fb9

Please sign in to comment.