-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Log types #415
Comments
It might make more sense to break that into two types of logs, but there is one other reason sometimes those things aren't filled in nicely, mainly Ganache, which is not the most standards compliant beast, especially slightly older versions. But for the most part a lot of those changes (as I recall) were added when the "pending" filter was added. I'll have to check my notes. For now though, I think it makes enough sense though, no? Or are there problems with marking them as optional? I'm still fairly new to TypeScript. |
I don't think that there are any Ganache issues any more with this, so I have made removed the optional component. If there are any problems please re-open the issue, but I think this is safe. :) I also removed the The changes are local, but will go out with the next v5 release. Thanks! :) |
This was published in 5.0.0-beta.180. Thanks! :) |
In abstract-provider, the type for a Log is defined as:
I see that many of these are marked as optional with a
?
. Some, like transactionHash, seem like they would always have to be there and others, like blockHash should perhaps benull
able and not optional (only if you wanted to match the JSON-RPC API more closely).It seems that there are two types of Logs that get returned, one from a getLogs of a mined transaction (including logIndex, blockHash, etc) and one from a getLogs of pending (or from
eth_getFilterChanges
?), which has Object keys that are nullable/undefined?Does that sound right architecturally?
The text was updated successfully, but these errors were encountered: