difftreelog
Merge branch 'develop' into test/move-to-playgrounds
in: master
28 files changed
.docker/forkless-config/launch-config-forkless-data.j2diffbeforeafterboth86 },86 },87 "parachains": [87 "parachains": [88 {88 {89 "bin": "/unique-chain/target/release/unique-collator",89 "bin": "/unique-chain/current/release/unique-collator",90 "upgradeBin": "/unique-chain/target/release/unique-collator",90 "upgradeBin": "/unique-chain/target/release/unique-collator",91 "upgradeWasm": "/unique-chain/target/release/wbuild/{{ FEATURE }}/{{ RUNTIME }}_runtime.compact.compressed.wasm",91 "upgradeWasm": "/unique-chain/target/release/wbuild/{{ FEATURE }}/{{ RUNTIME }}_runtime.compact.compressed.wasm",92 "id": "1000",92 "id": "1000",.github/workflows/nodes-only-update.ymldiffbeforeafterboth191 shell: bash191 shell: bash192192193 - name: Run tests before Node Parachain upgrade193 - name: Run tests before Node Parachain upgrade194 run: |194 run: |195 cd tests195 cd tests196 yarn install196 yarn install197 yarn add mochawesome197 yarn add mochawesome198 echo "Ready to start tests"198 echo "Ready to start tests"199 node scripts/readyness.js199 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}200 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}201 env:200 env:202 RPC_URL: http://127.0.0.1:9933/201 RPC_URL: http://127.0.0.1:9933/203202267 shell: bash266 shell: bash268267269 - name: Run tests after Node Parachain upgrade268 - name: Run tests after Node Parachain upgrade270 run: |269 run: |271 cd tests270 cd tests272 yarn install271 yarn install273 yarn add mochawesome272 yarn add mochawesome274 echo "Ready to start tests"273 echo "Ready to start tests"275 node scripts/readyness.js274 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}276 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}277 env:275 env:278 RPC_URL: http://127.0.0.1:9933/276 RPC_URL: http://127.0.0.1:9933/279277Cargo.lockdiffbeforeafterboth555255525553[[package]]5553[[package]]5554name = "pallet-common"5554name = "pallet-common"5555version = "0.1.5"5555version = "0.1.6"5556dependencies = [5556dependencies = [5557 "ethereum",5557 "ethereum",5558 "evm-coder",5558 "evm-coder",124731247312474[[package]]12474[[package]]12475name = "up-common"12475name = "up-common"12476version = "0.9.25"12476version = "0.9.27"12477dependencies = [12477dependencies = [12478 "fp-rpc",12478 "fp-rpc",12479 "frame-support",12479 "frame-support",pallets/common/CHANGELOG.mddiffbeforeafterboth223All notable changes to this project will be documented in this file.3All notable changes to this project will be documented in this file.445## [0.1.6] - 2022-08-1667### Added8- New Ethereum API methods: changeOwner, changeOwner(Substrate) and verifyOwnerOrAdmin(Substrate).95<!-- bureaucrate goes here -->10<!-- bureaucrate goes here -->6## [v0.1.5] 2022-08-1611## [v0.1.5] 2022-08-16712pallets/common/Cargo.tomldiffbeforeafterboth1[package]1[package]2name = "pallet-common"2name = "pallet-common"3version = "0.1.5"3version = "0.1.6"4license = "GPLv3"4license = "GPLv3"5edition = "2021"5edition = "2021"66pallets/common/src/erc.rsdiffbeforeafterboth31use alloc::format;31use alloc::format;323233use crate::{Pallet, CollectionHandle, Config, CollectionProperties};33use crate::{34 Pallet, CollectionHandle, Config, CollectionProperties,35 eth::convert_substrate_address_to_cross_account_id,36};343735/// Events for ethereum collection helper.38/// Events for ethereum collection helper.232 new_admin: uint256,235 new_admin: uint256,233 ) -> Result<void> {236 ) -> Result<void> {234 let caller = T::CrossAccountId::from_eth(caller);237 let caller = T::CrossAccountId::from_eth(caller);235 let mut new_admin_arr: [u8; 32] = Default::default();236 new_admin.to_big_endian(&mut new_admin_arr);237 let account_id = T::AccountId::from(new_admin_arr);238 let new_admin = T::CrossAccountId::from_sub(account_id);238 let new_admin = convert_substrate_address_to_cross_account_id::<T>(new_admin);239 <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;239 <Pallet<T>>::toggle_admin(self, &caller, &new_admin, true).map_err(dispatch_to_evm::<T>)?;240 Ok(())240 Ok(())241 }241 }248 admin: uint256,248 admin: uint256,249 ) -> Result<void> {249 ) -> Result<void> {250 let caller = T::CrossAccountId::from_eth(caller);250 let caller = T::CrossAccountId::from_eth(caller);251 let mut admin_arr: [u8; 32] = Default::default();252 admin.to_big_endian(&mut admin_arr);253 let account_id = T::AccountId::from(admin_arr);254 let admin = T::CrossAccountId::from_sub(account_id);251 let admin = convert_substrate_address_to_cross_account_id::<T>(admin);255 <Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;252 <Pallet<T>>::toggle_admin(self, &caller, &admin, false).map_err(dispatch_to_evm::<T>)?;256 Ok(())253 Ok(())257 }254 }414 ///411 ///415 /// @param user account to verify412 /// @param user account to verify416 /// @return "true" if account is the owner or admin413 /// @return "true" if account is the owner or admin414 #[solidity(rename_selector = "isOwnerOrAdmin")]417 fn verify_owner_or_admin(&self, user: address) -> Result<bool> {415 fn is_owner_or_admin_eth(&self, user: address) -> Result<bool> {416 let user = T::CrossAccountId::from_eth(user);418 Ok(check_is_owner_or_admin(user, self)417 Ok(self.is_owner_or_admin(&user))419 .map(|_| true)420 .unwrap_or(false))421 }418 }419420 /// Check that substrate account is the owner or admin of the collection421 ///422 /// @param user account to verify423 /// @return "true" if account is the owner or admin424 fn is_owner_or_admin_substrate(&self, user: uint256) -> Result<bool> {425 let user = convert_substrate_address_to_cross_account_id::<T>(user);426 Ok(self.is_owner_or_admin(&user))427 }422428423 /// Returns collection type429 /// Returns collection type424 ///430 ///432 Ok(mode.into())438 Ok(mode.into())433 }439 }440441 /// Changes collection owner to another account442 ///443 /// @dev Owner can be changed only by current owner444 /// @param newOwner new owner account445 fn set_owner(&mut self, caller: caller, new_owner: address) -> Result<void> {446 let caller = T::CrossAccountId::from_eth(caller);447 let new_owner = T::CrossAccountId::from_eth(new_owner);448 self.set_owner_internal(caller, new_owner)449 .map_err(dispatch_to_evm::<T>)450 }451452 /// Changes collection owner to another substrate account453 ///454 /// @dev Owner can be changed only by current owner455 /// @param newOwner new owner substrate account456 fn set_owner_substrate(&mut self, caller: caller, new_owner: uint256) -> Result<void> {457 let caller = T::CrossAccountId::from_eth(caller);458 let new_owner = convert_substrate_address_to_cross_account_id::<T>(new_owner);459 self.set_owner_internal(caller, new_owner)460 .map_err(dispatch_to_evm::<T>)461 }434}462}435463436fn check_is_owner_or_admin<T: Config>(464fn check_is_owner_or_admin<T: Config>(440 let caller = T::CrossAccountId::from_eth(caller);468 let caller = T::CrossAccountId::from_eth(caller);441 collection469 collection442 .check_is_owner_or_admin(&caller)470 .check_is_owner_or_admin(&caller)443 .map_err(pallet_evm_coder_substrate::dispatch_to_evm::<T>)?;471 .map_err(dispatch_to_evm::<T>)?;444 Ok(caller)472 Ok(caller)445}473}446474447fn save<T: Config>(collection: &CollectionHandle<T>) -> Result<void> {475fn save<T: Config>(collection: &CollectionHandle<T>) -> Result<void> {448 // TODO possibly delete for the lack of transaction476 // TODO possibly delete for the lack of transaction477 collection.consume_store_writes(1)?;449 collection478 collection450 .check_is_internal()479 .check_is_internal()451 .map_err(dispatch_to_evm::<T>)?;480 .map_err(dispatch_to_evm::<T>)?;452 <crate::CollectionById<T>>::insert(collection.id, collection.collection.clone());481 collection.save().map_err(dispatch_to_evm::<T>)?;453 Ok(())482 Ok(())454}483}455484pallets/common/src/eth.rsdiffbeforeafterboth161617//! The module contains a number of functions for converting and checking ethereum identifiers.17//! The module contains a number of functions for converting and checking ethereum identifiers.181819use up_data_structs::CollectionId;19use evm_coder::{types::*};20pub use pallet_evm::account::CrossAccountId;20use sp_core::H160;21use sp_core::H160;22use up_data_structs::CollectionId;2324use crate::Config;212522// 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 126// 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 123// TODO: Unhardcode prefix27// TODO: Unhardcode prefix48 address[0..16] == ETH_COLLECTION_PREFIX52 address[0..16] == ETH_COLLECTION_PREFIX49}53}5455/// Converts Substrate address to CrossAccountId56pub fn convert_substrate_address_to_cross_account_id<T: Config>(57 address: uint256,58) -> T::CrossAccountId59where60 T::AccountId: From<[u8; 32]>,61{62 let mut address_arr: [u8; 32] = Default::default();63 address.to_big_endian(&mut address_arr);64 let account_id = T::AccountId::from(address_arr);65 T::CrossAccountId::from_sub(account_id)66}5067pallets/common/src/lib.rsdiffbeforeafterboth203 }203 }204204205 /// Save collection to storage.205 /// Save collection to storage.206 pub fn save(self) -> DispatchResult {206 pub fn save(&self) -> DispatchResult {207 <CollectionById<T>>::insert(self.id, self.collection);207 <CollectionById<T>>::insert(self.id, &self.collection);208 Ok(())208 Ok(())209 }209 }210210303 Ok(())303 Ok(())304 }304 }305306 /// Changes collection owner to another account307 fn set_owner_internal(308 &mut self,309 caller: T::CrossAccountId,310 new_owner: T::CrossAccountId,311 ) -> DispatchResult {312 self.check_is_owner(&caller)?;313 self.collection.owner = new_owner.as_sub().clone();314 self.save()315 }305}316}306317307#[frame_support::pallet]318#[frame_support::pallet]pallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth31 );31 );32}32}3334// Selector: 6cf113cd35contract Collection is Dummy, ERC165 {36 // Set collection property.37 //38 // @param key Property key.39 // @param value Propery value.40 //41 // Selector: setCollectionProperty(string,bytes) 2f073f6642 function setCollectionProperty(string memory key, bytes memory value)43 public44 {45 require(false, stub_error);46 key;47 value;48 dummy = 0;49 }5051 // Delete collection property.52 //53 // @param key Property key.54 //55 // Selector: deleteCollectionProperty(string) 7b7debce56 function deleteCollectionProperty(string memory key) public {57 require(false, stub_error);58 key;59 dummy = 0;60 }6162 // Get collection property.63 //64 // @dev Throws error if key not found.65 //66 // @param key Property key.67 // @return bytes The property corresponding to the key.68 //69 // Selector: collectionProperty(string) cf24fd6d70 function collectionProperty(string memory key)71 public72 view73 returns (bytes memory)74 {75 require(false, stub_error);76 key;77 dummy;78 return hex"";79 }8081 // Set the sponsor of the collection.82 //83 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.84 //85 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.86 //87 // Selector: setCollectionSponsor(address) 7623402e88 function setCollectionSponsor(address sponsor) public {89 require(false, stub_error);90 sponsor;91 dummy = 0;92 }9394 // Collection sponsorship confirmation.95 //96 // @dev After setting the sponsor for the collection, it must be confirmed with this function.97 //98 // Selector: confirmCollectionSponsorship() 3c50e97a99 function confirmCollectionSponsorship() public {100 require(false, stub_error);101 dummy = 0;102 }103104 // Set limits for the collection.105 // @dev Throws error if limit not found.106 // @param limit Name of the limit. Valid names:107 // "accountTokenOwnershipLimit",108 // "sponsoredDataSize",109 // "sponsoredDataRateLimit",110 // "tokenLimit",111 // "sponsorTransferTimeout",112 // "sponsorApproveTimeout"113 // @param value Value of the limit.114 //115 // Selector: setCollectionLimit(string,uint32) 6a3841db116 function setCollectionLimit(string memory limit, uint32 value) public {117 require(false, stub_error);118 limit;119 value;120 dummy = 0;121 }122123 // Set limits for the collection.124 // @dev Throws error if limit not found.125 // @param limit Name of the limit. Valid names:126 // "ownerCanTransfer",127 // "ownerCanDestroy",128 // "transfersEnabled"129 // @param value Value of the limit.130 //131 // Selector: setCollectionLimit(string,bool) 993b7fba132 function setCollectionLimit(string memory limit, bool value) public {133 require(false, stub_error);134 limit;135 value;136 dummy = 0;137 }138139 // Get contract address.140 //141 // Selector: contractAddress() f6b4dfb4142 function contractAddress() public view returns (address) {143 require(false, stub_error);144 dummy;145 return 0x0000000000000000000000000000000000000000;146 }147148 // Add collection admin by substrate address.149 // @param new_admin Substrate administrator address.150 //151 // Selector: addCollectionAdminSubstrate(uint256) 5730062b152 function addCollectionAdminSubstrate(uint256 newAdmin) public {153 require(false, stub_error);154 newAdmin;155 dummy = 0;156 }157158 // Remove collection admin by substrate address.159 // @param admin Substrate administrator address.160 //161 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9162 function removeCollectionAdminSubstrate(uint256 admin) public {163 require(false, stub_error);164 admin;165 dummy = 0;166 }167168 // Add collection admin.169 // @param new_admin Address of the added administrator.170 //171 // Selector: addCollectionAdmin(address) 92e462c7172 function addCollectionAdmin(address newAdmin) public {173 require(false, stub_error);174 newAdmin;175 dummy = 0;176 }177178 // Remove collection admin.179 //180 // @param new_admin Address of the removed administrator.181 //182 // Selector: removeCollectionAdmin(address) fafd7b42183 function removeCollectionAdmin(address admin) public {184 require(false, stub_error);185 admin;186 dummy = 0;187 }188189 // Toggle accessibility of collection nesting.190 //191 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'192 //193 // Selector: setCollectionNesting(bool) 112d4586194 function setCollectionNesting(bool enable) public {195 require(false, stub_error);196 enable;197 dummy = 0;198 }199200 // Toggle accessibility of collection nesting.201 //202 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'203 // @param collections Addresses of collections that will be available for nesting.204 //205 // Selector: setCollectionNesting(bool,address[]) 64872396206 function setCollectionNesting(bool enable, address[] memory collections)207 public208 {209 require(false, stub_error);210 enable;211 collections;212 dummy = 0;213 }214215 // Set the collection access method.216 // @param mode Access mode217 // 0 for Normal218 // 1 for AllowList219 //220 // Selector: setCollectionAccess(uint8) 41835d4c221 function setCollectionAccess(uint8 mode) public {222 require(false, stub_error);223 mode;224 dummy = 0;225 }226227 // Add the user to the allowed list.228 //229 // @param user Address of a trusted user.230 //231 // Selector: addToCollectionAllowList(address) 67844fe6232 function addToCollectionAllowList(address user) public {233 require(false, stub_error);234 user;235 dummy = 0;236 }237238 // Remove the user from the allowed list.239 //240 // @param user Address of a removed user.241 //242 // Selector: removeFromCollectionAllowList(address) 85c51acb243 function removeFromCollectionAllowList(address user) public {244 require(false, stub_error);245 user;246 dummy = 0;247 }248249 // Switch permission for minting.250 //251 // @param mode Enable if "true".252 //253 // Selector: setCollectionMintMode(bool) 00018e84254 function setCollectionMintMode(bool mode) public {255 require(false, stub_error);256 mode;257 dummy = 0;258 }259260 // Check that account is the owner or admin of the collection261 //262 // @param user account to verify263 // @return "true" if account is the owner or admin264 //265 // Selector: verifyOwnerOrAdmin(address) c2282493266 function verifyOwnerOrAdmin(address user) public view returns (bool) {267 require(false, stub_error);268 user;269 dummy;270 return false;271 }272273 // Returns collection type274 //275 // @return `Fungible` or `NFT` or `ReFungible`276 //277 // Selector: uniqueCollectionType() d34b55b8278 function uniqueCollectionType() public returns (string memory) {279 require(false, stub_error);280 dummy = 0;281 return "";282 }283}28433285// Selector: 79cc679034// Selector: 79cc6790286contract ERC20UniqueExtensions is Dummy, ERC165 {35contract ERC20UniqueExtensions is Dummy, ERC165 {378 }127 }379}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}380417381contract UniqueFungible is418contract UniqueFungible is382 Dummy,419 Dummy,pallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterbothbinary blob — no preview
pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth373 }373 }374}374}375376// Selector: 6cf113cd377contract Collection is Dummy, ERC165 {378 // Set collection property.379 //380 // @param key Property key.381 // @param value Propery value.382 //383 // Selector: setCollectionProperty(string,bytes) 2f073f66384 function setCollectionProperty(string memory key, bytes memory value)385 public386 {387 require(false, stub_error);388 key;389 value;390 dummy = 0;391 }392393 // Delete collection property.394 //395 // @param key Property key.396 //397 // Selector: deleteCollectionProperty(string) 7b7debce398 function deleteCollectionProperty(string memory key) public {399 require(false, stub_error);400 key;401 dummy = 0;402 }403404 // Get collection property.405 //406 // @dev Throws error if key not found.407 //408 // @param key Property key.409 // @return bytes The property corresponding to the key.410 //411 // Selector: collectionProperty(string) cf24fd6d412 function collectionProperty(string memory key)413 public414 view415 returns (bytes memory)416 {417 require(false, stub_error);418 key;419 dummy;420 return hex"";421 }422423 // Set the sponsor of the collection.424 //425 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.426 //427 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.428 //429 // Selector: setCollectionSponsor(address) 7623402e430 function setCollectionSponsor(address sponsor) public {431 require(false, stub_error);432 sponsor;433 dummy = 0;434 }435436 // Collection sponsorship confirmation.437 //438 // @dev After setting the sponsor for the collection, it must be confirmed with this function.439 //440 // Selector: confirmCollectionSponsorship() 3c50e97a441 function confirmCollectionSponsorship() public {442 require(false, stub_error);443 dummy = 0;444 }445446 // Set limits for the collection.447 // @dev Throws error if limit not found.448 // @param limit Name of the limit. Valid names:449 // "accountTokenOwnershipLimit",450 // "sponsoredDataSize",451 // "sponsoredDataRateLimit",452 // "tokenLimit",453 // "sponsorTransferTimeout",454 // "sponsorApproveTimeout"455 // @param value Value of the limit.456 //457 // Selector: setCollectionLimit(string,uint32) 6a3841db458 function setCollectionLimit(string memory limit, uint32 value) public {459 require(false, stub_error);460 limit;461 value;462 dummy = 0;463 }464465 // Set limits for the collection.466 // @dev Throws error if limit not found.467 // @param limit Name of the limit. Valid names:468 // "ownerCanTransfer",469 // "ownerCanDestroy",470 // "transfersEnabled"471 // @param value Value of the limit.472 //473 // Selector: setCollectionLimit(string,bool) 993b7fba474 function setCollectionLimit(string memory limit, bool value) public {475 require(false, stub_error);476 limit;477 value;478 dummy = 0;479 }480481 // Get contract address.482 //483 // Selector: contractAddress() f6b4dfb4484 function contractAddress() public view returns (address) {485 require(false, stub_error);486 dummy;487 return 0x0000000000000000000000000000000000000000;488 }489490 // Add collection admin by substrate address.491 // @param new_admin Substrate administrator address.492 //493 // Selector: addCollectionAdminSubstrate(uint256) 5730062b494 function addCollectionAdminSubstrate(uint256 newAdmin) public {495 require(false, stub_error);496 newAdmin;497 dummy = 0;498 }499500 // Remove collection admin by substrate address.501 // @param admin Substrate administrator address.502 //503 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9504 function removeCollectionAdminSubstrate(uint256 admin) public {505 require(false, stub_error);506 admin;507 dummy = 0;508 }509510 // Add collection admin.511 // @param new_admin Address of the added administrator.512 //513 // Selector: addCollectionAdmin(address) 92e462c7514 function addCollectionAdmin(address newAdmin) public {515 require(false, stub_error);516 newAdmin;517 dummy = 0;518 }519520 // Remove collection admin.521 //522 // @param new_admin Address of the removed administrator.523 //524 // Selector: removeCollectionAdmin(address) fafd7b42525 function removeCollectionAdmin(address admin) public {526 require(false, stub_error);527 admin;528 dummy = 0;529 }530531 // Toggle accessibility of collection nesting.532 //533 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'534 //535 // Selector: setCollectionNesting(bool) 112d4586536 function setCollectionNesting(bool enable) public {537 require(false, stub_error);538 enable;539 dummy = 0;540 }541542 // Toggle accessibility of collection nesting.543 //544 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'545 // @param collections Addresses of collections that will be available for nesting.546 //547 // Selector: setCollectionNesting(bool,address[]) 64872396548 function setCollectionNesting(bool enable, address[] memory collections)549 public550 {551 require(false, stub_error);552 enable;553 collections;554 dummy = 0;555 }556557 // Set the collection access method.558 // @param mode Access mode559 // 0 for Normal560 // 1 for AllowList561 //562 // Selector: setCollectionAccess(uint8) 41835d4c563 function setCollectionAccess(uint8 mode) public {564 require(false, stub_error);565 mode;566 dummy = 0;567 }568569 // Add the user to the allowed list.570 //571 // @param user Address of a trusted user.572 //573 // Selector: addToCollectionAllowList(address) 67844fe6574 function addToCollectionAllowList(address user) public {575 require(false, stub_error);576 user;577 dummy = 0;578 }579580 // Remove the user from the allowed list.581 //582 // @param user Address of a removed user.583 //584 // Selector: removeFromCollectionAllowList(address) 85c51acb585 function removeFromCollectionAllowList(address user) public {586 require(false, stub_error);587 user;588 dummy = 0;589 }590591 // Switch permission for minting.592 //593 // @param mode Enable if "true".594 //595 // Selector: setCollectionMintMode(bool) 00018e84596 function setCollectionMintMode(bool mode) public {597 require(false, stub_error);598 mode;599 dummy = 0;600 }601602 // Check that account is the owner or admin of the collection603 //604 // @param user account to verify605 // @return "true" if account is the owner or admin606 //607 // Selector: verifyOwnerOrAdmin(address) c2282493608 function verifyOwnerOrAdmin(address user) public view returns (bool) {609 require(false, stub_error);610 user;611 dummy;612 return false;613 }614615 // Returns collection type616 //617 // @return `Fungible` or `NFT` or `ReFungible`618 //619 // Selector: uniqueCollectionType() d34b55b8620 function uniqueCollectionType() public returns (string memory) {621 require(false, stub_error);622 dummy = 0;623 return "";624 }625}626375627// Selector: 780e9d63376// Selector: 780e9d63628contract ERC721Enumerable is Dummy, ERC165 {377contract ERC721Enumerable is Dummy, ERC165 {745 }494 }746}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}747784748contract UniqueNFT is785contract UniqueNFT is749 Dummy,786 Dummy,pallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth371 }371 }372}372}373374// Selector: 6cf113cd375contract Collection is Dummy, ERC165 {376 // Set collection property.377 //378 // @param key Property key.379 // @param value Propery value.380 //381 // Selector: setCollectionProperty(string,bytes) 2f073f66382 function setCollectionProperty(string memory key, bytes memory value)383 public384 {385 require(false, stub_error);386 key;387 value;388 dummy = 0;389 }390391 // Delete collection property.392 //393 // @param key Property key.394 //395 // Selector: deleteCollectionProperty(string) 7b7debce396 function deleteCollectionProperty(string memory key) public {397 require(false, stub_error);398 key;399 dummy = 0;400 }401402 // Get collection property.403 //404 // @dev Throws error if key not found.405 //406 // @param key Property key.407 // @return bytes The property corresponding to the key.408 //409 // Selector: collectionProperty(string) cf24fd6d410 function collectionProperty(string memory key)411 public412 view413 returns (bytes memory)414 {415 require(false, stub_error);416 key;417 dummy;418 return hex"";419 }420421 // Set the sponsor of the collection.422 //423 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.424 //425 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.426 //427 // Selector: setCollectionSponsor(address) 7623402e428 function setCollectionSponsor(address sponsor) public {429 require(false, stub_error);430 sponsor;431 dummy = 0;432 }433434 // Collection sponsorship confirmation.435 //436 // @dev After setting the sponsor for the collection, it must be confirmed with this function.437 //438 // Selector: confirmCollectionSponsorship() 3c50e97a439 function confirmCollectionSponsorship() public {440 require(false, stub_error);441 dummy = 0;442 }443444 // Set limits for the collection.445 // @dev Throws error if limit not found.446 // @param limit Name of the limit. Valid names:447 // "accountTokenOwnershipLimit",448 // "sponsoredDataSize",449 // "sponsoredDataRateLimit",450 // "tokenLimit",451 // "sponsorTransferTimeout",452 // "sponsorApproveTimeout"453 // @param value Value of the limit.454 //455 // Selector: setCollectionLimit(string,uint32) 6a3841db456 function setCollectionLimit(string memory limit, uint32 value) public {457 require(false, stub_error);458 limit;459 value;460 dummy = 0;461 }462463 // Set limits for the collection.464 // @dev Throws error if limit not found.465 // @param limit Name of the limit. Valid names:466 // "ownerCanTransfer",467 // "ownerCanDestroy",468 // "transfersEnabled"469 // @param value Value of the limit.470 //471 // Selector: setCollectionLimit(string,bool) 993b7fba472 function setCollectionLimit(string memory limit, bool value) public {473 require(false, stub_error);474 limit;475 value;476 dummy = 0;477 }478479 // Get contract address.480 //481 // Selector: contractAddress() f6b4dfb4482 function contractAddress() public view returns (address) {483 require(false, stub_error);484 dummy;485 return 0x0000000000000000000000000000000000000000;486 }487488 // Add collection admin by substrate address.489 // @param new_admin Substrate administrator address.490 //491 // Selector: addCollectionAdminSubstrate(uint256) 5730062b492 function addCollectionAdminSubstrate(uint256 newAdmin) public {493 require(false, stub_error);494 newAdmin;495 dummy = 0;496 }497498 // Remove collection admin by substrate address.499 // @param admin Substrate administrator address.500 //501 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9502 function removeCollectionAdminSubstrate(uint256 admin) public {503 require(false, stub_error);504 admin;505 dummy = 0;506 }507508 // Add collection admin.509 // @param new_admin Address of the added administrator.510 //511 // Selector: addCollectionAdmin(address) 92e462c7512 function addCollectionAdmin(address newAdmin) public {513 require(false, stub_error);514 newAdmin;515 dummy = 0;516 }517518 // Remove collection admin.519 //520 // @param new_admin Address of the removed administrator.521 //522 // Selector: removeCollectionAdmin(address) fafd7b42523 function removeCollectionAdmin(address admin) public {524 require(false, stub_error);525 admin;526 dummy = 0;527 }528529 // Toggle accessibility of collection nesting.530 //531 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'532 //533 // Selector: setCollectionNesting(bool) 112d4586534 function setCollectionNesting(bool enable) public {535 require(false, stub_error);536 enable;537 dummy = 0;538 }539540 // Toggle accessibility of collection nesting.541 //542 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'543 // @param collections Addresses of collections that will be available for nesting.544 //545 // Selector: setCollectionNesting(bool,address[]) 64872396546 function setCollectionNesting(bool enable, address[] memory collections)547 public548 {549 require(false, stub_error);550 enable;551 collections;552 dummy = 0;553 }554555 // Set the collection access method.556 // @param mode Access mode557 // 0 for Normal558 // 1 for AllowList559 //560 // Selector: setCollectionAccess(uint8) 41835d4c561 function setCollectionAccess(uint8 mode) public {562 require(false, stub_error);563 mode;564 dummy = 0;565 }566567 // Add the user to the allowed list.568 //569 // @param user Address of a trusted user.570 //571 // Selector: addToCollectionAllowList(address) 67844fe6572 function addToCollectionAllowList(address user) public {573 require(false, stub_error);574 user;575 dummy = 0;576 }577578 // Remove the user from the allowed list.579 //580 // @param user Address of a removed user.581 //582 // Selector: removeFromCollectionAllowList(address) 85c51acb583 function removeFromCollectionAllowList(address user) public {584 require(false, stub_error);585 user;586 dummy = 0;587 }588589 // Switch permission for minting.590 //591 // @param mode Enable if "true".592 //593 // Selector: setCollectionMintMode(bool) 00018e84594 function setCollectionMintMode(bool mode) public {595 require(false, stub_error);596 mode;597 dummy = 0;598 }599600 // Check that account is the owner or admin of the collection601 //602 // @param user account to verify603 // @return "true" if account is the owner or admin604 //605 // Selector: verifyOwnerOrAdmin(address) c2282493606 function verifyOwnerOrAdmin(address user) public view returns (bool) {607 require(false, stub_error);608 user;609 dummy;610 return false;611 }612613 // Returns collection type614 //615 // @return `Fungible` or `NFT` or `ReFungible`616 //617 // Selector: uniqueCollectionType() d34b55b8618 function uniqueCollectionType() public returns (string memory) {619 require(false, stub_error);620 dummy = 0;621 return "";622 }623}624373625// Selector: 780e9d63374// Selector: 780e9d63626contract ERC721Enumerable is Dummy, ERC165 {375contract ERC721Enumerable is Dummy, ERC165 {757 }506 }758}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}759796760contract UniqueRefungible is797contract UniqueRefungible is761 Dummy,798 Dummy,pallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterbothbinary blob — no preview
pallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterbothbinary blob — no preview
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth22 );22 );23}23}2425// Selector: 6cf113cd26interface Collection is Dummy, ERC165 {27 // Set collection property.28 //29 // @param key Property key.30 // @param value Propery value.31 //32 // Selector: setCollectionProperty(string,bytes) 2f073f6633 function setCollectionProperty(string memory key, bytes memory value)34 external;3536 // Delete collection property.37 //38 // @param key Property key.39 //40 // Selector: deleteCollectionProperty(string) 7b7debce41 function deleteCollectionProperty(string memory key) external;4243 // Get collection property.44 //45 // @dev Throws error if key not found.46 //47 // @param key Property key.48 // @return bytes The property corresponding to the key.49 //50 // Selector: collectionProperty(string) cf24fd6d51 function collectionProperty(string memory key)52 external53 view54 returns (bytes memory);5556 // Set the sponsor of the collection.57 //58 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.59 //60 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.61 //62 // Selector: setCollectionSponsor(address) 7623402e63 function setCollectionSponsor(address sponsor) external;6465 // Collection sponsorship confirmation.66 //67 // @dev After setting the sponsor for the collection, it must be confirmed with this function.68 //69 // Selector: confirmCollectionSponsorship() 3c50e97a70 function confirmCollectionSponsorship() external;7172 // Set limits for the collection.73 // @dev Throws error if limit not found.74 // @param limit Name of the limit. Valid names:75 // "accountTokenOwnershipLimit",76 // "sponsoredDataSize",77 // "sponsoredDataRateLimit",78 // "tokenLimit",79 // "sponsorTransferTimeout",80 // "sponsorApproveTimeout"81 // @param value Value of the limit.82 //83 // Selector: setCollectionLimit(string,uint32) 6a3841db84 function setCollectionLimit(string memory limit, uint32 value) external;8586 // Set limits for the collection.87 // @dev Throws error if limit not found.88 // @param limit Name of the limit. Valid names:89 // "ownerCanTransfer",90 // "ownerCanDestroy",91 // "transfersEnabled"92 // @param value Value of the limit.93 //94 // Selector: setCollectionLimit(string,bool) 993b7fba95 function setCollectionLimit(string memory limit, bool value) external;9697 // Get contract address.98 //99 // Selector: contractAddress() f6b4dfb4100 function contractAddress() external view returns (address);101102 // Add collection admin by substrate address.103 // @param new_admin Substrate administrator address.104 //105 // Selector: addCollectionAdminSubstrate(uint256) 5730062b106 function addCollectionAdminSubstrate(uint256 newAdmin) external;107108 // Remove collection admin by substrate address.109 // @param admin Substrate administrator address.110 //111 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9112 function removeCollectionAdminSubstrate(uint256 admin) external;113114 // Add collection admin.115 // @param new_admin Address of the added administrator.116 //117 // Selector: addCollectionAdmin(address) 92e462c7118 function addCollectionAdmin(address newAdmin) external;119120 // Remove collection admin.121 //122 // @param new_admin Address of the removed administrator.123 //124 // Selector: removeCollectionAdmin(address) fafd7b42125 function removeCollectionAdmin(address admin) external;126127 // Toggle accessibility of collection nesting.128 //129 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'130 //131 // Selector: setCollectionNesting(bool) 112d4586132 function setCollectionNesting(bool enable) external;133134 // Toggle accessibility of collection nesting.135 //136 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'137 // @param collections Addresses of collections that will be available for nesting.138 //139 // Selector: setCollectionNesting(bool,address[]) 64872396140 function setCollectionNesting(bool enable, address[] memory collections)141 external;142143 // Set the collection access method.144 // @param mode Access mode145 // 0 for Normal146 // 1 for AllowList147 //148 // Selector: setCollectionAccess(uint8) 41835d4c149 function setCollectionAccess(uint8 mode) external;150151 // Add the user to the allowed list.152 //153 // @param user Address of a trusted user.154 //155 // Selector: addToCollectionAllowList(address) 67844fe6156 function addToCollectionAllowList(address user) external;157158 // Remove the user from the allowed list.159 //160 // @param user Address of a removed user.161 //162 // Selector: removeFromCollectionAllowList(address) 85c51acb163 function removeFromCollectionAllowList(address user) external;164165 // Switch permission for minting.166 //167 // @param mode Enable if "true".168 //169 // Selector: setCollectionMintMode(bool) 00018e84170 function setCollectionMintMode(bool mode) external;171172 // Check that account is the owner or admin of the collection173 //174 // @param user account to verify175 // @return "true" if account is the owner or admin176 //177 // Selector: verifyOwnerOrAdmin(address) c2282493178 function verifyOwnerOrAdmin(address user) external view returns (bool);179180 // Returns collection type181 //182 // @return `Fungible` or `NFT` or `ReFungible`183 //184 // Selector: uniqueCollectionType() d34b55b8185 function uniqueCollectionType() external returns (string memory);186}18724188// Selector: 79cc679025// Selector: 79cc6790189interface ERC20UniqueExtensions is Dummy, ERC165 {26interface ERC20UniqueExtensions is Dummy, ERC165 {228 returns (uint256);65 returns (uint256);229}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}230254231interface UniqueFungible is255interface UniqueFungible is232 Dummy,256 Dummy,tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth250 function finishMinting() external returns (bool);250 function finishMinting() external returns (bool);251}251}252253// Selector: 6cf113cd254interface Collection is Dummy, ERC165 {255 // Set collection property.256 //257 // @param key Property key.258 // @param value Propery value.259 //260 // Selector: setCollectionProperty(string,bytes) 2f073f66261 function setCollectionProperty(string memory key, bytes memory value)262 external;263264 // Delete collection property.265 //266 // @param key Property key.267 //268 // Selector: deleteCollectionProperty(string) 7b7debce269 function deleteCollectionProperty(string memory key) external;270271 // Get collection property.272 //273 // @dev Throws error if key not found.274 //275 // @param key Property key.276 // @return bytes The property corresponding to the key.277 //278 // Selector: collectionProperty(string) cf24fd6d279 function collectionProperty(string memory key)280 external281 view282 returns (bytes memory);283284 // Set the sponsor of the collection.285 //286 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.287 //288 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.289 //290 // Selector: setCollectionSponsor(address) 7623402e291 function setCollectionSponsor(address sponsor) external;292293 // Collection sponsorship confirmation.294 //295 // @dev After setting the sponsor for the collection, it must be confirmed with this function.296 //297 // Selector: confirmCollectionSponsorship() 3c50e97a298 function confirmCollectionSponsorship() external;299300 // Set limits for the collection.301 // @dev Throws error if limit not found.302 // @param limit Name of the limit. Valid names:303 // "accountTokenOwnershipLimit",304 // "sponsoredDataSize",305 // "sponsoredDataRateLimit",306 // "tokenLimit",307 // "sponsorTransferTimeout",308 // "sponsorApproveTimeout"309 // @param value Value of the limit.310 //311 // Selector: setCollectionLimit(string,uint32) 6a3841db312 function setCollectionLimit(string memory limit, uint32 value) external;313314 // Set limits for the collection.315 // @dev Throws error if limit not found.316 // @param limit Name of the limit. Valid names:317 // "ownerCanTransfer",318 // "ownerCanDestroy",319 // "transfersEnabled"320 // @param value Value of the limit.321 //322 // Selector: setCollectionLimit(string,bool) 993b7fba323 function setCollectionLimit(string memory limit, bool value) external;324325 // Get contract address.326 //327 // Selector: contractAddress() f6b4dfb4328 function contractAddress() external view returns (address);329330 // Add collection admin by substrate address.331 // @param new_admin Substrate administrator address.332 //333 // Selector: addCollectionAdminSubstrate(uint256) 5730062b334 function addCollectionAdminSubstrate(uint256 newAdmin) external;335336 // Remove collection admin by substrate address.337 // @param admin Substrate administrator address.338 //339 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9340 function removeCollectionAdminSubstrate(uint256 admin) external;341342 // Add collection admin.343 // @param new_admin Address of the added administrator.344 //345 // Selector: addCollectionAdmin(address) 92e462c7346 function addCollectionAdmin(address newAdmin) external;347348 // Remove collection admin.349 //350 // @param new_admin Address of the removed administrator.351 //352 // Selector: removeCollectionAdmin(address) fafd7b42353 function removeCollectionAdmin(address admin) external;354355 // Toggle accessibility of collection nesting.356 //357 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'358 //359 // Selector: setCollectionNesting(bool) 112d4586360 function setCollectionNesting(bool enable) external;361362 // Toggle accessibility of collection nesting.363 //364 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'365 // @param collections Addresses of collections that will be available for nesting.366 //367 // Selector: setCollectionNesting(bool,address[]) 64872396368 function setCollectionNesting(bool enable, address[] memory collections)369 external;370371 // Set the collection access method.372 // @param mode Access mode373 // 0 for Normal374 // 1 for AllowList375 //376 // Selector: setCollectionAccess(uint8) 41835d4c377 function setCollectionAccess(uint8 mode) external;378379 // Add the user to the allowed list.380 //381 // @param user Address of a trusted user.382 //383 // Selector: addToCollectionAllowList(address) 67844fe6384 function addToCollectionAllowList(address user) external;385386 // Remove the user from the allowed list.387 //388 // @param user Address of a removed user.389 //390 // Selector: removeFromCollectionAllowList(address) 85c51acb391 function removeFromCollectionAllowList(address user) external;392393 // Switch permission for minting.394 //395 // @param mode Enable if "true".396 //397 // Selector: setCollectionMintMode(bool) 00018e84398 function setCollectionMintMode(bool mode) external;399400 // Check that account is the owner or admin of the collection401 //402 // @param user account to verify403 // @return "true" if account is the owner or admin404 //405 // Selector: verifyOwnerOrAdmin(address) c2282493406 function verifyOwnerOrAdmin(address user) external view returns (bool);407408 // Returns collection type409 //410 // @return `Fungible` or `NFT` or `ReFungible`411 //412 // Selector: uniqueCollectionType() d34b55b8413 function uniqueCollectionType() external returns (string memory);414}415252416// Selector: 780e9d63253// Selector: 780e9d63417interface ERC721Enumerable is Dummy, ERC165 {254interface ERC721Enumerable is Dummy, ERC165 {490 returns (bool);327 returns (bool);491}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}492516493interface UniqueNFT is517interface UniqueNFT is494 Dummy,518 Dummy,tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth248 function finishMinting() external returns (bool);248 function finishMinting() external returns (bool);249}249}250251// Selector: 6cf113cd252interface Collection is Dummy, ERC165 {253 // Set collection property.254 //255 // @param key Property key.256 // @param value Propery value.257 //258 // Selector: setCollectionProperty(string,bytes) 2f073f66259 function setCollectionProperty(string memory key, bytes memory value)260 external;261262 // Delete collection property.263 //264 // @param key Property key.265 //266 // Selector: deleteCollectionProperty(string) 7b7debce267 function deleteCollectionProperty(string memory key) external;268269 // Get collection property.270 //271 // @dev Throws error if key not found.272 //273 // @param key Property key.274 // @return bytes The property corresponding to the key.275 //276 // Selector: collectionProperty(string) cf24fd6d277 function collectionProperty(string memory key)278 external279 view280 returns (bytes memory);281282 // Set the sponsor of the collection.283 //284 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.285 //286 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.287 //288 // Selector: setCollectionSponsor(address) 7623402e289 function setCollectionSponsor(address sponsor) external;290291 // Collection sponsorship confirmation.292 //293 // @dev After setting the sponsor for the collection, it must be confirmed with this function.294 //295 // Selector: confirmCollectionSponsorship() 3c50e97a296 function confirmCollectionSponsorship() external;297298 // Set limits for the collection.299 // @dev Throws error if limit not found.300 // @param limit Name of the limit. Valid names:301 // "accountTokenOwnershipLimit",302 // "sponsoredDataSize",303 // "sponsoredDataRateLimit",304 // "tokenLimit",305 // "sponsorTransferTimeout",306 // "sponsorApproveTimeout"307 // @param value Value of the limit.308 //309 // Selector: setCollectionLimit(string,uint32) 6a3841db310 function setCollectionLimit(string memory limit, uint32 value) external;311312 // Set limits for the collection.313 // @dev Throws error if limit not found.314 // @param limit Name of the limit. Valid names:315 // "ownerCanTransfer",316 // "ownerCanDestroy",317 // "transfersEnabled"318 // @param value Value of the limit.319 //320 // Selector: setCollectionLimit(string,bool) 993b7fba321 function setCollectionLimit(string memory limit, bool value) external;322323 // Get contract address.324 //325 // Selector: contractAddress() f6b4dfb4326 function contractAddress() external view returns (address);327328 // Add collection admin by substrate address.329 // @param new_admin Substrate administrator address.330 //331 // Selector: addCollectionAdminSubstrate(uint256) 5730062b332 function addCollectionAdminSubstrate(uint256 newAdmin) external;333334 // Remove collection admin by substrate address.335 // @param admin Substrate administrator address.336 //337 // Selector: removeCollectionAdminSubstrate(uint256) 4048fcf9338 function removeCollectionAdminSubstrate(uint256 admin) external;339340 // Add collection admin.341 // @param new_admin Address of the added administrator.342 //343 // Selector: addCollectionAdmin(address) 92e462c7344 function addCollectionAdmin(address newAdmin) external;345346 // Remove collection admin.347 //348 // @param new_admin Address of the removed administrator.349 //350 // Selector: removeCollectionAdmin(address) fafd7b42351 function removeCollectionAdmin(address admin) external;352353 // Toggle accessibility of collection nesting.354 //355 // @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'356 //357 // Selector: setCollectionNesting(bool) 112d4586358 function setCollectionNesting(bool enable) external;359360 // Toggle accessibility of collection nesting.361 //362 // @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'363 // @param collections Addresses of collections that will be available for nesting.364 //365 // Selector: setCollectionNesting(bool,address[]) 64872396366 function setCollectionNesting(bool enable, address[] memory collections)367 external;368369 // Set the collection access method.370 // @param mode Access mode371 // 0 for Normal372 // 1 for AllowList373 //374 // Selector: setCollectionAccess(uint8) 41835d4c375 function setCollectionAccess(uint8 mode) external;376377 // Add the user to the allowed list.378 //379 // @param user Address of a trusted user.380 //381 // Selector: addToCollectionAllowList(address) 67844fe6382 function addToCollectionAllowList(address user) external;383384 // Remove the user from the allowed list.385 //386 // @param user Address of a removed user.387 //388 // Selector: removeFromCollectionAllowList(address) 85c51acb389 function removeFromCollectionAllowList(address user) external;390391 // Switch permission for minting.392 //393 // @param mode Enable if "true".394 //395 // Selector: setCollectionMintMode(bool) 00018e84396 function setCollectionMintMode(bool mode) external;397398 // Check that account is the owner or admin of the collection399 //400 // @param user account to verify401 // @return "true" if account is the owner or admin402 //403 // Selector: verifyOwnerOrAdmin(address) c2282493404 function verifyOwnerOrAdmin(address user) external view returns (bool);405406 // Returns collection type407 //408 // @return `Fungible` or `NFT` or `ReFungible`409 //410 // Selector: uniqueCollectionType() d34b55b8411 function uniqueCollectionType() external returns (string memory);412}413250414// Selector: 780e9d63251// Selector: 780e9d63415interface ERC721Enumerable is Dummy, ERC165 {252interface ERC721Enumerable is Dummy, ERC165 {500 returns (address);337 returns (address);501}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}502526503interface UniqueRefungible is527interface UniqueRefungible is504 Dummy,528 Dummy,tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth151516import {expect} from 'chai';16import {expect} from 'chai';17import privateKey from '../substrate/privateKey';17import privateKey from '../substrate/privateKey';18import { UNIQUE } from '../util/helpers';18import {19import {19 createEthAccount,20 createEthAccount,20 createEthAccountWithBalance, 21 createEthAccountWithBalance, 21 evmCollection, 22 evmCollection, 22 evmCollectionHelpers, 23 evmCollectionHelpers, 23 getCollectionAddressFromResult, 24 getCollectionAddressFromResult, 24 itWeb3,25 itWeb3,26 recordEthFee,27 subToEth,25} from './util/helpers';28} from './util/helpers';262927describe('Add collection admins', () => {30describe('Add collection admins', () => {717472 const newAdmin = createEthAccount(web3);75 const newAdmin = createEthAccount(web3);73 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);76 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);74 expect(await collectionEvm.methods.verifyOwnerOrAdmin(newAdmin).call()).to.be.false;77 expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.false;75 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();78 await collectionEvm.methods.addCollectionAdmin(newAdmin).send();76 expect(await collectionEvm.methods.verifyOwnerOrAdmin(newAdmin).call()).to.be.true;79 expect(await collectionEvm.methods.isOwnerOrAdmin(newAdmin).call()).to.be.true;77 });80 });788179 itWeb3('(!negative tests!) Add admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {82 itWeb3('(!negative tests!) Add admin by ADMIN is not allowed', async ({api, web3, privateKeyWrapper}) => {311 });314 });312});315});316317describe('Change owner tests', () => {318 itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {319 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);320 const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);321 const collectionHelper = evmCollectionHelpers(web3, owner);322 const result = await collectionHelper.methods323 .createNonfungibleCollection('A', 'B', 'C')324 .send();325 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);326 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);327 328 await collectionEvm.methods.setOwner(newOwner).send();329 330 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;331 expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.true;332 });333334 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {335 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);336 const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);337 const collectionHelper = evmCollectionHelpers(web3, owner);338 const result = await collectionHelper.methods339 .createNonfungibleCollection('A', 'B', 'C')340 .send();341 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);342 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);343344 const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwner(newOwner).send());345 expect(cost < BigInt(0.2 * Number(UNIQUE)));346 expect(cost > 0);347 });348349 itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {350 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);351 const newOwner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);352 const collectionHelper = evmCollectionHelpers(web3, owner);353 const result = await collectionHelper.methods354 .createNonfungibleCollection('A', 'B', 'C')355 .send();356 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);357 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);358 359 await expect(collectionEvm.methods.setOwner(newOwner).send({from: newOwner})).to.be.rejected;360 expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.false;361 });362});363364describe('Change substrate owner tests', () => {365 itWeb3('Change owner', async ({api, web3, privateKeyWrapper}) => {366 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);367 const newOwner = privateKeyWrapper('//Alice');368 const collectionHelper = evmCollectionHelpers(web3, owner);369 const result = await collectionHelper.methods370 .createNonfungibleCollection('A', 'B', 'C')371 .send();372 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);373 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);374 375 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.true;376 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;377 378 await collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send();379 380 expect(await collectionEvm.methods.isOwnerOrAdmin(owner).call()).to.be.false;381 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.true;382 });383384 itWeb3('change owner call fee', async ({web3, api, privateKeyWrapper}) => {385 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);386 const newOwner = privateKeyWrapper('//Alice');387 const collectionHelper = evmCollectionHelpers(web3, owner);388 const result = await collectionHelper.methods389 .createNonfungibleCollection('A', 'B', 'C')390 .send();391 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);392 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);393394 const cost = await recordEthFee(api, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send());395 expect(cost < BigInt(0.2 * Number(UNIQUE)));396 expect(cost > 0);397 });398399 itWeb3('(!negative tests!) call setOwner by non owner', async ({api, web3, privateKeyWrapper}) => {400 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);401 const otherReceiver = await createEthAccountWithBalance(api, web3, privateKeyWrapper);402 const newOwner = privateKeyWrapper('//Alice');403 const collectionHelper = evmCollectionHelpers(web3, owner);404 const result = await collectionHelper.methods405 .createNonfungibleCollection('A', 'B', 'C')406 .send();407 const {collectionIdAddress} = await getCollectionAddressFromResult(api, result);408 const collectionEvm = evmCollection(web3, owner, collectionIdAddress);409 410 await expect(collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send({from: otherReceiver})).to.be.rejected;411 expect(await collectionEvm.methods.isOwnerOrAdminSubstrate(newOwner.addressRaw).call()).to.be.false;412 });413});tests/src/eth/fractionalizer/Fractionalizer.bindiffbeforeafterbothno changes
tests/src/eth/fractionalizer/Fractionalizer.soldiffbeforeafterboth64 "Wrong collection type. Collection is not refungible."64 "Wrong collection type. Collection is not refungible."65 );65 );66 require(66 require(67 refungibleContract.verifyOwnerOrAdmin(address(this)),67 refungibleContract.isOwnerOrAdmin(address(this)),68 "Fractionalizer contract should be an admin of the collection"68 "Fractionalizer contract should be an admin of the collection"69 );69 );70 rftCollection = _collection;70 rftCollection = _collection;tests/src/eth/fractionalizer/FractionalizerAbi.jsondiffbeforeafterbothno changes
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth150 "stateMutability": "nonpayable",150 "stateMutability": "nonpayable",151 "type": "function"151 "type": "function"152 },152 },153 {154 "inputs": [155 { "internalType": "address", "name": "user", "type": "address" }156 ],157 "name": "isOwnerOrAdmin",158 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],159 "stateMutability": "view",160 "type": "function"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 },153 {171 {154 "inputs": [],172 "inputs": [],155 "name": "name",173 "name": "name",258 "stateMutability": "nonpayable",276 "stateMutability": "nonpayable",259 "type": "function"277 "type": "function"260 },278 },279 {280 "inputs": [281 { "internalType": "address", "name": "newOwner", "type": "address" }282 ],283 "name": "setOwner",284 "outputs": [],285 "stateMutability": "nonpayable",286 "type": "function"287 },288 {289 "inputs": [290 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }291 ],292 "name": "setOwnerSubstrate",293 "outputs": [],294 "stateMutability": "nonpayable",295 "type": "function"296 },261 {297 {262 "inputs": [298 "inputs": [263 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }299 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }308 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],344 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],309 "stateMutability": "nonpayable",345 "stateMutability": "nonpayable",310 "type": "function"346 "type": "function"311 },347 }312 {313 "inputs": [314 { "internalType": "address", "name": "user", "type": "address" }315 ],316 "name": "verifyOwnerOrAdmin",317 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],318 "stateMutability": "view",319 "type": "function"320 }321]348]322349tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth209 "stateMutability": "view",209 "stateMutability": "view",210 "type": "function"210 "type": "function"211 },211 },212 {213 "inputs": [214 { "internalType": "address", "name": "user", "type": "address" }215 ],216 "name": "isOwnerOrAdmin",217 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],218 "stateMutability": "view",219 "type": "function"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 },212 {230 {213 "inputs": [231 "inputs": [214 { "internalType": "address", "name": "to", "type": "address" },232 { "internalType": "address", "name": "to", "type": "address" },432 "stateMutability": "nonpayable",450 "stateMutability": "nonpayable",433 "type": "function"451 "type": "function"434 },452 },453 {454 "inputs": [455 { "internalType": "address", "name": "newOwner", "type": "address" }456 ],457 "name": "setOwner",458 "outputs": [],459 "stateMutability": "nonpayable",460 "type": "function"461 },462 {463 "inputs": [464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }465 ],466 "name": "setOwnerSubstrate",467 "outputs": [],468 "stateMutability": "nonpayable",469 "type": "function"470 },435 {471 {436 "inputs": [472 "inputs": [437 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },473 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },533 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],569 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],534 "stateMutability": "nonpayable",570 "stateMutability": "nonpayable",535 "type": "function"571 "type": "function"536 },572 }537 {538 "inputs": [539 { "internalType": "address", "name": "user", "type": "address" }540 ],541 "name": "verifyOwnerOrAdmin",542 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],543 "stateMutability": "view",544 "type": "function"545 }546]573]547574tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth209 "stateMutability": "view",209 "stateMutability": "view",210 "type": "function"210 "type": "function"211 },211 },212 {213 "inputs": [214 { "internalType": "address", "name": "user", "type": "address" }215 ],216 "name": "isOwnerOrAdmin",217 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],218 "stateMutability": "view",219 "type": "function"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 },212 {230 {213 "inputs": [231 "inputs": [214 { "internalType": "address", "name": "to", "type": "address" },232 { "internalType": "address", "name": "to", "type": "address" },432 "stateMutability": "nonpayable",450 "stateMutability": "nonpayable",433 "type": "function"451 "type": "function"434 },452 },453 {454 "inputs": [455 { "internalType": "address", "name": "newOwner", "type": "address" }456 ],457 "name": "setOwner",458 "outputs": [],459 "stateMutability": "nonpayable",460 "type": "function"461 },462 {463 "inputs": [464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }465 ],466 "name": "setOwnerSubstrate",467 "outputs": [],468 "stateMutability": "nonpayable",469 "type": "function"470 },435 {471 {436 "inputs": [472 "inputs": [437 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },473 { "internalType": "uint256", "name": "tokenId", "type": "uint256" },542 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],578 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],543 "stateMutability": "nonpayable",579 "stateMutability": "nonpayable",544 "type": "function"580 "type": "function"545 },581 }546 {547 "inputs": [548 { "internalType": "address", "name": "user", "type": "address" }549 ],550 "name": "verifyOwnerOrAdmin",551 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],552 "stateMutability": "view",553 "type": "function"554 }555]582]556583tests/src/eth/refungibleAbi.jsondiffbeforeafterbothno changes