-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eth_getLogs
returns no logs
#303
Comments
const { ethers, JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("https://api.testnet.evm.eosnetwork.com/");
async function checkTransactionReceipt(txHash) {
const receipt = await provider.getTransactionReceipt(txHash);
console.log("Transaction Receipt:", receipt);
if (receipt) {
console.log("Transaction Receipt Found:", receipt);
console.log("Logs:", receipt.logs.length);
receipt.logs.forEach((log) => {
console.log("Log Address:", log.address);
});
} else {
console.log("Transaction is still pending or does not exist.");
}
}
checkTransactionReceipt(
"0x6e063e1fedf16d61488a3026d0abc16edd62b33b523d9ee84612ee2d317e80da"
); I make script and use official node from documentation EOS EVM https://docs.eosnetwork.com/evm/quick-start/endpoints |
Here is a test function to retrieve Logs from a block range, this returns an empty const { JsonRpcProvider } = require("ethers");
const provider = new JsonRpcProvider("https://api.testnet.evm.eosnetwork.com/");
async function checkLogs(fromBlock, toBlock) {
const logs = await provider.getLogs({ fromBlock, toBlock });
console.log(`Block range ${fromBlock}-${toBlock}`);
console.log("Logs:", logs.length);
logs.forEach((log) => {
console.log("Log Address:", log.address);
});
}
checkLogs(47502143, 47502144);
// Block range 47502143-47502144
// Logs: 0 Filter typeshttps://www.quicknode.com/docs/ethereum/eth_getLogs
/**
* A **Filter** allows searching a specific range of blocks for mathcing
* logs.
*/
export interface Filter extends EventFilter {
/**
* The start block for the filter (inclusive).
*/
fromBlock?: BlockTag;
/**
* The end block for the filter (inclusive).
*/
toBlock?: BlockTag;
}
/**
* A **FilterByBlockHash** allows searching a specific block for mathcing
* logs.
*/
export interface FilterByBlockHash extends EventFilter {
/**
* The blockhash of the specific block for the filter.
*/
blockHash?: string;
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like the
eth_getLogs
does not return any resultsTest RPC request
Feedback from @elmato
Note:
eth_getTransactionReceipt
does return logsThe text was updated successfully, but these errors were encountered: