difftreelog
chore return separate setOwner and isOwnerOrAdmin methods
in: master
14 files changed
pallets/common/src/erc.rsdiffbeforeafterboth421 ///421 ///422 /// @param user account to verify422 /// @param user account to verify423 /// @return "true" if account is the owner or admin423 /// @return "true" if account is the owner or admin424 #[solidity(rename_selector = "isOwnerOrAdmin")]425 fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {424 fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {426 let user = convert_substrate_address_to_cross_account_id::<T>(user);425 let user = convert_substrate_address_to_cross_account_id::<T>(user);427 Ok(self.is_owner_or_admin(&user))426 Ok(self.is_owner_or_admin(&user))454 ///453 ///455 /// @dev Owner can be changed only by current owner454 /// @dev Owner can be changed only by current owner456 /// @param newOwner new owner substrate account455 /// @param newOwner new owner substrate account457 #[solidity(rename_selector = "setOwner")]458 fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {456 fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {459 let caller = T::CrossAccountId::from_eth(caller);457 let caller = T::CrossAccountId::from_eth(caller);460 let new_owner = convert_substrate_address_to_cross_account_id::<T>(new_owner);458 let new_owner = convert_substrate_address_to_cross_account_id::<T>(new_owner);pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth31 );31 );32}32}3334// Selector: 2f4a708535contract 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: isOwnerOrAdmin(address) 9811b0c7266 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67279 function isOwnerOrAdmin(uint256 user) public view returns (bool) {280 require(false, stub_error);281 user;282 dummy;283 return false;284 }285286 // Returns collection type287 //288 // @return `Fungible` or `NFT` or `ReFungible`289 //290 // Selector: uniqueCollectionType() d34b55b8291 function uniqueCollectionType() public returns (string memory) {292 require(false, stub_error);293 dummy = 0;294 return "";295 }296297 // Changes collection owner to another account298 //299 // @dev Owner can be changed only by current owner300 // @param newOwner new owner account301 //302 // Selector: setOwner(address) 13af4035303 function setOwner(address newOwner) public {304 require(false, stub_error);305 newOwner;306 dummy = 0;307 }308309 // Changes collection owner to another substrate account310 //311 // @dev Owner can be changed only by current owner312 // @param newOwner new owner substrate account313 //314 // Selector: setOwner(uint256) 8041494e315 function setOwner(uint256 newOwner) public {316 require(false, stub_error);317 newOwner;318 dummy = 0;319 }320}32133322// Selector: 79cc679034// Selector: 79cc6790323contract ERC20UniqueExtensions is Dummy, ERC165 {35contract ERC20UniqueExtensions is Dummy, ERC165 {415 }127 }416}128}129130// Selector: ffe4da23131contract 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: isOwnerOrAdmin(address) 9811b0c7362 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00375 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035399 function setOwner(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: setOwnerSubstrate(uint256) b212138f411 function setOwnerSubstrate(uint256 newOwner) public {412 require(false, stub_error);413 newOwner;414 dummy = 0;415 }416}417417418contract UniqueFungible is418contract UniqueFungible is419 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: 2f4a708555contract 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: isOwnerOrAdmin(address) 9811b0c7286 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67299 function isOwnerOrAdmin(uint256 user) public view returns (bool) {300 require(false, stub_error);301 user;302 dummy;303 return false;304 }305306 // Returns collection type307 //308 // @return `Fungible` or `NFT` or `ReFungible`309 //310 // Selector: uniqueCollectionType() d34b55b8311 function uniqueCollectionType() public returns (string memory) {312 require(false, stub_error);313 dummy = 0;314 return "";315 }316317 // Changes collection owner to another account318 //319 // @dev Owner can be changed only by current owner320 // @param newOwner new owner account321 //322 // Selector: setOwner(address) 13af4035323 function setOwner(address newOwner) public {324 require(false, stub_error);325 newOwner;326 dummy = 0;327 }328329 // Changes collection owner to another substrate account330 //331 // @dev Owner can be changed only by current owner332 // @param newOwner new owner substrate account333 //334 // Selector: setOwner(uint256) 8041494e335 function setOwner(uint256 newOwner) public {336 require(false, stub_error);337 newOwner;338 dummy = 0;339 }340}34153342// Selector: 4136937754// Selector: 41369377343contract TokenProperties is Dummy, ERC165 {55contract TokenProperties is Dummy, ERC165 {782 }494 }783}495}496497// Selector: ffe4da23498contract 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: isOwnerOrAdmin(address) 9811b0c7729 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00742 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035766 function setOwner(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: setOwnerSubstrate(uint256) b212138f778 function setOwnerSubstrate(uint256 newOwner) public {779 require(false, stub_error);780 newOwner;781 dummy = 0;782 }783}784784785contract UniqueNFT is785contract UniqueNFT is786 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: 2f4a708555contract 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: isOwnerOrAdmin(address) 9811b0c7286 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67299 function isOwnerOrAdmin(uint256 user) public view returns (bool) {300 require(false, stub_error);301 user;302 dummy;303 return false;304 }305306 // Returns collection type307 //308 // @return `Fungible` or `NFT` or `ReFungible`309 //310 // Selector: uniqueCollectionType() d34b55b8311 function uniqueCollectionType() public returns (string memory) {312 require(false, stub_error);313 dummy = 0;314 return "";315 }316317 // Changes collection owner to another account318 //319 // @dev Owner can be changed only by current owner320 // @param newOwner new owner account321 //322 // Selector: setOwner(address) 13af4035323 function setOwner(address newOwner) public {324 require(false, stub_error);325 newOwner;326 dummy = 0;327 }328329 // Changes collection owner to another substrate account330 //331 // @dev Owner can be changed only by current owner332 // @param newOwner new owner substrate account333 //334 // Selector: setOwner(uint256) 8041494e335 function setOwner(uint256 newOwner) public {336 require(false, stub_error);337 newOwner;338 dummy = 0;339 }340}34153342// Selector: 4136937754// Selector: 41369377343contract TokenProperties is Dummy, ERC165 {55contract TokenProperties is Dummy, ERC165 {794 }506 }795}507}508509// Selector: ffe4da23510contract 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: isOwnerOrAdmin(address) 9811b0c7741 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00754 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035778 function setOwner(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: setOwnerSubstrate(uint256) b212138f790 function setOwnerSubstrate(uint256 newOwner) public {791 require(false, stub_error);792 newOwner;793 dummy = 0;794 }795}796796797contract UniqueRefungible is797contract UniqueRefungible is798 Dummy,798 Dummy,tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth22 );22 );23}23}2425// Selector: 2f4a708526interface 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: isOwnerOrAdmin(address) 9811b0c7178 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67186 function isOwnerOrAdmin(uint256 user) external view returns (bool);187188 // Returns collection type189 //190 // @return `Fungible` or `NFT` or `ReFungible`191 //192 // Selector: uniqueCollectionType() d34b55b8193 function uniqueCollectionType() external returns (string memory);194195 // Changes collection owner to another account196 //197 // @dev Owner can be changed only by current owner198 // @param newOwner new owner account199 //200 // Selector: setOwner(address) 13af4035201 function setOwner(address newOwner) external;202203 // Changes collection owner to another substrate account204 //205 // @dev Owner can be changed only by current owner206 // @param newOwner new owner substrate account207 //208 // Selector: setOwner(uint256) 8041494e209 function setOwner(uint256 newOwner) external;210}21124212// Selector: 79cc679025// Selector: 79cc6790213interface ERC20UniqueExtensions is Dummy, ERC165 {26interface ERC20UniqueExtensions is Dummy, ERC165 {252 returns (uint256);65 returns (uint256);253}66}6768// Selector: ffe4da2369interface 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: isOwnerOrAdmin(address) 9811b0c7221 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00229 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035244 function setOwner(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: setOwnerSubstrate(uint256) b212138f252 function setOwnerSubstrate(uint256 newOwner) external;253}254254255interface UniqueFungible is255interface UniqueFungible is256 Dummy,256 Dummy,tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth42 event MintingFinished();42 event MintingFinished();43}43}4445// Selector: 2f4a708546interface 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: isOwnerOrAdmin(address) 9811b0c7198 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67206 function isOwnerOrAdmin(uint256 user) external view returns (bool);207208 // Returns collection type209 //210 // @return `Fungible` or `NFT` or `ReFungible`211 //212 // Selector: uniqueCollectionType() d34b55b8213 function uniqueCollectionType() external returns (string memory);214215 // Changes collection owner to another account216 //217 // @dev Owner can be changed only by current owner218 // @param newOwner new owner account219 //220 // Selector: setOwner(address) 13af4035221 function setOwner(address newOwner) external;222223 // Changes collection owner to another substrate account224 //225 // @dev Owner can be changed only by current owner226 // @param newOwner new owner substrate account227 //228 // Selector: setOwner(uint256) 8041494e229 function setOwner(uint256 newOwner) external;230}23144232// Selector: 4136937745// Selector: 41369377233interface TokenProperties is Dummy, ERC165 {46interface TokenProperties is Dummy, ERC165 {514 returns (bool);327 returns (bool);515}328}329330// Selector: ffe4da23331interface 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: isOwnerOrAdmin(address) 9811b0c7483 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00491 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035506 function setOwner(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: setOwnerSubstrate(uint256) b212138f514 function setOwnerSubstrate(uint256 newOwner) external;515}516516517interface UniqueNFT is517interface UniqueNFT is518 Dummy,518 Dummy,tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth42 event MintingFinished();42 event MintingFinished();43}43}4445// Selector: 2f4a708546interface 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: isOwnerOrAdmin(address) 9811b0c7198 function isOwnerOrAdmin(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: isOwnerOrAdmin(uint256) 8a6cfe67206 function isOwnerOrAdmin(uint256 user) external view returns (bool);207208 // Returns collection type209 //210 // @return `Fungible` or `NFT` or `ReFungible`211 //212 // Selector: uniqueCollectionType() d34b55b8213 function uniqueCollectionType() external returns (string memory);214215 // Changes collection owner to another account216 //217 // @dev Owner can be changed only by current owner218 // @param newOwner new owner account219 //220 // Selector: setOwner(address) 13af4035221 function setOwner(address newOwner) external;222223 // Changes collection owner to another substrate account224 //225 // @dev Owner can be changed only by current owner226 // @param newOwner new owner substrate account227 //228 // Selector: setOwner(uint256) 8041494e229 function setOwner(uint256 newOwner) external;230}23144232// Selector: 4136937745// Selector: 41369377233interface TokenProperties is Dummy, ERC165 {46interface TokenProperties is Dummy, ERC165 {524 returns (address);337 returns (address);525}338}339340// Selector: ffe4da23341interface 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: isOwnerOrAdmin(address) 9811b0c7493 function isOwnerOrAdmin(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: isOwnerOrAdminSubstrate(uint256) 68910e00501 function isOwnerOrAdminSubstrate(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: setOwner(address) 13af4035516 function setOwner(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: setOwnerSubstrate(uint256) b212138f524 function setOwnerSubstrate(uint256 newOwner) external;525}526526527interface UniqueRefungible is527interface UniqueRefungible is528 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.isOwnerOrAdmin(owner).call()).to.be.true;375 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;376 expect(await collectionEvm.methods['isOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.false;376 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;377 377 await collectionEvm.methods['setOwner(uint256)'](newOwner.addressRaw).send();378 await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();378 379 379 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;380 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;380 expect(await collectionEvm.methods['isOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.true;381 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;381 });382 });382383383 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {384 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {390 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);391 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);391 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);392 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);392393393 const cost = await recordEthFee(api, owner, () => collectionEvm.methods['setOwner(uint256)'](newOwner.addressRaw).send());394 const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());394 expect(cost < BigInt(0.2 * Number(UNIQUE)));395 expect(cost < BigInt(0.2 * Number(UNIQUE)));395 expect(cost > 0);396 expect(cost > 0);396 });397 });406 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);407 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);407 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);408 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);408 409 409 await expect(collectionEvm.methods['setOwner(uint256)'](newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;410 await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;410 expect(await collectionEvm.methods['isOwnerOrAdmin(uint256)'](newOwner.addressRaw).call()).to.be.false;411 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;411 });412 });412});413});tests/src/eth/fungibleAbi.jsondiffbeforeafterboth150 "stateMutability": "nonpayable",150 "stateMutability": "nonpayable",151 "type": "function"151 "type": "function"152 },152 },153 {154 "inputs": [155 { "internalType": "uint256", "name": "user", "type": "uint256" }156 ],157 "name": "isOwnerOrAdmin",158 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],159 "stateMutability": "view",160 "type": "function"161 },162 {153 {163 "inputs": [154 "inputs": [164 { "internalType": "address", "name": "user", "type": "address" }155 { "internalType": "address", "name": "user", "type": "address" }168 "stateMutability": "view",159 "stateMutability": "view",169 "type": "function"160 "type": "function"170 },161 },162 {163 "inputs": [164 { "internalType": "uint256", "name": "user", "type": "uint256" }165 ],166 "name": "isOwnerOrAdminSubstrate",167 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],168 "stateMutability": "view",169 "type": "function"170 },171 {171 {172 "inputs": [],172 "inputs": [],173 "name": "name",173 "name": "name",289 "inputs": [289 "inputs": [290 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }290 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }291 ],291 ],292 "name": "setOwner",292 "name": "setOwnerSubstrate",293 "outputs": [],293 "outputs": [],294 "stateMutability": "nonpayable",294 "stateMutability": "nonpayable",295 "type": "function"295 "type": "function"tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth209 "stateMutability": "view",209 "stateMutability": "view",210 "type": "function"210 "type": "function"211 },211 },212 {213 "inputs": [214 { "internalType": "uint256", "name": "user", "type": "uint256" }215 ],216 "name": "isOwnerOrAdmin",217 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],218 "stateMutability": "view",219 "type": "function"220 },221 {212 {222 "inputs": [213 "inputs": [223 { "internalType": "address", "name": "user", "type": "address" }214 { "internalType": "address", "name": "user", "type": "address" }227 "stateMutability": "view",218 "stateMutability": "view",228 "type": "function"219 "type": "function"229 },220 },221 {222 "inputs": [223 { "internalType": "uint256", "name": "user", "type": "uint256" }224 ],225 "name": "isOwnerOrAdminSubstrate",226 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],227 "stateMutability": "view",228 "type": "function"229 },230 {230 {231 "inputs": [231 "inputs": [232 { "internalType": "address", "name": "to", "type": "address" },232 { "internalType": "address", "name": "to", "type": "address" },463 "inputs": [463 "inputs": [464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }465 ],465 ],466 "name": "setOwner",466 "name": "setOwnerSubstrate",467 "outputs": [],467 "outputs": [],468 "stateMutability": "nonpayable",468 "stateMutability": "nonpayable",469 "type": "function"469 "type": "function"tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth209 "stateMutability": "view",209 "stateMutability": "view",210 "type": "function"210 "type": "function"211 },211 },212 {213 "inputs": [214 { "internalType": "uint256", "name": "user", "type": "uint256" }215 ],216 "name": "isOwnerOrAdmin",217 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],218 "stateMutability": "view",219 "type": "function"220 },221 {212 {222 "inputs": [213 "inputs": [223 { "internalType": "address", "name": "user", "type": "address" }214 { "internalType": "address", "name": "user", "type": "address" }227 "stateMutability": "view",218 "stateMutability": "view",228 "type": "function"219 "type": "function"229 },220 },221 {222 "inputs": [223 { "internalType": "uint256", "name": "user", "type": "uint256" }224 ],225 "name": "isOwnerOrAdminSubstrate",226 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],227 "stateMutability": "view",228 "type": "function"229 },230 {230 {231 "inputs": [231 "inputs": [232 { "internalType": "address", "name": "to", "type": "address" },232 { "internalType": "address", "name": "to", "type": "address" },463 "inputs": [463 "inputs": [464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }465 ],465 ],466 "name": "setOwner",466 "name": "setOwnerSubstrate",467 "outputs": [],467 "outputs": [],468 "stateMutability": "nonpayable",468 "stateMutability": "nonpayable",469 "type": "function"469 "type": "function"