- 
                Notifications
    You must be signed in to change notification settings 
- Fork 570
Closed
Description
Create a command for Starport to scaffold an indexed type.
The current type command creates a quantitative type indexed by an auto-incremented id but many use cases require a type that is indexed by a specific index (address in many cases for example).
The command would look like:
starport indexed-type <name> <field1> ... [--module ...] [--no-setter]
The type is always indexed by a string to have something generic.
Txs are scaffolded:
appd tx foo set-bar <index> <value1> ...
appd tx foo delete-bar <index>
Queries:
appd q foo get-bar <index>
The same as --no-crud planned for the type command, --no-setter would skip generating the txs to set a value from messages (could be called --no-crud as well for consistency but here Create and Edit are the same)
At the keeper level, methods generated are:
SetBar()
GetBar()
RemoveBar()
IterateBar()
Metadata
Metadata
Assignees
Labels
No labels