We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Allow a library, or a contract, to emit an event declared in a interface using the following syntax
emit I.EventName();
Since 0.8.20, if a libraries emits an event, the contract that uses the library should include the event in its ABI
#10996 includes the following test:
library L { event e1(uint b); } function f() { emit L.e1(5); } contract C /* is L ? */ { event e1(uint indexed a); function g() public { f(); } }
However, one may want to use events from an interface rather then defining them in a library
interface I { event e1(uint b); } library L { function f() internal { emit I.e1(5); } } contract C { event e1(uint indexed a); function g() public { L.f(); } }
Unfortunatelly, this is not accepted:
TypeError: Member "e1" not found or not visible after argument-dependent lookup in type(contract I). | emit I.e1(5); | ^^^^
I don't see any backward compatibility issue.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Abstract
Allow a library, or a contract, to emit an event declared in a interface using the following syntax
Motivation
Since 0.8.20, if a libraries emits an event, the contract that uses the library should include the event in its ABI
#10996 includes the following test:
However, one may want to use events from an interface rather then defining them in a library
Unfortunatelly, this is not accepted:
Backwards Compatibility
I don't see any backward compatibility issue.
The text was updated successfully, but these errors were encountered: