-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
feat[lang]: auto-export events in ABI #3808
feat[lang]: auto-export events in ABI #3808
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #3808 +/- ##
==========================================
- Coverage 85.08% 84.87% -0.21%
==========================================
Files 92 92
Lines 13875 13907 +32
Branches 3113 3116 +3
==========================================
- Hits 11805 11804 -1
- Misses 1576 1607 +31
- Partials 494 496 +2 ☔ View full report in Codecov by Sentry. |
- improve call graph analysis - called_functions and reachable_internal_functions start out as None - move analyze_call_graph into standalone function instead of method - tinker with _add_exposed_function to ensure we have all exposed functions by the time we get to ImplementsDecl
rely on analysis, not declared events
change the event member names in the builtin interfaces
rename a test file
This reverts commit 0747a5c.
b2ba9e6
to
dde7d81
Compare
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.
Name collisions with imported events are performed based on used_events
, thus NamespaceCollision
isn't thrown in the cases like the following one:
# ITest
event Foo:
a: uint256
import ITest
implements: ITest
event Foo:
a: address
@external
def foo(u: uint256):
log Foo(empty(address))
#log ITest.Foo(u)
Testing with an attribute access to i
throws IndexError: list index out of range
:
import ITest
implements: ITest
event Foo:
a: address
@external
def foo(u: uint256):
log Foo(empty(address))
log i.Foo(empty(address)
this is intended, it's an attempt to reduce namespace pollution (instead of just exporting all events found in all imports) the other option is just to export all events in all imports, but that leads to some weird interactions with the namespace, e.g. you
weird, will investigate |
after investigating the parser issue i think it's an unrelated, latent error. it should be fixed, but reviewed in a separate PR |
What I did
depends #3786
after this, the standard token demo looks like this:
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture