Skip to content

SNIP-12 can't create a merkletree of enums #1362

@sgc-code

Description

@sgc-code

Describe the bug
Regarding SNIP-12.
It doesn't seem to be possible to create a merktree of enum

To Reproduce
I'm not sure what would be the correct types, but i tried these two approaches with no luck

{
  StarknetDomain: [ ... ],
  Object: [{ name: "tree", type: "merkletree", contains: "MyEnum" }],
  MyEnum: [{ name: "Variant 1", type: "()" }]
}
{
  StarknetDomain: [ ... ],
  Object: [{ name: "tree", type: "merkletree", contains: "enum" }],
  MyEnum: [{ name: "Variant 1", type: "()" }]
}

Expected behavior
There should be a way to create a merkle tree of any type, including enums

Screenshots

Desktop (please complete the following information):

Node version: 18
Starknet.js version: v6.23.1 (latest)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions