Skip to content
Cive

getFilterChanges

Returns a list of logs or hashes based on a Filter since the last time it was called.

A Filter can be created from the following actions:

Usage

Blocks

import {  } from "./client";
 
const  = await .(); 
const  = await .({  });
 
Output: ["0x...", ...]

Raw Events

import {  } from "cive";
import {  } from "./client";
 
const  = await .({
  : "cfx:...",
  : (
    "event Transfer(address indexed, address indexed, uint256)"
  ),
});
const  = await .({  });
 
Output: [{ ... }, { ... }, { ... }]

Transactions

import {  } from "./client";
 
const  = await .(); 
const  = await .({  });
 
Output: ["0x..", ...]

Returns

Log[]

If the filter was created with createContractEventFilter or createEventFilter, it returns a list of logs.

OR

"0x${string}"[]

If the filter was created with createPendingTransactionFilter, it returns a list of transaction hashes.

"0x${string}"[]

If the filter was created with createBlockFilter, it returns a list of block hashes.

Parameters

filter

A created filter.

const  = await .();
const  = await .({
  , 
});

JSON-RPC Method

cfx_getFilterChanges