Skip to content

Automatically calculate metadata hash from metadata URI #6

@spalladino

Description

@spalladino

Let's use the following strategy for calculating the metadata hash:

  • Get the contents of the file at the metadata URI
  • Parse them as a JSON file, and throw if it's invalid
  • Extract the following keys into a new object: name, version, description, homepage (in that order)
  • JSON-stringify the object above, respecting the order (make sure to preserve order if node's default doesn't do it yet)
  • Calculate the sha256 of it (make sure that Solidity's sha256 yields the same result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions