how to get pending block's transactions logs

i have try to use web3.eth.getBlock('pending') get the pending block

i try to use web3.eth.getPastLogs ,but only get last block logs, how can i to do this?

this is my code:

    let logs = await web3.eth.getPastLogs({
        fromBlock: "pending",
        toBlock: "earliest",

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.