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

Add cargo contract deploy command #962

Open
HCastano opened this issue Feb 8, 2023 · 1 comment
Open

Add cargo contract deploy command #962

HCastano opened this issue Feb 8, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers OpenZeppelin

Comments

@HCastano
Copy link
Contributor

HCastano commented Feb 8, 2023

I often find myself scripting something along the lines of:

cargo contract build --manifest-path flipper/Cargo.toml
cargo contract instantiate --constructor new \
    --suri //Alice --salt $(date +%s) \
    --manifest-path flipper/Cargo.toml

We should add a deploy subcommand which is able to do both of these steps (and possible
more if we think of anything else) in one go.

cargo contract deploy --manifest-path flipper/Cargo.toml

The main motivation here is that we should make common development workflows as easy as
possible to do from within cargo-contract, instead of having developers make their own
wrappers.

There may be other subcommand we want to streamline, but this seems like low-hanging
fruit.

@HCastano HCastano added enhancement New feature or request good first issue Good for newcomers labels Feb 8, 2023
@ascjones
Copy link
Collaborator

One issue to decide with this is how to deal with all the build options. We can either

  1. Accept all the arguments of both build and instantiate to the deploy command, though there may be some clashes e.g. --manifest-path.
  2. Restrict the arguments allowed for build i.e. can only specify --release or --debug, all other options are default or inherited (in the case of --manifest-path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers OpenZeppelin
Projects
None yet
Development

No branches or pull requests

3 participants