# 什么是nonce？

Nonce是以太坊上每笔交易的一个整数值，用于确保交易的唯一性和按照正确顺序进行处理。对于每个以太坊地址，当从该地址发送一笔交易时，其对应的nonce值会递增1，这确保了交易按照正确的顺序执行，并防止重复处理或交叉交易。

一个地址从未发送过交易时，它的nonce值为0，发起第一笔交易后，nonce值变为1，然后每次发送交易时递增。其他地址向该地址发送交易不会改变其nonce值。矿工会按照nonce值从小到大的顺序打包转账交易，因此如果nonce为1的交易还未被确认，那么nonce为2及更高的交易将无法被打包，即使支付的矿工费较高。

正确设置nonce是重要的，以避免交易被拒绝或出现其他问题。如果有两笔交易的nonce相同，其中一笔交易成功，另一笔交易将被视为无效，因为nonce值被认为是重复的。（nonce相同的交易，只会打包gas price较高的一笔）


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.tpwallet.io/cn/wallet-management/wallet/nonce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
