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

Design for creating and combining multiple operations via CLI #1566

Closed
willemneal opened this issue Aug 27, 2024 · 4 comments · Fixed by #1663
Closed

Design for creating and combining multiple operations via CLI #1566

willemneal opened this issue Aug 27, 2024 · 4 comments · Fixed by #1663
Assignees

Comments

@willemneal
Copy link
Member

Currently we are adding the ability to create operations transactions here: #1437

This adds a new tx new subcommand. Then each operation is a subcommand of this: e.g.

stellar tx new create-account --destination G... --starting-balance 10000

By default this will sign and submit the transaction, but does also accept --build-only to return the built transaction.

So to be able to add multiple operations into one transaction we would add a tx add subcommand. This would take a transaction envelope as input via stdin and then has the same interface as new, but in this case would add the operation to the passed in transaction. e.g.

stellar tx new --build-only create-account --destination G... --starting-balance 10000 | 
stellar tx add payment --source <key corresponding to the first> --amount 1000 --destination G..
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Aug 27, 2024
@leighmcculloch
Copy link
Member

leighmcculloch commented Aug 27, 2024

I think we should change tx add to tx add-operation / tx add-op so it is clear what's being added.

In the future we may want sub-commands for adding other things, like add-signature.

This seems like a nice idea to me, but I'm not sure what the priority is as it seems like it would be usable only by some very advanced use cases, and folks can always use Stellar SDKs for advanced use cases.

@willemneal
Copy link
Member Author

I think it's definitely useful for creating accounts since the generate can't fund on mainnet. And for payments (which yes can also be done via the SAC). Also I think set options could be useful. In general I think it is good for education and just being in alignment with the other tooling. The priority was that we made general transaction creation an OKR.

@leighmcculloch
Copy link
Member

Agreed, but that goal can be served without supporting sponsorship specifically, and without supporting multi-operation transactions. Do we specifically need those?

@janewang
Copy link
Contributor

A multi-operation transaction is a neat feature that we could work on in the future. For this quarter, I think being able to add classic ops is already a great win.

@janewang janewang moved this from Backlog (Not Ready) to Backlog (Ready for Design) in DevX Sep 24, 2024
@janewang janewang changed the title Design for creating and combining operations via CLI Design for creating and combining multiple operations via CLI Oct 1, 2024
@sagpatil sagpatil linked a pull request Nov 26, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants