aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

Update your-first-nft.md

Open cangcang-zcr opened this issue 3 years ago • 0 comments

function create_finite_collection_script is posted incorrectly , replace it with create_limited_collection_script

Description

when i test the create_limited_collection_script, it can't sign and submit the transaction successfully.And I can hardly find a definition of this function in aptos-lab.But create_finite_collection_script replaced with create_finite_collection_script and then it signs and submit transaction normally.I think create_finite_collection_script is posted wrong. https://github.com/aptos-labs/aptos-core/blob/bfd6dba22795240d726008777723e57020b8c71c/aptos-move/framework/aptos-framework/sources/token.move#L162

Test Plan

it is definited as

 public entry fun create_limited_collection_script(
        creator: &signer,
        name: vector<u8>,
        description: vector<u8>,
        uri: vector<u8>,
        maximum: u64,
    ) acquires Collections {
        create_collection(
            creator,
            string::utf8(name),
            string::utf8(description),
            string::utf8(uri),
            option::some(maximum),
        );
    }

In https://github.com/aptos-labs/aptos-core/blob/bfd6dba22795240d726008777723e57020b8c71c/aptos-move/framework/aptos-framework/sources/token.move#L162

but in your-first-nft.md , it was incorrectly written as

public(script) fun create_finite_collection_script(
    account: signer,
    description: vector<u8>,
    name: vector<u8>,
    uri: vector<u8>,
    maximum: u64,
)

so i replace the function create_finite_collection_script with create_limited_collection_script


This change is Reviewable

cangcang-zcr avatar Jul 31 '22 06:07 cangcang-zcr