Parameters
object— the filter options with fields likefromBlock,toBlock,address,topics
Response
quantity— a filter ID
eth_newFilter code examples
Body
application/json
curl --request POST \
--url https://plasma-mainnet.core.chainstack.com/be84184cd12967be5a65d06651c60085 \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [
{
"fromBlock": "latest",
"toBlock": "latest"
}
]
}'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://plasma-mainnet.core.chainstack.com/be84184cd12967be5a65d06651c60085 \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [
{
"fromBlock": "latest",
"toBlock": "latest"
}
]
}'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}object — the filter options with fields like fromBlock, toBlock, address, topicsquantity — a filter IDeth_newFilter code examplesconst { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");
async function call() {
const result = await provider.send("eth_newFilter", [
{
fromBlock: "latest",
toBlock: "latest"
}
]);
console.log(result);
}
call();
Was this page helpful?