eth_newBlockFilter and related functionality (#232)

* add filter types for block, pending tx, log
* implement pollForBlocks for block filters
* implement getFilterChanges for block filter
* implement uninstall filter by stopping polling
This commit is contained in:
noot
2020-04-07 16:00:06 -04:00
committed by GitHub
parent eaaae0e3fd
commit db4cee7eac
7 changed files with 126 additions and 35 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/ethermint/x/evm/types"
@@ -22,7 +23,7 @@ func GetQueryCmd(moduleName string, cdc *codec.Codec) *cobra.Command {
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
evmQueryCmd.AddCommand(client.GetCommands(
evmQueryCmd.AddCommand(flags.GetCommands(
GetCmdGetStorageAt(moduleName, cdc),
GetCmdGetCode(moduleName, cdc),
)...)
+4 -3
View File
@@ -14,6 +14,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
@@ -33,7 +34,7 @@ func GetTxCmd(storeKey string, cdc *codec.Codec) *cobra.Command {
RunE: client.ValidateCmd,
}
evmTxCmd.AddCommand(client.PostCommands(
evmTxCmd.AddCommand(flags.PostCommands(
GetCmdGenTx(cdc),
GetCmdGenCreateTx(cdc),
)...)
@@ -73,7 +74,7 @@ func GetCmdGenTx(cdc *codec.Codec) *cobra.Command {
data, err = hexutil.Decode(payload)
if err != nil {
fmt.Println(err)
return err
}
}
@@ -117,7 +118,7 @@ func GetCmdGenCreateTx(cdc *codec.Codec) *cobra.Command {
data, err := hexutil.Decode(payload)
if err != nil {
fmt.Println(err)
return err
}
var amount int64