Skip to content

Subgraph name should be unique with limit of 32 chars #185

@0xsarvesh

Description

@0xsarvesh

subgraph name has restriction of 32 chars after / character. Current implementation does substring of contract address to fit in size(Refer link). This logic doesn't guarantee the uniqueness in subgraph name.

https://github.com/mosaicdao/mosaic-chains/blob/cc36441350dac99c5225d8e0cf9db25b90bdbedf/src/Graph/SubGraph.ts#L178

One of the approach is to use a hashing function which takes 40bytes contract address as input and returns 16 bytes hash which could be used for subgraph name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions