Skip to content
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

Support events outside of contracts #80

Closed
cburgdorf opened this issue Oct 12, 2020 · 2 comments · Fixed by #654
Closed

Support events outside of contracts #80

cburgdorf opened this issue Oct 12, 2020 · 2 comments · Fixed by #654

Comments

@cburgdorf
Copy link
Collaborator

What is wrong?

Currently, events are only allowed inside contracts like so:

contract GuestBook:
    
    event Signed:
        idx book_msg: u256

    pub whatever:
        ...

They should be supported outside of the contract, too like so:

event Signed:
    idx book_msg: u256

contract GuestBook:
    
    pub whatever:
        ...

How can it be fixed

🤖

@pipermerriam
Copy link
Member

Is the idea here that this allows two different contracts to share the same event definitions?

@cburgdorf
Copy link
Collaborator Author

Is the idea here that this allows two different contracts to share the same event definitions?

Yep, exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants