difftreelog
misk: Update stubs
in: master
9 files changed
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/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
contract Dummy {
uint8 dummy;
string stub_error = "this contract is implemented in native";
@@ -21,8 +31,122 @@
}
}
+<<<<<<< HEAD
/// @title A contract that allows you to work with collections.
/// @dev the ERC-165 identifier for this interface is 0xffe4da23
+=======
+// Inline
+contract ERC20Events {
+ event Transfer(address indexed from, address indexed to, uint256 value);
+ event Approval(
+ address indexed owner,
+ address indexed spender,
+ uint256 value
+ );
+}
+
+<<<<<<< HEAD
+// Selector: 79cc6790
+contract ERC20UniqueExtensions is Dummy, ERC165 {
+ // Selector: burnFrom(address,uint256) 79cc6790
+ function burnFrom(address from, uint256 amount) public returns (bool) {
+ require(false, stub_error);
+ from;
+ amount;
+ dummy = 0;
+ return false;
+ }
+}
+
+// Selector: 942e8b22
+contract ERC20 is Dummy, ERC165, ERC20Events {
+ // Selector: name() 06fdde03
+ function name() public view returns (string memory) {
+ require(false, stub_error);
+ dummy;
+ return "";
+ }
+
+ // Selector: symbol() 95d89b41
+ function symbol() public view returns (string memory) {
+ require(false, stub_error);
+ dummy;
+ return "";
+ }
+
+ // Selector: totalSupply() 18160ddd
+ function totalSupply() public view returns (uint256) {
+ require(false, stub_error);
+ dummy;
+ return 0;
+ }
+
+ // Selector: decimals() 313ce567
+ function decimals() public view returns (uint8) {
+ require(false, stub_error);
+ dummy;
+ return 0;
+ }
+
+ // Selector: balanceOf(address) 70a08231
+ function balanceOf(address owner) public view returns (uint256) {
+ require(false, stub_error);
+ owner;
+ dummy;
+ return 0;
+ }
+
+ // Selector: transfer(address,uint256) a9059cbb
+ function transfer(address to, uint256 amount) public returns (bool) {
+ require(false, stub_error);
+ to;
+ amount;
+ dummy = 0;
+ return false;
+ }
+
+ // Selector: transferFrom(address,address,uint256) 23b872dd
+ function transferFrom(
+ address from,
+ address to,
+ uint256 amount
+ ) public returns (bool) {
+ require(false, stub_error);
+ from;
+ to;
+ amount;
+ dummy = 0;
+ return false;
+ }
+
+ // Selector: approve(address,uint256) 095ea7b3
+ function approve(address spender, uint256 amount) public returns (bool) {
+ require(false, stub_error);
+ spender;
+ amount;
+ dummy = 0;
+ return false;
+ }
+
+ // Selector: allowance(address,address) dd62ed3e
+ function allowance(address owner, address spender)
+ public
+ view
+ returns (uint256)
+ {
+ require(false, stub_error);
+ owner;
+ spender;
+ dummy;
+ return 0;
+ }
+}
+
+// Selector: ffe4da23
+=======
+// Selector: 765e2fae
+>>>>>>> misk: Update stubs
+>>>>>>> misk: Update stubs
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -82,16 +206,45 @@
dummy = 0;
}
+<<<<<<< HEAD
/// Collection sponsorship confirmation.
///
/// @dev After setting the sponsor for the collection, it must be confirmed with this function.
/// @dev EVM selector for this function is: 0x3c50e97a,
/// or in textual repr: confirmCollectionSponsorship()
+=======
+ // 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
+>>>>>>> misk: Update stubs
function confirmCollectionSponsorship() public {
require(false, stub_error);
dummy = 0;
}
+<<<<<<< HEAD
/// Set limits for the collection.
/// @dev Throws error if limit not found.
/// @param limit Name of the limit. Valid names:
@@ -104,6 +257,39 @@
/// @param value Value of the limit.
/// @dev EVM selector for this function is: 0x6a3841db,
/// or in textual repr: setCollectionLimit(string,uint32)
+=======
+ // 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 (Tuple0 memory) {
+ require(false, stub_error);
+ dummy;
+ return Tuple0(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
+>>>>>>> misk: Update stubs
function setCollectionLimit(string memory limit, uint32 value) public {
require(false, stub_error);
limit;
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.soldiffbeforeafterboth1// SPDX-License-Identifier: OTHER2// This code is automatically generated34pragma solidity >=0.8.0 <0.9.0;56/// @dev common stubs holder7interface Dummy {89}1011interface ERC165 is Dummy {12 function supportsInterface(bytes4 interfaceID) external view returns (bool);13}1415/// @title A contract that allows you to work with collections.16/// @dev the ERC-165 identifier for this interface is 0xffe4da2317interface Collection is Dummy, ERC165 {18 /// Set collection property.19 ///20 /// @param key Property key.21 /// @param value Propery value.22 /// @dev EVM selector for this function is: 0x2f073f66,23 /// or in textual repr: setCollectionProperty(string,bytes)24 function setCollectionProperty(string memory key, bytes memory value)25 external;2627 /// Delete collection property.28 ///29 /// @param key Property key.30 /// @dev EVM selector for this function is: 0x7b7debce,31 /// or in textual repr: deleteCollectionProperty(string)32 function deleteCollectionProperty(string memory key) external;3334 /// Get collection property.35 ///36 /// @dev Throws error if key not found.37 ///38 /// @param key Property key.39 /// @return bytes The property corresponding to the key.40 /// @dev EVM selector for this function is: 0xcf24fd6d,41 /// or in textual repr: collectionProperty(string)42 function collectionProperty(string memory key)43 external44 view45 returns (bytes memory);4647 /// Set the sponsor of the collection.48 ///49 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.50 ///51 /// @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.52 /// @dev EVM selector for this function is: 0x7623402e,53 /// or in textual repr: setCollectionSponsor(address)54 function setCollectionSponsor(address sponsor) external;5556 /// Collection sponsorship confirmation.57 ///58 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.59 /// @dev EVM selector for this function is: 0x3c50e97a,60 /// or in textual repr: confirmCollectionSponsorship()61 function confirmCollectionSponsorship() external;6263 /// Set limits for the collection.64 /// @dev Throws error if limit not found.65 /// @param limit Name of the limit. Valid names:66 /// "accountTokenOwnershipLimit",67 /// "sponsoredDataSize",68 /// "sponsoredDataRateLimit",69 /// "tokenLimit",70 /// "sponsorTransferTimeout",71 /// "sponsorApproveTimeout"72 /// @param value Value of the limit.73 /// @dev EVM selector for this function is: 0x6a3841db,74 /// or in textual repr: setCollectionLimit(string,uint32)75 function setCollectionLimit(string memory limit, uint32 value) external;7677 /// Set limits for the collection.78 /// @dev Throws error if limit not found.79 /// @param limit Name of the limit. Valid names:80 /// "ownerCanTransfer",81 /// "ownerCanDestroy",82 /// "transfersEnabled"83 /// @param value Value of the limit.84 /// @dev EVM selector for this function is: 0x993b7fba,85 /// or in textual repr: setCollectionLimit(string,bool)86 function setCollectionLimit(string memory limit, bool value) external;8788 /// Get contract address.89 /// @dev EVM selector for this function is: 0xf6b4dfb4,90 /// or in textual repr: contractAddress()91 function contractAddress() external view returns (address);9293 /// Add collection admin by substrate address.94 /// @param newAdmin Substrate administrator address.95 /// @dev EVM selector for this function is: 0x5730062b,96 /// or in textual repr: addCollectionAdminSubstrate(uint256)97 function addCollectionAdminSubstrate(uint256 newAdmin) external;9899 /// Remove collection admin by substrate address.100 /// @param admin Substrate administrator address.101 /// @dev EVM selector for this function is: 0x4048fcf9,102 /// or in textual repr: removeCollectionAdminSubstrate(uint256)103 function removeCollectionAdminSubstrate(uint256 admin) external;104105 /// Add collection admin.106 /// @param newAdmin Address of the added administrator.107 /// @dev EVM selector for this function is: 0x92e462c7,108 /// or in textual repr: addCollectionAdmin(address)109 function addCollectionAdmin(address newAdmin) external;110111 /// Remove collection admin.112 ///113 /// @param admin Address of the removed administrator.114 /// @dev EVM selector for this function is: 0xfafd7b42,115 /// or in textual repr: removeCollectionAdmin(address)116 function removeCollectionAdmin(address admin) external;117118 /// Toggle accessibility of collection nesting.119 ///120 /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled'121 /// @dev EVM selector for this function is: 0x112d4586,122 /// or in textual repr: setCollectionNesting(bool)123 function setCollectionNesting(bool enable) external;124125 /// Toggle accessibility of collection nesting.126 ///127 /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled'128 /// @param collections Addresses of collections that will be available for nesting.129 /// @dev EVM selector for this function is: 0x64872396,130 /// or in textual repr: setCollectionNesting(bool,address[])131 function setCollectionNesting(bool enable, address[] memory collections)132 external;133134 /// Set the collection access method.135 /// @param mode Access mode136 /// 0 for Normal137 /// 1 for AllowList138 /// @dev EVM selector for this function is: 0x41835d4c,139 /// or in textual repr: setCollectionAccess(uint8)140 function setCollectionAccess(uint8 mode) external;141142 /// Add the user to the allowed list.143 ///144 /// @param user Address of a trusted user.145 /// @dev EVM selector for this function is: 0x67844fe6,146 /// or in textual repr: addToCollectionAllowList(address)147 function addToCollectionAllowList(address user) external;148149 /// Remove the user from the allowed list.150 ///151 /// @param user Address of a removed user.152 /// @dev EVM selector for this function is: 0x85c51acb,153 /// or in textual repr: removeFromCollectionAllowList(address)154 function removeFromCollectionAllowList(address user) external;155156 /// Switch permission for minting.157 ///158 /// @param mode Enable if "true".159 /// @dev EVM selector for this function is: 0x00018e84,160 /// or in textual repr: setCollectionMintMode(bool)161 function setCollectionMintMode(bool mode) external;162163 /// Check that account is the owner or admin of the collection164 ///165 /// @param user account to verify166 /// @return "true" if account is the owner or admin167 /// @dev EVM selector for this function is: 0x9811b0c7,168 /// or in textual repr: isOwnerOrAdmin(address)169 function isOwnerOrAdmin(address user) external view returns (bool);170171 /// Check that substrate account is the owner or admin of the collection172 ///173 /// @param user account to verify174 /// @return "true" if account is the owner or admin175 /// @dev EVM selector for this function is: 0x68910e00,176 /// or in textual repr: isOwnerOrAdminSubstrate(uint256)177 function isOwnerOrAdminSubstrate(uint256 user) external view returns (bool);178179 /// Returns collection type180 ///181 /// @return `Fungible` or `NFT` or `ReFungible`182 /// @dev EVM selector for this function is: 0xd34b55b8,183 /// or in textual repr: uniqueCollectionType()184 function uniqueCollectionType() external returns (string memory);185186 /// Changes collection owner to another account187 ///188 /// @dev Owner can be changed only by current owner189 /// @param newOwner new owner account190 /// @dev EVM selector for this function is: 0x13af4035,191 /// or in textual repr: setOwner(address)192 function setOwner(address newOwner) external;193194 /// Changes collection owner to another substrate account195 ///196 /// @dev Owner can be changed only by current owner197 /// @param newOwner new owner substrate account198 /// @dev EVM selector for this function is: 0xb212138f,199 /// or in textual repr: setOwnerSubstrate(uint256)200 function setOwnerSubstrate(uint256 newOwner) external;201}202203/// @dev the ERC-165 identifier for this interface is 0x79cc6790204interface ERC20UniqueExtensions is Dummy, ERC165 {205 /// @dev EVM selector for this function is: 0x79cc6790,206 /// or in textual repr: burnFrom(address,uint256)207 function burnFrom(address from, uint256 amount) external returns (bool);208}209210/// @dev inlined interface211interface ERC20Events {212 event Transfer(address indexed from, address indexed to, uint256 value);213 event Approval(214 address indexed owner,215 address indexed spender,216 uint256 value217 );218}219220/// @dev the ERC-165 identifier for this interface is 0x942e8b22221interface ERC20 is Dummy, ERC165, ERC20Events {222 /// @dev EVM selector for this function is: 0x06fdde03,223 /// or in textual repr: name()224 function name() external view returns (string memory);225226 /// @dev EVM selector for this function is: 0x95d89b41,227 /// or in textual repr: symbol()228 function symbol() external view returns (string memory);229230 /// @dev EVM selector for this function is: 0x18160ddd,231 /// or in textual repr: totalSupply()232 function totalSupply() external view returns (uint256);233234 /// @dev EVM selector for this function is: 0x313ce567,235 /// or in textual repr: decimals()236 function decimals() external view returns (uint8);237238 /// @dev EVM selector for this function is: 0x70a08231,239 /// or in textual repr: balanceOf(address)240 function balanceOf(address owner) external view returns (uint256);241242 /// @dev EVM selector for this function is: 0xa9059cbb,243 /// or in textual repr: transfer(address,uint256)244 function transfer(address to, uint256 amount) external returns (bool);245246 /// @dev EVM selector for this function is: 0x23b872dd,247 /// or in textual repr: transferFrom(address,address,uint256)248 function transferFrom(249 address from,250 address to,251 uint256 amount252 ) external returns (bool);253254 /// @dev EVM selector for this function is: 0x095ea7b3,255 /// or in textual repr: approve(address,uint256)256 function approve(address spender, uint256 amount) external returns (bool);257258 /// @dev EVM selector for this function is: 0xdd62ed3e,259 /// or in textual repr: allowance(address,address)260 function allowance(address owner, address spender)261 external262 view263 returns (uint256);264}265266interface UniqueFungible is267 Dummy,268 ERC165,269 ERC20,270 ERC20UniqueExtensions,271 Collection272{}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"