Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

feat: add methods enum #68

Closed

Conversation

joshuajbouw
Copy link
Member

While doing the tests, this made quite a bit of sense to easily get a list of available methods without actually having to look at the code itself and potentially get confused that the method names themselves should be input as strings. This makes that distinction clearer and should remove some uncertainty from users of the library.

///
/// This makes it easier to get the correct method strings to use when using
/// the library.
pub enum Methods {
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be in tests folder though. It's not going to be used in the contract itself, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Depends if people are going to use the library as well, if not, then yeah can just live in the tests but, then thats just inflating it a bit. Would users be using the contract module directly at all?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I don't think the contract would be used as a library. And we do want to avoid inflating the contract size.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense.

@artob
Copy link
Contributor

artob commented Mar 25, 2021

Closing as per the earlier conversation.

@artob artob closed this Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants