Skip to content

Help:How to use metadata types to replace custom types? #6163

@0xverin

Description

@0xverin

For example:
In the custom types (definitions.ts file), I defined HeimaIdentity, but there is a CorePrimitivesIdentity in the metadata that is identical to this type.

When I replace HeimaIdentity in the definitions.ts with CorePrimitivesIdentity, the generated types do not include CorePrimitivesIdentity(can't find name error). I have to manually add import { CorePrimitivesIdentity } from "@polkadot/types/lookup".

Is there a way to resolve this issue and directly use the types generated from the metadata without custom definitions? Manually importing this is not a good solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions