Skip to content

Handle protocol contract commands dynamically #202

@aiman

Description

@aiman

When a Click group represents a protocol contract, where all the commands in the group are simply smart contract function calls, it should not be necessary to write the commands by hand.

This is because the number of arguments, and their ABI type, is known at run-time, and so user-supplied options and arguments can be parsed dynamically, and a suitable transaction object can be created from that.

This would reduce a large amount of repetitive code, which in the absence of strong tests, makes large-scale refactoring very error-prone.

It may be useful to consider a custom Click Group: Extending Click — Custom Groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions