Is there a Ethers.js equivalent of web3-eth-contract.getpastevents?
See original GitHub issueI can see how I can get new events with contract.events.onvaluechanged
. But I want to get all the events from a block number
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
web3.eth.Contract — web3.js 1.0.0 documentation
The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockchain. When you create a new contract object you...
Read more >web3: How do I get past events of myContract.myEvent?
Seeing as there isn't a detailed updated answer: As @pors mentioned, web3.js has a getPastEvents function. You can have it run at startup,...
Read more >Documentation - Ethers.js
A Contract is an abstraction of program code which lives on the Ethereum blockchain. The Contract object makes it easier to use an...
Read more >Web3.js vs Ethers.js: Which is best? - YouTube
Become an in-demand blockchain MASTER:https://dappuniversity.com/bootcampEthers. js Tutorial: ...
Read more >Using web3.js 'getPastEvents' to get specific events filtered by ...
This article focuses using the web3.js getPastEvents method with ... const contract = new web3.eth.Contract(contractAbi, contractAddress);
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As of version 3.0.1, the first line in the previous comment needs to change to
Hopefully this helps anyone new to the library who wants to get past events.
Here is how you get the topics for the
Transfer
event in your contract:See the Events example here: https://docs.ethers.io/ethers.js/html/api-advanced.html#id3