Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

name and description type in collections are wrong #887

@antiCoderX

Description

@antiCoderX

Url

https://aptos.dev/en/build/smart-contracts/digital-asset

Describe the content issue

All the strings used as name and description during creating a collection should be changed from raw string to string::utf8(b""). For example,

use std::option::{Self, Option};
 
public entry fun create_collection(creator: &signer) {
    let royalty = option::none();
    let collection_constructor_ref = &collection::create_unlimited_collection(
        creator,
-       "My Collection Description",
+       string::utf8(b"My Collection Description"),
-       "My Collection",
+      string::utf8(b"My Collection"),
        royalty,
        "https://mycollection.com",
    );
    let mutator_ref = collection::get_mutator_ref(collection_constructor_ref);
    // Store the mutator ref somewhere safe
}

Section

move-and-smart-contracts

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmove-and-smart-contractsAll content under https://aptos.dev/en/build/smart-contracts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions