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

Improve the declaration of events #255

Closed
clearloop opened this issue Oct 30, 2024 · 3 comments · Fixed by #298
Closed

Improve the declaration of events #255

clearloop opened this issue Oct 30, 2024 · 3 comments · Fixed by #298
Assignees
Labels
budget-$150 Payable large onboarding issues

Comments

@clearloop
Copy link
Member

clearloop commented Oct 30, 2024

Describe the feature

we currently only have a baseline event implementation, gather events as an enum, rich and dynamic log{1,2,3,4}

Solution

#[derive(Event)]
enum Event {
  Transfer { from: Address, to: Address, value: U256 },
}

ABIs are also required

@clearloop clearloop added budget-$50 Payable small onboarding issues budget-$100 Payable medium onboarding issues and removed budget-$50 Payable small onboarding issues labels Nov 26, 2024
@malik672
Copy link
Contributor

@clearloop assign me

@malik672
Copy link
Contributor

@clearloop i don't really get this, are events not based on the contract

@clearloop
Copy link
Member Author

clearloop commented Nov 26, 2024

@clearloop i don't really get this, are events not based on the contract

Oh sorry, we haven't had the contract namespace yet, so an Event derive macro is enough!

For what you are confused about, the answer is partially yes but not useful... with the benefits of rust module system we can import events from other zink contracts ^ ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
budget-$150 Payable large onboarding issues
Projects
Status: Done
2 participants