git.delta.rocks / unique-network / refs/commits / 6b71957232bb

difftreelog

misc: update stubs

Trubnikov Sergey2022-08-25parent: #40371d4.patch.diff
in: master

14 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
21 }21 }
22}22}
2323
24<<<<<<< HEAD
25<<<<<<< HEAD
26/// @title Magic contract, which allows users to reconfigure other contracts24/// @title Magic contract, which allows users to reconfigure other contracts
27/// @dev the ERC-165 identifier for this interface is 0xd77fab7025/// @dev the ERC-165 identifier for this interface is 0xd77fab70
28=======
29<<<<<<< HEAD
30// Selector: 6073d917
31=======
32// Selector: 06fc42e9
33>>>>>>> path: add stubs
34>>>>>>> path: add stubs
35=======
36// Selector: 6073d917
37>>>>>>> misc: update stubs
38contract ContractHelpers is Dummy, ERC165 {26contract ContractHelpers is Dummy, ERC165 {
39 /// Get user, which deployed specified contract27 /// Get user, which deployed specified contract
40 /// @dev May return zero address in case if contract is deployed28 /// @dev May return zero address in case if contract is deployed
56 return 0x0000000000000000000000000000000000000000;44 return 0x0000000000000000000000000000000000000000;
57 }45 }
5846
59<<<<<<< HEAD
60<<<<<<< HEAD
61 /// Set sponsor.47 /// Set sponsor.
62 /// @param contractAddress Contract for which a sponsor is being established.48 /// @param contractAddress Contract for which a sponsor is being established.
63 /// @param sponsor User address who set as pending sponsor.49 /// @param sponsor User address who set as pending sponsor.
64 /// @dev EVM selector for this function is: 0xf01fba93,50 /// @dev EVM selector for this function is: 0xf01fba93,
65 /// or in textual repr: setSponsor(address,address)51 /// or in textual repr: setSponsor(address,address)
66=======
67<<<<<<< HEAD
68=======
69>>>>>>> misc: update stubs
70 // Set sponsor.
71 //
72 // @param contract_address Contract for which a sponsor is being established.
73 // @param sponsor User address who set as pending sponsor.
74 //
75 // Selector: setSponsor(address,address) f01fba93
76>>>>>>> path: add stubs
77 function setSponsor(address contractAddress, address sponsor) public {52 function setSponsor(address contractAddress, address sponsor) public {
78 require(false, stub_error);53 require(false, stub_error);
79 contractAddress;54 contractAddress;
80 sponsor;55 sponsor;
81 dummy = 0;56 dummy = 0;
82 }57 }
8358
84<<<<<<< HEAD
85<<<<<<< HEAD
86 /// Set contract as self sponsored.59 /// Set contract as self sponsored.
87 ///60 ///
88 /// @param contractAddress Contract for which a self sponsoring is being enabled.61 /// @param contractAddress Contract for which a self sponsoring is being enabled.
89 /// @dev EVM selector for this function is: 0x89f7d9ae,62 /// @dev EVM selector for this function is: 0x89f7d9ae,
90 /// or in textual repr: selfSponsoredEnable(address)63 /// or in textual repr: selfSponsoredEnable(address)
91=======
92<<<<<<< HEAD
93=======
94>>>>>>> misc: update stubs
95 // Set contract as self sponsored.
96 //
97 // @param contract_address Contract for which a self sponsoring is being enabled.
98 //
99 // Selector: selfSponsoredEnable(address) 89f7d9ae
100>>>>>>> path: add stubs
101 function selfSponsoredEnable(address contractAddress) public {64 function selfSponsoredEnable(address contractAddress) public {
102 require(false, stub_error);65 require(false, stub_error);
103 contractAddress;66 contractAddress;
104 dummy = 0;67 dummy = 0;
105 }68 }
10669
107<<<<<<< HEAD
108<<<<<<< HEAD
109 /// Remove sponsor.70 /// Remove sponsor.
110 ///71 ///
111 /// @param contractAddress Contract for which a sponsorship is being removed.72 /// @param contractAddress Contract for which a sponsorship is being removed.
112 /// @dev EVM selector for this function is: 0xef784250,73 /// @dev EVM selector for this function is: 0xef784250,
113 /// or in textual repr: removeSponsor(address)74 /// or in textual repr: removeSponsor(address)
114=======
115<<<<<<< HEAD
116=======
117>>>>>>> misc: update stubs
118 // Remove sponsor.
119 //
120 // @param contract_address Contract for which a sponsorship is being removed.
121 //
122 // Selector: removeSponsor(address) ef784250
123>>>>>>> path: add stubs
124 function removeSponsor(address contractAddress) public {75 function removeSponsor(address contractAddress) public {
125 require(false, stub_error);76 require(false, stub_error);
126 contractAddress;77 contractAddress;
170 return false;121 return false;
171 }122 }
172123
173<<<<<<< HEAD
174<<<<<<< HEAD
175 /// Check tat contract has pending sponsor.124 /// Check tat contract has pending sponsor.
176 ///125 ///
177 /// @param contractAddress The contract for which the presence of a pending sponsor is checked.126 /// @param contractAddress The contract for which the presence of a pending sponsor is checked.
178 /// @return **true** if contract has pending sponsor.127 /// @return **true** if contract has pending sponsor.
179 /// @dev EVM selector for this function is: 0x39b9b242,128 /// @dev EVM selector for this function is: 0x39b9b242,
180 /// or in textual repr: hasPendingSponsor(address)129 /// or in textual repr: hasPendingSponsor(address)
181=======
182<<<<<<< HEAD
183=======
184>>>>>>> misc: update stubs
185 // Check tat contract has pending sponsor.
186 //
187 // @param contract_address The contract for which the presence of a pending sponsor is checked.
188 // @return **true** if contract has pending sponsor.
189 //
190 // Selector: hasPendingSponsor(address) 39b9b242
191>>>>>>> path: add stubs
192 function hasPendingSponsor(address contractAddress)130 function hasPendingSponsor(address contractAddress)
193 public131 public
194 view132 view
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 address field_0;
12 uint256 field_1;
13}
14
15// Common stubs holder
16>>>>>>> misk: Update stubs
17contract Dummy {7contract Dummy {
18 uint8 dummy;8 uint8 dummy;
19 string stub_error = "this contract is implemented in native";9 string stub_error = "this contract is implemented in native";
31 }21 }
32}22}
3323
34<<<<<<< HEAD
35/// @title A contract that allows you to work with collections.24/// @title A contract that allows you to work with collections.
36/// @dev the ERC-165 identifier for this interface is 0xffe4da2325/// @dev the ERC-165 identifier for this interface is 0xe54be640
37=======
38// Inline
39contract 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 value
45 );
46}
47
48// Selector: 79cc6790
49contract ERC20UniqueExtensions is Dummy, ERC165 {
50 // Selector: burnFrom(address,uint256) 79cc6790
51 function burnFrom(address from, uint256 amount) public returns (bool) {
52 require(false, stub_error);
53 from;
54 amount;
55 dummy = 0;
56 return false;
57 }
58}
59
60// Selector: 942e8b22
61contract ERC20 is Dummy, ERC165, ERC20Events {
62 // Selector: name() 06fdde03
63 function name() public view returns (string memory) {
64 require(false, stub_error);
65 dummy;
66 return "";
67 }
68
69 // Selector: symbol() 95d89b41
70 function symbol() public view returns (string memory) {
71 require(false, stub_error);
72 dummy;
73 return "";
74 }
75
76 // Selector: totalSupply() 18160ddd
77 function totalSupply() public view returns (uint256) {
78 require(false, stub_error);
79 dummy;
80 return 0;
81 }
82
83 // Selector: decimals() 313ce567
84 function decimals() public view returns (uint8) {
85 require(false, stub_error);
86 dummy;
87 return 0;
88 }
89
90 // Selector: balanceOf(address) 70a08231
91 function balanceOf(address owner) public view returns (uint256) {
92 require(false, stub_error);
93 owner;
94 dummy;
95 return 0;
96 }
97
98 // Selector: transfer(address,uint256) a9059cbb
99 function transfer(address to, uint256 amount) public returns (bool) {
100 require(false, stub_error);
101 to;
102 amount;
103 dummy = 0;
104 return false;
105 }
106
107 // Selector: transferFrom(address,address,uint256) 23b872dd
108 function transferFrom(
109 address from,
110 address to,
111 uint256 amount
112 ) public returns (bool) {
113 require(false, stub_error);
114 from;
115 to;
116 amount;
117 dummy = 0;
118 return false;
119 }
120
121 // Selector: approve(address,uint256) 095ea7b3
122 function approve(address spender, uint256 amount) public returns (bool) {
123 require(false, stub_error);
124 spender;
125 amount;
126 dummy = 0;
127 return false;
128 }
129
130 // Selector: allowance(address,address) dd62ed3e
131 function allowance(address owner, address spender)
132 public
133 view
134 returns (uint256)
135 {
136 require(false, stub_error);
137 owner;
138 spender;
139 dummy;
140 return 0;
141 }
142}
143
144<<<<<<< HEAD
145// Selector: ffe4da23
146=======
147// Selector: 765e2fae
148>>>>>>> misk: Update stubs
149>>>>>>> misk: Update stubs
150=======
151// Selector: e54be640
152>>>>>>> misc: update stubs
153contract Collection is Dummy, ERC165 {26contract Collection is Dummy, ERC165 {
154 /// Set collection property.27 /// Set collection property.
155 ///28 ///
209 dummy = 0;82 dummy = 0;
210 }83 }
21184
212<<<<<<< HEAD
213 /// Collection sponsorship confirmation.85 /// Set the substrate sponsor of the collection.
214 ///86 ///
215 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.87 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
216 /// @dev EVM selector for this function is: 0x3c50e97a,
217 /// or in textual repr: confirmCollectionSponsorship()
218=======
219 // Set the substrate sponsor of the collection.
220 //
221 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
222 //88 ///
223 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.89 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
224 //90 /// @dev EVM selector for this function is: 0xc74d6751,
225 // Selector: setCollectionSponsorSubstrate(uint256) c74d675191 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
226 function setCollectionSponsorSubstrate(uint256 sponsor) public {92 function setCollectionSponsorSubstrate(uint256 sponsor) public {
227 require(false, stub_error);93 require(false, stub_error);
228 sponsor;94 sponsor;
229 dummy = 0;95 dummy = 0;
230 }96 }
23197
232 // Selector: hasCollectionPendingSponsor() 058ac18598 /// @dev EVM selector for this function is: 0x058ac185,
99 /// or in textual repr: hasCollectionPendingSponsor()
233 function hasCollectionPendingSponsor() public view returns (bool) {100 function hasCollectionPendingSponsor() public view returns (bool) {
234 require(false, stub_error);101 require(false, stub_error);
235 dummy;102 dummy;
236 return false;103 return false;
237 }104 }
238105
239 // Collection sponsorship confirmation.106 /// Collection sponsorship confirmation.
240 //107 ///
241 // @dev After setting the sponsor for the collection, it must be confirmed with this function.108 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
242 //109 /// @dev EVM selector for this function is: 0x3c50e97a,
243 // Selector: confirmCollectionSponsorship() 3c50e97a110 /// or in textual repr: confirmCollectionSponsorship()
244>>>>>>> misk: Update stubs
245 function confirmCollectionSponsorship() public {111 function confirmCollectionSponsorship() public {
246 require(false, stub_error);112 require(false, stub_error);
247 dummy = 0;113 dummy = 0;
248 }114 }
249115
250<<<<<<< HEAD116 /// Remove collection sponsor.
117 /// @dev EVM selector for this function is: 0x6e0326a3,
118 /// or in textual repr: removeCollectionSponsor()
119 function removeCollectionSponsor() public {
120 require(false, stub_error);
121 dummy = 0;
122 }
123
124 /// Get current sponsor.
125 ///
126 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
127 /// @dev EVM selector for this function is: 0xb66bbc14,
128 /// or in textual repr: getCollectionSponsor()
129 function getCollectionSponsor() public view returns (Tuple6 memory) {
130 require(false, stub_error);
131 dummy;
132 return Tuple6(0x0000000000000000000000000000000000000000, 0);
133 }
134
251 /// Set limits for the collection.135 /// Set limits for the collection.
252 /// @dev Throws error if limit not found.136 /// @dev Throws error if limit not found.
260 /// @param value Value of the limit.144 /// @param value Value of the limit.
261 /// @dev EVM selector for this function is: 0x6a3841db,145 /// @dev EVM selector for this function is: 0x6a3841db,
262 /// or in textual repr: setCollectionLimit(string,uint32)146 /// or in textual repr: setCollectionLimit(string,uint32)
263=======
264 // Remove collection sponsor.
265 //
266 // Selector: removeCollectionSponsor() 6e0326a3
267 function removeCollectionSponsor() public {
268 require(false, stub_error);
269 dummy = 0;
270 }
271
272 // Get current sponsor.
273 //
274 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
275 //
276 // Selector: getCollectionSponsor() b66bbc14
277 function getCollectionSponsor() public view returns (Tuple0 memory) {
278 require(false, stub_error);
279 dummy;
280 return Tuple0(0x0000000000000000000000000000000000000000, 0);
281 }
282
283 // Set limits for the collection.
284 // @dev Throws error if limit not found.
285 // @param limit Name of the limit. Valid names:
286 // "accountTokenOwnershipLimit",
287 // "sponsoredDataSize",
288 // "sponsoredDataRateLimit",
289 // "tokenLimit",
290 // "sponsorTransferTimeout",
291 // "sponsorApproveTimeout"
292 // @param value Value of the limit.
293 //
294 // Selector: setCollectionLimit(string,uint32) 6a3841db
295>>>>>>> misk: Update stubs
296 function setCollectionLimit(string memory limit, uint32 value) public {147 function setCollectionLimit(string memory limit, uint32 value) public {
297 require(false, stub_error);148 require(false, stub_error);
298 limit;149 limit;
497 newOwner;348 newOwner;
498 dummy = 0;349 dummy = 0;
499 }350 }
351}
352
353/// @dev anonymous struct
354struct Tuple6 {
355 address field_0;
356 uint256 field_1;
500}357}
501358
502/// @dev the ERC-165 identifier for this interface is 0x79cc6790359/// @dev the ERC-165 identifier for this interface is 0x79cc6790
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 uint256 field_0;
12 string field_1;
13}
14
15// Anonymous struct
16struct Tuple1 {
17 address field_0;
18 uint256 field_1;
19}
20
21// Common stubs holder
22>>>>>>> misk: Update stubs
23contract Dummy {7contract Dummy {
24 uint8 dummy;8 uint8 dummy;
25 string stub_error = "this contract is implemented in native";9 string stub_error = "this contract is implemented in native";
115}99}
116100
117/// @title A contract that allows you to work with collections.101/// @title A contract that allows you to work with collections.
118/// @dev the ERC-165 identifier for this interface is 0xffe4da23102/// @dev the ERC-165 identifier for this interface is 0xe54be640
119contract Collection is Dummy, ERC165 {103contract Collection is Dummy, ERC165 {
120 /// Set collection property.104 /// Set collection property.
121 ///105 ///
175 dummy = 0;159 dummy = 0;
176 }160 }
177161
162 /// Set the substrate sponsor of the collection.
163 ///
164 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
165 ///
166 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
167 /// @dev EVM selector for this function is: 0xc74d6751,
168 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
169 function setCollectionSponsorSubstrate(uint256 sponsor) public {
170 require(false, stub_error);
171 sponsor;
172 dummy = 0;
173 }
174
175 /// @dev EVM selector for this function is: 0x058ac185,
176 /// or in textual repr: hasCollectionPendingSponsor()
177 function hasCollectionPendingSponsor() public view returns (bool) {
178 require(false, stub_error);
179 dummy;
180 return false;
181 }
182
178 /// Collection sponsorship confirmation.183 /// Collection sponsorship confirmation.
179 ///184 ///
180 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.185 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
185 dummy = 0;190 dummy = 0;
186 }191 }
187192
193 /// Remove collection sponsor.
194 /// @dev EVM selector for this function is: 0x6e0326a3,
195 /// or in textual repr: removeCollectionSponsor()
196 function removeCollectionSponsor() public {
197 require(false, stub_error);
198 dummy = 0;
199 }
200
201 /// Get current sponsor.
202 ///
203 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
204 /// @dev EVM selector for this function is: 0xb66bbc14,
205 /// or in textual repr: getCollectionSponsor()
206 function getCollectionSponsor() public view returns (Tuple17 memory) {
207 require(false, stub_error);
208 dummy;
209 return Tuple17(0x0000000000000000000000000000000000000000, 0);
210 }
211
188 /// Set limits for the collection.212 /// Set limits for the collection.
189 /// @dev Throws error if limit not found.213 /// @dev Throws error if limit not found.
190 /// @param limit Name of the limit. Valid names:214 /// @param limit Name of the limit. Valid names:
403 }427 }
404}428}
405429
430/// @dev anonymous struct
431struct Tuple17 {
432 address field_0;
433 uint256 field_1;
434}
435
406/// @title ERC721 Token that can be irreversibly burned (destroyed).436/// @title ERC721 Token that can be irreversibly burned (destroyed).
407/// @dev the ERC-165 identifier for this interface is 0x42966c68437/// @dev the ERC-165 identifier for this interface is 0x42966c68
408contract ERC721Burnable is Dummy, ERC165 {438contract ERC721Burnable is Dummy, ERC165 {
481 }511 }
482}512}
483513
484<<<<<<< HEAD
485<<<<<<< HEAD
486/// @title Unique extensions for ERC721.514/// @title Unique extensions for ERC721.
487/// @dev the ERC-165 identifier for this interface is 0xd74d154f515/// @dev the ERC-165 identifier for this interface is 0xd74d154f
488=======
489<<<<<<< HEAD
490=======
491>>>>>>> misc: update stubs
492// Selector: 780e9d63
493contract ERC721Enumerable is Dummy, ERC165 {
494 // @notice Enumerate valid NFTs
495 // @param index A counter less than `totalSupply()`
496 // @return The token identifier for the `index`th NFT,
497 // (sort order not specified)
498 //
499 // Selector: tokenByIndex(uint256) 4f6ccce7
500 function tokenByIndex(uint256 index) public view returns (uint256) {
501 require(false, stub_error);
502 index;
503 dummy;
504 return 0;
505 }
506
507 // @dev Not implemented
508 //
509 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
510 function tokenOfOwnerByIndex(address owner, uint256 index)
511 public
512 view
513 returns (uint256)
514 {
515 require(false, stub_error);
516 owner;
517 index;
518 dummy;
519 return 0;
520 }
521
522 // @notice Count NFTs tracked by this contract
523 // @return A count of valid NFTs tracked by this contract, where each one of
524 // them has an assigned and queryable owner not equal to the zero address
525 //
526 // Selector: totalSupply() 18160ddd
527 function totalSupply() public view returns (uint256) {
528 require(false, stub_error);
529 dummy;
530 return 0;
531 }
532}
533
534// Selector: d74d154f
535>>>>>>> misk: Update stubs
536contract ERC721UniqueExtensions is Dummy, ERC165 {516contract ERC721UniqueExtensions is Dummy, ERC165 {
537 /// @notice Transfer ownership of an NFT517 /// @notice Transfer ownership of an NFT
538 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`518 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
609 }589 }
610}590}
611591
612<<<<<<< HEAD
613<<<<<<< HEAD
614/// @dev anonymous struct592/// @dev anonymous struct
615struct Tuple8 {593struct Tuple8 {
616 uint256 field_0;594 uint256 field_0;
617 string field_1;595 string field_1;
618}596}
619=======
620// Selector: ffe4da23
621=======
622// Selector: 765e2fae
623>>>>>>> misk: Update stubs
624=======
625// Selector: e54be640
626>>>>>>> misc: update stubs
627contract Collection is Dummy, ERC165 {
628 // Set collection property.
629 //
630 // @param key Property key.
631 // @param value Propery value.
632 //
633 // Selector: setCollectionProperty(string,bytes) 2f073f66
634 function setCollectionProperty(string memory key, bytes memory value)
635 public
636 {
637 require(false, stub_error);
638 key;
639 value;
640 dummy = 0;
641 }
642>>>>>>> misk: Update stubs
643597
644/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension598/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
645/// @dev See https://eips.ethereum.org/EIPS/eip-721599/// @dev See https://eips.ethereum.org/EIPS/eip-721
670 owner;624 owner;
671 index;625 index;
672 dummy;626 dummy;
673<<<<<<< HEAD
674 return 0;627 return 0;
675=======
676 return hex"";
677 }
678
679 // Set the sponsor of the collection.
680 //
681 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
682 //
683 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
684 //
685 // Selector: setCollectionSponsor(address) 7623402e
686 function setCollectionSponsor(address sponsor) public {
687 require(false, stub_error);
688 sponsor;
689 dummy = 0;
690 }
691
692 // Set the substrate sponsor of the collection.
693 //
694 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
695 //
696 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
697 //
698 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
699 function setCollectionSponsorSubstrate(uint256 sponsor) public {
700 require(false, stub_error);
701 sponsor;
702 dummy = 0;
703 }
704
705 // Selector: hasCollectionPendingSponsor() 058ac185
706 function hasCollectionPendingSponsor() public view returns (bool) {
707 require(false, stub_error);
708 dummy;
709 return false;
710 }
711
712 // Collection sponsorship confirmation.
713 //
714 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
715 //
716 // Selector: confirmCollectionSponsorship() 3c50e97a
717 function confirmCollectionSponsorship() public {
718 require(false, stub_error);
719 dummy = 0;
720 }
721
722 // Remove collection sponsor.
723 //
724 // Selector: removeCollectionSponsor() 6e0326a3
725 function removeCollectionSponsor() public {
726 require(false, stub_error);
727 dummy = 0;
728 }
729
730 // Get current sponsor.
731 //
732 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
733 //
734 // Selector: getCollectionSponsor() b66bbc14
735 function getCollectionSponsor() public view returns (Tuple1 memory) {
736 require(false, stub_error);
737 dummy;
738 return Tuple1(0x0000000000000000000000000000000000000000, 0);
739 }
740
741 // Set limits for the collection.
742 // @dev Throws error if limit not found.
743 // @param limit Name of the limit. Valid names:
744 // "accountTokenOwnershipLimit",
745 // "sponsoredDataSize",
746 // "sponsoredDataRateLimit",
747 // "tokenLimit",
748 // "sponsorTransferTimeout",
749 // "sponsorApproveTimeout"
750 // @param value Value of the limit.
751 //
752 // Selector: setCollectionLimit(string,uint32) 6a3841db
753 function setCollectionLimit(string memory limit, uint32 value) public {
754 require(false, stub_error);
755 limit;
756 value;
757 dummy = 0;
758>>>>>>> misk: Update stubs
759 }628 }
760629
761 /// @notice Count NFTs tracked by this contract630 /// @notice Count NFTs tracked by this contract
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 uint256 field_0;
12 string field_1;
13}
14
15// Anonymous struct
16struct Tuple1 {
17 address field_0;
18 uint256 field_1;
19}
20
21// Common stubs holder
22>>>>>>> misk: Update stubs
23contract Dummy {7contract Dummy {
24 uint8 dummy;8 uint8 dummy;
25 string stub_error = "this contract is implemented in native";9 string stub_error = "this contract is implemented in native";
115}99}
116100
117/// @title A contract that allows you to work with collections.101/// @title A contract that allows you to work with collections.
118/// @dev the ERC-165 identifier for this interface is 0xffe4da23102/// @dev the ERC-165 identifier for this interface is 0xe54be640
119contract Collection is Dummy, ERC165 {103contract Collection is Dummy, ERC165 {
120 /// Set collection property.104 /// Set collection property.
121 ///105 ///
175 dummy = 0;159 dummy = 0;
176 }160 }
177161
162 /// Set the substrate sponsor of the collection.
163 ///
164 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
165 ///
166 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
167 /// @dev EVM selector for this function is: 0xc74d6751,
168 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
169 function setCollectionSponsorSubstrate(uint256 sponsor) public {
170 require(false, stub_error);
171 sponsor;
172 dummy = 0;
173 }
174
175 /// @dev EVM selector for this function is: 0x058ac185,
176 /// or in textual repr: hasCollectionPendingSponsor()
177 function hasCollectionPendingSponsor() public view returns (bool) {
178 require(false, stub_error);
179 dummy;
180 return false;
181 }
182
178 /// Collection sponsorship confirmation.183 /// Collection sponsorship confirmation.
179 ///184 ///
180 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.185 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
185 dummy = 0;190 dummy = 0;
186 }191 }
187192
193 /// Remove collection sponsor.
194 /// @dev EVM selector for this function is: 0x6e0326a3,
195 /// or in textual repr: removeCollectionSponsor()
196 function removeCollectionSponsor() public {
197 require(false, stub_error);
198 dummy = 0;
199 }
200
201 /// Get current sponsor.
202 ///
203 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
204 /// @dev EVM selector for this function is: 0xb66bbc14,
205 /// or in textual repr: getCollectionSponsor()
206 function getCollectionSponsor() public view returns (Tuple17 memory) {
207 require(false, stub_error);
208 dummy;
209 return Tuple17(0x0000000000000000000000000000000000000000, 0);
210 }
211
188 /// Set limits for the collection.212 /// Set limits for the collection.
189 /// @dev Throws error if limit not found.213 /// @dev Throws error if limit not found.
190 /// @param limit Name of the limit. Valid names:214 /// @param limit Name of the limit. Valid names:
403 }427 }
404}428}
405429
430/// @dev anonymous struct
431struct Tuple17 {
432 address field_0;
433 uint256 field_1;
434}
435
406/// @title ERC721 Token that can be irreversibly burned (destroyed).436/// @title ERC721 Token that can be irreversibly burned (destroyed).
407/// @dev the ERC-165 identifier for this interface is 0x42966c68437/// @dev the ERC-165 identifier for this interface is 0x42966c68
408contract ERC721Burnable is Dummy, ERC165 {438contract ERC721Burnable is Dummy, ERC165 {
481 }511 }
482}512}
483513
484<<<<<<< HEAD
485<<<<<<< HEAD
486/// @title Unique extensions for ERC721.514/// @title Unique extensions for ERC721.
487/// @dev the ERC-165 identifier for this interface is 0x7c3bef89515/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
488=======
489<<<<<<< HEAD
490=======
491>>>>>>> misc: update stubs
492// Selector: 780e9d63
493contract ERC721Enumerable is Dummy, ERC165 {
494 // @notice Enumerate valid RFTs
495 // @param index A counter less than `totalSupply()`
496 // @return The token identifier for the `index`th NFT,
497 // (sort order not specified)
498 //
499 // Selector: tokenByIndex(uint256) 4f6ccce7
500 function tokenByIndex(uint256 index) public view returns (uint256) {
501 require(false, stub_error);
502 index;
503 dummy;
504 return 0;
505 }
506
507 // Not implemented
508 //
509 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
510 function tokenOfOwnerByIndex(address owner, uint256 index)
511 public
512 view
513 returns (uint256)
514 {
515 require(false, stub_error);
516 owner;
517 index;
518 dummy;
519 return 0;
520 }
521
522 // @notice Count RFTs tracked by this contract
523 // @return A count of valid RFTs tracked by this contract, where each one of
524 // them has an assigned and queryable owner not equal to the zero address
525 //
526 // Selector: totalSupply() 18160ddd
527 function totalSupply() public view returns (uint256) {
528 require(false, stub_error);
529 dummy;
530 return 0;
531 }
532}
533
534// Selector: 7c3bef89
535>>>>>>> misk: Update stubs
536contract ERC721UniqueExtensions is Dummy, ERC165 {516contract ERC721UniqueExtensions is Dummy, ERC165 {
537 /// @notice Transfer ownership of an RFT517 /// @notice Transfer ownership of an RFT
538 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`518 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
623 }603 }
624}604}
625605
626<<<<<<< HEAD
627<<<<<<< HEAD
628/// @dev anonymous struct606/// @dev anonymous struct
629struct Tuple8 {607struct Tuple8 {
630 uint256 field_0;608 uint256 field_0;
631 string field_1;609 string field_1;
632}610}
633=======
634// Selector: ffe4da23
635=======
636// Selector: 765e2fae
637>>>>>>> misk: Update stubs
638=======
639// Selector: e54be640
640>>>>>>> misc: update stubs
641contract Collection is Dummy, ERC165 {
642 // Set collection property.
643 //
644 // @param key Property key.
645 // @param value Propery value.
646 //
647 // Selector: setCollectionProperty(string,bytes) 2f073f66
648 function setCollectionProperty(string memory key, bytes memory value)
649 public
650 {
651 require(false, stub_error);
652 key;
653 value;
654 dummy = 0;
655 }
656>>>>>>> misk: Update stubs
657611
658/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension612/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
659/// @dev See https://eips.ethereum.org/EIPS/eip-721613/// @dev See https://eips.ethereum.org/EIPS/eip-721
684 owner;638 owner;
685 index;639 index;
686 dummy;640 dummy;
687<<<<<<< HEAD
688 return 0;641 return 0;
689=======
690 return hex"";
691 }
692
693 // Set the sponsor of the collection.
694 //
695 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
696 //
697 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
698 //
699 // Selector: setCollectionSponsor(address) 7623402e
700 function setCollectionSponsor(address sponsor) public {
701 require(false, stub_error);
702 sponsor;
703 dummy = 0;
704 }
705
706 // Set the substrate sponsor of the collection.
707 //
708 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
709 //
710 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
711 //
712 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
713 function setCollectionSponsorSubstrate(uint256 sponsor) public {
714 require(false, stub_error);
715 sponsor;
716 dummy = 0;
717 }
718
719 // Selector: hasCollectionPendingSponsor() 058ac185
720 function hasCollectionPendingSponsor() public view returns (bool) {
721 require(false, stub_error);
722 dummy;
723 return false;
724 }
725
726 // Collection sponsorship confirmation.
727 //
728 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
729 //
730 // Selector: confirmCollectionSponsorship() 3c50e97a
731 function confirmCollectionSponsorship() public {
732 require(false, stub_error);
733 dummy = 0;
734 }
735
736 // Remove collection sponsor.
737 //
738 // Selector: removeCollectionSponsor() 6e0326a3
739 function removeCollectionSponsor() public {
740 require(false, stub_error);
741 dummy = 0;
742 }
743
744 // Get current sponsor.
745 //
746 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
747 //
748 // Selector: getCollectionSponsor() b66bbc14
749 function getCollectionSponsor() public view returns (Tuple1 memory) {
750 require(false, stub_error);
751 dummy;
752 return Tuple1(0x0000000000000000000000000000000000000000, 0);
753 }
754
755 // Set limits for the collection.
756 // @dev Throws error if limit not found.
757 // @param limit Name of the limit. Valid names:
758 // "accountTokenOwnershipLimit",
759 // "sponsoredDataSize",
760 // "sponsoredDataRateLimit",
761 // "tokenLimit",
762 // "sponsorTransferTimeout",
763 // "sponsorApproveTimeout"
764 // @param value Value of the limit.
765 //
766 // Selector: setCollectionLimit(string,uint32) 6a3841db
767 function setCollectionLimit(string memory limit, uint32 value) public {
768 require(false, stub_error);
769 limit;
770 value;
771 dummy = 0;
772>>>>>>> misk: Update stubs
773 }642 }
774643
775 /// @notice Count RFTs tracked by this contract644 /// @notice Count RFTs tracked by this contract
modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
12 function supportsInterface(bytes4 interfaceID) external view returns (bool);12 function supportsInterface(bytes4 interfaceID) external view returns (bool);
13}13}
1414
15<<<<<<< HEAD
16<<<<<<< HEAD
17/// @title Magic contract, which allows users to reconfigure other contracts15/// @title Magic contract, which allows users to reconfigure other contracts
18/// @dev the ERC-165 identifier for this interface is 0xd77fab7016/// @dev the ERC-165 identifier for this interface is 0xd77fab70
19=======
20<<<<<<< HEAD
21// Selector: 6073d917
22=======
23// Selector: 06fc42e9
24>>>>>>> path: add stubs
25>>>>>>> path: add stubs
26=======
27// Selector: 6073d917
28>>>>>>> misc: update stubs
29interface ContractHelpers is Dummy, ERC165 {17interface ContractHelpers is Dummy, ERC165 {
30 /// Get user, which deployed specified contract18 /// Get user, which deployed specified contract
31 /// @dev May return zero address in case if contract is deployed19 /// @dev May return zero address in case if contract is deployed
41 view29 view
42 returns (address);30 returns (address);
4331
44<<<<<<< HEAD
45<<<<<<< HEAD
46 /// Set sponsor.32 /// Set sponsor.
47 /// @param contractAddress Contract for which a sponsor is being established.33 /// @param contractAddress Contract for which a sponsor is being established.
48 /// @param sponsor User address who set as pending sponsor.34 /// @param sponsor User address who set as pending sponsor.
49 /// @dev EVM selector for this function is: 0xf01fba93,35 /// @dev EVM selector for this function is: 0xf01fba93,
50 /// or in textual repr: setSponsor(address,address)36 /// or in textual repr: setSponsor(address,address)
51=======
52<<<<<<< HEAD
53=======
54>>>>>>> misc: update stubs
55 // Set sponsor.
56 //
57 // @param contract_address Contract for which a sponsor is being established.
58 // @param sponsor User address who set as pending sponsor.
59 //
60 // Selector: setSponsor(address,address) f01fba93
61>>>>>>> path: add stubs
62 function setSponsor(address contractAddress, address sponsor) external;37 function setSponsor(address contractAddress, address sponsor) external;
6338
64 /// Set contract as self sponsored.39 /// Set contract as self sponsored.
84 /// or in textual repr: confirmSponsorship(address)59 /// or in textual repr: confirmSponsorship(address)
85 function confirmSponsorship(address contractAddress) external;60 function confirmSponsorship(address contractAddress) external;
8661
87<<<<<<< HEAD
88 /// Get current sponsor.62 /// Get current sponsor.
89 ///63 ///
90 /// @param contractAddress The contract for which a sponsor is requested.64 /// @param contractAddress The contract for which a sponsor is requested.
91 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.65 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
92 /// @dev EVM selector for this function is: 0x743fc745,66 /// @dev EVM selector for this function is: 0x743fc745,
93 /// or in textual repr: getSponsor(address)67 /// or in textual repr: getSponsor(address)
94=======
95 // Get current sponsor.
96 //
97 // @param contract_address The contract for which a sponsor is requested.
98 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
99 //
100 // Selector: getSponsor(address) 743fc745
101>>>>>>> path: add stubs
102 function getSponsor(address contractAddress)68 function getSponsor(address contractAddress)
103 external69 external
104 view70 view
105 returns (Tuple0 memory);71 returns (Tuple0 memory);
10672
107<<<<<<< HEAD
108<<<<<<< HEAD
109 /// Check tat contract has confirmed sponsor.73 /// Check tat contract has confirmed sponsor.
110 ///74 ///
111 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.75 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
120 /// @return **true** if contract has pending sponsor.84 /// @return **true** if contract has pending sponsor.
121 /// @dev EVM selector for this function is: 0x39b9b242,85 /// @dev EVM selector for this function is: 0x39b9b242,
122 /// or in textual repr: hasPendingSponsor(address)86 /// or in textual repr: hasPendingSponsor(address)
123=======
124<<<<<<< HEAD
125=======
126>>>>>>> misc: update stubs
127 // Check tat contract has confirmed sponsor.
128 //
129 // @param contract_address The contract for which the presence of a confirmed sponsor is checked.
130 // @return **true** if contract has confirmed sponsor.
131 //
132 // Selector: hasSponsor(address) 97418603
133 function hasSponsor(address contractAddress) external view returns (bool);
134
135 // Check tat contract has pending sponsor.
136 //
137 // @param contract_address The contract for which the presence of a pending sponsor is checked.
138 // @return **true** if contract has pending sponsor.
139 //
140 // Selector: hasPendingSponsor(address) 39b9b242
141>>>>>>> path: add stubs
142 function hasPendingSponsor(address contractAddress)87 function hasPendingSponsor(address contractAddress)
143 external88 external
144 view89 view
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 address field_0;
12 uint256 field_1;
13}
14
15// Common stubs holder
16>>>>>>> misk: Update stubs
17interface Dummy {7interface Dummy {
188
19}9}
22 function supportsInterface(bytes4 interfaceID) external view returns (bool);12 function supportsInterface(bytes4 interfaceID) external view returns (bool);
23}13}
2414
25<<<<<<< HEAD
26/// @title A contract that allows you to work with collections.15/// @title A contract that allows you to work with collections.
27/// @dev the ERC-165 identifier for this interface is 0xffe4da2316/// @dev the ERC-165 identifier for this interface is 0xe54be640
28=======
29// Inline
30interface ERC20Events {
31 event Transfer(address indexed from, address indexed to, uint256 value);
32 event Approval(
33 address indexed owner,
34 address indexed spender,
35 uint256 value
36 );
37}
38
39// Selector: 79cc6790
40interface ERC20UniqueExtensions is Dummy, ERC165 {
41 // Selector: burnFrom(address,uint256) 79cc6790
42 function burnFrom(address from, uint256 amount) external returns (bool);
43}
44
45// Selector: 942e8b22
46interface ERC20 is Dummy, ERC165, ERC20Events {
47 // Selector: name() 06fdde03
48 function name() external view returns (string memory);
49
50 // Selector: symbol() 95d89b41
51 function symbol() external view returns (string memory);
52
53 // Selector: totalSupply() 18160ddd
54 function totalSupply() external view returns (uint256);
55
56 // Selector: decimals() 313ce567
57 function decimals() external view returns (uint8);
58
59 // Selector: balanceOf(address) 70a08231
60 function balanceOf(address owner) external view returns (uint256);
61
62 // Selector: transfer(address,uint256) a9059cbb
63 function transfer(address to, uint256 amount) external returns (bool);
64
65 // Selector: transferFrom(address,address,uint256) 23b872dd
66 function transferFrom(
67 address from,
68 address to,
69 uint256 amount
70 ) external returns (bool);
71
72 // Selector: approve(address,uint256) 095ea7b3
73 function approve(address spender, uint256 amount) external returns (bool);
74
75 // Selector: allowance(address,address) dd62ed3e
76 function allowance(address owner, address spender)
77 external
78 view
79 returns (uint256);
80}
81
82<<<<<<< HEAD
83// Selector: ffe4da23
84=======
85// Selector: 765e2fae
86>>>>>>> misk: Update stubs
87>>>>>>> misk: Update stubs
88=======
89// Selector: e54be640
90>>>>>>> misc: update stubs
91interface Collection is Dummy, ERC165 {17interface Collection is Dummy, ERC165 {
92 /// Set collection property.18 /// Set collection property.
93 ///19 ///
127 /// or in textual repr: setCollectionSponsor(address)53 /// or in textual repr: setCollectionSponsor(address)
128 function setCollectionSponsor(address sponsor) external;54 function setCollectionSponsor(address sponsor) external;
12955
130<<<<<<< HEAD56 /// Set the substrate sponsor of the collection.
57 ///
58 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
59 ///
60 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
61 /// @dev EVM selector for this function is: 0xc74d6751,
62 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
63 function setCollectionSponsorSubstrate(uint256 sponsor) external;
64
65 /// @dev EVM selector for this function is: 0x058ac185,
66 /// or in textual repr: hasCollectionPendingSponsor()
67 function hasCollectionPendingSponsor() external view returns (bool);
68
131 /// Collection sponsorship confirmation.69 /// Collection sponsorship confirmation.
132 ///70 ///
135 /// or in textual repr: confirmCollectionSponsorship()73 /// or in textual repr: confirmCollectionSponsorship()
136 function confirmCollectionSponsorship() external;74 function confirmCollectionSponsorship() external;
13775
76 /// Remove collection sponsor.
77 /// @dev EVM selector for this function is: 0x6e0326a3,
78 /// or in textual repr: removeCollectionSponsor()
79 function removeCollectionSponsor() external;
80
81 /// Get current sponsor.
82 ///
83 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
84 /// @dev EVM selector for this function is: 0xb66bbc14,
85 /// or in textual repr: getCollectionSponsor()
86 function getCollectionSponsor() external view returns (Tuple6 memory);
87
138 /// Set limits for the collection.88 /// Set limits for the collection.
139 /// @dev Throws error if limit not found.89 /// @dev Throws error if limit not found.
140 /// @param limit Name of the limit. Valid names:90 /// @param limit Name of the limit. Valid names:
147 /// @param value Value of the limit.97 /// @param value Value of the limit.
148 /// @dev EVM selector for this function is: 0x6a3841db,98 /// @dev EVM selector for this function is: 0x6a3841db,
149 /// or in textual repr: setCollectionLimit(string,uint32)99 /// or in textual repr: setCollectionLimit(string,uint32)
150=======
151 // Set the substrate sponsor of the collection.
152 //
153 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
154 //
155 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
156 //
157 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
158 function setCollectionSponsorSubstrate(uint256 sponsor) external;
159
160 // Selector: hasCollectionPendingSponsor() 058ac185
161 function hasCollectionPendingSponsor() external view returns (bool);
162
163 // Collection sponsorship confirmation.
164 //
165 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
166 //
167 // Selector: confirmCollectionSponsorship() 3c50e97a
168 function confirmCollectionSponsorship() external;
169
170 // Remove collection sponsor.
171 //
172 // Selector: removeCollectionSponsor() 6e0326a3
173 function removeCollectionSponsor() external;
174
175 // Get current sponsor.
176 //
177 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
178 //
179 // Selector: getCollectionSponsor() b66bbc14
180 function getCollectionSponsor() external view returns (Tuple0 memory);
181
182 // Set limits for the collection.
183 // @dev Throws error if limit not found.
184 // @param limit Name of the limit. Valid names:
185 // "accountTokenOwnershipLimit",
186 // "sponsoredDataSize",
187 // "sponsoredDataRateLimit",
188 // "tokenLimit",
189 // "sponsorTransferTimeout",
190 // "sponsorApproveTimeout"
191 // @param value Value of the limit.
192 //
193 // Selector: setCollectionLimit(string,uint32) 6a3841db
194>>>>>>> misk: Update stubs
195 function setCollectionLimit(string memory limit, uint32 value) external;100 function setCollectionLimit(string memory limit, uint32 value) external;
196101
197 /// Set limits for the collection.102 /// Set limits for the collection.
318 /// @dev EVM selector for this function is: 0xb212138f,223 /// @dev EVM selector for this function is: 0xb212138f,
319 /// or in textual repr: setOwnerSubstrate(uint256)224 /// or in textual repr: setOwnerSubstrate(uint256)
320 function setOwnerSubstrate(uint256 newOwner) external;225 function setOwnerSubstrate(uint256 newOwner) external;
226}
227
228/// @dev anonymous struct
229struct Tuple6 {
230 address field_0;
231 uint256 field_1;
321}232}
322233
323/// @dev the ERC-165 identifier for this interface is 0x79cc6790234/// @dev the ERC-165 identifier for this interface is 0x79cc6790
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 uint256 field_0;
12 string field_1;
13}
14
15// Anonymous struct
16struct Tuple1 {
17 address field_0;
18 uint256 field_1;
19}
20
21// Common stubs holder
22>>>>>>> misk: Update stubs
23interface Dummy {7interface Dummy {
248
25}9}
81}65}
8266
83/// @title A contract that allows you to work with collections.67/// @title A contract that allows you to work with collections.
84/// @dev the ERC-165 identifier for this interface is 0xffe4da2368/// @dev the ERC-165 identifier for this interface is 0xe54be640
85interface Collection is Dummy, ERC165 {69interface Collection is Dummy, ERC165 {
86 /// Set collection property.70 /// Set collection property.
87 ///71 ///
121 /// or in textual repr: setCollectionSponsor(address)105 /// or in textual repr: setCollectionSponsor(address)
122 function setCollectionSponsor(address sponsor) external;106 function setCollectionSponsor(address sponsor) external;
123107
108 /// Set the substrate sponsor of the collection.
109 ///
110 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
111 ///
112 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
113 /// @dev EVM selector for this function is: 0xc74d6751,
114 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
115 function setCollectionSponsorSubstrate(uint256 sponsor) external;
116
117 /// @dev EVM selector for this function is: 0x058ac185,
118 /// or in textual repr: hasCollectionPendingSponsor()
119 function hasCollectionPendingSponsor() external view returns (bool);
120
124 /// Collection sponsorship confirmation.121 /// Collection sponsorship confirmation.
125 ///122 ///
126 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.123 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
127 /// @dev EVM selector for this function is: 0x3c50e97a,124 /// @dev EVM selector for this function is: 0x3c50e97a,
128 /// or in textual repr: confirmCollectionSponsorship()125 /// or in textual repr: confirmCollectionSponsorship()
129 function confirmCollectionSponsorship() external;126 function confirmCollectionSponsorship() external;
130127
128 /// Remove collection sponsor.
129 /// @dev EVM selector for this function is: 0x6e0326a3,
130 /// or in textual repr: removeCollectionSponsor()
131 function removeCollectionSponsor() external;
132
133 /// Get current sponsor.
134 ///
135 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
136 /// @dev EVM selector for this function is: 0xb66bbc14,
137 /// or in textual repr: getCollectionSponsor()
138 function getCollectionSponsor() external view returns (Tuple17 memory);
139
131 /// Set limits for the collection.140 /// Set limits for the collection.
132 /// @dev Throws error if limit not found.141 /// @dev Throws error if limit not found.
133 /// @param limit Name of the limit. Valid names:142 /// @param limit Name of the limit. Valid names:
268 function setOwnerSubstrate(uint256 newOwner) external;277 function setOwnerSubstrate(uint256 newOwner) external;
269}278}
270279
280/// @dev anonymous struct
281struct Tuple17 {
282 address field_0;
283 uint256 field_1;
284}
285
271/// @title ERC721 Token that can be irreversibly burned (destroyed).286/// @title ERC721 Token that can be irreversibly burned (destroyed).
272/// @dev the ERC-165 identifier for this interface is 0x42966c68287/// @dev the ERC-165 identifier for this interface is 0x42966c68
273interface ERC721Burnable is Dummy, ERC165 {288interface ERC721Burnable is Dummy, ERC165 {
321 function finishMinting() external returns (bool);336 function finishMinting() external returns (bool);
322}337}
323338
324<<<<<<< HEAD
325<<<<<<< HEAD
326/// @title Unique extensions for ERC721.339/// @title Unique extensions for ERC721.
327/// @dev the ERC-165 identifier for this interface is 0xd74d154f340/// @dev the ERC-165 identifier for this interface is 0xd74d154f
328=======
329<<<<<<< HEAD
330=======
331>>>>>>> misc: update stubs
332// Selector: 780e9d63
333interface ERC721Enumerable is Dummy, ERC165 {
334 // @notice Enumerate valid NFTs
335 // @param index A counter less than `totalSupply()`
336 // @return The token identifier for the `index`th NFT,
337 // (sort order not specified)
338 //
339 // Selector: tokenByIndex(uint256) 4f6ccce7
340 function tokenByIndex(uint256 index) external view returns (uint256);
341
342 // @dev Not implemented
343 //
344 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
345 function tokenOfOwnerByIndex(address owner, uint256 index)
346 external
347 view
348 returns (uint256);
349
350 // @notice Count NFTs tracked by this contract
351 // @return A count of valid NFTs tracked by this contract, where each one of
352 // them has an assigned and queryable owner not equal to the zero address
353 //
354 // Selector: totalSupply() 18160ddd
355 function totalSupply() external view returns (uint256);
356}
357
358// Selector: d74d154f
359>>>>>>> misk: Update stubs
360interface ERC721UniqueExtensions is Dummy, ERC165 {341interface ERC721UniqueExtensions is Dummy, ERC165 {
361 /// @notice Transfer ownership of an NFT342 /// @notice Transfer ownership of an NFT
362 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`343 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
405 returns (bool);386 returns (bool);
406}387}
407388
408<<<<<<< HEAD
409<<<<<<< HEAD
410/// @dev anonymous struct389/// @dev anonymous struct
411struct Tuple8 {390struct Tuple8 {
412 uint256 field_0;391 uint256 field_0;
413 string field_1;392 string field_1;
414}393}
415=======
416// Selector: ffe4da23
417=======
418// Selector: 765e2fae
419>>>>>>> misk: Update stubs
420=======
421// Selector: e54be640
422>>>>>>> misc: update stubs
423interface Collection is Dummy, ERC165 {
424 // Set collection property.
425 //
426 // @param key Property key.
427 // @param value Propery value.
428 //
429 // Selector: setCollectionProperty(string,bytes) 2f073f66
430 function setCollectionProperty(string memory key, bytes memory value)
431 external;
432>>>>>>> misk: Update stubs
433394
434/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension395/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
435/// @dev See https://eips.ethereum.org/EIPS/eip-721396/// @dev See https://eips.ethereum.org/EIPS/eip-721
449 function tokenOfOwnerByIndex(address owner, uint256 index)410 function tokenOfOwnerByIndex(address owner, uint256 index)
450 external411 external
451 view412 view
452<<<<<<< HEAD
453 returns (uint256);413 returns (uint256);
454=======
455 returns (bytes memory);
456
457 // Set the sponsor of the collection.
458 //
459 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
460 //
461 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
462 //
463 // Selector: setCollectionSponsor(address) 7623402e
464 function setCollectionSponsor(address sponsor) external;
465
466 // Set the substrate sponsor of the collection.
467 //
468 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
469 //
470 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
471 //
472 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
473 function setCollectionSponsorSubstrate(uint256 sponsor) external;
474
475 // Selector: hasCollectionPendingSponsor() 058ac185
476 function hasCollectionPendingSponsor() external view returns (bool);
477
478 // Collection sponsorship confirmation.
479 //
480 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
481 //
482 // Selector: confirmCollectionSponsorship() 3c50e97a
483 function confirmCollectionSponsorship() external;
484
485 // Remove collection sponsor.
486 //
487 // Selector: removeCollectionSponsor() 6e0326a3
488 function removeCollectionSponsor() external;
489
490 // Get current sponsor.
491 //
492 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
493 //
494 // Selector: getCollectionSponsor() b66bbc14
495 function getCollectionSponsor() external view returns (Tuple1 memory);
496
497 // Set limits for the collection.
498 // @dev Throws error if limit not found.
499 // @param limit Name of the limit. Valid names:
500 // "accountTokenOwnershipLimit",
501 // "sponsoredDataSize",
502 // "sponsoredDataRateLimit",
503 // "tokenLimit",
504 // "sponsorTransferTimeout",
505 // "sponsorApproveTimeout"
506 // @param value Value of the limit.
507 //
508 // Selector: setCollectionLimit(string,uint32) 6a3841db
509 function setCollectionLimit(string memory limit, uint32 value) external;
510
511 // Set limits for the collection.
512 // @dev Throws error if limit not found.
513 // @param limit Name of the limit. Valid names:
514 // "ownerCanTransfer",
515 // "ownerCanDestroy",
516 // "transfersEnabled"
517 // @param value Value of the limit.
518 //
519 // Selector: setCollectionLimit(string,bool) 993b7fba
520 function setCollectionLimit(string memory limit, bool value) external;
521
522 // Get contract address.
523 //
524 // Selector: contractAddress() f6b4dfb4
525 function contractAddress() external view returns (address);
526
527 // Add collection admin by substrate address.
528 // @param new_admin Substrate administrator address.
529 //
530 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
531 function addCollectionAdminSubstrate(uint256 newAdmin) external;
532>>>>>>> misk: Update stubs
533414
534 /// @notice Count NFTs tracked by this contract415 /// @notice Count NFTs tracked by this contract
535 /// @return A count of valid NFTs tracked by this contract, where each one of416 /// @return A count of valid NFTs tracked by this contract, where each one of
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
33
4pragma solidity >=0.8.0 <0.9.0;4pragma solidity >=0.8.0 <0.9.0;
55
6<<<<<<< HEAD
7/// @dev common stubs holder6/// @dev common stubs holder
8=======
9// Anonymous struct
10struct Tuple0 {
11 uint256 field_0;
12 string field_1;
13}
14
15// Anonymous struct
16struct Tuple1 {
17 address field_0;
18 uint256 field_1;
19}
20
21// Common stubs holder
22>>>>>>> misk: Update stubs
23interface Dummy {7interface Dummy {
248
25}9}
81}65}
8266
83/// @title A contract that allows you to work with collections.67/// @title A contract that allows you to work with collections.
84/// @dev the ERC-165 identifier for this interface is 0xffe4da2368/// @dev the ERC-165 identifier for this interface is 0xe54be640
85interface Collection is Dummy, ERC165 {69interface Collection is Dummy, ERC165 {
86 /// Set collection property.70 /// Set collection property.
87 ///71 ///
121 /// or in textual repr: setCollectionSponsor(address)105 /// or in textual repr: setCollectionSponsor(address)
122 function setCollectionSponsor(address sponsor) external;106 function setCollectionSponsor(address sponsor) external;
123107
108 /// Set the substrate sponsor of the collection.
109 ///
110 /// @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
111 ///
112 /// @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
113 /// @dev EVM selector for this function is: 0xc74d6751,
114 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
115 function setCollectionSponsorSubstrate(uint256 sponsor) external;
116
117 /// @dev EVM selector for this function is: 0x058ac185,
118 /// or in textual repr: hasCollectionPendingSponsor()
119 function hasCollectionPendingSponsor() external view returns (bool);
120
124 /// Collection sponsorship confirmation.121 /// Collection sponsorship confirmation.
125 ///122 ///
126 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.123 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
127 /// @dev EVM selector for this function is: 0x3c50e97a,124 /// @dev EVM selector for this function is: 0x3c50e97a,
128 /// or in textual repr: confirmCollectionSponsorship()125 /// or in textual repr: confirmCollectionSponsorship()
129 function confirmCollectionSponsorship() external;126 function confirmCollectionSponsorship() external;
130127
128 /// Remove collection sponsor.
129 /// @dev EVM selector for this function is: 0x6e0326a3,
130 /// or in textual repr: removeCollectionSponsor()
131 function removeCollectionSponsor() external;
132
133 /// Get current sponsor.
134 ///
135 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
136 /// @dev EVM selector for this function is: 0xb66bbc14,
137 /// or in textual repr: getCollectionSponsor()
138 function getCollectionSponsor() external view returns (Tuple17 memory);
139
131 /// Set limits for the collection.140 /// Set limits for the collection.
132 /// @dev Throws error if limit not found.141 /// @dev Throws error if limit not found.
133 /// @param limit Name of the limit. Valid names:142 /// @param limit Name of the limit. Valid names:
268 function setOwnerSubstrate(uint256 newOwner) external;277 function setOwnerSubstrate(uint256 newOwner) external;
269}278}
270279
280/// @dev anonymous struct
281struct Tuple17 {
282 address field_0;
283 uint256 field_1;
284}
285
271/// @title ERC721 Token that can be irreversibly burned (destroyed).286/// @title ERC721 Token that can be irreversibly burned (destroyed).
272/// @dev the ERC-165 identifier for this interface is 0x42966c68287/// @dev the ERC-165 identifier for this interface is 0x42966c68
273interface ERC721Burnable is Dummy, ERC165 {288interface ERC721Burnable is Dummy, ERC165 {
321 function finishMinting() external returns (bool);336 function finishMinting() external returns (bool);
322}337}
323338
324<<<<<<< HEAD
325<<<<<<< HEAD
326/// @title Unique extensions for ERC721.339/// @title Unique extensions for ERC721.
327/// @dev the ERC-165 identifier for this interface is 0x7c3bef89340/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
328=======
329<<<<<<< HEAD
330=======
331>>>>>>> misc: update stubs
332// Selector: 780e9d63
333interface ERC721Enumerable is Dummy, ERC165 {
334 // @notice Enumerate valid RFTs
335 // @param index A counter less than `totalSupply()`
336 // @return The token identifier for the `index`th NFT,
337 // (sort order not specified)
338 //
339 // Selector: tokenByIndex(uint256) 4f6ccce7
340 function tokenByIndex(uint256 index) external view returns (uint256);
341
342 // Not implemented
343 //
344 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
345 function tokenOfOwnerByIndex(address owner, uint256 index)
346 external
347 view
348 returns (uint256);
349
350 // @notice Count RFTs tracked by this contract
351 // @return A count of valid RFTs tracked by this contract, where each one of
352 // them has an assigned and queryable owner not equal to the zero address
353 //
354 // Selector: totalSupply() 18160ddd
355 function totalSupply() external view returns (uint256);
356}
357
358// Selector: 7c3bef89
359>>>>>>> misk: Update stubs
360interface ERC721UniqueExtensions is Dummy, ERC165 {341interface ERC721UniqueExtensions is Dummy, ERC165 {
361 /// @notice Transfer ownership of an RFT342 /// @notice Transfer ownership of an RFT
362 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`343 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
417 returns (address);398 returns (address);
418}399}
419400
420<<<<<<< HEAD
421<<<<<<< HEAD
422/// @dev anonymous struct401/// @dev anonymous struct
423struct Tuple8 {402struct Tuple8 {
424 uint256 field_0;403 uint256 field_0;
425 string field_1;404 string field_1;
426}405}
427=======
428// Selector: ffe4da23
429=======
430// Selector: 765e2fae
431>>>>>>> misk: Update stubs
432=======
433// Selector: e54be640
434>>>>>>> misc: update stubs
435interface Collection is Dummy, ERC165 {
436 // Set collection property.
437 //
438 // @param key Property key.
439 // @param value Propery value.
440 //
441 // Selector: setCollectionProperty(string,bytes) 2f073f66
442 function setCollectionProperty(string memory key, bytes memory value)
443 external;
444>>>>>>> misk: Update stubs
445406
446/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension407/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
447/// @dev See https://eips.ethereum.org/EIPS/eip-721408/// @dev See https://eips.ethereum.org/EIPS/eip-721
461 function tokenOfOwnerByIndex(address owner, uint256 index)422 function tokenOfOwnerByIndex(address owner, uint256 index)
462 external423 external
463 view424 view
464<<<<<<< HEAD
465 returns (uint256);425 returns (uint256);
466=======
467 returns (bytes memory);
468
469 // Set the sponsor of the collection.
470 //
471 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
472 //
473 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
474 //
475 // Selector: setCollectionSponsor(address) 7623402e
476 function setCollectionSponsor(address sponsor) external;
477
478 // Set the substrate sponsor of the collection.
479 //
480 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
481 //
482 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
483 //
484 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
485 function setCollectionSponsorSubstrate(uint256 sponsor) external;
486
487 // Selector: hasCollectionPendingSponsor() 058ac185
488 function hasCollectionPendingSponsor() external view returns (bool);
489
490 // Collection sponsorship confirmation.
491 //
492 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
493 //
494 // Selector: confirmCollectionSponsorship() 3c50e97a
495 function confirmCollectionSponsorship() external;
496
497 // Remove collection sponsor.
498 //
499 // Selector: removeCollectionSponsor() 6e0326a3
500 function removeCollectionSponsor() external;
501
502 // Get current sponsor.
503 //
504 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
505 //
506 // Selector: getCollectionSponsor() b66bbc14
507 function getCollectionSponsor() external view returns (Tuple1 memory);
508
509 // Set limits for the collection.
510 // @dev Throws error if limit not found.
511 // @param limit Name of the limit. Valid names:
512 // "accountTokenOwnershipLimit",
513 // "sponsoredDataSize",
514 // "sponsoredDataRateLimit",
515 // "tokenLimit",
516 // "sponsorTransferTimeout",
517 // "sponsorApproveTimeout"
518 // @param value Value of the limit.
519 //
520 // Selector: setCollectionLimit(string,uint32) 6a3841db
521 function setCollectionLimit(string memory limit, uint32 value) external;
522
523 // Set limits for the collection.
524 // @dev Throws error if limit not found.
525 // @param limit Name of the limit. Valid names:
526 // "ownerCanTransfer",
527 // "ownerCanDestroy",
528 // "transfersEnabled"
529 // @param value Value of the limit.
530 //
531 // Selector: setCollectionLimit(string,bool) 993b7fba
532 function setCollectionLimit(string memory limit, bool value) external;
533
534 // Get contract address.
535 //
536 // Selector: contractAddress() f6b4dfb4
537 function contractAddress() external view returns (address);
538
539 // Add collection admin by substrate address.
540 // @param new_admin Substrate administrator address.
541 //
542 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
543 function addCollectionAdminSubstrate(uint256 newAdmin) external;
544>>>>>>> misk: Update stubs
545426
546 /// @notice Count RFTs tracked by this contract427 /// @notice Count RFTs tracked by this contract
547 /// @return A count of valid RFTs tracked by this contract, where each one of428 /// @return A count of valid RFTs tracked by this contract, where each one of
modifiedtests/src/eth/fungibleAbi.jsondiffbeforeafterboth
159 { "internalType": "address", "name": "field_0", "type": "address" },159 { "internalType": "address", "name": "field_0", "type": "address" },
160 { "internalType": "uint256", "name": "field_1", "type": "uint256" }160 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
161 ],161 ],
162 "internalType": "struct Tuple0",162 "internalType": "struct Tuple6",
163 "name": "",163 "name": "",
164 "type": "tuple"164 "type": "tuple"
165 }165 }
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
208 { "internalType": "address", "name": "field_0", "type": "address" },208 { "internalType": "address", "name": "field_0", "type": "address" },
209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
210 ],210 ],
211 "internalType": "struct Tuple1",211 "internalType": "struct Tuple17",
212 "name": "",212 "name": "",
213 "type": "tuple"213 "type": "tuple"
214 }214 }
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
208 { "internalType": "address", "name": "field_0", "type": "address" },208 { "internalType": "address", "name": "field_0", "type": "address" },
209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
210 ],210 ],
211 "internalType": "struct Tuple1",211 "internalType": "struct Tuple17",
212 "name": "",212 "name": "",
213 "type": "tuple"213 "type": "tuple"
214 }214 }