From b1f755db7bc2f6ca2c0e523be24dd1ac148d7711 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Mon, 16 May 2022 22:14:58 +0800 Subject: [PATCH] fix tx event query --- rpc/ethereum/namespaces/eth/filters/filter_system.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpc/ethereum/namespaces/eth/filters/filter_system.go b/rpc/ethereum/namespaces/eth/filters/filter_system.go index f75a0a53..89f17bb8 100644 --- a/rpc/ethereum/namespaces/eth/filters/filter_system.go +++ b/rpc/ethereum/namespaces/eth/filters/filter_system.go @@ -10,6 +10,7 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" + tmquery "github.com/tendermint/tendermint/libs/pubsub/query" coretypes "github.com/tendermint/tendermint/rpc/coretypes" rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" tmtypes "github.com/tendermint/tendermint/types" @@ -27,7 +28,7 @@ import ( var ( txEvents = tmtypes.QueryForEvent(tmtypes.EventTxValue).String() - evmEvents = fmt.Sprintf("%s='%s' AND %s.%s='%s'", tmtypes.EventTypeKey, tmtypes.EventTx, sdk.EventTypeMessage, sdk.AttributeKeyModule, evmtypes.ModuleName) + evmEvents = tmquery.MustCompile(fmt.Sprintf("%s='%s' AND %s.%s='%s'", tmtypes.EventTypeKey, tmtypes.EventTxValue, sdk.EventTypeMessage, sdk.AttributeKeyModule, evmtypes.ModuleName)).String() headerEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlockHeaderValue).String() )