Parameters
object— the filter options with fields likefromBlock,toBlock,address,topics,blockHash
Response
array— an array of log objects
object — the filter options with fields like fromBlock, toBlock, address, topics, blockHasharray — an array of log objectseth_getLogs code examplesconst { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");
async function call() {
const result = await provider.send("eth_getLogs", [
{
fromBlock: "latest",
toBlock: "latest"
}
]);
console.log(result);
}
call();
Was this page helpful?