Hi Infura Community,
I am using the polygon provider - https://polygon-mainnet.infura.io/v3/ for our product to send transactions.
Sometimes the transaction receipt status is true for the first time when we get the receipt via
const polygonWeb3 = new Web3(`https://polygon-mainnet.infura.io/v3/${infuraProjectId}`);
const receipt = await polygonWeb3.eth.getTransactionReceipt(txHash);
But after a few minutes, receipt.status changes to false. So we recorded those transactions as successful for the first time but their status became false finally, which leads confusing our customers.
Here is one of sample transaction receipts (We could provide more if needed):
receipt: {
blockHash: '0xf973319f92bec16a195d16528410a4de8efb1fd9524f70120d38e000e45678ba',
blockNumber: 25083606,
contractAddress: null,
cumulativeGasUsed: 14715936,
effectiveGasPrice: 34800000000,
from: '0xf10120862d09b20d8950f893dbfbcd8051ee2f91',
gasUsed: 118679,
logs: [ [Object], [Object], [Object], [Object] ],
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000a00000000000000000000800000008000000801000000000000000000100100000000000000200020000000000000000000000000000000000000080000012010000040000000000000000000000000004000100010000000000000000000000000010220000000000000000000000000040000000000000000000000000000000004000000002000000000001000200000000000100000000800000100000000000000010000004000000000000000100000080000000002000000000000000100000',
status: true,
to: '0x74c32ffc73c215b072a489c317d1d4bba78ad6d9',
transactionHash: '0xc5649241293168e8a7b79268177da2e5c0ae5a15c8420de5d07916c503d36a63',
transactionIndex: 101,
type: '0x0'
}
As you can see on the above, receipt.status was true for the first time when we get the receipt after sending a transaction.
But its status became false after a few mins - Polygon Transaction Hash (Txhash) Details | PolygonScan
Do you have any idea why it happens and how can we resolve its status correctly for the first time?
Thanks in advance,
Dmytro