-
Notifications
You must be signed in to change notification settings - Fork 20
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(zink-codegen): introduce derive macro for events #298
Conversation
@clearloop seems like log does not exist |
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.
Sorry for the late! was busy these days, almost finished! your new tests are totally correct!
at the current stage, you now need to handle the log function in the visitor, see https://github.com/zink-lang/zink/blob/main/codegen/src/visitor/log.rs#L62
If you need more details or have specific questions, free feel to pin me in the telegram group! In case this issue is a bit harder than the previous, just updated the bounty to large level!
|
|
|
like this |
quite similar to what i did first, made the tests fail |
it sorts normally: |
looks closed! now you can decode this output to see what exactly the log is!
|
see my fix here: malik672/zink@sync...zink-lang:zink:cl/sync |
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.
Everything works now!
Now we need to wrap these log functions into our proc-macro
for the event abi part, let's handle it in a separated PR (#299), since it modifies logic in compiler
need to generate sugar functions in our proc-macro, the implementation till 583dbe2 makes sure our deep logic are working now, so the last thing is wrap them in proc-macro |
@clearloop might need your help here |
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.
Instead of quote!
, construct the functions with the ImplItemType could make things more dynamic
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.
Thanks for contributing on this issue! however, I can not send you the full bounty because I solved the issue instead finally XD, it's unfair to other contributors who solve tricky issues independently, hope you can understand!
Apart from that, thank you again for spending time on digging the feature! see the transaction 🎁 : https://polygonscan.com/tx/0x1b588cab3bdb014fe247acf4c06f825515af6b8ee4c1df1c505de220f7af39b1
Resolves #255
0x30bE4D758d86cfb1Ae74Ae698f2CF4BA7dC8d693