[英]how to adjust ethereum transaction's nonce
在開發以太坊dapp的過程中,我測試了負載,出現了nonce錯誤。 在構建 rawTx 時,我使用web3.getTransactionCount("accountAddress", 'pending')
作為交易的隨機數。 我沒想到會出現 nonce 錯誤,因為我沒有使用web3.getTransactionCount("accountAddress")
作為交易的 nonce,但是它發生了。 我想知道如何處理它。
你做得對。 該問題缺乏上下文信息來說明可能出現的問題。
您在 web3 之后缺少 eth object 調用並且不要忘記等待關鍵字
await web3.eth.getTransactionCount('address', 'pending')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.