Skip to content

Conversation

qalisander
Copy link
Contributor

Description

Usage of typed log function separated from vm() api seems a bit quirky for end users.
This pr adds possibility to write as below:

self.vm().log(Transfer { from, to, token_id });

Since Host trait should be dyn compatible, any use of generically typed functions or supertrait's functions is impossible. Unless we auto-implement logging-dedicated trait for every T: Host type.

Checklist

  • I have documented these changes where necessary.
  • I have read the DCO and ensured that these changes comply.
  • I assign this work under its open source licensing.

@qalisander qalisander marked this pull request as ready for review September 24, 2025 08:55
@qalisander qalisander changed the title Convenient logging api feat: convenient vm() logging api Sep 24, 2025
@gligneul
Copy link
Contributor

@qalisander, there are some CI fails. Could you take a look?

@qalisander
Copy link
Contributor Author

@gligneul Done. Just missing imports

Copy link
Contributor

@gligneul gligneul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great

@gligneul gligneul merged commit b600b2a into OffchainLabs:main Sep 24, 2025
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants