Skip to content

chores: reorg events into its own interface file#105

Open
petrovska-petro wants to merge 4 commits intomainfrom
feat/events-refactor
Open

chores: reorg events into its own interface file#105
petrovska-petro wants to merge 4 commits intomainfrom
feat/events-refactor

Conversation

@petrovska-petro
Copy link
Collaborator

closes #77

Copy link
Contributor

@gosuto-inzasheru gosuto-inzasheru left a comment

Choose a reason for hiding this comment

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

is this a common approach?

why not do the same as the errors, and have an libraries/Events.sol?

im confused because the interface file this now creates does not actually provide a full interface to the vmodule (or factory), and is thus unusable for an external project trying to use those interface files for example

@petrovska-petro
Copy link
Collaborator Author

is this a common approach?

why not do the same as the errors, and have an libraries/Events.sol?

im confused because the interface file this now creates does not actually provide a full interface to the vmodule (or factory), and is thus unusable for an external project trying to use those interface files for example

it is used in some of the codebases that i personally find the cleanest; file organisation wise. but it is a way of many

missed pushing before the methods before as it creates errs that i need to look further, but i agree that generally the should include the methods as well so they're reusable

then, we could use as well /// @inheritdoc X natspec, which will copy the tags from the base contract, but somehow i still find valuable to have the comments in line w/ the function definition, even tho if we'd like to reduce even more the lines on the core contract, we could indeed use /// @inheritdoc X

see

@petrovska-petro
Copy link
Collaborator Author

why not do the same as the errors, and have an libraries/Events.sol?

it could be perfectly an abstract contract, but i think the interface approach is best bang for your buck, since it can encapsulate the events + methods, and also if we'd like to go a mile further could move all natspec there and inherit

on the side of verification things, im not sure how it may affect tbh, smth to try out, but i imagine should not present a problem

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.

style: move all events into a (separate) library?

2 participants