Skip to content

Research and implement new layout metadata format #767

@cmichi

Description

@cmichi

Blocker for use-ink/cargo-contract#101.

I'm just copy/pasting from the discussion there:

The current metadata format cannot represent some more or less common scenarios and really needs some restructuring. When I tried some weeks ago I immediately hit a wall for recursive data structures.

We first have to define semantics, definitions and structures for a new and better layout metadata section before we should tackle this issue. We have to think about cases like:

  • recursively defined data structures such as enum Tree { Leaf(i32), Node(Box<Tree>, Box<Tree>) } or in case of ink_storage: ink_storage::Vec<ink_storage::Vec<i32>>, packed elements where some elements actually have some further pointers Pack<(i32, ink_storage::Box<i32>) and more.

Maybe we have to restrict the final metadata to not support certain use cases because their metadata format would become too complex otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ink_metadata[ink_metadata] Work itemB-designDesigning a new component, interface or functionality.B-researchResearch task that has open questions that need to be resolved.C-discussionAn issue for discussion for a given topic.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions