func TestEth_GetFilterChanges_Topics_AB(t *testing.T) {
	time.Sleep(time.Second)

	rpcRes, err := call(t, "eth_blockNumber", []string{})
	require.NoError(t, err)

	var res hexutil.Uint64
	err = res.UnmarshalJSON(rpcRes.Result)
	require.NoError(t, err)

	param := make([]map[string]interface{}, 1)
	param[0] = make(map[string]interface{})
	param[0]["topics"] = []string{helloTopic, worldTopic}
	param[0]["fromBlock"] = res.String()
	param[0]["toBlock"] = zeroString // latest

	deployTestContractWithFunction(t)

	rpcRes, err = call(t, "eth_newFilter", param)
	require.NoError(t, err)

	var ID hexutil.Bytes
	err = json.Unmarshal(rpcRes.Result, &ID)
	require.NoError(t, err)

	time.Sleep(time.Second * 2)

	// get filter changes
	changesRes, err := call(t, "eth_getFilterChanges", []string{ID.String()})
	require.NoError(t, err)

	var logs []*ethtypes.Log
	err = json.Unmarshal(changesRes.Result, &logs)
	require.NoError(t, err)

	require.Equal(t, 1, len(logs))
	time.Sleep(time.Second * 2)
}
// Tests topics case where there are topics in first two positions
Tests topics case where there are topics in first two positions
// Tests topics case where there are topics in first two positions
func TestEth_GetFilterChanges_Topics_AB(t *testing.T) {
	time.Sleep(time.Second)
	rpcRes, err := call(t, "eth_blockNumber", []string{})
	require.NoError(t, err)
	var res hexutil.Uint64
	err = res.UnmarshalJSON(rpcRes.Result)
	require.NoError(t, err)
	param := make([]map[string]interface{}, 1)
	param[0] = make(map[string]interface{})
	param[0]["topics"] = []string{helloTopic, worldTopic}
	param[0]["fromBlock"] = res.String()
	param[0]["toBlock"] = zeroString 
	deployTestContractWithFunction(t)
	rpcRes, err = call(t, "eth_newFilter", param)
	require.NoError(t, err)
	var ID hexutil.Bytes
	err = json.Unmarshal(rpcRes.Result, &ID)
	require.NoError(t, err)
	time.Sleep(time.Second * 2)
	changesRes, err := call(t, "eth_getFilterChanges", []string{ID.String()})
	require.NoError(t, err)
	var logs []*ethtypes.Log
	err = json.Unmarshal(changesRes.Result, &logs)
	require.NoError(t, err)
	require.Equal(t, 1, len(logs))
	time.Sleep(time.Second * 2)
}
func TestEth_GetFilterChanges_Topics_AB ( t * testing . T ) { time . Sleep ( time . Second ) rpcRes , err := call ( t , " " , [ ] string { } ) require . NoError ( t , err ) var res hexutil . Uint64 err = res . UnmarshalJSON ( rpcRes . Result ) require . NoError ( t , err ) param := make ( [ ] map [ string ] interface { } , 1 ) param [ 0 ] = make ( map [ string ] interface { } ) param [ 0 ] [ " " ] = [ ] string { helloTopic , worldTopic } param [ 0 ] [ " " ] = res . String ( ) param [ 0 ] [ " " ] = zeroString deployTestContractWithFunction ( t ) rpcRes , err = call ( t , " " , param ) require . NoError ( t , err ) var ID hexutil . Bytes err = json . Unmarshal ( rpcRes . Result , & ID ) require . NoError ( t , err ) time . Sleep ( time . Second * 2 ) changesRes , err := call ( t , " " , [ ] string { ID . String ( ) } ) require . NoError ( t , err ) var logs [ ] * ethtypes . Log err = json . Unmarshal ( changesRes . Result , & logs ) require . NoError ( t , err ) require . Equal ( t , 1 , len ( logs ) ) time . Sleep ( time . Second * 2 ) }
Tests topics case where there are topics in first two positions
Tests topics case where there are topics in first two positions
// latest // get filter changes