git.delta.rocks / unique-network / refs/commits / c311337f0c46

difftreelog

Add data fields for limited owners control

Greg Zaitsev2021-02-09parent: #563ceaa.patch.diff
in: master

2 files changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -185,6 +185,8 @@
 
     // Timeouts for item types in passed blocks
     pub sponsor_transfer_timeout: u32,
+    pub owner_can_transfer: bool,
+    pub owner_can_destroy: bool,
 }
 
 impl Default for CollectionLimits {
@@ -193,7 +195,10 @@
             account_token_ownership_limit: 10_000_000, 
             token_limit: u32::max_value(),
             sponsored_data_size: u32::max_value(), 
-            sponsor_transfer_timeout: 14400 }
+            sponsor_transfer_timeout: 14400,
+            owner_can_transfer: true,
+            owner_can_destroy: true
+        }
     }
 }
 
@@ -590,7 +595,7 @@
                 sponsor_confirmed: false,
                 variable_on_chain_schema: Vec::new(),
                 const_on_chain_schema: Vec::new(),
-                limits: CollectionLimits::default(),
+                limits: CollectionLimits::default()
             };
 
             // Add new collection to map
modifiedruntime_types.jsondiffbeforeafterboth
117 "AccountTokenOwnershipLimit": "u32",117 "AccountTokenOwnershipLimit": "u32",
118 "SponsoredMintSize": "u32",118 "SponsoredMintSize": "u32",
119 "TokenLimit": "u32",119 "TokenLimit": "u32",
120 "SponsorTimeout": "u32"120 "SponsorTimeout": "u32",
121 "OwnerCanTransfer": "bool",
122 "OwnerCanDestroy": "bool"
121 },123 },
122 "AccountInfo": "AccountInfoWithProviders",124 "AccountInfo": "AccountInfoWithProviders",
123 "AccountInfoWithProviders": {125 "AccountInfoWithProviders": {