Skip to content

Commit d227a40

Browse files
committed
remove unused methods
1 parent e1c435c commit d227a40

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

testutil/integration/evm/utils/contracts.go

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,11 @@
11
package utils
22

33
import (
4-
"fmt"
5-
"slices"
6-
74
abcitypes "github.com/cometbft/cometbft/abci/types"
85

9-
testutiltypes "github.com/cosmos/evm/testutil/types"
106
evmtypes "github.com/cosmos/evm/x/vm/types"
117
)
128

13-
// CheckTxTopics checks if all expected topics are present in the transaction response
14-
func CheckTxTopics(res abcitypes.ExecTxResult, expectedTopics []string) error {
15-
msgEthResponse, err := DecodeExecTxResult(res)
16-
if err != nil {
17-
return err
18-
}
19-
20-
// Collect all topics within the transaction
21-
availableLogs := make([]string, 0, len(msgEthResponse.Logs))
22-
for _, log := range msgEthResponse.Logs {
23-
availableLogs = append(availableLogs, log.Topics...)
24-
}
25-
26-
// Check if all expected topics are present
27-
for _, expectedTopic := range expectedTopics {
28-
if !slices.Contains(availableLogs, expectedTopic) {
29-
return fmt.Errorf("expected topic %s not found in tx response", expectedTopic)
30-
}
31-
}
32-
return nil
33-
}
34-
35-
// DecodeContractCallResponse decodes the response of a contract call query
36-
func DecodeContractCallResponse(response interface{}, callArgs testutiltypes.CallArgs, res abcitypes.ExecTxResult) error {
37-
msgEthResponse, err := DecodeExecTxResult(res)
38-
if err != nil {
39-
return err
40-
}
41-
42-
err = callArgs.ContractABI.UnpackIntoInterface(response, callArgs.MethodName, msgEthResponse.Ret)
43-
if err != nil {
44-
return err
45-
}
46-
return nil
47-
}
48-
499
func DecodeExecTxResult(res abcitypes.ExecTxResult) (*evmtypes.MsgEthereumTxResponse, error) {
5010
msgEthResponse, err := evmtypes.DecodeTxResponse(res.Data)
5111
if err != nil {

0 commit comments

Comments
 (0)