-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.
Description
Ethers Version
5.6.8
Search Terms
nonce manager, increment nonce
Describe the Problem
nonceManager.incrementTransactionCount(0) increments nonce by 1.
The bug is on this line https://github.com/ethers-io/ethers.js/blob/master/packages/experimental/src.ts/nonce-manager.ts#L49
It should be changed to:
this._deltaCount += (count ?? 1);Code Snippet
import { NonceManager } from "@ethersproject/experimental"
import { VoidSigner } from "ethers"
;(async () => {
const manager = new NonceManager(new VoidSigner(''))
manager.setTransactionCount(10)
console.log(await manager.getTransactionCount('pending')) // 10
manager.incrementTransactionCount(0)
console.log(await manager.getTransactionCount('pending')) // 11
})()Contract ABI
No response
Errors
No response
Environment
No response
Environment (Other)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.