Skip to content

Explore index and index_assign for StorageMap and other dynamic storage types #4437

@mohammadfawaz

Description

@mohammadfawaz

#4331 and #4334 attempt to introduce index and index_assign to StoargeMap and StorageVec respectively. These methods are then called by the compiler when [] is used to support syntax like storage.map[a] = b.

As we're not sure how to go about supporting [] for arbitrary types just yet, I've closed those PRs. They do contain important code though for future reference, particularly code that de-sugars [] to calls to index or index_assign.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lib: stdStandard library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions