Closed grepfruit19 closed 4 years ago
In v5, you can use the contract.queryFilter(filter [ , fromBlock [ , toBlock ] ] )
function on the Contract objects. The filter
object can be computed for you using: contract.filters.Transfer(null, myAddress)
, for example, which will create a filter for you that lists all ERC20 transactions to myAddress
.
Ah nice, what's the state of the v5 beta? Any estimations on when it might come out?
@willKim19 See this PR for the answer https://github.com/ethers-io/ethers.js/pull/621
It doesn't seem like there's a good way to get past events from a contract. I've written the below code, maybe we can add it to the codebase if it seems like there's a need for it.
Thoughts?