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

Make distinction between contract methods and utility functions more general #350

Open
marcelamelara opened this issue Jan 26, 2022 · 1 comment
Labels
enhancement New feature or request wawaka Issues related to contract development with wawaka

Comments

@marcelamelara
Copy link
Member

Per thread #348 (comment), it would be helpful for future contract programming to clean up and generalize the interface for contract methods vs utility functions, as these are currently all placed in contracts/wawaka/common/contract/base.h.

@cmickeyb
Copy link
Contributor

I know this issue describes a need to improve naming of functions provided by the common contract methods for wawaka. However, I think there is a bigger issue about the right way to provide re-usable components for contracts. While building the exchange contracts I've found that there are a number of methods that get re-used. This was the genesis for the base & attestation contracts. These are "inherited" in some way into other contracts (and these are not the only examples).

Another aspect of the problem is that plugins for the methods are also shared. For example, it doesn't make sense to re-implement the "get_verifying_key" function for every plugin that might use it. With the exchange contracts I've been building a library of these methods that could be pulled into the plugins more easily.

So... I really think we need to generalize the discussion in this issue to best practices for developing and sharing re-usable contract components.

@cmickeyb cmickeyb added the wawaka Issues related to contract development with wawaka label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wawaka Issues related to contract development with wawaka
Projects
None yet
Development

No branches or pull requests

2 participants