-
Notifications
You must be signed in to change notification settings - Fork 79
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
ocean.py handling of datatoken templates is error-prone and hard to extend #1315
Comments
I just realized that the merged commit solves the first bullet issue (current setup is messy), but only partially the second bullet (naming). Here's the second bullet in full :
The label "Datatoken" and "Datatoken" enterprise are still problematic. Here's another way to illustrate the problem: imagine if we wanted to add another template. Its labeling compared to the others would be super confusing. Proposed solution: have classes "Datatoken1" and "Datatoken2" for templates 1 and 2 respectively. I'm an re-opening this in order to solve this. |
@trentmc I do not think this is the most fortunate naming. It can be easily typoed and badly autocompleted. Do you have any other suggestions? I would add something like DatatokenSimple vs. DatatokenEnterprise. Not necessarily these ones, but clearer labels instead of numbers. |
I'm open to exploring other names. First, let's refresh on differences between template 1 and 2:
Also, let's consider possible new templates (that we could realistically see within the next 6-12 mos):
Candidates for template 1:
Candidates for template 2:
And then we'd also need to come up with potential names for:
Some analyses of names:
Here's my recommendation:
|
Background / motivation
This issue was partly spurred by discussion in PR 1304, but also something that's been brewing for a while in my head:)
Here are the problems:
Here's another way to illustrate the problem: imagine if we wanted to add another template. It would be super-messy, because of all the weird relations above. (And, there's a very high chance we do want to add templates, probably in the next 6 months. So this is a real challenge.)
This issue is not urgent to solve, though it is important. And it will become urgent if we want to add another template.
Towards a solution
There's a better way:
TODOs
Appendix / Notes
I recognize that the smart contracts themselves are named similarly confusingly: ERC20Template.sol and "ERC20TemplateEnterprise.sol". That's harder to change given that these are deployed immutably. I do recommend that future templates get named "ERC20Template3.sol", "ERC20Template4.sol", etc.
The text was updated successfully, but these errors were encountered: