aptos-core
aptos-core copied to clipboard
[Bug] the definition of this create_finite_collection_scriptis is not correct posted in the dev tutorial's your-first-nft section
🐛 Bug
public(script) fun create_finite_collection_script(
account: signer,
description: vector<u8>,
name: vector<u8>,
uri: vector<u8>,
maximum: u64,
)
in https://github.com/aptos-labs/aptos-core/blob/main/developer-docs-site/docs/tutorials/your-first-nft.md This seems to be written wrong, it should be create_limited_collection_script .
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.
Steps to reproduce
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,
)
Expected Behavior
I hope this little problem will be changed soon to cause problems to other people。
i commit a pull request in https://github.com/aptos-labs/aptos-core/pull/2385
Thanks!