difftreelog
Update acceptance doc - module name
in: master
1 file changed
doc/demo_milestone1-2.mddiffbeforeafterboth123Execute extrinsic `nft`.`createItem` from ALICE account. Set properties to `0x01`. Now if you read the chain state `nft`.`balance(<Collection ID>, ALICE)`, it will be equal to 1. Also, you can read chain state `nft`.`itemList(<Collection ID>, 1)`, and it will return data for the token 1:123Execute extrinsic `nft`.`createItem` from ALICE account. Set properties to `0x01`. Now if you read the chain state `nft`.`balance(<Collection ID>, ALICE)`, it will be equal to 1. Also, you can read chain state `nft`.`itemList(<Collection ID>, 1)`, and it will return data for the token 1:124124125```125```126templateModule.itemList: NftItemType126nft.itemList: NftItemType127{127{128 Collection: 1,128 Collection: 1,129 Owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,129 Owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,134#### GetOwner134#### GetOwner135Reading the ownership is done by reading chainstate `nft`.`itemList(<Collection ID>, 1)`. One of the returned fields is Owner:135Reading the ownership is done by reading chainstate `nft`.`itemList(<Collection ID>, 1)`. One of the returned fields is Owner:136```136```137templateModule.itemList: NftItemType137nft.itemList: NftItemType138{138{139 Collection: 1,139 Collection: 1,140 Owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,140 Owner: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,145#### Transfer145#### Transfer146Execute `nft`.`transfer` from ALICE address to transfer token 1 to BOB and check the ownership again:146Execute `nft`.`transfer` from ALICE address to transfer token 1 to BOB and check the ownership again:147```147```148templateModule.itemList: NftItemType148nft.itemList: NftItemType149{149{150 Collection: 1,150 Collection: 1,151 Owner: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty,151 Owner: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty,159159160Read the chain state `nft`.`balance` for ALICE address and see that she owns 1 token:160Read the chain state `nft`.`balance` for ALICE address and see that she owns 1 token:161```161```162templateModule.balance: u64162nft.balance: u6416311631164```164```165165166#### AddCollectionAdmin166#### AddCollectionAdmin167Execute `nft`.`AddCollectionAdmin` from ALICE account and let CHARLIE be an admin. Now you can see that CHARLIE can transfer ALICE's token from ALICE's account to EVE and back. Also, you can read admin list from chain state and see that it is not empty:167Execute `nft`.`AddCollectionAdmin` from ALICE account and let CHARLIE be an admin. Now you can see that CHARLIE can transfer ALICE's token from ALICE's account to EVE and back. Also, you can read admin list from chain state and see that it is not empty:168168169```169```170templateModule.adminList: Vec<AccountId>170nft.adminList: Vec<AccountId>171[171[172 5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y172 5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y173]173]177Execute `nft`.`RemoveCollectionAdmin` from ALICE account to remove CHARLIE from admins. Now you can see that CHARLIE cannot transfer ALICE's tokens anymore. If you read the chan state `nft`.`adminList`, the response will be empty:177Execute `nft`.`RemoveCollectionAdmin` from ALICE account to remove CHARLIE from admins. Now you can see that CHARLIE cannot transfer ALICE's tokens anymore. If you read the chan state `nft`.`adminList`, the response will be empty:178178179```179```180templateModule.adminList: Vec<AccountId>180nft.adminList: Vec<AccountId>181[]181[]182```182```183183184#### BurnItem184#### BurnItem185Execute `nft`.`burnItem` from ALICE account to burn token 1, and then read the chain state `nft`.`itemList(<Collection ID>, 1)`. This time the chain state returns default values in fields because token does not exist anymore. You can also check ALICE balance in chain state, now it is equal 0 again.185Execute `nft`.`burnItem` from ALICE account to burn token 1, and then read the chain state `nft`.`itemList(<Collection ID>, 1)`. This time the chain state returns default values in fields because token does not exist anymore. You can also check ALICE balance in chain state, now it is equal 0 again.186```186```187templateModule.itemList: NftItemType187nft.itemList: NftItemType188{188{189 Collection: 0,189 Collection: 0,190 Owner: 5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM,190 Owner: 5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM,