-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Adding event and error selector fields #12921
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
Adding event and error selector fields #12921
Conversation
6dccdd2 to
22a7a5c
Compare
8b0b96d to
562ed07
Compare
ed6c4e9 to
480595b
Compare
|
There was an error when running Please check that your changes are working as intended. |
d5c567f to
fa09d90
Compare
977f545 to
472a16b
Compare
59de325 to
25ec156
Compare
ccdc55c to
a3d7bac
Compare
| } | ||
| } | ||
| // ---- | ||
| // TypeError 9582: (70-82): Member "selector" not found or not visible after argument-dependent lookup in function (). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function ().
Nitpick: need to fix the error message. I think there is a PR already for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#13005 is the PR
a3d7bac to
43dff44
Compare
6f3e7ba to
c7bd783
Compare
|
|
||
| - ``string.concat(...) returns (string memory)``: :ref:`Concatenates variable number of string arguments to one string array<string-concat>` | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I guess we could remove the newline here, it'd be nicer to keep the PR clean of unrelated changes like this :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now. If we merge we should remember rebasing #13005 afterwards, though, since it may change the error messages of the new tests.
| @@ -0,0 +1,17 @@ | |||
| library Y { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the name of the test should include the word 'anonymous' since this is what is being tested.
Please also add more tests for different ways to access the selector of an anonymous event.
docs/contracts/events.rst
Outdated
| Members of Events | ||
| ================= | ||
|
|
||
| - ``event.selector``: The signature is defined as the canonical expression of the basic prototype without data location specifier. It is the the Keccak-256 hash of the signature of the event. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this before merging.
c7bd783 to
d4c06d2
Compare
closes #12581