difftreelog
misk: Update stubs
in: master
9 files changed
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7contract Dummy {8 uint8 dummy;9 string stub_error = "this contract is implemented in native";10}1112contract ERC165 is Dummy {13 function supportsInterface(bytes4 interfaceID)14 external15 view16 returns (bool)17 {18 require(false, stub_error);19 interfaceID;20 return true;21 }22}2324/// @title A contract that allows you to work with collections.25/// @dev the ERC-165 identifier for this interface is 0xffe4da2326contract Collection is Dummy, ERC165 {27 /// Set collection property.28 ///29 /// @param key Property key.30 /// @param value Propery value.31 /// @dev EVM selector for this function is: 0x2f073f66,32 /// or in textual repr: setCollectionProperty(string,bytes)33 function setCollectionProperty(string memory key, bytes memory value)34 public35 {36 require(false, stub_error);37 key;38 value;39 dummy = 0;40 }4142 /// Delete collection property.43 ///44 /// @param key Property key.45 /// @dev EVM selector for this function is: 0x7b7debce,46 /// or in textual repr: deleteCollectionProperty(string)47 function deleteCollectionProperty(string memory key) public {48 require(false, stub_error);49 key;50 dummy = 0;51 }5253 /// Get collection property.54 ///55 /// @dev Throws error if key not found.56 ///57 /// @param key Property key.58 /// @return bytes The property corresponding to the key.59 /// @dev EVM selector for this function is: 0xcf24fd6d,60 /// or in textual repr: collectionProperty(string)61 function collectionProperty(string memory key)62 public63 view64 returns (bytes memory)65 {66 require(false, stub_error);67 key;68 dummy;69 return hex"";70 }7172 /// Set the sponsor of the collection.73 ///74 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.75 ///76 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.77 /// @dev EVM selector for this function is: 0x7623402e,78 /// or in textual repr: setCollectionSponsor(address)79 function setCollectionSponsor(address sponsor) public {80 require(false, stub_error);81 sponsor;82 dummy = 0;83 }8485 /// Collection sponsorship confirmation.86 ///87 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.88 /// @dev EVM selector for this function is: 0x3c50e97a,89 /// or in textual repr: confirmCollectionSponsorship()90 function confirmCollectionSponsorship() public {91 require(false, stub_error);92 dummy = 0;93 }9495 /// Set limits for the collection.96 /// @dev Throws error if limit not found.97 /// @param limit Name of the limit. Valid names:98 /// "accountTokenOwnershipLimit",99 /// "sponsoredDataSize",100 /// "sponsoredDataRateLimit",101 /// "tokenLimit",102 /// "sponsorTransferTimeout",103 /// "sponsorApproveTimeout"104 /// @param value Value of the limit.105 /// @dev EVM selector for this function is: 0x6a3841db,106 /// or in textual repr: setCollectionLimit(string,uint32)107 function setCollectionLimit(string memory limit, uint32 value) public {108 require(false, stub_error);109 limit;110 value;111 dummy = 0;112 }113114 /// Set limits for the collection.115 /// @dev Throws error if limit not found.116 /// @param limit Name of the limit. Valid names:117 /// "ownerCanTransfer",118 /// "ownerCanDestroy",119 /// "transfersEnabled"120 /// @param value Value of the limit.121 /// @dev EVM selector for this function is: 0x993b7fba,122 /// or in textual repr: setCollectionLimit(string,bool)123 function setCollectionLimit(string memory limit, bool value) public {124 require(false, stub_error);125 limit;126 value;127 dummy = 0;128 }129130 /// Get contract address.131 /// @dev EVM selector for this function is: 0xf6b4dfb4,132 /// or in textual repr: contractAddress()133 function contractAddress() public view returns (address) {134 require(false, stub_error);135 dummy;136 return 0x0000000000000000000000000000000000000000;137 }138139 /// Add collection admin by substrate address.140 /// @param newAdmin Substrate administrator address.141 /// @dev EVM selector for this function is: 0x5730062b,142 /// or in textual repr: addCollectionAdminSubstrate(uint256)143 function addCollectionAdminSubstrate(uint256 newAdmin) public {144 require(false, stub_error);145 newAdmin;146 dummy = 0;147 }148149 /// Remove collection admin by substrate address.150 /// @param admin Substrate administrator address.151 /// @dev EVM selector for this function is: 0x4048fcf9,152 /// or in textual repr: removeCollectionAdminSubstrate(uint256)153 function removeCollectionAdminSubstrate(uint256 admin) public {154 require(false, stub_error);155 admin;156 dummy = 0;157 }158159 /// Add collection admin.160 /// @param newAdmin Address of the added administrator.161 /// @dev EVM selector for this function is: 0x92e462c7,162 /// or in textual repr: addCollectionAdmin(address)163 function addCollectionAdmin(address newAdmin) public {164 require(false, stub_error);165 newAdmin;166 dummy = 0;167 }168169 /// Remove collection admin.170 ///171 /// @param admin Address of the removed administrator.172 /// @dev EVM selector for this function is: 0xfafd7b42,173 /// or in textual repr: removeCollectionAdmin(address)174 function removeCollectionAdmin(address admin) public {175 require(false, stub_error);176 admin;177 dummy = 0;178 }179180 /// Toggle accessibility of collection nesting.181 ///182 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'183 /// @dev EVM selector for this function is: 0x112d4586,184 /// or in textual repr: setCollectionNesting(bool)185 function setCollectionNesting(bool enable) public {186 require(false, stub_error);187 enable;188 dummy = 0;189 }190191 /// Toggle accessibility of collection nesting.192 ///193 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'194 /// @param collections Addresses of collections that will be available for nesting.195 /// @dev EVM selector for this function is: 0x64872396,196 /// or in textual repr: setCollectionNesting(bool,address[])197 function setCollectionNesting(bool enable, address[] memory collections)198 public199 {200 require(false, stub_error);201 enable;202 collections;203 dummy = 0;204 }205206 /// Set the collection access method.207 /// @param mode Access mode208 /// 0 for Normal209 /// 1 for AllowList210 /// @dev EVM selector for this function is: 0x41835d4c,211 /// or in textual repr: setCollectionAccess(uint8)212 function setCollectionAccess(uint8 mode) public {213 require(false, stub_error);214 mode;215 dummy = 0;216 }217218 /// Add the user to the allowed list.219 ///220 /// @param user Address of a trusted user.221 /// @dev EVM selector for this function is: 0x67844fe6,222 /// or in textual repr: addToCollectionAllowList(address)223 function addToCollectionAllowList(address user) public {224 require(false, stub_error);225 user;226 dummy = 0;227 }228229 /// Remove the user from the allowed list.230 ///231 /// @param user Address of a removed user.232 /// @dev EVM selector for this function is: 0x85c51acb,233 /// or in textual repr: removeFromCollectionAllowList(address)234 function removeFromCollectionAllowList(address user) public {235 require(false, stub_error);236 user;237 dummy = 0;238 }239240 /// Switch permission for minting.241 ///242 /// @param mode Enable if "true".243 /// @dev EVM selector for this function is: 0x00018e84,244 /// or in textual repr: setCollectionMintMode(bool)245 function setCollectionMintMode(bool mode) public {246 require(false, stub_error);247 mode;248 dummy = 0;249 }250251 /// Check that account is the owner or admin of the collection252 ///253 /// @param user account to verify254 /// @return "true" if account is the owner or admin255 /// @dev EVM selector for this function is: 0x9811b0c7,256 /// or in textual repr: isOwnerOrAdmin(address)257 function isOwnerOrAdmin(address user) public view returns (bool) {258 require(false, stub_error);259 user;260 dummy;261 return false;262 }263264 /// Check that substrate account is the owner or admin of the collection265 ///266 /// @param user account to verify267 /// @return "true" if account is the owner or admin268 /// @dev EVM selector for this function is: 0x68910e00,269 /// or in textual repr: isOwnerOrAdminSubstrate(uint256)270 function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {271 require(false, stub_error);272 user;273 dummy;274 return false;275 }276277 /// Returns collection type278 ///279 /// @return `Fungible` or `NFT` or `ReFungible`280 /// @dev EVM selector for this function is: 0xd34b55b8,281 /// or in textual repr: uniqueCollectionType()282 function uniqueCollectionType() public returns (string memory) {283 require(false, stub_error);284 dummy = 0;285 return "";286 }287288 /// Changes collection owner to another account289 ///290 /// @dev Owner can be changed only by current owner291 /// @param newOwner new owner account292 /// @dev EVM selector for this function is: 0x13af4035,293 /// or in textual repr: setOwner(address)294 function setOwner(address newOwner) public {295 require(false, stub_error);296 newOwner;297 dummy = 0;298 }299300 /// Changes collection owner to another substrate account301 ///302 /// @dev Owner can be changed only by current owner303 /// @param newOwner new owner substrate account304 /// @dev EVM selector for this function is: 0xb212138f,305 /// or in textual repr: setOwnerSubstrate(uint256)306 function setOwnerSubstrate(uint256 newOwner) public {307 require(false, stub_error);308 newOwner;309 dummy = 0;310 }311}312313/// @dev the ERC-165 identifier for this interface is 0x79cc6790314contract ERC20UniqueExtensions is Dummy, ERC165 {315 /// @dev EVM selector for this function is: 0x79cc6790,316 /// or in textual repr: burnFrom(address,uint256)317 function burnFrom(address from, uint256 amount) public returns (bool) {318 require(false, stub_error);319 from;320 amount;321 dummy = 0;322 return false;323 }324}325326/// @dev inlined interface327contract ERC20Events {328 event Transfer(address indexed from, address indexed to, uint256 value);329 event Approval(330 address indexed owner,331 address indexed spender,332 uint256 value333 );334}335336/// @dev the ERC-165 identifier for this interface is 0x942e8b22337contract ERC20 is Dummy, ERC165, ERC20Events {338 /// @dev EVM selector for this function is: 0x06fdde03,339 /// or in textual repr: name()340 function name() public view returns (string memory) {341 require(false, stub_error);342 dummy;343 return "";344 }345346 /// @dev EVM selector for this function is: 0x95d89b41,347 /// or in textual repr: symbol()348 function symbol() public view returns (string memory) {349 require(false, stub_error);350 dummy;351 return "";352 }353354 /// @dev EVM selector for this function is: 0x18160ddd,355 /// or in textual repr: totalSupply()356 function totalSupply() public view returns (uint256) {357 require(false, stub_error);358 dummy;359 return 0;360 }361362 /// @dev EVM selector for this function is: 0x313ce567,363 /// or in textual repr: decimals()364 function decimals() public view returns (uint8) {365 require(false, stub_error);366 dummy;367 return 0;368 }369370 /// @dev EVM selector for this function is: 0x70a08231,371 /// or in textual repr: balanceOf(address)372 function balanceOf(address owner) public view returns (uint256) {373 require(false, stub_error);374 owner;375 dummy;376 return 0;377 }378379 /// @dev EVM selector for this function is: 0xa9059cbb,380 /// or in textual repr: transfer(address,uint256)381 function transfer(address to, uint256 amount) public returns (bool) {382 require(false, stub_error);383 to;384 amount;385 dummy = 0;386 return false;387 }388389 /// @dev EVM selector for this function is: 0x23b872dd,390 /// or in textual repr: transferFrom(address,address,uint256)391 function transferFrom(392 address from,393 address to,394 uint256 amount395 ) public returns (bool) {396 require(false, stub_error);397 from;398 to;399 amount;400 dummy = 0;401 return false;402 }403404 /// @dev EVM selector for this function is: 0x095ea7b3,405 /// or in textual repr: approve(address,uint256)406 function approve(address spender, uint256 amount) public returns (bool) {407 require(false, stub_error);408 spender;409 amount;410 dummy = 0;411 return false;412 }413414 /// @dev EVM selector for this function is: 0xdd62ed3e,415 /// or in textual repr: allowance(address,address)416 function allowance(address owner, address spender)417 public418 view419 returns (uint256)420 {421 require(false, stub_error);422 owner;423 spender;424 dummy;425 return 0;426 }427}428429contract UniqueFungible is430 Dummy,431 ERC165,432 ERC20,433 ERC20UniqueExtensions,434 Collection435{}1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56<<<<<<< HEAD7/// @dev common stubs holder8=======9// Anonymous struct10struct Tuple0 {11 address field_0;12 uint256 field_1;13}1415// Common stubs holder16>>>>>>> misk: Update stubs17contract Dummy {18 uint8 dummy;19 string stub_error = "this contract is implemented in native";20}2122contract ERC165 is Dummy {23 function supportsInterface(bytes4 interfaceID)24 external25 view26 returns (bool)27 {28 require(false, stub_error);29 interfaceID;30 return true;31 }32}3334<<<<<<< HEAD35/// @title A contract that allows you to work with collections.36/// @dev the ERC-165 identifier for this interface is 0xffe4da2337=======38// Inline39contract ERC20Events {40 event Transfer(address indexed from, address indexed to, uint256 value);41 event Approval(42 address indexed owner,43 address indexed spender,44 uint256 value45 );46}4748<<<<<<< HEAD49// Selector: 79cc679050contract ERC20UniqueExtensions is Dummy, ERC165 {51 // Selector: burnFrom(address,uint256) 79cc679052 function burnFrom(address from, uint256 amount) public returns (bool) {53 require(false, stub_error);54 from;55 amount;56 dummy = 0;57 return false;58 }59}6061// Selector: 942e8b2262contract ERC20 is Dummy, ERC165, ERC20Events {63 // Selector: name() 06fdde0364 function name() public view returns (string memory) {65 require(false, stub_error);66 dummy;67 return "";68 }6970 // Selector: symbol() 95d89b4171 function symbol() public view returns (string memory) {72 require(false, stub_error);73 dummy;74 return "";75 }7677 // Selector: totalSupply() 18160ddd78 function totalSupply() public view returns (uint256) {79 require(false, stub_error);80 dummy;81 return 0;82 }8384 // Selector: decimals() 313ce56785 function decimals() public view returns (uint8) {86 require(false, stub_error);87 dummy;88 return 0;89 }9091 // Selector: balanceOf(address) 70a0823192 function balanceOf(address owner) public view returns (uint256) {93 require(false, stub_error);94 owner;95 dummy;96 return 0;97 }9899 // Selector: transfer(address,uint256) a9059cbb100 function transfer(address to, uint256 amount) public returns (bool) {101 require(false, stub_error);102 to;103 amount;104 dummy = 0;105 return false;106 }107108 // Selector: transferFrom(address,address,uint256) 23b872dd109 function transferFrom(110 address from,111 address to,112 uint256 amount113 ) public returns (bool) {114 require(false, stub_error);115 from;116 to;117 amount;118 dummy = 0;119 return false;120 }121122 // Selector: approve(address,uint256) 095ea7b3123 function approve(address spender, uint256 amount) public returns (bool) {124 require(false, stub_error);125 spender;126 amount;127 dummy = 0;128 return false;129 }130131 // Selector: allowance(address,address) dd62ed3e132 function allowance(address owner, address spender)133 public134 view135 returns (uint256)136 {137 require(false, stub_error);138 owner;139 spender;140 dummy;141 return 0;142 }143}144145// Selector: ffe4da23146=======147// Selector: 765e2fae148>>>>>>> misk: Update stubs149>>>>>>> misk: Update stubs150contract Collection is Dummy, ERC165 {151 /// Set collection property.152 ///153 /// @param key Property key.154 /// @param value Propery value.155 /// @dev EVM selector for this function is: 0x2f073f66,156 /// or in textual repr: setCollectionProperty(string,bytes)157 function setCollectionProperty(string memory key, bytes memory value)158 public159 {160 require(false, stub_error);161 key;162 value;163 dummy = 0;164 }165166 /// Delete collection property.167 ///168 /// @param key Property key.169 /// @dev EVM selector for this function is: 0x7b7debce,170 /// or in textual repr: deleteCollectionProperty(string)171 function deleteCollectionProperty(string memory key) public {172 require(false, stub_error);173 key;174 dummy = 0;175 }176177 /// Get collection property.178 ///179 /// @dev Throws error if key not found.180 ///181 /// @param key Property key.182 /// @return bytes The property corresponding to the key.183 /// @dev EVM selector for this function is: 0xcf24fd6d,184 /// or in textual repr: collectionProperty(string)185 function collectionProperty(string memory key)186 public187 view188 returns (bytes memory)189 {190 require(false, stub_error);191 key;192 dummy;193 return hex"";194 }195196 /// Set the sponsor of the collection.197 ///198 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.199 ///200 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.201 /// @dev EVM selector for this function is: 0x7623402e,202 /// or in textual repr: setCollectionSponsor(address)203 function setCollectionSponsor(address sponsor) public {204 require(false, stub_error);205 sponsor;206 dummy = 0;207 }208209<<<<<<< HEAD210 /// Collection sponsorship confirmation.211 ///212 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.213 /// @dev EVM selector for this function is: 0x3c50e97a,214 /// or in textual repr: confirmCollectionSponsorship()215=======216 // Set the substrate sponsor of the collection.217 //218 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.219 //220 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.221 //222 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751223 function setCollectionSponsorSubstrate(uint256 sponsor) public {224 require(false, stub_error);225 sponsor;226 dummy = 0;227 }228229 // Selector: hasCollectionPendingSponsor() 058ac185230 function hasCollectionPendingSponsor() public view returns (bool) {231 require(false, stub_error);232 dummy;233 return false;234 }235236 // Collection sponsorship confirmation.237 //238 // @dev After setting the sponsor for the collection, it must be confirmed with this function.239 //240 // Selector: confirmCollectionSponsorship() 3c50e97a241>>>>>>> misk: Update stubs242 function confirmCollectionSponsorship() public {243 require(false, stub_error);244 dummy = 0;245 }246247<<<<<<< HEAD248 /// Set limits for the collection.249 /// @dev Throws error if limit not found.250 /// @param limit Name of the limit. Valid names:251 /// "accountTokenOwnershipLimit",252 /// "sponsoredDataSize",253 /// "sponsoredDataRateLimit",254 /// "tokenLimit",255 /// "sponsorTransferTimeout",256 /// "sponsorApproveTimeout"257 /// @param value Value of the limit.258 /// @dev EVM selector for this function is: 0x6a3841db,259 /// or in textual repr: setCollectionLimit(string,uint32)260=======261 // Remove collection sponsor.262 //263 // Selector: removeCollectionSponsor() 6e0326a3264 function removeCollectionSponsor() public {265 require(false, stub_error);266 dummy = 0;267 }268269 // Get current sponsor.270 //271 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.272 //273 // Selector: getCollectionSponsor() b66bbc14274 function getCollectionSponsor() public view returns (Tuple0 memory) {275 require(false, stub_error);276 dummy;277 return Tuple0(0x0000000000000000000000000000000000000000, 0);278 }279280 // Set limits for the collection.281 // @dev Throws error if limit not found.282 // @param limit Name of the limit. Valid names:283 // "accountTokenOwnershipLimit",284 // "sponsoredDataSize",285 // "sponsoredDataRateLimit",286 // "tokenLimit",287 // "sponsorTransferTimeout",288 // "sponsorApproveTimeout"289 // @param value Value of the limit.290 //291 // Selector: setCollectionLimit(string,uint32) 6a3841db292>>>>>>> misk: Update stubs293 function setCollectionLimit(string memory limit, uint32 value) public {294 require(false, stub_error);295 limit;296 value;297 dummy = 0;298 }299300 /// Set limits for the collection.301 /// @dev Throws error if limit not found.302 /// @param limit Name of the limit. Valid names:303 /// "ownerCanTransfer",304 /// "ownerCanDestroy",305 /// "transfersEnabled"306 /// @param value Value of the limit.307 /// @dev EVM selector for this function is: 0x993b7fba,308 /// or in textual repr: setCollectionLimit(string,bool)309 function setCollectionLimit(string memory limit, bool value) public {310 require(false, stub_error);311 limit;312 value;313 dummy = 0;314 }315316 /// Get contract address.317 /// @dev EVM selector for this function is: 0xf6b4dfb4,318 /// or in textual repr: contractAddress()319 function contractAddress() public view returns (address) {320 require(false, stub_error);321 dummy;322 return 0x0000000000000000000000000000000000000000;323 }324325 /// Add collection admin by substrate address.326 /// @param newAdmin Substrate administrator address.327 /// @dev EVM selector for this function is: 0x5730062b,328 /// or in textual repr: addCollectionAdminSubstrate(uint256)329 function addCollectionAdminSubstrate(uint256 newAdmin) public {330 require(false, stub_error);331 newAdmin;332 dummy = 0;333 }334335 /// Remove collection admin by substrate address.336 /// @param admin Substrate administrator address.337 /// @dev EVM selector for this function is: 0x4048fcf9,338 /// or in textual repr: removeCollectionAdminSubstrate(uint256)339 function removeCollectionAdminSubstrate(uint256 admin) public {340 require(false, stub_error);341 admin;342 dummy = 0;343 }344345 /// Add collection admin.346 /// @param newAdmin Address of the added administrator.347 /// @dev EVM selector for this function is: 0x92e462c7,348 /// or in textual repr: addCollectionAdmin(address)349 function addCollectionAdmin(address newAdmin) public {350 require(false, stub_error);351 newAdmin;352 dummy = 0;353 }354355 /// Remove collection admin.356 ///357 /// @param admin Address of the removed administrator.358 /// @dev EVM selector for this function is: 0xfafd7b42,359 /// or in textual repr: removeCollectionAdmin(address)360 function removeCollectionAdmin(address admin) public {361 require(false, stub_error);362 admin;363 dummy = 0;364 }365366 /// Toggle accessibility of collection nesting.367 ///368 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'369 /// @dev EVM selector for this function is: 0x112d4586,370 /// or in textual repr: setCollectionNesting(bool)371 function setCollectionNesting(bool enable) public {372 require(false, stub_error);373 enable;374 dummy = 0;375 }376377 /// Toggle accessibility of collection nesting.378 ///379 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'380 /// @param collections Addresses of collections that will be available for nesting.381 /// @dev EVM selector for this function is: 0x64872396,382 /// or in textual repr: setCollectionNesting(bool,address[])383 function setCollectionNesting(bool enable, address[] memory collections)384 public385 {386 require(false, stub_error);387 enable;388 collections;389 dummy = 0;390 }391392 /// Set the collection access method.393 /// @param mode Access mode394 /// 0 for Normal395 /// 1 for AllowList396 /// @dev EVM selector for this function is: 0x41835d4c,397 /// or in textual repr: setCollectionAccess(uint8)398 function setCollectionAccess(uint8 mode) public {399 require(false, stub_error);400 mode;401 dummy = 0;402 }403404 /// Add the user to the allowed list.405 ///406 /// @param user Address of a trusted user.407 /// @dev EVM selector for this function is: 0x67844fe6,408 /// or in textual repr: addToCollectionAllowList(address)409 function addToCollectionAllowList(address user) public {410 require(false, stub_error);411 user;412 dummy = 0;413 }414415 /// Remove the user from the allowed list.416 ///417 /// @param user Address of a removed user.418 /// @dev EVM selector for this function is: 0x85c51acb,419 /// or in textual repr: removeFromCollectionAllowList(address)420 function removeFromCollectionAllowList(address user) public {421 require(false, stub_error);422 user;423 dummy = 0;424 }425426 /// Switch permission for minting.427 ///428 /// @param mode Enable if "true".429 /// @dev EVM selector for this function is: 0x00018e84,430 /// or in textual repr: setCollectionMintMode(bool)431 function setCollectionMintMode(bool mode) public {432 require(false, stub_error);433 mode;434 dummy = 0;435 }436437 /// Check that account is the owner or admin of the collection438 ///439 /// @param user account to verify440 /// @return "true" if account is the owner or admin441 /// @dev EVM selector for this function is: 0x9811b0c7,442 /// or in textual repr: isOwnerOrAdmin(address)443 function isOwnerOrAdmin(address user) public view returns (bool) {444 require(false, stub_error);445 user;446 dummy;447 return false;448 }449450 /// Check that substrate account is the owner or admin of the collection451 ///452 /// @param user account to verify453 /// @return "true" if account is the owner or admin454 /// @dev EVM selector for this function is: 0x68910e00,455 /// or in textual repr: isOwnerOrAdminSubstrate(uint256)456 function isOwnerOrAdminSubstrate(uint256 user) public view returns (bool) {457 require(false, stub_error);458 user;459 dummy;460 return false;461 }462463 /// Returns collection type464 ///465 /// @return `Fungible` or `NFT` or `ReFungible`466 /// @dev EVM selector for this function is: 0xd34b55b8,467 /// or in textual repr: uniqueCollectionType()468 function uniqueCollectionType() public returns (string memory) {469 require(false, stub_error);470 dummy = 0;471 return "";472 }473474 /// Changes collection owner to another account475 ///476 /// @dev Owner can be changed only by current owner477 /// @param newOwner new owner account478 /// @dev EVM selector for this function is: 0x13af4035,479 /// or in textual repr: setOwner(address)480 function setOwner(address newOwner) public {481 require(false, stub_error);482 newOwner;483 dummy = 0;484 }485486 /// Changes collection owner to another substrate account487 ///488 /// @dev Owner can be changed only by current owner489 /// @param newOwner new owner substrate account490 /// @dev EVM selector for this function is: 0xb212138f,491 /// or in textual repr: setOwnerSubstrate(uint256)492 function setOwnerSubstrate(uint256 newOwner) public {493 require(false, stub_error);494 newOwner;495 dummy = 0;496 }497}498499/// @dev the ERC-165 identifier for this interface is 0x79cc6790500contract ERC20UniqueExtensions is Dummy, ERC165 {501 /// @dev EVM selector for this function is: 0x79cc6790,502 /// or in textual repr: burnFrom(address,uint256)503 function burnFrom(address from, uint256 amount) public returns (bool) {504 require(false, stub_error);505 from;506 amount;507 dummy = 0;508 return false;509 }510}511512/// @dev inlined interface513contract ERC20Events {514 event Transfer(address indexed from, address indexed to, uint256 value);515 event Approval(516 address indexed owner,517 address indexed spender,518 uint256 value519 );520}521522/// @dev the ERC-165 identifier for this interface is 0x942e8b22523contract ERC20 is Dummy, ERC165, ERC20Events {524 /// @dev EVM selector for this function is: 0x06fdde03,525 /// or in textual repr: name()526 function name() public view returns (string memory) {527 require(false, stub_error);528 dummy;529 return "";530 }531532 /// @dev EVM selector for this function is: 0x95d89b41,533 /// or in textual repr: symbol()534 function symbol() public view returns (string memory) {535 require(false, stub_error);536 dummy;537 return "";538 }539540 /// @dev EVM selector for this function is: 0x18160ddd,541 /// or in textual repr: totalSupply()542 function totalSupply() public view returns (uint256) {543 require(false, stub_error);544 dummy;545 return 0;546 }547548 /// @dev EVM selector for this function is: 0x313ce567,549 /// or in textual repr: decimals()550 function decimals() public view returns (uint8) {551 require(false, stub_error);552 dummy;553 return 0;554 }555556 /// @dev EVM selector for this function is: 0x70a08231,557 /// or in textual repr: balanceOf(address)558 function balanceOf(address owner) public view returns (uint256) {559 require(false, stub_error);560 owner;561 dummy;562 return 0;563 }564565 /// @dev EVM selector for this function is: 0xa9059cbb,566 /// or in textual repr: transfer(address,uint256)567 function transfer(address to, uint256 amount) public returns (bool) {568 require(false, stub_error);569 to;570 amount;571 dummy = 0;572 return false;573 }574575 /// @dev EVM selector for this function is: 0x23b872dd,576 /// or in textual repr: transferFrom(address,address,uint256)577 function transferFrom(578 address from,579 address to,580 uint256 amount581 ) public returns (bool) {582 require(false, stub_error);583 from;584 to;585 amount;586 dummy = 0;587 return false;588 }589590 /// @dev EVM selector for this function is: 0x095ea7b3,591 /// or in textual repr: approve(address,uint256)592 function approve(address spender, uint256 amount) public returns (bool) {593 require(false, stub_error);594 spender;595 amount;596 dummy = 0;597 return false;598 }599600 /// @dev EVM selector for this function is: 0xdd62ed3e,601 /// or in textual repr: allowance(address,address)602 function allowance(address owner, address spender)603 public604 view605 returns (uint256)606 {607 require(false, stub_error);608 owner;609 spender;610 dummy;611 return 0;612 }613}614615contract UniqueFungible is616 Dummy,617 ERC165,618 ERC20,619 ERC20UniqueExtensions,620 Collection621{}pallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth--- a/pallets/nonfungible/src/stubs/UniqueNFT.sol
+++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol
@@ -3,7 +3,23 @@
pragma solidity >=0.8.0 <0.9.0;
+<<<<<<< HEAD
/// @dev common stubs holder
+=======
+// Anonymous struct
+struct Tuple0 {
+ uint256 field_0;
+ string field_1;
+}
+
+// Anonymous struct
+struct Tuple1 {
+ address field_0;
+ uint256 field_1;
+}
+
+// Common stubs holder
+>>>>>>> misk: Update stubs
contract Dummy {
uint8 dummy;
string stub_error = "this contract is implemented in native";
@@ -465,8 +481,55 @@
}
}
+<<<<<<< HEAD
/// @title Unique extensions for ERC721.
/// @dev the ERC-165 identifier for this interface is 0xd74d154f
+=======
+<<<<<<< HEAD
+// Selector: 780e9d63
+contract ERC721Enumerable is Dummy, ERC165 {
+ // @notice Enumerate valid NFTs
+ // @param index A counter less than `totalSupply()`
+ // @return The token identifier for the `index`th NFT,
+ // (sort order not specified)
+ //
+ // Selector: tokenByIndex(uint256) 4f6ccce7
+ function tokenByIndex(uint256 index) public view returns (uint256) {
+ require(false, stub_error);
+ index;
+ dummy;
+ return 0;
+ }
+
+ // @dev Not implemented
+ //
+ // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
+ function tokenOfOwnerByIndex(address owner, uint256 index)
+ public
+ view
+ returns (uint256)
+ {
+ require(false, stub_error);
+ owner;
+ index;
+ dummy;
+ return 0;
+ }
+
+ // @notice Count NFTs tracked by this contract
+ // @return A count of valid NFTs tracked by this contract, where each one of
+ // them has an assigned and queryable owner not equal to the zero address
+ //
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() public view returns (uint256) {
+ require(false, stub_error);
+ dummy;
+ return 0;
+ }
+}
+
+// Selector: d74d154f
+>>>>>>> misk: Update stubs
contract ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice Transfer ownership of an NFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -543,11 +606,33 @@
}
}
+<<<<<<< HEAD
/// @dev anonymous struct
struct Tuple8 {
uint256 field_0;
string field_1;
}
+=======
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+contract Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ public
+ {
+ require(false, stub_error);
+ key;
+ value;
+ dummy = 0;
+ }
+>>>>>>> misk: Update stubs
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
@@ -578,7 +663,92 @@
owner;
index;
dummy;
+<<<<<<< HEAD
return 0;
+=======
+ return hex"";
+ }
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) public {
+ require(false, stub_error);
+ sponsor;
+ dummy = 0;
+ }
+
+ // Set the substrate sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
+ function setCollectionSponsorSubstrate(uint256 sponsor) public {
+ require(false, stub_error);
+ sponsor;
+ dummy = 0;
+ }
+
+ // Selector: hasCollectionPendingSponsor() 058ac185
+ function hasCollectionPendingSponsor() public view returns (bool) {
+ require(false, stub_error);
+ dummy;
+ return false;
+ }
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() public {
+ require(false, stub_error);
+ dummy = 0;
+ }
+
+ // Remove collection sponsor.
+ //
+ // Selector: removeCollectionSponsor() 6e0326a3
+ function removeCollectionSponsor() public {
+ require(false, stub_error);
+ dummy = 0;
+ }
+
+ // Get current sponsor.
+ //
+ // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+ //
+ // Selector: getCollectionSponsor() b66bbc14
+ function getCollectionSponsor() public view returns (Tuple1 memory) {
+ require(false, stub_error);
+ dummy;
+ return Tuple1(0x0000000000000000000000000000000000000000, 0);
+ }
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) public {
+ require(false, stub_error);
+ limit;
+ value;
+ dummy = 0;
+>>>>>>> misk: Update stubs
}
/// @notice Count NFTs tracked by this contract
pallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth--- a/pallets/refungible/src/stubs/UniqueRefungible.sol
+++ b/pallets/refungible/src/stubs/UniqueRefungible.sol
@@ -3,7 +3,23 @@
pragma solidity >=0.8.0 <0.9.0;
+<<<<<<< HEAD
/// @dev common stubs holder
+=======
+// Anonymous struct
+struct Tuple0 {
+ uint256 field_0;
+ string field_1;
+}
+
+// Anonymous struct
+struct Tuple1 {
+ address field_0;
+ uint256 field_1;
+}
+
+// Common stubs holder
+>>>>>>> misk: Update stubs
contract Dummy {
uint8 dummy;
string stub_error = "this contract is implemented in native";
@@ -465,8 +481,55 @@
}
}
+<<<<<<< HEAD
/// @title Unique extensions for ERC721.
/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
+=======
+<<<<<<< HEAD
+// Selector: 780e9d63
+contract ERC721Enumerable is Dummy, ERC165 {
+ // @notice Enumerate valid RFTs
+ // @param index A counter less than `totalSupply()`
+ // @return The token identifier for the `index`th NFT,
+ // (sort order not specified)
+ //
+ // Selector: tokenByIndex(uint256) 4f6ccce7
+ function tokenByIndex(uint256 index) public view returns (uint256) {
+ require(false, stub_error);
+ index;
+ dummy;
+ return 0;
+ }
+
+ // Not implemented
+ //
+ // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
+ function tokenOfOwnerByIndex(address owner, uint256 index)
+ public
+ view
+ returns (uint256)
+ {
+ require(false, stub_error);
+ owner;
+ index;
+ dummy;
+ return 0;
+ }
+
+ // @notice Count RFTs tracked by this contract
+ // @return A count of valid RFTs tracked by this contract, where each one of
+ // them has an assigned and queryable owner not equal to the zero address
+ //
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() public view returns (uint256) {
+ require(false, stub_error);
+ dummy;
+ return 0;
+ }
+}
+
+// Selector: 7c3bef89
+>>>>>>> misk: Update stubs
contract ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -557,11 +620,33 @@
}
}
+<<<<<<< HEAD
/// @dev anonymous struct
struct Tuple8 {
uint256 field_0;
string field_1;
}
+=======
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+contract Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ public
+ {
+ require(false, stub_error);
+ key;
+ value;
+ dummy = 0;
+ }
+>>>>>>> misk: Update stubs
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
@@ -592,7 +677,92 @@
owner;
index;
dummy;
+<<<<<<< HEAD
return 0;
+=======
+ return hex"";
+ }
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) public {
+ require(false, stub_error);
+ sponsor;
+ dummy = 0;
+ }
+
+ // Set the substrate sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
+ function setCollectionSponsorSubstrate(uint256 sponsor) public {
+ require(false, stub_error);
+ sponsor;
+ dummy = 0;
+ }
+
+ // Selector: hasCollectionPendingSponsor() 058ac185
+ function hasCollectionPendingSponsor() public view returns (bool) {
+ require(false, stub_error);
+ dummy;
+ return false;
+ }
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() public {
+ require(false, stub_error);
+ dummy = 0;
+ }
+
+ // Remove collection sponsor.
+ //
+ // Selector: removeCollectionSponsor() 6e0326a3
+ function removeCollectionSponsor() public {
+ require(false, stub_error);
+ dummy = 0;
+ }
+
+ // Get current sponsor.
+ //
+ // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+ //
+ // Selector: getCollectionSponsor() b66bbc14
+ function getCollectionSponsor() public view returns (Tuple1 memory) {
+ require(false, stub_error);
+ dummy;
+ return Tuple1(0x0000000000000000000000000000000000000000, 0);
+ }
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) public {
+ require(false, stub_error);
+ limit;
+ value;
+ dummy = 0;
+>>>>>>> misk: Update stubs
}
/// @notice Count RFTs tracked by this contract
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -3,7 +3,17 @@
pragma solidity >=0.8.0 <0.9.0;
+<<<<<<< HEAD
/// @dev common stubs holder
+=======
+// Anonymous struct
+struct Tuple0 {
+ address field_0;
+ uint256 field_1;
+}
+
+// Common stubs holder
+>>>>>>> misk: Update stubs
interface Dummy {
}
@@ -12,8 +22,69 @@
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
+<<<<<<< HEAD
/// @title A contract that allows you to work with collections.
/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+=======
+// Inline
+interface ERC20Events {
+ event Transfer(address indexed from, address indexed to, uint256 value);
+ event Approval(
+ address indexed owner,
+ address indexed spender,
+ uint256 value
+ );
+}
+
+<<<<<<< HEAD
+// Selector: 79cc6790
+interface ERC20UniqueExtensions is Dummy, ERC165 {
+ // Selector: burnFrom(address,uint256) 79cc6790
+ function burnFrom(address from, uint256 amount) external returns (bool);
+}
+
+// Selector: 942e8b22
+interface ERC20 is Dummy, ERC165, ERC20Events {
+ // Selector: name() 06fdde03
+ function name() external view returns (string memory);
+
+ // Selector: symbol() 95d89b41
+ function symbol() external view returns (string memory);
+
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() external view returns (uint256);
+
+ // Selector: decimals() 313ce567
+ function decimals() external view returns (uint8);
+
+ // Selector: balanceOf(address) 70a08231
+ function balanceOf(address owner) external view returns (uint256);
+
+ // Selector: transfer(address,uint256) a9059cbb
+ function transfer(address to, uint256 amount) external returns (bool);
+
+ // Selector: transferFrom(address,address,uint256) 23b872dd
+ function transferFrom(
+ address from,
+ address to,
+ uint256 amount
+ ) external returns (bool);
+
+ // Selector: approve(address,uint256) 095ea7b3
+ function approve(address spender, uint256 amount) external returns (bool);
+
+ // Selector: allowance(address,address) dd62ed3e
+ function allowance(address owner, address spender)
+ external
+ view
+ returns (uint256);
+}
+
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+>>>>>>> misk: Update stubs
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -53,6 +124,7 @@
/// or in textual repr: setCollectionSponsor(address)
function setCollectionSponsor(address sponsor) external;
+<<<<<<< HEAD
/// Collection sponsorship confirmation.
///
/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
@@ -72,6 +144,51 @@
/// @param value Value of the limit.
/// @dev EVM selector for this function is: 0x6a3841db,
/// or in textual repr: setCollectionLimit(string,uint32)
+=======
+ // Set the substrate sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
+ function setCollectionSponsorSubstrate(uint256 sponsor) external;
+
+ // Selector: hasCollectionPendingSponsor() 058ac185
+ function hasCollectionPendingSponsor() external view returns (bool);
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() external;
+
+ // Remove collection sponsor.
+ //
+ // Selector: removeCollectionSponsor() 6e0326a3
+ function removeCollectionSponsor() external;
+
+ // Get current sponsor.
+ //
+ // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+ //
+ // Selector: getCollectionSponsor() b66bbc14
+ function getCollectionSponsor() external view returns (Tuple0 memory);
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+>>>>>>> misk: Update stubs
function setCollectionLimit(string memory limit, uint32 value) external;
/// Set limits for the collection.
tests/src/eth/api/UniqueNFT.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueNFT.sol
+++ b/tests/src/eth/api/UniqueNFT.sol
@@ -3,7 +3,23 @@
pragma solidity >=0.8.0 <0.9.0;
+<<<<<<< HEAD
/// @dev common stubs holder
+=======
+// Anonymous struct
+struct Tuple0 {
+ uint256 field_0;
+ string field_1;
+}
+
+// Anonymous struct
+struct Tuple1 {
+ address field_0;
+ uint256 field_1;
+}
+
+// Common stubs holder
+>>>>>>> misk: Update stubs
interface Dummy {
}
@@ -305,8 +321,39 @@
function finishMinting() external returns (bool);
}
+<<<<<<< HEAD
/// @title Unique extensions for ERC721.
/// @dev the ERC-165 identifier for this interface is 0xd74d154f
+=======
+<<<<<<< HEAD
+// Selector: 780e9d63
+interface ERC721Enumerable is Dummy, ERC165 {
+ // @notice Enumerate valid NFTs
+ // @param index A counter less than `totalSupply()`
+ // @return The token identifier for the `index`th NFT,
+ // (sort order not specified)
+ //
+ // Selector: tokenByIndex(uint256) 4f6ccce7
+ function tokenByIndex(uint256 index) external view returns (uint256);
+
+ // @dev Not implemented
+ //
+ // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
+ function tokenOfOwnerByIndex(address owner, uint256 index)
+ external
+ view
+ returns (uint256);
+
+ // @notice Count NFTs tracked by this contract
+ // @return A count of valid NFTs tracked by this contract, where each one of
+ // them has an assigned and queryable owner not equal to the zero address
+ //
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() external view returns (uint256);
+}
+
+// Selector: d74d154f
+>>>>>>> misk: Update stubs
interface ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice Transfer ownership of an NFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -355,11 +402,27 @@
returns (bool);
}
+<<<<<<< HEAD
/// @dev anonymous struct
struct Tuple8 {
uint256 field_0;
string field_1;
}
+=======
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+interface Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ external;
+>>>>>>> misk: Update stubs
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
@@ -379,7 +442,87 @@
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
+<<<<<<< HEAD
returns (uint256);
+=======
+ returns (bytes memory);
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) external;
+
+ // Set the substrate sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
+ function setCollectionSponsorSubstrate(uint256 sponsor) external;
+
+ // Selector: hasCollectionPendingSponsor() 058ac185
+ function hasCollectionPendingSponsor() external view returns (bool);
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() external;
+
+ // Remove collection sponsor.
+ //
+ // Selector: removeCollectionSponsor() 6e0326a3
+ function removeCollectionSponsor() external;
+
+ // Get current sponsor.
+ //
+ // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+ //
+ // Selector: getCollectionSponsor() b66bbc14
+ function getCollectionSponsor() external view returns (Tuple1 memory);
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) external;
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,bool) 993b7fba
+ function setCollectionLimit(string memory limit, bool value) external;
+
+ // Get contract address.
+ //
+ // Selector: contractAddress() f6b4dfb4
+ function contractAddress() external view returns (address);
+
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
+ // Selector: addCollectionAdminSubstrate(uint256) 5730062b
+ function addCollectionAdminSubstrate(uint256 newAdmin) external;
+>>>>>>> misk: Update stubs
/// @notice Count NFTs tracked by this contract
/// @return A count of valid NFTs tracked by this contract, where each one of
tests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueRefungible.sol
+++ b/tests/src/eth/api/UniqueRefungible.sol
@@ -3,7 +3,23 @@
pragma solidity >=0.8.0 <0.9.0;
+<<<<<<< HEAD
/// @dev common stubs holder
+=======
+// Anonymous struct
+struct Tuple0 {
+ uint256 field_0;
+ string field_1;
+}
+
+// Anonymous struct
+struct Tuple1 {
+ address field_0;
+ uint256 field_1;
+}
+
+// Common stubs holder
+>>>>>>> misk: Update stubs
interface Dummy {
}
@@ -305,8 +321,39 @@
function finishMinting() external returns (bool);
}
+<<<<<<< HEAD
/// @title Unique extensions for ERC721.
/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
+=======
+<<<<<<< HEAD
+// Selector: 780e9d63
+interface ERC721Enumerable is Dummy, ERC165 {
+ // @notice Enumerate valid RFTs
+ // @param index A counter less than `totalSupply()`
+ // @return The token identifier for the `index`th NFT,
+ // (sort order not specified)
+ //
+ // Selector: tokenByIndex(uint256) 4f6ccce7
+ function tokenByIndex(uint256 index) external view returns (uint256);
+
+ // Not implemented
+ //
+ // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
+ function tokenOfOwnerByIndex(address owner, uint256 index)
+ external
+ view
+ returns (uint256);
+
+ // @notice Count RFTs tracked by this contract
+ // @return A count of valid RFTs tracked by this contract, where each one of
+ // them has an assigned and queryable owner not equal to the zero address
+ //
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() external view returns (uint256);
+}
+
+// Selector: 7c3bef89
+>>>>>>> misk: Update stubs
interface ERC721UniqueExtensions is Dummy, ERC165 {
/// @notice Transfer ownership of an RFT
/// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
@@ -367,11 +414,27 @@
returns (address);
}
+<<<<<<< HEAD
/// @dev anonymous struct
struct Tuple8 {
uint256 field_0;
string field_1;
}
+=======
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+interface Collection is Dummy, ERC165 {
+ // Set collection property.
+ //
+ // @param key Property key.
+ // @param value Propery value.
+ //
+ // Selector: setCollectionProperty(string,bytes) 2f073f66
+ function setCollectionProperty(string memory key, bytes memory value)
+ external;
+>>>>>>> misk: Update stubs
/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
@@ -391,7 +454,87 @@
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
+<<<<<<< HEAD
returns (uint256);
+=======
+ returns (bytes memory);
+
+ // Set the sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsor(address) 7623402e
+ function setCollectionSponsor(address sponsor) external;
+
+ // Set the substrate sponsor of the collection.
+ //
+ // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
+ //
+ // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
+ //
+ // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
+ function setCollectionSponsorSubstrate(uint256 sponsor) external;
+
+ // Selector: hasCollectionPendingSponsor() 058ac185
+ function hasCollectionPendingSponsor() external view returns (bool);
+
+ // Collection sponsorship confirmation.
+ //
+ // @dev After setting the sponsor for the collection, it must be confirmed with this function.
+ //
+ // Selector: confirmCollectionSponsorship() 3c50e97a
+ function confirmCollectionSponsorship() external;
+
+ // Remove collection sponsor.
+ //
+ // Selector: removeCollectionSponsor() 6e0326a3
+ function removeCollectionSponsor() external;
+
+ // Get current sponsor.
+ //
+ // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
+ //
+ // Selector: getCollectionSponsor() b66bbc14
+ function getCollectionSponsor() external view returns (Tuple1 memory);
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "accountTokenOwnershipLimit",
+ // "sponsoredDataSize",
+ // "sponsoredDataRateLimit",
+ // "tokenLimit",
+ // "sponsorTransferTimeout",
+ // "sponsorApproveTimeout"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,uint32) 6a3841db
+ function setCollectionLimit(string memory limit, uint32 value) external;
+
+ // Set limits for the collection.
+ // @dev Throws error if limit not found.
+ // @param limit Name of the limit. Valid names:
+ // "ownerCanTransfer",
+ // "ownerCanDestroy",
+ // "transfersEnabled"
+ // @param value Value of the limit.
+ //
+ // Selector: setCollectionLimit(string,bool) 993b7fba
+ function setCollectionLimit(string memory limit, bool value) external;
+
+ // Get contract address.
+ //
+ // Selector: contractAddress() f6b4dfb4
+ function contractAddress() external view returns (address);
+
+ // Add collection admin by substrate address.
+ // @param new_admin Substrate administrator address.
+ //
+ // Selector: addCollectionAdminSubstrate(uint256) 5730062b
+ function addCollectionAdminSubstrate(uint256 newAdmin) external;
+>>>>>>> misk: Update stubs
/// @notice Count RFTs tracked by this contract
/// @return A count of valid RFTs tracked by this contract, where each one of
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/fungibleAbi.json
+++ b/tests/src/eth/fungibleAbi.json
@@ -170,6 +170,30 @@
},
{
"inputs": [],
+ "name": "getCollectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple0",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "hasCollectionPendingSponsor",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
"name": "name",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "view",
@@ -194,6 +218,13 @@
"type": "function"
},
{
+ "inputs": [],
+ "name": "removeCollectionSponsor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "address", "name": "user", "type": "address" }
],
@@ -278,6 +309,7 @@
},
{
"inputs": [
+<<<<<<< HEAD
{ "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "setOwner",
@@ -290,6 +322,11 @@
{ "internalType": "uint256", "name": "newOwner", "type": "uint256" }
],
"name": "setOwnerSubstrate",
+=======
+ { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
+ ],
+ "name": "setCollectionSponsorSubstrate",
+>>>>>>> misk: Update stubs
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
tests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/nonFungibleAbi.json
+++ b/tests/src/eth/nonFungibleAbi.json
@@ -200,6 +200,30 @@
"type": "function"
},
{
+ "inputs": [],
+ "name": "getCollectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple1",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "hasCollectionPendingSponsor",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "address", "name": "owner", "type": "address" },
{ "internalType": "address", "name": "operator", "type": "address" }
@@ -335,6 +359,13 @@
"type": "function"
},
{
+ "inputs": [],
+ "name": "removeCollectionSponsor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "address", "name": "user", "type": "address" }
],
@@ -452,6 +483,7 @@
},
{
"inputs": [
+<<<<<<< HEAD
{ "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "setOwner",
@@ -464,6 +496,11 @@
{ "internalType": "uint256", "name": "newOwner", "type": "uint256" }
],
"name": "setOwnerSubstrate",
+=======
+ { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
+ ],
+ "name": "setCollectionSponsorSubstrate",
+>>>>>>> misk: Update stubs
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
tests/src/eth/reFungibleAbi.jsondiffbeforeafterboth--- a/tests/src/eth/reFungibleAbi.json
+++ b/tests/src/eth/reFungibleAbi.json
@@ -200,6 +200,30 @@
"type": "function"
},
{
+ "inputs": [],
+ "name": "getCollectionSponsor",
+ "outputs": [
+ {
+ "components": [
+ { "internalType": "address", "name": "field_0", "type": "address" },
+ { "internalType": "uint256", "name": "field_1", "type": "uint256" }
+ ],
+ "internalType": "struct Tuple1",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "hasCollectionPendingSponsor",
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "address", "name": "owner", "type": "address" },
{ "internalType": "address", "name": "operator", "type": "address" }
@@ -335,6 +359,13 @@
"type": "function"
},
{
+ "inputs": [],
+ "name": "removeCollectionSponsor",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
"inputs": [
{ "internalType": "address", "name": "user", "type": "address" }
],
@@ -452,6 +483,7 @@
},
{
"inputs": [
+<<<<<<< HEAD
{ "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "setOwner",
@@ -464,6 +496,11 @@
{ "internalType": "uint256", "name": "newOwner", "type": "uint256" }
],
"name": "setOwnerSubstrate",
+=======
+ { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
+ ],
+ "name": "setCollectionSponsorSubstrate",
+>>>>>>> misk: Update stubs
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"