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...", ...]import { , } from "cive";
import { } from "cive/chains";
export const = ({
: ,
: (),
});Raw Events
import { } from "cive";
import { } from "./client";
const = await .({
: "cfx:...",
: (
"event Transfer(address indexed, address indexed, uint256)"
),
});
const = await .({ });
Output: [{ ... }, { ... }, { ... }]import { , } from "cive";
import { } from "cive/chains";
export const = ({
: ,
: (),
});Transactions
import { } from "./client";
const = await .();
const = await .({ });
Output: ["0x..", ...]import { , } from "cive";
import { } from "cive/chains";
export const = ({
: ,
: (),
});Returns
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
- Type:
Filter
A created filter.
const = await .();
const = await .({
,
});