Skip to content

Commit 1868405

Browse files
committed
fix lints & ci
removed already migrated test also
1 parent f597df9 commit 1868405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+347
-511
lines changed

ethereum/eip712/eip712_fuzzer_test.go

Lines changed: 0 additions & 194 deletions
This file was deleted.

evmd/tests/integration/backend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ import (
99
)
1010

1111
func TestBackend(t *testing.T) {
12-
s := backend.NewBackendTestSuite(CreateEvmd)
12+
s := backend.NewTestSuite(CreateEvmd)
1313
suite.Run(t, s)
1414
}

evmd/tests/integration/eip712_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
)
1010

1111
func TestEIP712TestSuite(t *testing.T) {
12-
s := eip712.NewEIP712TestSuite(CreateEvmd, false)
12+
s := eip712.NewTestSuite(CreateEvmd, false)
1313
suite.Run(t, s)
1414

1515
// Note that we don't test the Legacy EIP-712 Extension, since that case
1616
// is sufficiently covered by the AnteHandler tests.
17-
s = eip712.NewEIP712TestSuite(CreateEvmd, true)
17+
s = eip712.NewTestSuite(CreateEvmd, true)
1818
suite.Run(t, s)
1919
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package integration
2+
3+
import "testing"
4+
5+
func TestIterateContracts(t *testing.T) {
6+
TestIterateContracts(t)
7+
}

interfaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
)
4141

4242
// EvmApp defines the interface for an EVM application.
43-
type EvmApp interface {
43+
type EvmApp interface { //nolint:revive
4444
ibctesting.TestingApp
4545
runtime.AppI
4646
InterfaceRegistry() types.InterfaceRegistry

rpc/backend/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ var _ BackendI = (*Backend)(nil)
128128
type Backend struct {
129129
Ctx context.Context
130130
ClientCtx client.Context
131-
RpcClient tmrpcclient.SignClient
131+
RPCClient tmrpcclient.SignClient
132132
QueryClient *rpctypes.QueryClient // gRPC query client
133133
Logger log.Logger
134134
EvmChainID *big.Int
@@ -158,7 +158,7 @@ func NewBackend(
158158
return &Backend{
159159
Ctx: context.Background(),
160160
ClientCtx: clientCtx,
161-
RpcClient: rpcClient,
161+
RPCClient: rpcClient,
162162
QueryClient: rpctypes.NewQueryClient(clientCtx),
163163
Logger: logger.With("module", "backend"),
164164
EvmChainID: big.NewInt(int64(appConf.EVM.EVMChainID)), //nolint:gosec // G115 // won't exceed uint64

rpc/backend/blocks.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (b *Backend) GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (
6767
return nil, nil
6868
}
6969

70-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &resBlock.Block.Height)
70+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height)
7171
if err != nil {
7272
b.Logger.Debug("failed to fetch block result from Tendermint", "height", blockNum, "error", err.Error())
7373
return nil, nil
@@ -95,7 +95,7 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]inte
9595
return nil, nil
9696
}
9797

98-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &resBlock.Block.Height)
98+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height)
9999
if err != nil {
100100
b.Logger.Debug("failed to fetch block result from Tendermint", "block-hash", hash.String(), "error", err.Error())
101101
return nil, nil
@@ -113,7 +113,7 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]inte
113113
// GetBlockTransactionCountByHash returns the number of Ethereum transactions in
114114
// the block identified by hash.
115115
func (b *Backend) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint {
116-
block, err := b.RpcClient.BlockByHash(b.Ctx, hash.Bytes())
116+
block, err := b.RPCClient.BlockByHash(b.Ctx, hash.Bytes())
117117
if err != nil {
118118
b.Logger.Debug("block not found", "hash", hash.Hex(), "error", err.Error())
119119
return nil
@@ -147,7 +147,7 @@ func (b *Backend) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber
147147
// GetBlockTransactionCount returns the number of Ethereum transactions in a
148148
// given block.
149149
func (b *Backend) GetBlockTransactionCount(block *tmrpctypes.ResultBlock) *hexutil.Uint {
150-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &block.Block.Height)
150+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &block.Block.Height)
151151
if err != nil {
152152
return nil
153153
}
@@ -169,7 +169,7 @@ func (b *Backend) TendermintBlockByNumber(blockNum rpctypes.BlockNumber) (*tmrpc
169169
}
170170
height = int64(n) //#nosec G115 -- checked for int overflow already
171171
}
172-
resBlock, err := b.RpcClient.Block(b.Ctx, &height)
172+
resBlock, err := b.RPCClient.Block(b.Ctx, &height)
173173
if err != nil {
174174
b.Logger.Debug("tendermint client failed to get block", "height", height, "error", err.Error())
175175
return nil, err
@@ -186,12 +186,12 @@ func (b *Backend) TendermintBlockByNumber(blockNum rpctypes.BlockNumber) (*tmrpc
186186
// TendermintBlockResultByNumber returns a Tendermint-formatted block result
187187
// by block number
188188
func (b *Backend) TendermintBlockResultByNumber(height *int64) (*tmrpctypes.ResultBlockResults, error) {
189-
return b.RpcClient.BlockResults(b.Ctx, height)
189+
return b.RPCClient.BlockResults(b.Ctx, height)
190190
}
191191

192192
// TendermintBlockByHash returns a Tendermint-formatted block by block number
193193
func (b *Backend) TendermintBlockByHash(blockHash common.Hash) (*tmrpctypes.ResultBlock, error) {
194-
resBlock, err := b.RpcClient.BlockByHash(b.Ctx, blockHash.Bytes())
194+
resBlock, err := b.RPCClient.BlockByHash(b.Ctx, blockHash.Bytes())
195195
if err != nil {
196196
b.Logger.Debug("tendermint client failed to get block", "blockHash", blockHash.Hex(), "error", err.Error())
197197
return nil, err
@@ -225,7 +225,7 @@ func (b *Backend) BlockNumberFromTendermint(blockNrOrHash rpctypes.BlockNumberOr
225225

226226
// BlockNumberFromTendermintByHash returns the block height of given block hash
227227
func (b *Backend) BlockNumberFromTendermintByHash(blockHash common.Hash) (*big.Int, error) {
228-
resBlock, err := b.RpcClient.HeaderByHash(b.Ctx, blockHash.Bytes())
228+
resBlock, err := b.RPCClient.HeaderByHash(b.Ctx, blockHash.Bytes())
229229
if err != nil {
230230
return nil, err
231231
}
@@ -290,7 +290,7 @@ func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Heade
290290
return nil, errors.Errorf("block not found for height %d", blockNum)
291291
}
292292

293-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &resBlock.Block.Height)
293+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height)
294294
if err != nil {
295295
return nil, errors.Errorf("block result not found for height %d", resBlock.Block.Height)
296296
}
@@ -312,7 +312,7 @@ func (b *Backend) HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Heade
312312

313313
// HeaderByHash returns the block header identified by hash.
314314
func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) {
315-
resHeader, err := b.RpcClient.HeaderByHash(b.Ctx, blockHash.Bytes())
315+
resHeader, err := b.RPCClient.HeaderByHash(b.Ctx, blockHash.Bytes())
316316
if err != nil {
317317
return nil, err
318318
}
@@ -323,7 +323,7 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)
323323

324324
height := resHeader.Header.Height
325325

326-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &resHeader.Header.Height)
326+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resHeader.Header.Height)
327327
if err != nil {
328328
return nil, errors.Errorf("block result not found for height %d", height)
329329
}
@@ -468,7 +468,7 @@ func (b *Backend) EthBlockByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Blo
468468
return nil, fmt.Errorf("block not found for height %d", blockNum)
469469
}
470470

471-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, &resBlock.Block.Height)
471+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, &resBlock.Block.Height)
472472
if err != nil {
473473
return nil, fmt.Errorf("block result not found for height %d", resBlock.Block.Height)
474474
}
@@ -530,7 +530,7 @@ func (b *Backend) GetBlockReceipts(
530530
return nil, fmt.Errorf("block not found for height %d", *blockNum.TmHeight())
531531
}
532532

533-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, blockNum.TmHeight())
533+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, blockNum.TmHeight())
534534
if err != nil {
535535
return nil, fmt.Errorf("block result not found for height %d", resBlock.Block.Height)
536536
}

rpc/backend/chain_info.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func (b *Backend) FeeHistory(
201201
}
202202

203203
// tendermint block result
204-
tendermintBlockResult, err := b.RpcClient.BlockResults(b.Ctx, &tendermintblock.Block.Height)
204+
tendermintBlockResult, err := b.RPCClient.BlockResults(b.Ctx, &tendermintblock.Block.Height)
205205
if tendermintBlockResult == nil {
206206
b.Logger.Debug("block result not found", "height", tendermintblock.Block.Height, "error", err.Error())
207207
return nil, err

rpc/backend/filters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (b *Backend) GetLogs(hash common.Hash) ([][]*ethtypes.Log, error) {
2121
// GetLogsByHeight returns all the logs from all the ethereum transactions in a block.
2222
func (b *Backend) GetLogsByHeight(height *int64) ([][]*ethtypes.Log, error) {
2323
// NOTE: we query the state in case the tx result logs are not persisted after an upgrade.
24-
blockRes, err := b.RpcClient.BlockResults(b.Ctx, height)
24+
blockRes, err := b.RPCClient.BlockResults(b.Ctx, height)
2525
if err != nil {
2626
return nil, err
2727
}

0 commit comments

Comments
 (0)