How do i test create collection and mint token at a time?? #438
Closed
ajaythxkur
started this conversation in
General
Replies: 1 comment
-
i fogot to call create_collection function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
fun init_module(creator: &signer){ let constructor_ref = &object::create_named_object(creator, COLLECTION_NAME); let obj_signer = &object::generate_signer(constructor_ref); move_to(obj_signer, ObjectController { app_extend_ref: object::generate_extend_ref(constructor_ref), }); } fun create_nft_collection(creator: &signer){ // This means that the supply of the token will not be tracked. let maximum_supply = 0; // This variable sets if we want to allow mutation for collection description, uri, and maximum. // Here, we are setting all of them to false, which means that we don't allow mutations to any CollectionData fields. let mutate_setting = vector<bool>[ false, false, false ]; token::create_collection( creator, utf8(COLLECTION_NAME), utf8(COLLECTION_DESCRIPTION), utf8(COLLECTION_URI), maximum_supply, mutate_setting, ); }
Beta Was this translation helpful? Give feedback.
All reactions