Skip to content

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

@jasonpaulos

Description

@jasonpaulos

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions