Skip to content

feat: scaffold types without CRUD #736

@lumtis

Description

@lumtis

Some context: #731 (comment)

Developing an application to test the IBC scaffold, I realize the starport type command is very useful because it generates all the keeper methods setter/getter, etc... but you sometimes don't want the whole CRUD messages.

And even think it will be usually the case in practice. CRUD feature is very great because it enables you to generate a functional blockchain with command lines without touching the source code but, most of the time, the types are updated from logic inside the handlers so I think it could be great to be able to generate the types without having the messages generated (I think list-foo query is still good to generate)

Two possible solutions:

  • Having this feature through an option like starport type --no-crud (or --crud and not generating the messages by default)

  • Having a new command:
    starport type crud ...
    starport type internal ... (something that makes it explicit that no message for outside interaction are generated)

Having the new namespace type would be useful if we consider implementing, in the future, other commands for types generations. Like for example, a type that is indexed by an address, which is I think a recurrent use case (balance)

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