question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `getTransactionCount()` method to JsonRpcProvider

See original GitHub issue

Should return the number of transactions for a given address on a given block. Uses the eth_getTransactionCount RPC call.

ethers.js equivalent - provider.getTransactionCount

const essentialEth = require('essential-eth');
const provider = new essentialEth.JsonRpcProvider();
provider.getTransactionCount('0xE0DA0FFc6e82A8B743c04DD6d15BAe7b4B48E808', 14642060);
// 10

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
iadnanmalikcommented, Apr 24, 2022

Added a PR. Looking forward to any reviews or suggestions. 😃

1reaction
dawsbotcommented, Apr 24, 2022

@iadnanmalik for future reference, you can view the generated tsdoc docs by cd docusaurus then npm install and npm run start.

I’ll add this to the readme soon 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Ethers.js
The JSON-RPC API is another popular method for interacting with Ethereum and is ... JsonRpcProvider(); // The provider also allows signing transactions to ......
Read more >
Providers — ethers.js 4.0.0 documentation
The JsonRpcProvider and IpcProvider allow you to connect to Ethereum nodes you control ... it is recommended that you use the getDefaultProvider() method....
Read more >
documentation/api-providers.rst at master - ethers.js - GitHub
The JsonRpcProvider and IpcProvider allow you to connect to Ethereum nodes you control ... it is recommended that you use the getDefaultProvider() method....
Read more >
JsonRpcProvider class - ethers library - Dart API - Pub.dev
The JSON-RPC API is a popular method for interacting with Ethereum and is available in all major Ethereum node implementations (e.g. Geth and...
Read more >
Can jsonRpcProvider.getSigner() take any address as an ...
And I have a question about the getSigner() method below. https://docs.ethers.io/v5/api/providers/jsonrpc-provider/#JsonRpcProvider-getSigner.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found