Skip to content

Support foreign objects as ABI arguments in goal app method #3205

@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 foreign object argument types account, asset, and application, as described in ARC-4.

This is related to #3226, which tracks adding transactions as arguments 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 special type or a standard ABI type. The special argument types are only valid as top-level arguments, so direct string comparison should be sufficient.
  2. If a special type is present, insert the argument value into the appropriate foreign array, and use the array index of the value as the app call argument, treated as an ABI uint8.
  3. If any additional foreign objects are specified by directly including --app-account or --foreign-* flags, continue to insert these into the appropriate foreign object array. We don't need to adhere to a specific ordering between these and method argument foreign objects, but probably putting these additional objects after the ones specified by the method arguments makes the most sense.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions