I need check transaction status.
use eth_getTransactionReceipt, I can get status 0(failed)/1(success),how can i get pending status?
I have the transaction hash, I just want get transaction status
Hi @wheesys and welcome to the Infura community!
The receipt is not available for pending transactions and returns null
.
When calling eth_getTransactionReceipt, the status only can be true or false
-
status
-Boolean
:TRUE
if the transaction was successful,FALSE
if the EVM reverted the transaction.
You can use getPendingTransactions for more info you can check here:
https://web3js.readthedocs.io/en/v1.2.9/web3-eth.html#getpendingtransactions
THX.
If field result in eth_getTransactionReceipt return data is blank, Can I regard this as pending?
I have the transaction hash, just need to know this transaction status.
You mean receipt will return null for pending transaction.
Whole result of eth_getTransactionReceipt is null? Or just field result is null?