-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[isoltest] Handle events in isoltest semantics tests. #6902
Comments
Moved from #10427:
|
All of this would be covered by just checking the entire log precisely, though, wouldn't it? I.e. in
Especially, if we make events not occurring in the expectations an error (which we definitely should). |
Yes, all are reading parts of the same |
Ok, |
I was experimenting a bit with the syntax and how we could implement this. I was thinking about introducing "builtin" functions into isoltest. I thought it would make sense to provide the same "low-level" functions - I think @ekpyron syntax proposal is nice but maybe it is too high-level. If I understood that syntax correctly, we will not be able to check explicitly for indexed & anonymous events. I could imagine that it may make sense to have such "higher-level" function. Such function may simplify the event usage of newly written semantic tests. I think we should start with the "low-level" functions first, so that we are able to easily translate the event based I think the syntax for the "low-level" functions could look like this:
I have in mind to create a simple framework that allows to define builtin functions. These builtin functions will be placed in a "module" namespace, where each module can provide different functions. A call to a builtin will always be defined like I think this will make it more easy to extend the semantic tests with additional functions. |
I think for logs, this is much too detailed, and we can keep the 2-3 tests that cannot use the event interface in EndToEndTests, but it could be useful for |
Yes these "low-level" builtins are too detailed, but I added a new builtin |
At some point we should be able to expect events emitted during a transaction/call in
isoltest
.We'll first need to decide what syntax to use for that, though.
Suggestion:
Maybe we should also have some way to check the logged ether amount of the transaction.
The text was updated successfully, but these errors were encountered: