检查交易的确认块数?

Checking the number of confirmed blocks for a transaction?

如何检查给定交易的“区块确认”数量?

我尝试检查区块高度为 +1、+2 等的交易哈希,但它们不包含交易 ID。

我是否需要等待未来的区块被开采,并且交易状态仍然被视为有效? Receipt.Status.

经过大量研究,我可以说它是在包含您的交易的区块之后被开采的区块数,并且您的交易仍然被认为是有效的。因此,要检查区块确认,您将检查交易是否仍然有效,并查看在交易区块高度之上还有多少区块被开采。

Therefore, if your transaction has 13 block confirmations (see above graphic), then there have been 12 blocks mined since the block was mined that included your transaction.

https://jaredstauffer.medium.com/what-is-a-block-confirmation-on-ethereum-e27d29ca8c01#:~:text=A%20block%20confirmation%20is%20simply,mined%20that%20included%20your%20transaction.