difftreelog
chore fix code review
in: master
20 files changed
Cargo.lockdiffbeforeafterboth124731247312474[[package]]12474[[package]]12475name = "up-common"12475name = "up-common"12476version = "0.9.25"12476version = "0.9.27"12477dependencies = [12477dependencies = [12478 "fp-rpc",12478 "fp-rpc",12479 "frame-support",12479 "frame-support",pallets/common/CHANGELOG.mddiffbeforeafterboth5## [0.1.6] - 2022-08-165## [0.1.6] - 2022-08-16667### Added7### Added8- New Ethereum API methods: changeOwner, changeOwnerSubstrate and verifyOwnerOrAdminSubstrate.8- New Ethereum API methods: changeOwner, changeOwner(Substrate) and verifyOwnerOrAdmin(Substrate).9910<!-- bureaucrate goes here -->10<!-- bureaucrate goes here -->11## [v0.1.5] 2022-08-1611## [v0.1.5] 2022-08-16pallets/common/src/erc.rsdiffbeforeafterboth420 ///420 ///421 /// @param user account to verify421 /// @param user account to verify422 /// @return "true" if account is the owner or admin422 /// @return "true" if account is the owner or admin423 #[solidity(rename_selector = "verifyOwnerOrAdmin")]423 fn verify_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {424 fn verify_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {424 let user = convert_substrate_address_to_cross_account_id::<T>(user);425 let user = convert_substrate_address_to_cross_account_id::<T>(user);425 Ok(self426 Ok(self455 ///456 ///456 /// @dev Owner can be changed only by current owner457 /// @dev Owner can be changed only by current owner457 /// @param newOwner new owner substrate account458 /// @param newOwner new owner substrate account459 #[solidity(rename_selector = "changeOwner")]458 fn change_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {460 fn change_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {459 let caller = T::CrossAccountId::from_eth(caller);461 let caller = T::CrossAccountId::from_eth(caller);460 let new_owner = convert_substrate_address_to_cross_account_id::<T>(new_owner);462 let new_owner = convert_substrate_address_to_cross_account_id::<T>(new_owner);pallets/common/src/lib.rsdiffbeforeafterboth204204205 /// Save collection to storage.205 /// Save collection to storage.206 pub fn save(&self) -> DispatchResult {206 pub fn save(&self) -> DispatchResult {207 <CollectionById<T>>::insert(self.id, self.collection.clone());207 <CollectionById<T>>::insert(self.id, &self.collection);208 Ok(())208 Ok(())209 }209 }210210pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth31 );31 );32}32}3334// Selector: 07f76b0c35contract Collection is Dummy, ERC165 {36 // Set collection property.37 //38 // @param key Property key.39 // @param value Propery value.40 //41 // Selector: setCollectionProperty(string,bytes) 2f073f6642 function setCollectionProperty(string memory key, bytes memory value)43 public44 {45 require(false, stub_error);46 key;47 value;48 dummy = 0;49 }5051 // Delete collection property.52 //53 // @param key Property key.54 //55 // Selector: deleteCollectionProperty(string) 7b7debce56 function deleteCollectionProperty(string memory key) public {57 require(false, stub_error);58 key;59 dummy = 0;60 }6162 // Get collection property.63 //64 // @dev Throws error if key not found.65 //66 // @param key Property key.67 // @return bytes The property corresponding to the key.68 //69 // Selector: collectionProperty(string) cf24fd6d70 function collectionProperty(string memory key)71 public72 view73 returns (bytes memory)74 {75 require(false, stub_error);76 key;77 dummy;78 return hex"";79 }8081 // Set the sponsor of the collection.82 //83 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.84 //85 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.86 //87 // Selector: setCollectionSponsor(address) 7623402e88 function setCollectionSponsor(address sponsor) public {89 require(false, stub_error);90 sponsor;91 dummy = 0;92 }9394 // Collection sponsorship confirmation.95 //96 // @dev After setting the sponsor for the collection, it must be confirmed with this function.97 //98 // Selector: confirmCollectionSponsorship() 3c50e97a99 function confirmCollectionSponsorship() public {100 require(false, stub_error);101 dummy = 0;102 }103104 // Set limits for the collection.105 // @dev Throws error if limit not found.106 // @param limit Name of the limit. Valid names:107 // "accountTokenOwnershipLimit",108 // "sponsoredDataSize",109 // "sponsoredDataRateLimit",110 // "tokenLimit",111 // "sponsorTransferTimeout",112 // "sponsorApproveTimeout"113 // @param value Value of the limit.114 //115 // Selector: setCollectionLimit(string,uint32) 6a3841db116 function setCollectionLimit(string memory limit, uint32 value) public {117 require(false, stub_error);118 limit;119 value;120 dummy = 0;121 }122123 // Set limits for the collection.124 // @dev Throws error if limit not found.125 // @param limit Name of the limit. Valid names:126 // "ownerCanTransfer",127 // "ownerCanDestroy",128 // "transfersEnabled"129 // @param value Value of the limit.130 //131 // Selector: setCollectionLimit(string,bool) 993b7fba132 function setCollectionLimit(string memory limit, bool value) public {133 require(false, stub_error);134 limit;135 value;136 dummy = 0;137 }138139 // Get contract address.140 //141 // Selector: contractAddress() f6b4dfb4142 function contractAddress() public view returns (address) {143 require(false, stub_error);144 dummy;145 return 0x0000000000000000000000000000000000000000;146 }147148 // Add collection admin by substrate address.149 // @param new_admin Substrate administrator address.150 //151 // Selector: addCollectionAdminSubstrate(uint256) 5730062b152 function addCollectionAdminSubstrate(uint256 newAdmin) public {153 require(false, stub_error);154 newAdmin;155 dummy = 0;156 }157158 // Remove collection admin by substrate address.159 // @param admin Substrate administrator address.160 //161 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9162 function removeCollectionAdminSubstrate(uint256 admin) public {163 require(false, stub_error);164 admin;165 dummy = 0;166 }167168 // Add collection admin.169 // @param new_admin Address of the added administrator.170 //171 // Selector: addCollectionAdmin(address) 92e462c7172 function addCollectionAdmin(address newAdmin) public {173 require(false, stub_error);174 newAdmin;175 dummy = 0;176 }177178 // Remove collection admin.179 //180 // @param new_admin Address of the removed administrator.181 //182 // Selector: removeCollectionAdmin(address) fafd7b42183 function removeCollectionAdmin(address admin) public {184 require(false, stub_error);185 admin;186 dummy = 0;187 }188189 // Toggle accessibility of collection nesting.190 //191 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'192 //193 // Selector: setCollectionNesting(bool) 112d4586194 function setCollectionNesting(bool enable) public {195 require(false, stub_error);196 enable;197 dummy = 0;198 }199200 // Toggle accessibility of collection nesting.201 //202 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'203 // @param collections Addresses of collections that will be available for nesting.204 //205 // Selector: setCollectionNesting(bool,address[]) 64872396206 function setCollectionNesting(bool enable, address[] memory collections)207 public208 {209 require(false, stub_error);210 enable;211 collections;212 dummy = 0;213 }214215 // Set the collection access method.216 // @param mode Access mode217 // 0 for Normal218 // 1 for AllowList219 //220 // Selector: setCollectionAccess(uint8) 41835d4c221 function setCollectionAccess(uint8 mode) public {222 require(false, stub_error);223 mode;224 dummy = 0;225 }226227 // Add the user to the allowed list.228 //229 // @param user Address of a trusted user.230 //231 // Selector: addToCollectionAllowList(address) 67844fe6232 function addToCollectionAllowList(address user) public {233 require(false, stub_error);234 user;235 dummy = 0;236 }237238 // Remove the user from the allowed list.239 //240 // @param user Address of a removed user.241 //242 // Selector: removeFromCollectionAllowList(address) 85c51acb243 function removeFromCollectionAllowList(address user) public {244 require(false, stub_error);245 user;246 dummy = 0;247 }248249 // Switch permission for minting.250 //251 // @param mode Enable if "true".252 //253 // Selector: setCollectionMintMode(bool) 00018e84254 function setCollectionMintMode(bool mode) public {255 require(false, stub_error);256 mode;257 dummy = 0;258 }259260 // Check that account is the owner or admin of the collection261 //262 // @param user account to verify263 // @return "true" if account is the owner or admin264 //265 // Selector: verifyOwnerOrAdmin(address) c2282493266 function verifyOwnerOrAdmin(address user) public view returns (bool) {267 require(false, stub_error);268 user;269 dummy;270 return false;271 }272273 // Check that substrate account is the owner or admin of the collection274 //275 // @param user account to verify276 // @return "true" if account is the owner or admin277 //278 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40279 function verifyOwnerOrAdminSubstrate(uint256 user)280 public281 view282 returns (bool)283 {284 require(false, stub_error);285 user;286 dummy;287 return false;288 }289290 // Returns collection type291 //292 // @return `Fungible` or `NFT` or `ReFungible`293 //294 // Selector: uniqueCollectionType() d34b55b8295 function uniqueCollectionType() public returns (string memory) {296 require(false, stub_error);297 dummy = 0;298 return "";299 }300301 // Changes collection owner to another account302 //303 // @dev Owner can be changed only by current owner304 // @param newOwner new owner account305 //306 // Selector: changeOwner(address) a6f9dae1307 function changeOwner(address newOwner) public {308 require(false, stub_error);309 newOwner;310 dummy = 0;311 }312313 // Changes collection owner to another substrate account314 //315 // @dev Owner can be changed only by current owner316 // @param newOwner new owner substrate account317 //318 // Selector: changeOwnerSubstrate(uint256) 337e2c60319 function changeOwnerSubstrate(uint256 newOwner) public {320 require(false, stub_error);321 newOwner;322 dummy = 0;323 }324}32533326// Selector: 79cc679034// Selector: 79cc6790327contract ERC20UniqueExtensions is Dummy, ERC165 {35contract ERC20UniqueExtensions is Dummy, ERC165 {419 }127 }420}128}129130// Selector: f077f83e131contract Collection is Dummy, ERC165 {132 // Set collection property.133 //134 // @param key Property key.135 // @param value Propery value.136 //137 // Selector: setCollectionProperty(string,bytes) 2f073f66138 function setCollectionProperty(string memory key, bytes memory value)139 public140 {141 require(false, stub_error);142 key;143 value;144 dummy = 0;145 }146147 // Delete collection property.148 //149 // @param key Property key.150 //151 // Selector: deleteCollectionProperty(string) 7b7debce152 function deleteCollectionProperty(string memory key) public {153 require(false, stub_error);154 key;155 dummy = 0;156 }157158 // Get collection property.159 //160 // @dev Throws error if key not found.161 //162 // @param key Property key.163 // @return bytes The property corresponding to the key.164 //165 // Selector: collectionProperty(string) cf24fd6d166 function collectionProperty(string memory key)167 public168 view169 returns (bytes memory)170 {171 require(false, stub_error);172 key;173 dummy;174 return hex"";175 }176177 // Set the sponsor of the collection.178 //179 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.180 //181 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.182 //183 // Selector: setCollectionSponsor(address) 7623402e184 function setCollectionSponsor(address sponsor) public {185 require(false, stub_error);186 sponsor;187 dummy = 0;188 }189190 // Collection sponsorship confirmation.191 //192 // @dev After setting the sponsor for the collection, it must be confirmed with this function.193 //194 // Selector: confirmCollectionSponsorship() 3c50e97a195 function confirmCollectionSponsorship() public {196 require(false, stub_error);197 dummy = 0;198 }199200 // Set limits for the collection.201 // @dev Throws error if limit not found.202 // @param limit Name of the limit. Valid names:203 // "accountTokenOwnershipLimit",204 // "sponsoredDataSize",205 // "sponsoredDataRateLimit",206 // "tokenLimit",207 // "sponsorTransferTimeout",208 // "sponsorApproveTimeout"209 // @param value Value of the limit.210 //211 // Selector: setCollectionLimit(string,uint32) 6a3841db212 function setCollectionLimit(string memory limit, uint32 value) public {213 require(false, stub_error);214 limit;215 value;216 dummy = 0;217 }218219 // Set limits for the collection.220 // @dev Throws error if limit not found.221 // @param limit Name of the limit. Valid names:222 // "ownerCanTransfer",223 // "ownerCanDestroy",224 // "transfersEnabled"225 // @param value Value of the limit.226 //227 // Selector: setCollectionLimit(string,bool) 993b7fba228 function setCollectionLimit(string memory limit, bool value) public {229 require(false, stub_error);230 limit;231 value;232 dummy = 0;233 }234235 // Get contract address.236 //237 // Selector: contractAddress() f6b4dfb4238 function contractAddress() public view returns (address) {239 require(false, stub_error);240 dummy;241 return 0x0000000000000000000000000000000000000000;242 }243244 // Add collection admin by substrate address.245 // @param new_admin Substrate administrator address.246 //247 // Selector: addCollectionAdminSubstrate(uint256) 5730062b248 function addCollectionAdminSubstrate(uint256 newAdmin) public {249 require(false, stub_error);250 newAdmin;251 dummy = 0;252 }253254 // Remove collection admin by substrate address.255 // @param admin Substrate administrator address.256 //257 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9258 function removeCollectionAdminSubstrate(uint256 admin) public {259 require(false, stub_error);260 admin;261 dummy = 0;262 }263264 // Add collection admin.265 // @param new_admin Address of the added administrator.266 //267 // Selector: addCollectionAdmin(address) 92e462c7268 function addCollectionAdmin(address newAdmin) public {269 require(false, stub_error);270 newAdmin;271 dummy = 0;272 }273274 // Remove collection admin.275 //276 // @param new_admin Address of the removed administrator.277 //278 // Selector: removeCollectionAdmin(address) fafd7b42279 function removeCollectionAdmin(address admin) public {280 require(false, stub_error);281 admin;282 dummy = 0;283 }284285 // Toggle accessibility of collection nesting.286 //287 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'288 //289 // Selector: setCollectionNesting(bool) 112d4586290 function setCollectionNesting(bool enable) public {291 require(false, stub_error);292 enable;293 dummy = 0;294 }295296 // Toggle accessibility of collection nesting.297 //298 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'299 // @param collections Addresses of collections that will be available for nesting.300 //301 // Selector: setCollectionNesting(bool,address[]) 64872396302 function setCollectionNesting(bool enable, address[] memory collections)303 public304 {305 require(false, stub_error);306 enable;307 collections;308 dummy = 0;309 }310311 // Set the collection access method.312 // @param mode Access mode313 // 0 for Normal314 // 1 for AllowList315 //316 // Selector: setCollectionAccess(uint8) 41835d4c317 function setCollectionAccess(uint8 mode) public {318 require(false, stub_error);319 mode;320 dummy = 0;321 }322323 // Add the user to the allowed list.324 //325 // @param user Address of a trusted user.326 //327 // Selector: addToCollectionAllowList(address) 67844fe6328 function addToCollectionAllowList(address user) public {329 require(false, stub_error);330 user;331 dummy = 0;332 }333334 // Remove the user from the allowed list.335 //336 // @param user Address of a removed user.337 //338 // Selector: removeFromCollectionAllowList(address) 85c51acb339 function removeFromCollectionAllowList(address user) public {340 require(false, stub_error);341 user;342 dummy = 0;343 }344345 // Switch permission for minting.346 //347 // @param mode Enable if "true".348 //349 // Selector: setCollectionMintMode(bool) 00018e84350 function setCollectionMintMode(bool mode) public {351 require(false, stub_error);352 mode;353 dummy = 0;354 }355356 // Check that account is the owner or admin of the collection357 //358 // @param user account to verify359 // @return "true" if account is the owner or admin360 //361 // Selector: verifyOwnerOrAdmin(address) c2282493362 function verifyOwnerOrAdmin(address user) public view returns (bool) {363 require(false, stub_error);364 user;365 dummy;366 return false;367 }368369 // Check that substrate account is the owner or admin of the collection370 //371 // @param user account to verify372 // @return "true" if account is the owner or admin373 //374 // Selector: verifyOwnerOrAdmin(uint256) a83328e5375 function verifyOwnerOrAdmin(uint256 user) public view returns (bool) {376 require(false, stub_error);377 user;378 dummy;379 return false;380 }381382 // Returns collection type383 //384 // @return `Fungible` or `NFT` or `ReFungible`385 //386 // Selector: uniqueCollectionType() d34b55b8387 function uniqueCollectionType() public returns (string memory) {388 require(false, stub_error);389 dummy = 0;390 return "";391 }392393 // Changes collection owner to another account394 //395 // @dev Owner can be changed only by current owner396 // @param newOwner new owner account397 //398 // Selector: changeOwner(address) a6f9dae1399 function changeOwner(address newOwner) public {400 require(false, stub_error);401 newOwner;402 dummy = 0;403 }404405 // Changes collection owner to another substrate account406 //407 // @dev Owner can be changed only by current owner408 // @param newOwner new owner substrate account409 //410 // Selector: changeOwner(uint256) 924c19f7411 function changeOwner(uint256 newOwner) public {412 require(false, stub_error);413 newOwner;414 dummy = 0;415 }416}421417422contract UniqueFungible is418contract UniqueFungible is423 Dummy,419 Dummy,pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth51 event MintingFinished();51 event MintingFinished();52}52}5354// Selector: 07f76b0c55contract Collection is Dummy, ERC165 {56 // Set collection property.57 //58 // @param key Property key.59 // @param value Propery value.60 //61 // Selector: setCollectionProperty(string,bytes) 2f073f6662 function setCollectionProperty(string memory key, bytes memory value)63 public64 {65 require(false, stub_error);66 key;67 value;68 dummy = 0;69 }7071 // Delete collection property.72 //73 // @param key Property key.74 //75 // Selector: deleteCollectionProperty(string) 7b7debce76 function deleteCollectionProperty(string memory key) public {77 require(false, stub_error);78 key;79 dummy = 0;80 }8182 // Get collection property.83 //84 // @dev Throws error if key not found.85 //86 // @param key Property key.87 // @return bytes The property corresponding to the key.88 //89 // Selector: collectionProperty(string) cf24fd6d90 function collectionProperty(string memory key)91 public92 view93 returns (bytes memory)94 {95 require(false, stub_error);96 key;97 dummy;98 return hex"";99 }100101 // Set the sponsor of the collection.102 //103 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.104 //105 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.106 //107 // Selector: setCollectionSponsor(address) 7623402e108 function setCollectionSponsor(address sponsor) public {109 require(false, stub_error);110 sponsor;111 dummy = 0;112 }113114 // Collection sponsorship confirmation.115 //116 // @dev After setting the sponsor for the collection, it must be confirmed with this function.117 //118 // Selector: confirmCollectionSponsorship() 3c50e97a119 function confirmCollectionSponsorship() public {120 require(false, stub_error);121 dummy = 0;122 }123124 // Set limits for the collection.125 // @dev Throws error if limit not found.126 // @param limit Name of the limit. Valid names:127 // "accountTokenOwnershipLimit",128 // "sponsoredDataSize",129 // "sponsoredDataRateLimit",130 // "tokenLimit",131 // "sponsorTransferTimeout",132 // "sponsorApproveTimeout"133 // @param value Value of the limit.134 //135 // Selector: setCollectionLimit(string,uint32) 6a3841db136 function setCollectionLimit(string memory limit, uint32 value) public {137 require(false, stub_error);138 limit;139 value;140 dummy = 0;141 }142143 // Set limits for the collection.144 // @dev Throws error if limit not found.145 // @param limit Name of the limit. Valid names:146 // "ownerCanTransfer",147 // "ownerCanDestroy",148 // "transfersEnabled"149 // @param value Value of the limit.150 //151 // Selector: setCollectionLimit(string,bool) 993b7fba152 function setCollectionLimit(string memory limit, bool value) public {153 require(false, stub_error);154 limit;155 value;156 dummy = 0;157 }158159 // Get contract address.160 //161 // Selector: contractAddress() f6b4dfb4162 function contractAddress() public view returns (address) {163 require(false, stub_error);164 dummy;165 return 0x0000000000000000000000000000000000000000;166 }167168 // Add collection admin by substrate address.169 // @param new_admin Substrate administrator address.170 //171 // Selector: addCollectionAdminSubstrate(uint256) 5730062b172 function addCollectionAdminSubstrate(uint256 newAdmin) public {173 require(false, stub_error);174 newAdmin;175 dummy = 0;176 }177178 // Remove collection admin by substrate address.179 // @param admin Substrate administrator address.180 //181 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9182 function removeCollectionAdminSubstrate(uint256 admin) public {183 require(false, stub_error);184 admin;185 dummy = 0;186 }187188 // Add collection admin.189 // @param new_admin Address of the added administrator.190 //191 // Selector: addCollectionAdmin(address) 92e462c7192 function addCollectionAdmin(address newAdmin) public {193 require(false, stub_error);194 newAdmin;195 dummy = 0;196 }197198 // Remove collection admin.199 //200 // @param new_admin Address of the removed administrator.201 //202 // Selector: removeCollectionAdmin(address) fafd7b42203 function removeCollectionAdmin(address admin) public {204 require(false, stub_error);205 admin;206 dummy = 0;207 }208209 // Toggle accessibility of collection nesting.210 //211 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'212 //213 // Selector: setCollectionNesting(bool) 112d4586214 function setCollectionNesting(bool enable) public {215 require(false, stub_error);216 enable;217 dummy = 0;218 }219220 // Toggle accessibility of collection nesting.221 //222 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'223 // @param collections Addresses of collections that will be available for nesting.224 //225 // Selector: setCollectionNesting(bool,address[]) 64872396226 function setCollectionNesting(bool enable, address[] memory collections)227 public228 {229 require(false, stub_error);230 enable;231 collections;232 dummy = 0;233 }234235 // Set the collection access method.236 // @param mode Access mode237 // 0 for Normal238 // 1 for AllowList239 //240 // Selector: setCollectionAccess(uint8) 41835d4c241 function setCollectionAccess(uint8 mode) public {242 require(false, stub_error);243 mode;244 dummy = 0;245 }246247 // Add the user to the allowed list.248 //249 // @param user Address of a trusted user.250 //251 // Selector: addToCollectionAllowList(address) 67844fe6252 function addToCollectionAllowList(address user) public {253 require(false, stub_error);254 user;255 dummy = 0;256 }257258 // Remove the user from the allowed list.259 //260 // @param user Address of a removed user.261 //262 // Selector: removeFromCollectionAllowList(address) 85c51acb263 function removeFromCollectionAllowList(address user) public {264 require(false, stub_error);265 user;266 dummy = 0;267 }268269 // Switch permission for minting.270 //271 // @param mode Enable if "true".272 //273 // Selector: setCollectionMintMode(bool) 00018e84274 function setCollectionMintMode(bool mode) public {275 require(false, stub_error);276 mode;277 dummy = 0;278 }279280 // Check that account is the owner or admin of the collection281 //282 // @param user account to verify283 // @return "true" if account is the owner or admin284 //285 // Selector: verifyOwnerOrAdmin(address) c2282493286 function verifyOwnerOrAdmin(address user) public view returns (bool) {287 require(false, stub_error);288 user;289 dummy;290 return false;291 }292293 // Check that substrate account is the owner or admin of the collection294 //295 // @param user account to verify296 // @return "true" if account is the owner or admin297 //298 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40299 function verifyOwnerOrAdminSubstrate(uint256 user)300 public301 view302 returns (bool)303 {304 require(false, stub_error);305 user;306 dummy;307 return false;308 }309310 // Returns collection type311 //312 // @return `Fungible` or `NFT` or `ReFungible`313 //314 // Selector: uniqueCollectionType() d34b55b8315 function uniqueCollectionType() public returns (string memory) {316 require(false, stub_error);317 dummy = 0;318 return "";319 }320321 // Changes collection owner to another account322 //323 // @dev Owner can be changed only by current owner324 // @param newOwner new owner account325 //326 // Selector: changeOwner(address) a6f9dae1327 function changeOwner(address newOwner) public {328 require(false, stub_error);329 newOwner;330 dummy = 0;331 }332333 // Changes collection owner to another substrate account334 //335 // @dev Owner can be changed only by current owner336 // @param newOwner new owner substrate account337 //338 // Selector: changeOwnerSubstrate(uint256) 337e2c60339 function changeOwnerSubstrate(uint256 newOwner) public {340 require(false, stub_error);341 newOwner;342 dummy = 0;343 }344}34553346// Selector: 4136937754// Selector: 41369377347contract TokenProperties is Dummy, ERC165 {55contract TokenProperties is Dummy, ERC165 {786 }494 }787}495}496497// Selector: f077f83e498contract Collection is Dummy, ERC165 {499 // Set collection property.500 //501 // @param key Property key.502 // @param value Propery value.503 //504 // Selector: setCollectionProperty(string,bytes) 2f073f66505 function setCollectionProperty(string memory key, bytes memory value)506 public507 {508 require(false, stub_error);509 key;510 value;511 dummy = 0;512 }513514 // Delete collection property.515 //516 // @param key Property key.517 //518 // Selector: deleteCollectionProperty(string) 7b7debce519 function deleteCollectionProperty(string memory key) public {520 require(false, stub_error);521 key;522 dummy = 0;523 }524525 // Get collection property.526 //527 // @dev Throws error if key not found.528 //529 // @param key Property key.530 // @return bytes The property corresponding to the key.531 //532 // Selector: collectionProperty(string) cf24fd6d533 function collectionProperty(string memory key)534 public535 view536 returns (bytes memory)537 {538 require(false, stub_error);539 key;540 dummy;541 return hex"";542 }543544 // Set the sponsor of the collection.545 //546 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.547 //548 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.549 //550 // Selector: setCollectionSponsor(address) 7623402e551 function setCollectionSponsor(address sponsor) public {552 require(false, stub_error);553 sponsor;554 dummy = 0;555 }556557 // Collection sponsorship confirmation.558 //559 // @dev After setting the sponsor for the collection, it must be confirmed with this function.560 //561 // Selector: confirmCollectionSponsorship() 3c50e97a562 function confirmCollectionSponsorship() public {563 require(false, stub_error);564 dummy = 0;565 }566567 // Set limits for the collection.568 // @dev Throws error if limit not found.569 // @param limit Name of the limit. Valid names:570 // "accountTokenOwnershipLimit",571 // "sponsoredDataSize",572 // "sponsoredDataRateLimit",573 // "tokenLimit",574 // "sponsorTransferTimeout",575 // "sponsorApproveTimeout"576 // @param value Value of the limit.577 //578 // Selector: setCollectionLimit(string,uint32) 6a3841db579 function setCollectionLimit(string memory limit, uint32 value) public {580 require(false, stub_error);581 limit;582 value;583 dummy = 0;584 }585586 // Set limits for the collection.587 // @dev Throws error if limit not found.588 // @param limit Name of the limit. Valid names:589 // "ownerCanTransfer",590 // "ownerCanDestroy",591 // "transfersEnabled"592 // @param value Value of the limit.593 //594 // Selector: setCollectionLimit(string,bool) 993b7fba595 function setCollectionLimit(string memory limit, bool value) public {596 require(false, stub_error);597 limit;598 value;599 dummy = 0;600 }601602 // Get contract address.603 //604 // Selector: contractAddress() f6b4dfb4605 function contractAddress() public view returns (address) {606 require(false, stub_error);607 dummy;608 return 0x0000000000000000000000000000000000000000;609 }610611 // Add collection admin by substrate address.612 // @param new_admin Substrate administrator address.613 //614 // Selector: addCollectionAdminSubstrate(uint256) 5730062b615 function addCollectionAdminSubstrate(uint256 newAdmin) public {616 require(false, stub_error);617 newAdmin;618 dummy = 0;619 }620621 // Remove collection admin by substrate address.622 // @param admin Substrate administrator address.623 //624 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9625 function removeCollectionAdminSubstrate(uint256 admin) public {626 require(false, stub_error);627 admin;628 dummy = 0;629 }630631 // Add collection admin.632 // @param new_admin Address of the added administrator.633 //634 // Selector: addCollectionAdmin(address) 92e462c7635 function addCollectionAdmin(address newAdmin) public {636 require(false, stub_error);637 newAdmin;638 dummy = 0;639 }640641 // Remove collection admin.642 //643 // @param new_admin Address of the removed administrator.644 //645 // Selector: removeCollectionAdmin(address) fafd7b42646 function removeCollectionAdmin(address admin) public {647 require(false, stub_error);648 admin;649 dummy = 0;650 }651652 // Toggle accessibility of collection nesting.653 //654 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'655 //656 // Selector: setCollectionNesting(bool) 112d4586657 function setCollectionNesting(bool enable) public {658 require(false, stub_error);659 enable;660 dummy = 0;661 }662663 // Toggle accessibility of collection nesting.664 //665 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'666 // @param collections Addresses of collections that will be available for nesting.667 //668 // Selector: setCollectionNesting(bool,address[]) 64872396669 function setCollectionNesting(bool enable, address[] memory collections)670 public671 {672 require(false, stub_error);673 enable;674 collections;675 dummy = 0;676 }677678 // Set the collection access method.679 // @param mode Access mode680 // 0 for Normal681 // 1 for AllowList682 //683 // Selector: setCollectionAccess(uint8) 41835d4c684 function setCollectionAccess(uint8 mode) public {685 require(false, stub_error);686 mode;687 dummy = 0;688 }689690 // Add the user to the allowed list.691 //692 // @param user Address of a trusted user.693 //694 // Selector: addToCollectionAllowList(address) 67844fe6695 function addToCollectionAllowList(address user) public {696 require(false, stub_error);697 user;698 dummy = 0;699 }700701 // Remove the user from the allowed list.702 //703 // @param user Address of a removed user.704 //705 // Selector: removeFromCollectionAllowList(address) 85c51acb706 function removeFromCollectionAllowList(address user) public {707 require(false, stub_error);708 user;709 dummy = 0;710 }711712 // Switch permission for minting.713 //714 // @param mode Enable if "true".715 //716 // Selector: setCollectionMintMode(bool) 00018e84717 function setCollectionMintMode(bool mode) public {718 require(false, stub_error);719 mode;720 dummy = 0;721 }722723 // Check that account is the owner or admin of the collection724 //725 // @param user account to verify726 // @return "true" if account is the owner or admin727 //728 // Selector: verifyOwnerOrAdmin(address) c2282493729 function verifyOwnerOrAdmin(address user) public view returns (bool) {730 require(false, stub_error);731 user;732 dummy;733 return false;734 }735736 // Check that substrate account is the owner or admin of the collection737 //738 // @param user account to verify739 // @return "true" if account is the owner or admin740 //741 // Selector: verifyOwnerOrAdmin(uint256) a83328e5742 function verifyOwnerOrAdmin(uint256 user) public view returns (bool) {743 require(false, stub_error);744 user;745 dummy;746 return false;747 }748749 // Returns collection type750 //751 // @return `Fungible` or `NFT` or `ReFungible`752 //753 // Selector: uniqueCollectionType() d34b55b8754 function uniqueCollectionType() public returns (string memory) {755 require(false, stub_error);756 dummy = 0;757 return "";758 }759760 // Changes collection owner to another account761 //762 // @dev Owner can be changed only by current owner763 // @param newOwner new owner account764 //765 // Selector: changeOwner(address) a6f9dae1766 function changeOwner(address newOwner) public {767 require(false, stub_error);768 newOwner;769 dummy = 0;770 }771772 // Changes collection owner to another substrate account773 //774 // @dev Owner can be changed only by current owner775 // @param newOwner new owner substrate account776 //777 // Selector: changeOwner(uint256) 924c19f7778 function changeOwner(uint256 newOwner) public {779 require(false, stub_error);780 newOwner;781 dummy = 0;782 }783}788784789contract UniqueNFT is785contract UniqueNFT is790 Dummy,786 Dummy,pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth51 event MintingFinished();51 event MintingFinished();52}52}5354// Selector: 07f76b0c55contract Collection is Dummy, ERC165 {56 // Set collection property.57 //58 // @param key Property key.59 // @param value Propery value.60 //61 // Selector: setCollectionProperty(string,bytes) 2f073f6662 function setCollectionProperty(string memory key, bytes memory value)63 public64 {65 require(false, stub_error);66 key;67 value;68 dummy = 0;69 }7071 // Delete collection property.72 //73 // @param key Property key.74 //75 // Selector: deleteCollectionProperty(string) 7b7debce76 function deleteCollectionProperty(string memory key) public {77 require(false, stub_error);78 key;79 dummy = 0;80 }8182 // Get collection property.83 //84 // @dev Throws error if key not found.85 //86 // @param key Property key.87 // @return bytes The property corresponding to the key.88 //89 // Selector: collectionProperty(string) cf24fd6d90 function collectionProperty(string memory key)91 public92 view93 returns (bytes memory)94 {95 require(false, stub_error);96 key;97 dummy;98 return hex"";99 }100101 // Set the sponsor of the collection.102 //103 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.104 //105 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.106 //107 // Selector: setCollectionSponsor(address) 7623402e108 function setCollectionSponsor(address sponsor) public {109 require(false, stub_error);110 sponsor;111 dummy = 0;112 }113114 // Collection sponsorship confirmation.115 //116 // @dev After setting the sponsor for the collection, it must be confirmed with this function.117 //118 // Selector: confirmCollectionSponsorship() 3c50e97a119 function confirmCollectionSponsorship() public {120 require(false, stub_error);121 dummy = 0;122 }123124 // Set limits for the collection.125 // @dev Throws error if limit not found.126 // @param limit Name of the limit. Valid names:127 // "accountTokenOwnershipLimit",128 // "sponsoredDataSize",129 // "sponsoredDataRateLimit",130 // "tokenLimit",131 // "sponsorTransferTimeout",132 // "sponsorApproveTimeout"133 // @param value Value of the limit.134 //135 // Selector: setCollectionLimit(string,uint32) 6a3841db136 function setCollectionLimit(string memory limit, uint32 value) public {137 require(false, stub_error);138 limit;139 value;140 dummy = 0;141 }142143 // Set limits for the collection.144 // @dev Throws error if limit not found.145 // @param limit Name of the limit. Valid names:146 // "ownerCanTransfer",147 // "ownerCanDestroy",148 // "transfersEnabled"149 // @param value Value of the limit.150 //151 // Selector: setCollectionLimit(string,bool) 993b7fba152 function setCollectionLimit(string memory limit, bool value) public {153 require(false, stub_error);154 limit;155 value;156 dummy = 0;157 }158159 // Get contract address.160 //161 // Selector: contractAddress() f6b4dfb4162 function contractAddress() public view returns (address) {163 require(false, stub_error);164 dummy;165 return 0x0000000000000000000000000000000000000000;166 }167168 // Add collection admin by substrate address.169 // @param new_admin Substrate administrator address.170 //171 // Selector: addCollectionAdminSubstrate(uint256) 5730062b172 function addCollectionAdminSubstrate(uint256 newAdmin) public {173 require(false, stub_error);174 newAdmin;175 dummy = 0;176 }177178 // Remove collection admin by substrate address.179 // @param admin Substrate administrator address.180 //181 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9182 function removeCollectionAdminSubstrate(uint256 admin) public {183 require(false, stub_error);184 admin;185 dummy = 0;186 }187188 // Add collection admin.189 // @param new_admin Address of the added administrator.190 //191 // Selector: addCollectionAdmin(address) 92e462c7192 function addCollectionAdmin(address newAdmin) public {193 require(false, stub_error);194 newAdmin;195 dummy = 0;196 }197198 // Remove collection admin.199 //200 // @param new_admin Address of the removed administrator.201 //202 // Selector: removeCollectionAdmin(address) fafd7b42203 function removeCollectionAdmin(address admin) public {204 require(false, stub_error);205 admin;206 dummy = 0;207 }208209 // Toggle accessibility of collection nesting.210 //211 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'212 //213 // Selector: setCollectionNesting(bool) 112d4586214 function setCollectionNesting(bool enable) public {215 require(false, stub_error);216 enable;217 dummy = 0;218 }219220 // Toggle accessibility of collection nesting.221 //222 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'223 // @param collections Addresses of collections that will be available for nesting.224 //225 // Selector: setCollectionNesting(bool,address[]) 64872396226 function setCollectionNesting(bool enable, address[] memory collections)227 public228 {229 require(false, stub_error);230 enable;231 collections;232 dummy = 0;233 }234235 // Set the collection access method.236 // @param mode Access mode237 // 0 for Normal238 // 1 for AllowList239 //240 // Selector: setCollectionAccess(uint8) 41835d4c241 function setCollectionAccess(uint8 mode) public {242 require(false, stub_error);243 mode;244 dummy = 0;245 }246247 // Add the user to the allowed list.248 //249 // @param user Address of a trusted user.250 //251 // Selector: addToCollectionAllowList(address) 67844fe6252 function addToCollectionAllowList(address user) public {253 require(false, stub_error);254 user;255 dummy = 0;256 }257258 // Remove the user from the allowed list.259 //260 // @param user Address of a removed user.261 //262 // Selector: removeFromCollectionAllowList(address) 85c51acb263 function removeFromCollectionAllowList(address user) public {264 require(false, stub_error);265 user;266 dummy = 0;267 }268269 // Switch permission for minting.270 //271 // @param mode Enable if "true".272 //273 // Selector: setCollectionMintMode(bool) 00018e84274 function setCollectionMintMode(bool mode) public {275 require(false, stub_error);276 mode;277 dummy = 0;278 }279280 // Check that account is the owner or admin of the collection281 //282 // @param user account to verify283 // @return "true" if account is the owner or admin284 //285 // Selector: verifyOwnerOrAdmin(address) c2282493286 function verifyOwnerOrAdmin(address user) public view returns (bool) {287 require(false, stub_error);288 user;289 dummy;290 return false;291 }292293 // Check that substrate account is the owner or admin of the collection294 //295 // @param user account to verify296 // @return "true" if account is the owner or admin297 //298 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40299 function verifyOwnerOrAdminSubstrate(uint256 user)300 public301 view302 returns (bool)303 {304 require(false, stub_error);305 user;306 dummy;307 return false;308 }309310 // Returns collection type311 //312 // @return `Fungible` or `NFT` or `ReFungible`313 //314 // Selector: uniqueCollectionType() d34b55b8315 function uniqueCollectionType() public returns (string memory) {316 require(false, stub_error);317 dummy = 0;318 return "";319 }320321 // Changes collection owner to another account322 //323 // @dev Owner can be changed only by current owner324 // @param newOwner new owner account325 //326 // Selector: changeOwner(address) a6f9dae1327 function changeOwner(address newOwner) public {328 require(false, stub_error);329 newOwner;330 dummy = 0;331 }332333 // Changes collection owner to another substrate account334 //335 // @dev Owner can be changed only by current owner336 // @param newOwner new owner substrate account337 //338 // Selector: changeOwnerSubstrate(uint256) 337e2c60339 function changeOwnerSubstrate(uint256 newOwner) public {340 require(false, stub_error);341 newOwner;342 dummy = 0;343 }344}34553346// Selector: 4136937754// Selector: 41369377347contract TokenProperties is Dummy, ERC165 {55contract TokenProperties is Dummy, ERC165 {798 }506 }799}507}508509// Selector: f077f83e510contract Collection is Dummy, ERC165 {511 // Set collection property.512 //513 // @param key Property key.514 // @param value Propery value.515 //516 // Selector: setCollectionProperty(string,bytes) 2f073f66517 function setCollectionProperty(string memory key, bytes memory value)518 public519 {520 require(false, stub_error);521 key;522 value;523 dummy = 0;524 }525526 // Delete collection property.527 //528 // @param key Property key.529 //530 // Selector: deleteCollectionProperty(string) 7b7debce531 function deleteCollectionProperty(string memory key) public {532 require(false, stub_error);533 key;534 dummy = 0;535 }536537 // Get collection property.538 //539 // @dev Throws error if key not found.540 //541 // @param key Property key.542 // @return bytes The property corresponding to the key.543 //544 // Selector: collectionProperty(string) cf24fd6d545 function collectionProperty(string memory key)546 public547 view548 returns (bytes memory)549 {550 require(false, stub_error);551 key;552 dummy;553 return hex"";554 }555556 // Set the sponsor of the collection.557 //558 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.559 //560 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.561 //562 // Selector: setCollectionSponsor(address) 7623402e563 function setCollectionSponsor(address sponsor) public {564 require(false, stub_error);565 sponsor;566 dummy = 0;567 }568569 // Collection sponsorship confirmation.570 //571 // @dev After setting the sponsor for the collection, it must be confirmed with this function.572 //573 // Selector: confirmCollectionSponsorship() 3c50e97a574 function confirmCollectionSponsorship() public {575 require(false, stub_error);576 dummy = 0;577 }578579 // Set limits for the collection.580 // @dev Throws error if limit not found.581 // @param limit Name of the limit. Valid names:582 // "accountTokenOwnershipLimit",583 // "sponsoredDataSize",584 // "sponsoredDataRateLimit",585 // "tokenLimit",586 // "sponsorTransferTimeout",587 // "sponsorApproveTimeout"588 // @param value Value of the limit.589 //590 // Selector: setCollectionLimit(string,uint32) 6a3841db591 function setCollectionLimit(string memory limit, uint32 value) public {592 require(false, stub_error);593 limit;594 value;595 dummy = 0;596 }597598 // Set limits for the collection.599 // @dev Throws error if limit not found.600 // @param limit Name of the limit. Valid names:601 // "ownerCanTransfer",602 // "ownerCanDestroy",603 // "transfersEnabled"604 // @param value Value of the limit.605 //606 // Selector: setCollectionLimit(string,bool) 993b7fba607 function setCollectionLimit(string memory limit, bool value) public {608 require(false, stub_error);609 limit;610 value;611 dummy = 0;612 }613614 // Get contract address.615 //616 // Selector: contractAddress() f6b4dfb4617 function contractAddress() public view returns (address) {618 require(false, stub_error);619 dummy;620 return 0x0000000000000000000000000000000000000000;621 }622623 // Add collection admin by substrate address.624 // @param new_admin Substrate administrator address.625 //626 // Selector: addCollectionAdminSubstrate(uint256) 5730062b627 function addCollectionAdminSubstrate(uint256 newAdmin) public {628 require(false, stub_error);629 newAdmin;630 dummy = 0;631 }632633 // Remove collection admin by substrate address.634 // @param admin Substrate administrator address.635 //636 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9637 function removeCollectionAdminSubstrate(uint256 admin) public {638 require(false, stub_error);639 admin;640 dummy = 0;641 }642643 // Add collection admin.644 // @param new_admin Address of the added administrator.645 //646 // Selector: addCollectionAdmin(address) 92e462c7647 function addCollectionAdmin(address newAdmin) public {648 require(false, stub_error);649 newAdmin;650 dummy = 0;651 }652653 // Remove collection admin.654 //655 // @param new_admin Address of the removed administrator.656 //657 // Selector: removeCollectionAdmin(address) fafd7b42658 function removeCollectionAdmin(address admin) public {659 require(false, stub_error);660 admin;661 dummy = 0;662 }663664 // Toggle accessibility of collection nesting.665 //666 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'667 //668 // Selector: setCollectionNesting(bool) 112d4586669 function setCollectionNesting(bool enable) public {670 require(false, stub_error);671 enable;672 dummy = 0;673 }674675 // Toggle accessibility of collection nesting.676 //677 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'678 // @param collections Addresses of collections that will be available for nesting.679 //680 // Selector: setCollectionNesting(bool,address[]) 64872396681 function setCollectionNesting(bool enable, address[] memory collections)682 public683 {684 require(false, stub_error);685 enable;686 collections;687 dummy = 0;688 }689690 // Set the collection access method.691 // @param mode Access mode692 // 0 for Normal693 // 1 for AllowList694 //695 // Selector: setCollectionAccess(uint8) 41835d4c696 function setCollectionAccess(uint8 mode) public {697 require(false, stub_error);698 mode;699 dummy = 0;700 }701702 // Add the user to the allowed list.703 //704 // @param user Address of a trusted user.705 //706 // Selector: addToCollectionAllowList(address) 67844fe6707 function addToCollectionAllowList(address user) public {708 require(false, stub_error);709 user;710 dummy = 0;711 }712713 // Remove the user from the allowed list.714 //715 // @param user Address of a removed user.716 //717 // Selector: removeFromCollectionAllowList(address) 85c51acb718 function removeFromCollectionAllowList(address user) public {719 require(false, stub_error);720 user;721 dummy = 0;722 }723724 // Switch permission for minting.725 //726 // @param mode Enable if "true".727 //728 // Selector: setCollectionMintMode(bool) 00018e84729 function setCollectionMintMode(bool mode) public {730 require(false, stub_error);731 mode;732 dummy = 0;733 }734735 // Check that account is the owner or admin of the collection736 //737 // @param user account to verify738 // @return "true" if account is the owner or admin739 //740 // Selector: verifyOwnerOrAdmin(address) c2282493741 function verifyOwnerOrAdmin(address user) public view returns (bool) {742 require(false, stub_error);743 user;744 dummy;745 return false;746 }747748 // Check that substrate account is the owner or admin of the collection749 //750 // @param user account to verify751 // @return "true" if account is the owner or admin752 //753 // Selector: verifyOwnerOrAdmin(uint256) a83328e5754 function verifyOwnerOrAdmin(uint256 user) public view returns (bool) {755 require(false, stub_error);756 user;757 dummy;758 return false;759 }760761 // Returns collection type762 //763 // @return `Fungible` or `NFT` or `ReFungible`764 //765 // Selector: uniqueCollectionType() d34b55b8766 function uniqueCollectionType() public returns (string memory) {767 require(false, stub_error);768 dummy = 0;769 return "";770 }771772 // Changes collection owner to another account773 //774 // @dev Owner can be changed only by current owner775 // @param newOwner new owner account776 //777 // Selector: changeOwner(address) a6f9dae1778 function changeOwner(address newOwner) public {779 require(false, stub_error);780 newOwner;781 dummy = 0;782 }783784 // Changes collection owner to another substrate account785 //786 // @dev Owner can be changed only by current owner787 // @param newOwner new owner substrate account788 //789 // Selector: changeOwner(uint256) 924c19f7790 function changeOwner(uint256 newOwner) public {791 require(false, stub_error);792 newOwner;793 dummy = 0;794 }795}800796801contract UniqueRefungible is797contract UniqueRefungible is802 Dummy,798 Dummy,pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth22 );22 );23}23}2425// Selector: 07f76b0c26interface Collection is Dummy, ERC165 {27 // Set collection property.28 //29 // @param key Property key.30 // @param value Propery value.31 //32 // Selector: setCollectionProperty(string,bytes) 2f073f6633 function setCollectionProperty(string memory key, bytes memory value)34 external;3536 // Delete collection property.37 //38 // @param key Property key.39 //40 // Selector: deleteCollectionProperty(string) 7b7debce41 function deleteCollectionProperty(string memory key) external;4243 // Get collection property.44 //45 // @dev Throws error if key not found.46 //47 // @param key Property key.48 // @return bytes The property corresponding to the key.49 //50 // Selector: collectionProperty(string) cf24fd6d51 function collectionProperty(string memory key)52 external53 view54 returns (bytes memory);5556 // Set the sponsor of the collection.57 //58 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.59 //60 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.61 //62 // Selector: setCollectionSponsor(address) 7623402e63 function setCollectionSponsor(address sponsor) external;6465 // Collection sponsorship confirmation.66 //67 // @dev After setting the sponsor for the collection, it must be confirmed with this function.68 //69 // Selector: confirmCollectionSponsorship() 3c50e97a70 function confirmCollectionSponsorship() external;7172 // Set limits for the collection.73 // @dev Throws error if limit not found.74 // @param limit Name of the limit. Valid names:75 // "accountTokenOwnershipLimit",76 // "sponsoredDataSize",77 // "sponsoredDataRateLimit",78 // "tokenLimit",79 // "sponsorTransferTimeout",80 // "sponsorApproveTimeout"81 // @param value Value of the limit.82 //83 // Selector: setCollectionLimit(string,uint32) 6a3841db84 function setCollectionLimit(string memory limit, uint32 value) external;8586 // Set limits for the collection.87 // @dev Throws error if limit not found.88 // @param limit Name of the limit. Valid names:89 // "ownerCanTransfer",90 // "ownerCanDestroy",91 // "transfersEnabled"92 // @param value Value of the limit.93 //94 // Selector: setCollectionLimit(string,bool) 993b7fba95 function setCollectionLimit(string memory limit, bool value) external;9697 // Get contract address.98 //99 // Selector: contractAddress() f6b4dfb4100 function contractAddress() external view returns (address);101102 // Add collection admin by substrate address.103 // @param new_admin Substrate administrator address.104 //105 // Selector: addCollectionAdminSubstrate(uint256) 5730062b106 function addCollectionAdminSubstrate(uint256 newAdmin) external;107108 // Remove collection admin by substrate address.109 // @param admin Substrate administrator address.110 //111 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9112 function removeCollectionAdminSubstrate(uint256 admin) external;113114 // Add collection admin.115 // @param new_admin Address of the added administrator.116 //117 // Selector: addCollectionAdmin(address) 92e462c7118 function addCollectionAdmin(address newAdmin) external;119120 // Remove collection admin.121 //122 // @param new_admin Address of the removed administrator.123 //124 // Selector: removeCollectionAdmin(address) fafd7b42125 function removeCollectionAdmin(address admin) external;126127 // Toggle accessibility of collection nesting.128 //129 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'130 //131 // Selector: setCollectionNesting(bool) 112d4586132 function setCollectionNesting(bool enable) external;133134 // Toggle accessibility of collection nesting.135 //136 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'137 // @param collections Addresses of collections that will be available for nesting.138 //139 // Selector: setCollectionNesting(bool,address[]) 64872396140 function setCollectionNesting(bool enable, address[] memory collections)141 external;142143 // Set the collection access method.144 // @param mode Access mode145 // 0 for Normal146 // 1 for AllowList147 //148 // Selector: setCollectionAccess(uint8) 41835d4c149 function setCollectionAccess(uint8 mode) external;150151 // Add the user to the allowed list.152 //153 // @param user Address of a trusted user.154 //155 // Selector: addToCollectionAllowList(address) 67844fe6156 function addToCollectionAllowList(address user) external;157158 // Remove the user from the allowed list.159 //160 // @param user Address of a removed user.161 //162 // Selector: removeFromCollectionAllowList(address) 85c51acb163 function removeFromCollectionAllowList(address user) external;164165 // Switch permission for minting.166 //167 // @param mode Enable if "true".168 //169 // Selector: setCollectionMintMode(bool) 00018e84170 function setCollectionMintMode(bool mode) external;171172 // Check that account is the owner or admin of the collection173 //174 // @param user account to verify175 // @return "true" if account is the owner or admin176 //177 // Selector: verifyOwnerOrAdmin(address) c2282493178 function verifyOwnerOrAdmin(address user) external view returns (bool);179180 // Check that substrate account is the owner or admin of the collection181 //182 // @param user account to verify183 // @return "true" if account is the owner or admin184 //185 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40186 function verifyOwnerOrAdminSubstrate(uint256 user)187 external188 view189 returns (bool);190191 // Returns collection type192 //193 // @return `Fungible` or `NFT` or `ReFungible`194 //195 // Selector: uniqueCollectionType() d34b55b8196 function uniqueCollectionType() external returns (string memory);197198 // Changes collection owner to another account199 //200 // @dev Owner can be changed only by current owner201 // @param newOwner new owner account202 //203 // Selector: changeOwner(address) a6f9dae1204 function changeOwner(address newOwner) external;205206 // Changes collection owner to another substrate account207 //208 // @dev Owner can be changed only by current owner209 // @param newOwner new owner substrate account210 //211 // Selector: changeOwnerSubstrate(uint256) 337e2c60212 function changeOwnerSubstrate(uint256 newOwner) external;213}21424215// Selector: 79cc679025// Selector: 79cc6790216interface ERC20UniqueExtensions is Dummy, ERC165 {26interface ERC20UniqueExtensions is Dummy, ERC165 {255 returns (uint256);65 returns (uint256);256}66}6768// Selector: f077f83e69interface Collection is Dummy, ERC165 {70 // Set collection property.71 //72 // @param key Property key.73 // @param value Propery value.74 //75 // Selector: setCollectionProperty(string,bytes) 2f073f6676 function setCollectionProperty(string memory key, bytes memory value)77 external;7879 // Delete collection property.80 //81 // @param key Property key.82 //83 // Selector: deleteCollectionProperty(string) 7b7debce84 function deleteCollectionProperty(string memory key) external;8586 // Get collection property.87 //88 // @dev Throws error if key not found.89 //90 // @param key Property key.91 // @return bytes The property corresponding to the key.92 //93 // Selector: collectionProperty(string) cf24fd6d94 function collectionProperty(string memory key)95 external96 view97 returns (bytes memory);9899 // Set the sponsor of the collection.100 //101 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.102 //103 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.104 //105 // Selector: setCollectionSponsor(address) 7623402e106 function setCollectionSponsor(address sponsor) external;107108 // Collection sponsorship confirmation.109 //110 // @dev After setting the sponsor for the collection, it must be confirmed with this function.111 //112 // Selector: confirmCollectionSponsorship() 3c50e97a113 function confirmCollectionSponsorship() external;114115 // Set limits for the collection.116 // @dev Throws error if limit not found.117 // @param limit Name of the limit. Valid names:118 // "accountTokenOwnershipLimit",119 // "sponsoredDataSize",120 // "sponsoredDataRateLimit",121 // "tokenLimit",122 // "sponsorTransferTimeout",123 // "sponsorApproveTimeout"124 // @param value Value of the limit.125 //126 // Selector: setCollectionLimit(string,uint32) 6a3841db127 function setCollectionLimit(string memory limit, uint32 value) external;128129 // Set limits for the collection.130 // @dev Throws error if limit not found.131 // @param limit Name of the limit. Valid names:132 // "ownerCanTransfer",133 // "ownerCanDestroy",134 // "transfersEnabled"135 // @param value Value of the limit.136 //137 // Selector: setCollectionLimit(string,bool) 993b7fba138 function setCollectionLimit(string memory limit, bool value) external;139140 // Get contract address.141 //142 // Selector: contractAddress() f6b4dfb4143 function contractAddress() external view returns (address);144145 // Add collection admin by substrate address.146 // @param new_admin Substrate administrator address.147 //148 // Selector: addCollectionAdminSubstrate(uint256) 5730062b149 function addCollectionAdminSubstrate(uint256 newAdmin) external;150151 // Remove collection admin by substrate address.152 // @param admin Substrate administrator address.153 //154 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9155 function removeCollectionAdminSubstrate(uint256 admin) external;156157 // Add collection admin.158 // @param new_admin Address of the added administrator.159 //160 // Selector: addCollectionAdmin(address) 92e462c7161 function addCollectionAdmin(address newAdmin) external;162163 // Remove collection admin.164 //165 // @param new_admin Address of the removed administrator.166 //167 // Selector: removeCollectionAdmin(address) fafd7b42168 function removeCollectionAdmin(address admin) external;169170 // Toggle accessibility of collection nesting.171 //172 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'173 //174 // Selector: setCollectionNesting(bool) 112d4586175 function setCollectionNesting(bool enable) external;176177 // Toggle accessibility of collection nesting.178 //179 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'180 // @param collections Addresses of collections that will be available for nesting.181 //182 // Selector: setCollectionNesting(bool,address[]) 64872396183 function setCollectionNesting(bool enable, address[] memory collections)184 external;185186 // Set the collection access method.187 // @param mode Access mode188 // 0 for Normal189 // 1 for AllowList190 //191 // Selector: setCollectionAccess(uint8) 41835d4c192 function setCollectionAccess(uint8 mode) external;193194 // Add the user to the allowed list.195 //196 // @param user Address of a trusted user.197 //198 // Selector: addToCollectionAllowList(address) 67844fe6199 function addToCollectionAllowList(address user) external;200201 // Remove the user from the allowed list.202 //203 // @param user Address of a removed user.204 //205 // Selector: removeFromCollectionAllowList(address) 85c51acb206 function removeFromCollectionAllowList(address user) external;207208 // Switch permission for minting.209 //210 // @param mode Enable if "true".211 //212 // Selector: setCollectionMintMode(bool) 00018e84213 function setCollectionMintMode(bool mode) external;214215 // Check that account is the owner or admin of the collection216 //217 // @param user account to verify218 // @return "true" if account is the owner or admin219 //220 // Selector: verifyOwnerOrAdmin(address) c2282493221 function verifyOwnerOrAdmin(address user) external view returns (bool);222223 // Check that substrate account is the owner or admin of the collection224 //225 // @param user account to verify226 // @return "true" if account is the owner or admin227 //228 // Selector: verifyOwnerOrAdmin(uint256) a83328e5229 function verifyOwnerOrAdmin(uint256 user) external view returns (bool);230231 // Returns collection type232 //233 // @return `Fungible` or `NFT` or `ReFungible`234 //235 // Selector: uniqueCollectionType() d34b55b8236 function uniqueCollectionType() external returns (string memory);237238 // Changes collection owner to another account239 //240 // @dev Owner can be changed only by current owner241 // @param newOwner new owner account242 //243 // Selector: changeOwner(address) a6f9dae1244 function changeOwner(address newOwner) external;245246 // Changes collection owner to another substrate account247 //248 // @dev Owner can be changed only by current owner249 // @param newOwner new owner substrate account250 //251 // Selector: changeOwner(uint256) 924c19f7252 function changeOwner(uint256 newOwner) external;253}257254258interface UniqueFungible is255interface UniqueFungible is259 Dummy,256 Dummy,tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth42 event MintingFinished();42 event MintingFinished();43}43}4445// Selector: 07f76b0c46interface Collection is Dummy, ERC165 {47 // Set collection property.48 //49 // @param key Property key.50 // @param value Propery value.51 //52 // Selector: setCollectionProperty(string,bytes) 2f073f6653 function setCollectionProperty(string memory key, bytes memory value)54 external;5556 // Delete collection property.57 //58 // @param key Property key.59 //60 // Selector: deleteCollectionProperty(string) 7b7debce61 function deleteCollectionProperty(string memory key) external;6263 // Get collection property.64 //65 // @dev Throws error if key not found.66 //67 // @param key Property key.68 // @return bytes The property corresponding to the key.69 //70 // Selector: collectionProperty(string) cf24fd6d71 function collectionProperty(string memory key)72 external73 view74 returns (bytes memory);7576 // Set the sponsor of the collection.77 //78 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.79 //80 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.81 //82 // Selector: setCollectionSponsor(address) 7623402e83 function setCollectionSponsor(address sponsor) external;8485 // Collection sponsorship confirmation.86 //87 // @dev After setting the sponsor for the collection, it must be confirmed with this function.88 //89 // Selector: confirmCollectionSponsorship() 3c50e97a90 function confirmCollectionSponsorship() external;9192 // Set limits for the collection.93 // @dev Throws error if limit not found.94 // @param limit Name of the limit. Valid names:95 // "accountTokenOwnershipLimit",96 // "sponsoredDataSize",97 // "sponsoredDataRateLimit",98 // "tokenLimit",99 // "sponsorTransferTimeout",100 // "sponsorApproveTimeout"101 // @param value Value of the limit.102 //103 // Selector: setCollectionLimit(string,uint32) 6a3841db104 function setCollectionLimit(string memory limit, uint32 value) external;105106 // Set limits for the collection.107 // @dev Throws error if limit not found.108 // @param limit Name of the limit. Valid names:109 // "ownerCanTransfer",110 // "ownerCanDestroy",111 // "transfersEnabled"112 // @param value Value of the limit.113 //114 // Selector: setCollectionLimit(string,bool) 993b7fba115 function setCollectionLimit(string memory limit, bool value) external;116117 // Get contract address.118 //119 // Selector: contractAddress() f6b4dfb4120 function contractAddress() external view returns (address);121122 // Add collection admin by substrate address.123 // @param new_admin Substrate administrator address.124 //125 // Selector: addCollectionAdminSubstrate(uint256) 5730062b126 function addCollectionAdminSubstrate(uint256 newAdmin) external;127128 // Remove collection admin by substrate address.129 // @param admin Substrate administrator address.130 //131 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9132 function removeCollectionAdminSubstrate(uint256 admin) external;133134 // Add collection admin.135 // @param new_admin Address of the added administrator.136 //137 // Selector: addCollectionAdmin(address) 92e462c7138 function addCollectionAdmin(address newAdmin) external;139140 // Remove collection admin.141 //142 // @param new_admin Address of the removed administrator.143 //144 // Selector: removeCollectionAdmin(address) fafd7b42145 function removeCollectionAdmin(address admin) external;146147 // Toggle accessibility of collection nesting.148 //149 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'150 //151 // Selector: setCollectionNesting(bool) 112d4586152 function setCollectionNesting(bool enable) external;153154 // Toggle accessibility of collection nesting.155 //156 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'157 // @param collections Addresses of collections that will be available for nesting.158 //159 // Selector: setCollectionNesting(bool,address[]) 64872396160 function setCollectionNesting(bool enable, address[] memory collections)161 external;162163 // Set the collection access method.164 // @param mode Access mode165 // 0 for Normal166 // 1 for AllowList167 //168 // Selector: setCollectionAccess(uint8) 41835d4c169 function setCollectionAccess(uint8 mode) external;170171 // Add the user to the allowed list.172 //173 // @param user Address of a trusted user.174 //175 // Selector: addToCollectionAllowList(address) 67844fe6176 function addToCollectionAllowList(address user) external;177178 // Remove the user from the allowed list.179 //180 // @param user Address of a removed user.181 //182 // Selector: removeFromCollectionAllowList(address) 85c51acb183 function removeFromCollectionAllowList(address user) external;184185 // Switch permission for minting.186 //187 // @param mode Enable if "true".188 //189 // Selector: setCollectionMintMode(bool) 00018e84190 function setCollectionMintMode(bool mode) external;191192 // Check that account is the owner or admin of the collection193 //194 // @param user account to verify195 // @return "true" if account is the owner or admin196 //197 // Selector: verifyOwnerOrAdmin(address) c2282493198 function verifyOwnerOrAdmin(address user) external view returns (bool);199200 // Check that substrate account is the owner or admin of the collection201 //202 // @param user account to verify203 // @return "true" if account is the owner or admin204 //205 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40206 function verifyOwnerOrAdminSubstrate(uint256 user)207 external208 view209 returns (bool);210211 // Returns collection type212 //213 // @return `Fungible` or `NFT` or `ReFungible`214 //215 // Selector: uniqueCollectionType() d34b55b8216 function uniqueCollectionType() external returns (string memory);217218 // Changes collection owner to another account219 //220 // @dev Owner can be changed only by current owner221 // @param newOwner new owner account222 //223 // Selector: changeOwner(address) a6f9dae1224 function changeOwner(address newOwner) external;225226 // Changes collection owner to another substrate account227 //228 // @dev Owner can be changed only by current owner229 // @param newOwner new owner substrate account230 //231 // Selector: changeOwnerSubstrate(uint256) 337e2c60232 function changeOwnerSubstrate(uint256 newOwner) external;233}23444235// Selector: 4136937745// Selector: 41369377236interface TokenProperties is Dummy, ERC165 {46interface TokenProperties is Dummy, ERC165 {517 returns (bool);327 returns (bool);518}328}329330// Selector: f077f83e331interface Collection is Dummy, ERC165 {332 // Set collection property.333 //334 // @param key Property key.335 // @param value Propery value.336 //337 // Selector: setCollectionProperty(string,bytes) 2f073f66338 function setCollectionProperty(string memory key, bytes memory value)339 external;340341 // Delete collection property.342 //343 // @param key Property key.344 //345 // Selector: deleteCollectionProperty(string) 7b7debce346 function deleteCollectionProperty(string memory key) external;347348 // Get collection property.349 //350 // @dev Throws error if key not found.351 //352 // @param key Property key.353 // @return bytes The property corresponding to the key.354 //355 // Selector: collectionProperty(string) cf24fd6d356 function collectionProperty(string memory key)357 external358 view359 returns (bytes memory);360361 // Set the sponsor of the collection.362 //363 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.364 //365 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.366 //367 // Selector: setCollectionSponsor(address) 7623402e368 function setCollectionSponsor(address sponsor) external;369370 // Collection sponsorship confirmation.371 //372 // @dev After setting the sponsor for the collection, it must be confirmed with this function.373 //374 // Selector: confirmCollectionSponsorship() 3c50e97a375 function confirmCollectionSponsorship() external;376377 // Set limits for the collection.378 // @dev Throws error if limit not found.379 // @param limit Name of the limit. Valid names:380 // "accountTokenOwnershipLimit",381 // "sponsoredDataSize",382 // "sponsoredDataRateLimit",383 // "tokenLimit",384 // "sponsorTransferTimeout",385 // "sponsorApproveTimeout"386 // @param value Value of the limit.387 //388 // Selector: setCollectionLimit(string,uint32) 6a3841db389 function setCollectionLimit(string memory limit, uint32 value) external;390391 // Set limits for the collection.392 // @dev Throws error if limit not found.393 // @param limit Name of the limit. Valid names:394 // "ownerCanTransfer",395 // "ownerCanDestroy",396 // "transfersEnabled"397 // @param value Value of the limit.398 //399 // Selector: setCollectionLimit(string,bool) 993b7fba400 function setCollectionLimit(string memory limit, bool value) external;401402 // Get contract address.403 //404 // Selector: contractAddress() f6b4dfb4405 function contractAddress() external view returns (address);406407 // Add collection admin by substrate address.408 // @param new_admin Substrate administrator address.409 //410 // Selector: addCollectionAdminSubstrate(uint256) 5730062b411 function addCollectionAdminSubstrate(uint256 newAdmin) external;412413 // Remove collection admin by substrate address.414 // @param admin Substrate administrator address.415 //416 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9417 function removeCollectionAdminSubstrate(uint256 admin) external;418419 // Add collection admin.420 // @param new_admin Address of the added administrator.421 //422 // Selector: addCollectionAdmin(address) 92e462c7423 function addCollectionAdmin(address newAdmin) external;424425 // Remove collection admin.426 //427 // @param new_admin Address of the removed administrator.428 //429 // Selector: removeCollectionAdmin(address) fafd7b42430 function removeCollectionAdmin(address admin) external;431432 // Toggle accessibility of collection nesting.433 //434 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'435 //436 // Selector: setCollectionNesting(bool) 112d4586437 function setCollectionNesting(bool enable) external;438439 // Toggle accessibility of collection nesting.440 //441 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'442 // @param collections Addresses of collections that will be available for nesting.443 //444 // Selector: setCollectionNesting(bool,address[]) 64872396445 function setCollectionNesting(bool enable, address[] memory collections)446 external;447448 // Set the collection access method.449 // @param mode Access mode450 // 0 for Normal451 // 1 for AllowList452 //453 // Selector: setCollectionAccess(uint8) 41835d4c454 function setCollectionAccess(uint8 mode) external;455456 // Add the user to the allowed list.457 //458 // @param user Address of a trusted user.459 //460 // Selector: addToCollectionAllowList(address) 67844fe6461 function addToCollectionAllowList(address user) external;462463 // Remove the user from the allowed list.464 //465 // @param user Address of a removed user.466 //467 // Selector: removeFromCollectionAllowList(address) 85c51acb468 function removeFromCollectionAllowList(address user) external;469470 // Switch permission for minting.471 //472 // @param mode Enable if "true".473 //474 // Selector: setCollectionMintMode(bool) 00018e84475 function setCollectionMintMode(bool mode) external;476477 // Check that account is the owner or admin of the collection478 //479 // @param user account to verify480 // @return "true" if account is the owner or admin481 //482 // Selector: verifyOwnerOrAdmin(address) c2282493483 function verifyOwnerOrAdmin(address user) external view returns (bool);484485 // Check that substrate account is the owner or admin of the collection486 //487 // @param user account to verify488 // @return "true" if account is the owner or admin489 //490 // Selector: verifyOwnerOrAdmin(uint256) a83328e5491 function verifyOwnerOrAdmin(uint256 user) external view returns (bool);492493 // Returns collection type494 //495 // @return `Fungible` or `NFT` or `ReFungible`496 //497 // Selector: uniqueCollectionType() d34b55b8498 function uniqueCollectionType() external returns (string memory);499500 // Changes collection owner to another account501 //502 // @dev Owner can be changed only by current owner503 // @param newOwner new owner account504 //505 // Selector: changeOwner(address) a6f9dae1506 function changeOwner(address newOwner) external;507508 // Changes collection owner to another substrate account509 //510 // @dev Owner can be changed only by current owner511 // @param newOwner new owner substrate account512 //513 // Selector: changeOwner(uint256) 924c19f7514 function changeOwner(uint256 newOwner) external;515}519516520interface UniqueNFT is517interface UniqueNFT is521 Dummy,518 Dummy,tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth42 event MintingFinished();42 event MintingFinished();43}43}4445// Selector: 07f76b0c46interface Collection is Dummy, ERC165 {47 // Set collection property.48 //49 // @param key Property key.50 // @param value Propery value.51 //52 // Selector: setCollectionProperty(string,bytes) 2f073f6653 function setCollectionProperty(string memory key, bytes memory value)54 external;5556 // Delete collection property.57 //58 // @param key Property key.59 //60 // Selector: deleteCollectionProperty(string) 7b7debce61 function deleteCollectionProperty(string memory key) external;6263 // Get collection property.64 //65 // @dev Throws error if key not found.66 //67 // @param key Property key.68 // @return bytes The property corresponding to the key.69 //70 // Selector: collectionProperty(string) cf24fd6d71 function collectionProperty(string memory key)72 external73 view74 returns (bytes memory);7576 // Set the sponsor of the collection.77 //78 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.79 //80 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.81 //82 // Selector: setCollectionSponsor(address) 7623402e83 function setCollectionSponsor(address sponsor) external;8485 // Collection sponsorship confirmation.86 //87 // @dev After setting the sponsor for the collection, it must be confirmed with this function.88 //89 // Selector: confirmCollectionSponsorship() 3c50e97a90 function confirmCollectionSponsorship() external;9192 // Set limits for the collection.93 // @dev Throws error if limit not found.94 // @param limit Name of the limit. Valid names:95 // "accountTokenOwnershipLimit",96 // "sponsoredDataSize",97 // "sponsoredDataRateLimit",98 // "tokenLimit",99 // "sponsorTransferTimeout",100 // "sponsorApproveTimeout"101 // @param value Value of the limit.102 //103 // Selector: setCollectionLimit(string,uint32) 6a3841db104 function setCollectionLimit(string memory limit, uint32 value) external;105106 // Set limits for the collection.107 // @dev Throws error if limit not found.108 // @param limit Name of the limit. Valid names:109 // "ownerCanTransfer",110 // "ownerCanDestroy",111 // "transfersEnabled"112 // @param value Value of the limit.113 //114 // Selector: setCollectionLimit(string,bool) 993b7fba115 function setCollectionLimit(string memory limit, bool value) external;116117 // Get contract address.118 //119 // Selector: contractAddress() f6b4dfb4120 function contractAddress() external view returns (address);121122 // Add collection admin by substrate address.123 // @param new_admin Substrate administrator address.124 //125 // Selector: addCollectionAdminSubstrate(uint256) 5730062b126 function addCollectionAdminSubstrate(uint256 newAdmin) external;127128 // Remove collection admin by substrate address.129 // @param admin Substrate administrator address.130 //131 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9132 function removeCollectionAdminSubstrate(uint256 admin) external;133134 // Add collection admin.135 // @param new_admin Address of the added administrator.136 //137 // Selector: addCollectionAdmin(address) 92e462c7138 function addCollectionAdmin(address newAdmin) external;139140 // Remove collection admin.141 //142 // @param new_admin Address of the removed administrator.143 //144 // Selector: removeCollectionAdmin(address) fafd7b42145 function removeCollectionAdmin(address admin) external;146147 // Toggle accessibility of collection nesting.148 //149 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'150 //151 // Selector: setCollectionNesting(bool) 112d4586152 function setCollectionNesting(bool enable) external;153154 // Toggle accessibility of collection nesting.155 //156 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'157 // @param collections Addresses of collections that will be available for nesting.158 //159 // Selector: setCollectionNesting(bool,address[]) 64872396160 function setCollectionNesting(bool enable, address[] memory collections)161 external;162163 // Set the collection access method.164 // @param mode Access mode165 // 0 for Normal166 // 1 for AllowList167 //168 // Selector: setCollectionAccess(uint8) 41835d4c169 function setCollectionAccess(uint8 mode) external;170171 // Add the user to the allowed list.172 //173 // @param user Address of a trusted user.174 //175 // Selector: addToCollectionAllowList(address) 67844fe6176 function addToCollectionAllowList(address user) external;177178 // Remove the user from the allowed list.179 //180 // @param user Address of a removed user.181 //182 // Selector: removeFromCollectionAllowList(address) 85c51acb183 function removeFromCollectionAllowList(address user) external;184185 // Switch permission for minting.186 //187 // @param mode Enable if "true".188 //189 // Selector: setCollectionMintMode(bool) 00018e84190 function setCollectionMintMode(bool mode) external;191192 // Check that account is the owner or admin of the collection193 //194 // @param user account to verify195 // @return "true" if account is the owner or admin196 //197 // Selector: verifyOwnerOrAdmin(address) c2282493198 function verifyOwnerOrAdmin(address user) external view returns (bool);199200 // Check that substrate account is the owner or admin of the collection201 //202 // @param user account to verify203 // @return "true" if account is the owner or admin204 //205 // Selector: verifyOwnerOrAdminSubstrate(uint256) fe818e40206 function verifyOwnerOrAdminSubstrate(uint256 user)207 external208 view209 returns (bool);210211 // Returns collection type212 //213 // @return `Fungible` or `NFT` or `ReFungible`214 //215 // Selector: uniqueCollectionType() d34b55b8216 function uniqueCollectionType() external returns (string memory);217218 // Changes collection owner to another account219 //220 // @dev Owner can be changed only by current owner221 // @param newOwner new owner account222 //223 // Selector: changeOwner(address) a6f9dae1224 function changeOwner(address newOwner) external;225226 // Changes collection owner to another substrate account227 //228 // @dev Owner can be changed only by current owner229 // @param newOwner new owner substrate account230 //231 // Selector: changeOwnerSubstrate(uint256) 337e2c60232 function changeOwnerSubstrate(uint256 newOwner) external;233}23444235// Selector: 4136937745// Selector: 41369377236interface TokenProperties is Dummy, ERC165 {46interface TokenProperties is Dummy, ERC165 {527 returns (address);337 returns (address);528}338}339340// Selector: f077f83e341interface Collection is Dummy, ERC165 {342 // Set collection property.343 //344 // @param key Property key.345 // @param value Propery value.346 //347 // Selector: setCollectionProperty(string,bytes) 2f073f66348 function setCollectionProperty(string memory key, bytes memory value)349 external;350351 // Delete collection property.352 //353 // @param key Property key.354 //355 // Selector: deleteCollectionProperty(string) 7b7debce356 function deleteCollectionProperty(string memory key) external;357358 // Get collection property.359 //360 // @dev Throws error if key not found.361 //362 // @param key Property key.363 // @return bytes The property corresponding to the key.364 //365 // Selector: collectionProperty(string) cf24fd6d366 function collectionProperty(string memory key)367 external368 view369 returns (bytes memory);370371 // Set the sponsor of the collection.372 //373 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.374 //375 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.376 //377 // Selector: setCollectionSponsor(address) 7623402e378 function setCollectionSponsor(address sponsor) external;379380 // Collection sponsorship confirmation.381 //382 // @dev After setting the sponsor for the collection, it must be confirmed with this function.383 //384 // Selector: confirmCollectionSponsorship() 3c50e97a385 function confirmCollectionSponsorship() external;386387 // Set limits for the collection.388 // @dev Throws error if limit not found.389 // @param limit Name of the limit. Valid names:390 // "accountTokenOwnershipLimit",391 // "sponsoredDataSize",392 // "sponsoredDataRateLimit",393 // "tokenLimit",394 // "sponsorTransferTimeout",395 // "sponsorApproveTimeout"396 // @param value Value of the limit.397 //398 // Selector: setCollectionLimit(string,uint32) 6a3841db399 function setCollectionLimit(string memory limit, uint32 value) external;400401 // Set limits for the collection.402 // @dev Throws error if limit not found.403 // @param limit Name of the limit. Valid names:404 // "ownerCanTransfer",405 // "ownerCanDestroy",406 // "transfersEnabled"407 // @param value Value of the limit.408 //409 // Selector: setCollectionLimit(string,bool) 993b7fba410 function setCollectionLimit(string memory limit, bool value) external;411412 // Get contract address.413 //414 // Selector: contractAddress() f6b4dfb4415 function contractAddress() external view returns (address);416417 // Add collection admin by substrate address.418 // @param new_admin Substrate administrator address.419 //420 // Selector: addCollectionAdminSubstrate(uint256) 5730062b421 function addCollectionAdminSubstrate(uint256 newAdmin) external;422423 // Remove collection admin by substrate address.424 // @param admin Substrate administrator address.425 //426 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9427 function removeCollectionAdminSubstrate(uint256 admin) external;428429 // Add collection admin.430 // @param new_admin Address of the added administrator.431 //432 // Selector: addCollectionAdmin(address) 92e462c7433 function addCollectionAdmin(address newAdmin) external;434435 // Remove collection admin.436 //437 // @param new_admin Address of the removed administrator.438 //439 // Selector: removeCollectionAdmin(address) fafd7b42440 function removeCollectionAdmin(address admin) external;441442 // Toggle accessibility of collection nesting.443 //444 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'445 //446 // Selector: setCollectionNesting(bool) 112d4586447 function setCollectionNesting(bool enable) external;448449 // Toggle accessibility of collection nesting.450 //451 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'452 // @param collections Addresses of collections that will be available for nesting.453 //454 // Selector: setCollectionNesting(bool,address[]) 64872396455 function setCollectionNesting(bool enable, address[] memory collections)456 external;457458 // Set the collection access method.459 // @param mode Access mode460 // 0 for Normal461 // 1 for AllowList462 //463 // Selector: setCollectionAccess(uint8) 41835d4c464 function setCollectionAccess(uint8 mode) external;465466 // Add the user to the allowed list.467 //468 // @param user Address of a trusted user.469 //470 // Selector: addToCollectionAllowList(address) 67844fe6471 function addToCollectionAllowList(address user) external;472473 // Remove the user from the allowed list.474 //475 // @param user Address of a removed user.476 //477 // Selector: removeFromCollectionAllowList(address) 85c51acb478 function removeFromCollectionAllowList(address user) external;479480 // Switch permission for minting.481 //482 // @param mode Enable if "true".483 //484 // Selector: setCollectionMintMode(bool) 00018e84485 function setCollectionMintMode(bool mode) external;486487 // Check that account is the owner or admin of the collection488 //489 // @param user account to verify490 // @return "true" if account is the owner or admin491 //492 // Selector: verifyOwnerOrAdmin(address) c2282493493 function verifyOwnerOrAdmin(address user) external view returns (bool);494495 // Check that substrate account is the owner or admin of the collection496 //497 // @param user account to verify498 // @return "true" if account is the owner or admin499 //500 // Selector: verifyOwnerOrAdmin(uint256) a83328e5501 function verifyOwnerOrAdmin(uint256 user) external view returns (bool);502503 // Returns collection type504 //505 // @return `Fungible` or `NFT` or `ReFungible`506 //507 // Selector: uniqueCollectionType() d34b55b8508 function uniqueCollectionType() external returns (string memory);509510 // Changes collection owner to another account511 //512 // @dev Owner can be changed only by current owner513 // @param newOwner new owner account514 //515 // Selector: changeOwner(address) a6f9dae1516 function changeOwner(address newOwner) external;517518 // Changes collection owner to another substrate account519 //520 // @dev Owner can be changed only by current owner521 // @param newOwner new owner substrate account522 //523 // Selector: changeOwner(uint256) 924c19f7524 function changeOwner(uint256 newOwner) external;525}529526530interface UniqueRefungible is527interface UniqueRefungible is531 Dummy,528 Dummy,tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth373 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);373 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);374 374 375 expect(await collectionEvm.methods.verifyOwnerOrAdmin(owner).call()).to.be.true;375 expect(await collectionEvm.methods.verifyOwnerOrAdmin(owner).call()).to.be.true;376 expect(await collectionEvm.methods.verifyOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;376 expect(await collectionEvm.methods['verifyOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.false;377 await collectionEvm.methods.changeOwnerSubstrate(newOwner.addressRaw).send();377 await collectionEvm.methods['changeOwner(uint256)'](newOwner.addressRaw).send();378 378 379 expect(await collectionEvm.methods.verifyOwnerOrAdmin(owner).call()).to.be.false;379 expect(await collectionEvm.methods.verifyOwnerOrAdmin(owner).call()).to.be.false;380 expect(await collectionEvm.methods.verifyOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;380 expect(await collectionEvm.methods['verifyOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.true;381 });381 });382382383 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {383 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {390 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);390 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);391 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);391 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);392392393 const cost = await recordEthFee(api, owner, () => collectionEvm.methods.changeOwnerSubstrate(newOwner.addressRaw).send());393 const cost = await recordEthFee(api, owner, () => collectionEvm.methods['changeOwner(uint256)'](newOwner.addressRaw).send());394 expect(cost < BigInt(0.2 * Number(UNIQUE)));394 expect(cost < BigInt(0.2 * Number(UNIQUE)));395 expect(cost > 0);395 expect(cost > 0);396 });396 });406 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);406 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);407 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);407 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);408 408 409 await expect(collectionEvm.methods.changeOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;409 await expect(collectionEvm.methods['changeOwner(uint256)'](newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;410 expect(await collectionEvm.methods.verifyOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;410 expect(await collectionEvm.methods['verifyOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.false;411 });411 });412});412});tests/src/eth/fungibleAbi.jsondiffbeforeafterboth115 "stateMutability": "nonpayable",115 "stateMutability": "nonpayable",116 "type": "function"116 "type": "function"117 },117 },118 {119 "inputs": [120 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }121 ],122 "name": "changeOwner",123 "outputs": [],124 "stateMutability": "nonpayable",125 "type": "function"126 },118 {127 {119 "inputs": [128 "inputs": [120 { "internalType": "address", "name": "newOwner", "type": "address" }129 { "internalType": "address", "name": "newOwner", "type": "address" }124 "stateMutability": "nonpayable",133 "stateMutability": "nonpayable",125 "type": "function"134 "type": "function"126 },135 },127 {128 "inputs": [129 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }130 ],131 "name": "changeOwnerSubstrate",132 "outputs": [],133 "stateMutability": "nonpayable",134 "type": "function"135 },136 {136 {137 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],137 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],138 "name": "collectionProperty",138 "name": "collectionProperty",329 },329 },330 {330 {331 "inputs": [331 "inputs": [332 { "internalType": "address", "name": "user", "type": "address" }332 { "internalType": "uint256", "name": "user", "type": "uint256" }333 ],333 ],334 "name": "verifyOwnerOrAdmin",334 "name": "verifyOwnerOrAdmin",335 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],335 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],338 },338 },339 {339 {340 "inputs": [340 "inputs": [341 { "internalType": "uint256", "name": "user", "type": "uint256" }341 { "internalType": "address", "name": "user", "type": "address" }342 ],342 ],343 "name": "verifyOwnerOrAdminSubstrate",343 "name": "verifyOwnerOrAdmin",344 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],344 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],345 "stateMutability": "view",345 "stateMutability": "view",346 "type": "function"346 "type": "function"tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth145 "stateMutability": "nonpayable",145 "stateMutability": "nonpayable",146 "type": "function"146 "type": "function"147 },147 },148 {149 "inputs": [150 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }151 ],152 "name": "changeOwner",153 "outputs": [],154 "stateMutability": "nonpayable",155 "type": "function"156 },148 {157 {149 "inputs": [158 "inputs": [150 { "internalType": "address", "name": "newOwner", "type": "address" }159 { "internalType": "address", "name": "newOwner", "type": "address" }154 "stateMutability": "nonpayable",163 "stateMutability": "nonpayable",155 "type": "function"164 "type": "function"156 },165 },157 {158 "inputs": [159 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }160 ],161 "name": "changeOwnerSubstrate",162 "outputs": [],163 "stateMutability": "nonpayable",164 "type": "function"165 },166 {166 {167 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],167 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],168 "name": "collectionProperty",168 "name": "collectionProperty",554 },554 },555 {555 {556 "inputs": [556 "inputs": [557 { "internalType": "address", "name": "user", "type": "address" }557 { "internalType": "uint256", "name": "user", "type": "uint256" }558 ],558 ],559 "name": "verifyOwnerOrAdmin",559 "name": "verifyOwnerOrAdmin",560 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],560 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],563 },563 },564 {564 {565 "inputs": [565 "inputs": [566 { "internalType": "uint256", "name": "user", "type": "uint256" }566 { "internalType": "address", "name": "user", "type": "address" }567 ],567 ],568 "name": "verifyOwnerOrAdminSubstrate",568 "name": "verifyOwnerOrAdmin",569 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],569 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],570 "stateMutability": "view",570 "stateMutability": "view",571 "type": "function"571 "type": "function"tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth145 "stateMutability": "nonpayable",145 "stateMutability": "nonpayable",146 "type": "function"146 "type": "function"147 },147 },148 {149 "inputs": [150 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }151 ],152 "name": "changeOwner",153 "outputs": [],154 "stateMutability": "nonpayable",155 "type": "function"156 },148 {157 {149 "inputs": [158 "inputs": [150 { "internalType": "address", "name": "newOwner", "type": "address" }159 { "internalType": "address", "name": "newOwner", "type": "address" }154 "stateMutability": "nonpayable",163 "stateMutability": "nonpayable",155 "type": "function"164 "type": "function"156 },165 },157 {158 "inputs": [159 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }160 ],161 "name": "changeOwnerSubstrate",162 "outputs": [],163 "stateMutability": "nonpayable",164 "type": "function"165 },166 {166 {167 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],167 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],168 "name": "collectionProperty",168 "name": "collectionProperty",563 },563 },564 {564 {565 "inputs": [565 "inputs": [566 { "internalType": "address", "name": "user", "type": "address" }566 { "internalType": "uint256", "name": "user", "type": "uint256" }567 ],567 ],568 "name": "verifyOwnerOrAdmin",568 "name": "verifyOwnerOrAdmin",569 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],569 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],572 },572 },573 {573 {574 "inputs": [574 "inputs": [575 { "internalType": "uint256", "name": "user", "type": "uint256" }575 { "internalType": "address", "name": "user", "type": "address" }576 ],576 ],577 "name": "verifyOwnerOrAdminSubstrate",577 "name": "verifyOwnerOrAdmin",578 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],578 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],579 "stateMutability": "view",579 "stateMutability": "view",580 "type": "function"580 "type": "function"