-
Notifications
You must be signed in to change notification settings - Fork 36
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
Contract templates and contract new from template using sc-meta #342
Conversation
sub.add_argument("--template", required=True, help="the template to use") | ||
sub.add_argument("--directory", type=str, default=os.getcwd(), | ||
help="🗀 the parent directory of the project (default: current directory)") | ||
sub.add_argument("--tag", help="the framework version on which the contract should be created") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe specify the version that will be used in case that the flag is not set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That version is somehow out of mxpy
's control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I was trying to figure out if there is a simple way to do that, but I think it's to much work for what it adds.
sub.set_defaults(func=create) | ||
|
||
sub = cli_shared.add_command_subparser(subparsers, "contract", "templates", | ||
"List the available Smart Contract templates.") | ||
sub.add_argument("--tag", help="the sc-meta framework version referred to") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify the default value
From now on,
mxpy
will usesc-meta
for displaying the available contract templates and for creating a new contract using the available templates.This PR contains a few breaking changes:
For the
mxpy contract new
command:name
argument is no longer a positional argument, should be used as a keyword argument:--name
--directory
argument is no longer existent,--path
should be used instead--tag
. It is used to specify the framework version on which the contract should be createdFor the
mxpy templates
command:--tag
argument has been added. It is used to specify thesc-meta
framework version referred to