Skip to content

Metadata parameters validation bypass in FA’s mutate_metadata function #331

Description

@supra-yoga

Description

The fungible asset module implements metadata parameter validations during initial creation through the add_fungibility function. These validations enforce important constraints like MAX_NAME_LENGTH (32), MAX_SYMBOL_LENGTH (10), MAX_DECIMALS (32), and MAX_URI_LENGTH (512). However, the mutate_metadata function, which can modify these parameters post-creation, lacks these validation checks.

This could cause display issues in wallets and explorers due to excessive lengths in names, symbols, and URIs, while decimal modifications beyond MAX_DECIMALS might lead to inconsistent token displays.

Recommendation

Add validation checks in the mutate_metadata function that match exactly with those in add_fungibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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