ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

getTransactionCount() of a contract address always return 1

Open AmazingAng opened this issue 3 years ago • 0 comments

Ethers Version

5.6.9

Search Terms

getTransactionCount

Describe the Problem

getTransactionCount() of a contract address always returns 1, which should return the transaction of that contract. For example, 0xE592427A0AEce92De3Edee1F18E0157C05861564 is a uniswap router, but getTransactionCount() of it returns 1.

Code Snippet

let nonce = await provider.getTransactionCount("0xE592427A0AEce92De3Edee1F18E0157C05861564")
    console.log(nonce);

Contract ABI

No response

Errors

No response

Environment

node.js (v12 or newer)

Environment (Other)

No response

AmazingAng avatar Sep 18 '22 16:09 AmazingAng