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

Implement Command naming convention #12

Open
aslesarenko opened this issue Jan 16, 2020 · 0 comments
Open

Implement Command naming convention #12

aslesarenko opened this issue Jan 16, 2020 · 0 comments

Comments

@aslesarenko
Copy link
Member

Problem

ErgoTool is supposed to be compiled using native-image, which impose some limitations on architecture. In particular new commands cannot be implemented as dynamically loaded plugins.
Thus in a long term we will end up having a lot of command supporting different application domain.
It will be hard to come up with simple and clear names of the commands.

Solution

All commands can be grouped into namespaces, one namespace for each application domain.
Command names can optionally have namespace prefix followed by command name.

Examples with prefixes: dex:NewToken, dex:SellOrder.

Examples without prefixes: mnemonic, send, etc.

ErgoTool object should become a dispatcher between app-specific command processors (new trait CommandProcessor should be created)
The parser can extract application prefix and create the corresponding processor.
The subsequent parsing and processing should be delegated to the processor.

@greenhat greenhat mentioned this issue Jan 19, 2020
1 task
greenhat added a commit that referenced this issue Jan 20, 2020
This was referenced Jan 22, 2020
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

No branches or pull requests

1 participant