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

Support unsigned transactions as ABI arguments in goal app method #3226

Closed
jasonpaulos opened this issue Nov 17, 2021 · 0 comments · Fixed by #3233
Closed

Support unsigned transactions as ABI arguments in goal app method #3226

jasonpaulos opened this issue Nov 17, 2021 · 0 comments · Fixed by #3233

Comments

@jasonpaulos
Copy link
Contributor

jasonpaulos commented Nov 17, 2021

Summary

This is a follow up to #3088, which added the goal app method subcommand for invoking ABI methods.

In addition to standard ABI type arguments, the subcommand should support the special transaction argument types txn, pay, keyreg, acfg, axfer, afrz, and appl, as described in ARC-4.

This is related to #3205, which tracks adding foreign type support (i.e. account, asset, application types) to goal app method.

Scope

Extend the goal app method subcommand to support these new method argument types. At a high level it should:

  1. Recognize when an argument is a transaction type or a standard ABI type. The transaction argument types are only valid as top-level arguments, so direct string comparison should be sufficient.
  2. Load all transaction arguments. The syntax should probably be --arg path/to/unsigned/txn/file.msgp, so the subcommand needs load the transaction from a file and decode it.
  3. Encode all non-transaction arguments as if the transaction arguments were not present.
  4. If transaction arguments are present, create an atomic transaction group and place the transactions arguments before the final app call transaction. Calculate and assign a group ID to all transactions.
  5. Open question: how can the transaction arguments be signed? Perhaps if the private key of every sender is known to the wallet, they can be signed automatically and submitted, and otherwise only an unsigned (or partially signed) group can be output from this command?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant