git.delta.rocks / unique-network / refs/commits / fd0a58401917

difftreelog

misk: Update stubs

Trubnikov Sergey2022-08-24parent: #83de2b0.patch.diff
in: master

9 files changed

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
6/// @dev common stubs holder7/// @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
7contract Dummy {17contract Dummy {
8 uint8 dummy;18 uint8 dummy;
9 string stub_error = "this contract is implemented in native";19 string stub_error = "this contract is implemented in native";
21 }31 }
22}32}
2333
34<<<<<<< HEAD
24/// @title A contract that allows you to work with collections.35/// @title A contract that allows you to work with collections.
25/// @dev the ERC-165 identifier for this interface is 0xffe4da2336/// @dev the ERC-165 identifier for this interface is 0xffe4da23
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<<<<<<< HEAD
49// Selector: 79cc6790
50contract ERC20UniqueExtensions is Dummy, ERC165 {
51 // Selector: burnFrom(address,uint256) 79cc6790
52 function burnFrom(address from, uint256 amount) public returns (bool) {
53 require(false, stub_error);
54 from;
55 amount;
56 dummy = 0;
57 return false;
58 }
59}
60
61// Selector: 942e8b22
62contract ERC20 is Dummy, ERC165, ERC20Events {
63 // Selector: name() 06fdde03
64 function name() public view returns (string memory) {
65 require(false, stub_error);
66 dummy;
67 return "";
68 }
69
70 // Selector: symbol() 95d89b41
71 function symbol() public view returns (string memory) {
72 require(false, stub_error);
73 dummy;
74 return "";
75 }
76
77 // Selector: totalSupply() 18160ddd
78 function totalSupply() public view returns (uint256) {
79 require(false, stub_error);
80 dummy;
81 return 0;
82 }
83
84 // Selector: decimals() 313ce567
85 function decimals() public view returns (uint8) {
86 require(false, stub_error);
87 dummy;
88 return 0;
89 }
90
91 // Selector: balanceOf(address) 70a08231
92 function balanceOf(address owner) public view returns (uint256) {
93 require(false, stub_error);
94 owner;
95 dummy;
96 return 0;
97 }
98
99 // Selector: transfer(address,uint256) a9059cbb
100 function transfer(address to, uint256 amount) public returns (bool) {
101 require(false, stub_error);
102 to;
103 amount;
104 dummy = 0;
105 return false;
106 }
107
108 // Selector: transferFrom(address,address,uint256) 23b872dd
109 function transferFrom(
110 address from,
111 address to,
112 uint256 amount
113 ) public returns (bool) {
114 require(false, stub_error);
115 from;
116 to;
117 amount;
118 dummy = 0;
119 return false;
120 }
121
122 // Selector: approve(address,uint256) 095ea7b3
123 function approve(address spender, uint256 amount) public returns (bool) {
124 require(false, stub_error);
125 spender;
126 amount;
127 dummy = 0;
128 return false;
129 }
130
131 // Selector: allowance(address,address) dd62ed3e
132 function allowance(address owner, address spender)
133 public
134 view
135 returns (uint256)
136 {
137 require(false, stub_error);
138 owner;
139 spender;
140 dummy;
141 return 0;
142 }
143}
144
145// Selector: ffe4da23
146=======
147// Selector: 765e2fae
148>>>>>>> misk: Update stubs
149>>>>>>> misk: Update stubs
26contract Collection is Dummy, ERC165 {150contract Collection is Dummy, ERC165 {
27 /// Set collection property.151 /// Set collection property.
28 ///152 ///
82 dummy = 0;206 dummy = 0;
83 }207 }
84208
209<<<<<<< HEAD
85 /// Collection sponsorship confirmation.210 /// Collection sponsorship confirmation.
86 ///211 ///
87 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.212 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
88 /// @dev EVM selector for this function is: 0x3c50e97a,213 /// @dev EVM selector for this function is: 0x3c50e97a,
89 /// or in textual repr: confirmCollectionSponsorship()214 /// or in textual repr: confirmCollectionSponsorship()
215=======
216 // Set the substrate sponsor of the collection.
217 //
218 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
219 //
220 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
221 //
222 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
223 function setCollectionSponsorSubstrate(uint256 sponsor) public {
224 require(false, stub_error);
225 sponsor;
226 dummy = 0;
227 }
228
229 // Selector: hasCollectionPendingSponsor() 058ac185
230 function hasCollectionPendingSponsor() public view returns (bool) {
231 require(false, stub_error);
232 dummy;
233 return false;
234 }
235
236 // Collection sponsorship confirmation.
237 //
238 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
239 //
240 // Selector: confirmCollectionSponsorship() 3c50e97a
241>>>>>>> misk: Update stubs
90 function confirmCollectionSponsorship() public {242 function confirmCollectionSponsorship() public {
91 require(false, stub_error);243 require(false, stub_error);
92 dummy = 0;244 dummy = 0;
93 }245 }
94246
247<<<<<<< HEAD
95 /// Set limits for the collection.248 /// Set limits for the collection.
96 /// @dev Throws error if limit not found.249 /// @dev Throws error if limit not found.
97 /// @param limit Name of the limit. Valid names:250 /// @param limit Name of the limit. Valid names:
104 /// @param value Value of the limit.257 /// @param value Value of the limit.
105 /// @dev EVM selector for this function is: 0x6a3841db,258 /// @dev EVM selector for this function is: 0x6a3841db,
106 /// or in textual repr: setCollectionLimit(string,uint32)259 /// or in textual repr: setCollectionLimit(string,uint32)
260=======
261 // Remove collection sponsor.
262 //
263 // Selector: removeCollectionSponsor() 6e0326a3
264 function removeCollectionSponsor() public {
265 require(false, stub_error);
266 dummy = 0;
267 }
268
269 // Get current sponsor.
270 //
271 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
272 //
273 // Selector: getCollectionSponsor() b66bbc14
274 function getCollectionSponsor() public view returns (Tuple0 memory) {
275 require(false, stub_error);
276 dummy;
277 return Tuple0(0x0000000000000000000000000000000000000000, 0);
278 }
279
280 // Set limits for the collection.
281 // @dev Throws error if limit not found.
282 // @param limit Name of the limit. Valid names:
283 // "accountTokenOwnershipLimit",
284 // "sponsoredDataSize",
285 // "sponsoredDataRateLimit",
286 // "tokenLimit",
287 // "sponsorTransferTimeout",
288 // "sponsorApproveTimeout"
289 // @param value Value of the limit.
290 //
291 // Selector: setCollectionLimit(string,uint32) 6a3841db
292>>>>>>> misk: Update stubs
107 function setCollectionLimit(string memory limit, uint32 value) public {293 function setCollectionLimit(string memory limit, uint32 value) public {
108 require(false, stub_error);294 require(false, stub_error);
109 limit;295 limit;
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
6/// @dev common stubs holder7/// @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
7contract Dummy {23contract Dummy {
8 uint8 dummy;24 uint8 dummy;
9 string stub_error = "this contract is implemented in native";25 string stub_error = "this contract is implemented in native";
465 }481 }
466}482}
467483
484<<<<<<< HEAD
468/// @title Unique extensions for ERC721.485/// @title Unique extensions for ERC721.
469/// @dev the ERC-165 identifier for this interface is 0xd74d154f486/// @dev the ERC-165 identifier for this interface is 0xd74d154f
487=======
488<<<<<<< HEAD
489// Selector: 780e9d63
490contract ERC721Enumerable is Dummy, ERC165 {
491 // @notice Enumerate valid NFTs
492 // @param index A counter less than `totalSupply()`
493 // @return The token identifier for the `index`th NFT,
494 // (sort order not specified)
495 //
496 // Selector: tokenByIndex(uint256) 4f6ccce7
497 function tokenByIndex(uint256 index) public view returns (uint256) {
498 require(false, stub_error);
499 index;
500 dummy;
501 return 0;
502 }
503
504 // @dev Not implemented
505 //
506 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
507 function tokenOfOwnerByIndex(address owner, uint256 index)
508 public
509 view
510 returns (uint256)
511 {
512 require(false, stub_error);
513 owner;
514 index;
515 dummy;
516 return 0;
517 }
518
519 // @notice Count NFTs tracked by this contract
520 // @return A count of valid NFTs tracked by this contract, where each one of
521 // them has an assigned and queryable owner not equal to the zero address
522 //
523 // Selector: totalSupply() 18160ddd
524 function totalSupply() public view returns (uint256) {
525 require(false, stub_error);
526 dummy;
527 return 0;
528 }
529}
530
531// Selector: d74d154f
532>>>>>>> misk: Update stubs
470contract ERC721UniqueExtensions is Dummy, ERC165 {533contract ERC721UniqueExtensions is Dummy, ERC165 {
471 /// @notice Transfer ownership of an NFT534 /// @notice Transfer ownership of an NFT
472 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`535 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
543 }606 }
544}607}
545608
609<<<<<<< HEAD
546/// @dev anonymous struct610/// @dev anonymous struct
547struct Tuple8 {611struct Tuple8 {
548 uint256 field_0;612 uint256 field_0;
549 string field_1;613 string field_1;
550}614}
615=======
616// Selector: ffe4da23
617=======
618// Selector: 765e2fae
619>>>>>>> misk: Update stubs
620contract Collection is Dummy, ERC165 {
621 // Set collection property.
622 //
623 // @param key Property key.
624 // @param value Propery value.
625 //
626 // Selector: setCollectionProperty(string,bytes) 2f073f66
627 function setCollectionProperty(string memory key, bytes memory value)
628 public
629 {
630 require(false, stub_error);
631 key;
632 value;
633 dummy = 0;
634 }
635>>>>>>> misk: Update stubs
551636
552/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension637/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
553/// @dev See https://eips.ethereum.org/EIPS/eip-721638/// @dev See https://eips.ethereum.org/EIPS/eip-721
578 owner;663 owner;
579 index;664 index;
580 dummy;665 dummy;
666<<<<<<< HEAD
581 return 0;667 return 0;
668=======
669 return hex"";
670 }
671
672 // Set the sponsor of the collection.
673 //
674 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
675 //
676 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
677 //
678 // Selector: setCollectionSponsor(address) 7623402e
679 function setCollectionSponsor(address sponsor) public {
680 require(false, stub_error);
681 sponsor;
682 dummy = 0;
683 }
684
685 // Set the substrate sponsor of the collection.
686 //
687 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
688 //
689 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
690 //
691 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
692 function setCollectionSponsorSubstrate(uint256 sponsor) public {
693 require(false, stub_error);
694 sponsor;
695 dummy = 0;
696 }
697
698 // Selector: hasCollectionPendingSponsor() 058ac185
699 function hasCollectionPendingSponsor() public view returns (bool) {
700 require(false, stub_error);
701 dummy;
702 return false;
703 }
704
705 // Collection sponsorship confirmation.
706 //
707 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
708 //
709 // Selector: confirmCollectionSponsorship() 3c50e97a
710 function confirmCollectionSponsorship() public {
711 require(false, stub_error);
712 dummy = 0;
713 }
714
715 // Remove collection sponsor.
716 //
717 // Selector: removeCollectionSponsor() 6e0326a3
718 function removeCollectionSponsor() public {
719 require(false, stub_error);
720 dummy = 0;
721 }
722
723 // Get current sponsor.
724 //
725 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
726 //
727 // Selector: getCollectionSponsor() b66bbc14
728 function getCollectionSponsor() public view returns (Tuple1 memory) {
729 require(false, stub_error);
730 dummy;
731 return Tuple1(0x0000000000000000000000000000000000000000, 0);
732 }
733
734 // Set limits for the collection.
735 // @dev Throws error if limit not found.
736 // @param limit Name of the limit. Valid names:
737 // "accountTokenOwnershipLimit",
738 // "sponsoredDataSize",
739 // "sponsoredDataRateLimit",
740 // "tokenLimit",
741 // "sponsorTransferTimeout",
742 // "sponsorApproveTimeout"
743 // @param value Value of the limit.
744 //
745 // Selector: setCollectionLimit(string,uint32) 6a3841db
746 function setCollectionLimit(string memory limit, uint32 value) public {
747 require(false, stub_error);
748 limit;
749 value;
750 dummy = 0;
751>>>>>>> misk: Update stubs
582 }752 }
583753
584 /// @notice Count NFTs tracked by this contract754 /// @notice Count NFTs tracked by this contract
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
6/// @dev common stubs holder7/// @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
7contract Dummy {23contract Dummy {
8 uint8 dummy;24 uint8 dummy;
9 string stub_error = "this contract is implemented in native";25 string stub_error = "this contract is implemented in native";
465 }481 }
466}482}
467483
484<<<<<<< HEAD
468/// @title Unique extensions for ERC721.485/// @title Unique extensions for ERC721.
469/// @dev the ERC-165 identifier for this interface is 0x7c3bef89486/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
487=======
488<<<<<<< HEAD
489// Selector: 780e9d63
490contract ERC721Enumerable is Dummy, ERC165 {
491 // @notice Enumerate valid RFTs
492 // @param index A counter less than `totalSupply()`
493 // @return The token identifier for the `index`th NFT,
494 // (sort order not specified)
495 //
496 // Selector: tokenByIndex(uint256) 4f6ccce7
497 function tokenByIndex(uint256 index) public view returns (uint256) {
498 require(false, stub_error);
499 index;
500 dummy;
501 return 0;
502 }
503
504 // Not implemented
505 //
506 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
507 function tokenOfOwnerByIndex(address owner, uint256 index)
508 public
509 view
510 returns (uint256)
511 {
512 require(false, stub_error);
513 owner;
514 index;
515 dummy;
516 return 0;
517 }
518
519 // @notice Count RFTs tracked by this contract
520 // @return A count of valid RFTs tracked by this contract, where each one of
521 // them has an assigned and queryable owner not equal to the zero address
522 //
523 // Selector: totalSupply() 18160ddd
524 function totalSupply() public view returns (uint256) {
525 require(false, stub_error);
526 dummy;
527 return 0;
528 }
529}
530
531// Selector: 7c3bef89
532>>>>>>> misk: Update stubs
470contract ERC721UniqueExtensions is Dummy, ERC165 {533contract ERC721UniqueExtensions is Dummy, ERC165 {
471 /// @notice Transfer ownership of an RFT534 /// @notice Transfer ownership of an RFT
472 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`535 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
557 }620 }
558}621}
559622
623<<<<<<< HEAD
560/// @dev anonymous struct624/// @dev anonymous struct
561struct Tuple8 {625struct Tuple8 {
562 uint256 field_0;626 uint256 field_0;
563 string field_1;627 string field_1;
564}628}
629=======
630// Selector: ffe4da23
631=======
632// Selector: 765e2fae
633>>>>>>> misk: Update stubs
634contract Collection is Dummy, ERC165 {
635 // Set collection property.
636 //
637 // @param key Property key.
638 // @param value Propery value.
639 //
640 // Selector: setCollectionProperty(string,bytes) 2f073f66
641 function setCollectionProperty(string memory key, bytes memory value)
642 public
643 {
644 require(false, stub_error);
645 key;
646 value;
647 dummy = 0;
648 }
649>>>>>>> misk: Update stubs
565650
566/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension651/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
567/// @dev See https://eips.ethereum.org/EIPS/eip-721652/// @dev See https://eips.ethereum.org/EIPS/eip-721
592 owner;677 owner;
593 index;678 index;
594 dummy;679 dummy;
680<<<<<<< HEAD
595 return 0;681 return 0;
682=======
683 return hex"";
684 }
685
686 // Set the sponsor of the collection.
687 //
688 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
689 //
690 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
691 //
692 // Selector: setCollectionSponsor(address) 7623402e
693 function setCollectionSponsor(address sponsor) public {
694 require(false, stub_error);
695 sponsor;
696 dummy = 0;
697 }
698
699 // Set the substrate sponsor of the collection.
700 //
701 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
702 //
703 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
704 //
705 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
706 function setCollectionSponsorSubstrate(uint256 sponsor) public {
707 require(false, stub_error);
708 sponsor;
709 dummy = 0;
710 }
711
712 // Selector: hasCollectionPendingSponsor() 058ac185
713 function hasCollectionPendingSponsor() public view returns (bool) {
714 require(false, stub_error);
715 dummy;
716 return false;
717 }
718
719 // Collection sponsorship confirmation.
720 //
721 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
722 //
723 // Selector: confirmCollectionSponsorship() 3c50e97a
724 function confirmCollectionSponsorship() public {
725 require(false, stub_error);
726 dummy = 0;
727 }
728
729 // Remove collection sponsor.
730 //
731 // Selector: removeCollectionSponsor() 6e0326a3
732 function removeCollectionSponsor() public {
733 require(false, stub_error);
734 dummy = 0;
735 }
736
737 // Get current sponsor.
738 //
739 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
740 //
741 // Selector: getCollectionSponsor() b66bbc14
742 function getCollectionSponsor() public view returns (Tuple1 memory) {
743 require(false, stub_error);
744 dummy;
745 return Tuple1(0x0000000000000000000000000000000000000000, 0);
746 }
747
748 // Set limits for the collection.
749 // @dev Throws error if limit not found.
750 // @param limit Name of the limit. Valid names:
751 // "accountTokenOwnershipLimit",
752 // "sponsoredDataSize",
753 // "sponsoredDataRateLimit",
754 // "tokenLimit",
755 // "sponsorTransferTimeout",
756 // "sponsorApproveTimeout"
757 // @param value Value of the limit.
758 //
759 // Selector: setCollectionLimit(string,uint32) 6a3841db
760 function setCollectionLimit(string memory limit, uint32 value) public {
761 require(false, stub_error);
762 limit;
763 value;
764 dummy = 0;
765>>>>>>> misk: Update stubs
596 }766 }
597767
598 /// @notice Count RFTs tracked by this contract768 /// @notice Count RFTs tracked by this contract
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
6/// @dev common stubs holder7/// @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
7interface Dummy {17interface Dummy {
818
9}19}
12 function supportsInterface(bytes4 interfaceID) external view returns (bool);22 function supportsInterface(bytes4 interfaceID) external view returns (bool);
13}23}
1424
25<<<<<<< HEAD
15/// @title A contract that allows you to work with collections.26/// @title A contract that allows you to work with collections.
16/// @dev the ERC-165 identifier for this interface is 0xffe4da2327/// @dev the ERC-165 identifier for this interface is 0xffe4da23
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<<<<<<< HEAD
40// Selector: 79cc6790
41interface ERC20UniqueExtensions is Dummy, ERC165 {
42 // Selector: burnFrom(address,uint256) 79cc6790
43 function burnFrom(address from, uint256 amount) external returns (bool);
44}
45
46// Selector: 942e8b22
47interface ERC20 is Dummy, ERC165, ERC20Events {
48 // Selector: name() 06fdde03
49 function name() external view returns (string memory);
50
51 // Selector: symbol() 95d89b41
52 function symbol() external view returns (string memory);
53
54 // Selector: totalSupply() 18160ddd
55 function totalSupply() external view returns (uint256);
56
57 // Selector: decimals() 313ce567
58 function decimals() external view returns (uint8);
59
60 // Selector: balanceOf(address) 70a08231
61 function balanceOf(address owner) external view returns (uint256);
62
63 // Selector: transfer(address,uint256) a9059cbb
64 function transfer(address to, uint256 amount) external returns (bool);
65
66 // Selector: transferFrom(address,address,uint256) 23b872dd
67 function transferFrom(
68 address from,
69 address to,
70 uint256 amount
71 ) external returns (bool);
72
73 // Selector: approve(address,uint256) 095ea7b3
74 function approve(address spender, uint256 amount) external returns (bool);
75
76 // Selector: allowance(address,address) dd62ed3e
77 function allowance(address owner, address spender)
78 external
79 view
80 returns (uint256);
81}
82
83// Selector: ffe4da23
84=======
85// Selector: 765e2fae
86>>>>>>> misk: Update stubs
87>>>>>>> misk: Update stubs
17interface Collection is Dummy, ERC165 {88interface Collection is Dummy, ERC165 {
18 /// Set collection property.89 /// Set collection property.
19 ///90 ///
53 /// or in textual repr: setCollectionSponsor(address)124 /// or in textual repr: setCollectionSponsor(address)
54 function setCollectionSponsor(address sponsor) external;125 function setCollectionSponsor(address sponsor) external;
55126
127<<<<<<< HEAD
56 /// Collection sponsorship confirmation.128 /// Collection sponsorship confirmation.
57 ///129 ///
58 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.130 /// @dev After setting the sponsor for the collection, it must be confirmed with this function.
72 /// @param value Value of the limit.144 /// @param value Value of the limit.
73 /// @dev EVM selector for this function is: 0x6a3841db,145 /// @dev EVM selector for this function is: 0x6a3841db,
74 /// or in textual repr: setCollectionLimit(string,uint32)146 /// or in textual repr: setCollectionLimit(string,uint32)
147=======
148 // Set the substrate sponsor of the collection.
149 //
150 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
151 //
152 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
153 //
154 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
155 function setCollectionSponsorSubstrate(uint256 sponsor) external;
156
157 // Selector: hasCollectionPendingSponsor() 058ac185
158 function hasCollectionPendingSponsor() external view returns (bool);
159
160 // Collection sponsorship confirmation.
161 //
162 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
163 //
164 // Selector: confirmCollectionSponsorship() 3c50e97a
165 function confirmCollectionSponsorship() external;
166
167 // Remove collection sponsor.
168 //
169 // Selector: removeCollectionSponsor() 6e0326a3
170 function removeCollectionSponsor() external;
171
172 // Get current sponsor.
173 //
174 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
175 //
176 // Selector: getCollectionSponsor() b66bbc14
177 function getCollectionSponsor() external view returns (Tuple0 memory);
178
179 // Set limits for the collection.
180 // @dev Throws error if limit not found.
181 // @param limit Name of the limit. Valid names:
182 // "accountTokenOwnershipLimit",
183 // "sponsoredDataSize",
184 // "sponsoredDataRateLimit",
185 // "tokenLimit",
186 // "sponsorTransferTimeout",
187 // "sponsorApproveTimeout"
188 // @param value Value of the limit.
189 //
190 // Selector: setCollectionLimit(string,uint32) 6a3841db
191>>>>>>> misk: Update stubs
75 function setCollectionLimit(string memory limit, uint32 value) external;192 function setCollectionLimit(string memory limit, uint32 value) external;
76193
77 /// Set limits for the collection.194 /// Set limits for the collection.
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
6/// @dev common stubs holder7/// @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
7interface Dummy {23interface Dummy {
824
9}25}
305 function finishMinting() external returns (bool);321 function finishMinting() external returns (bool);
306}322}
307323
324<<<<<<< HEAD
308/// @title Unique extensions for ERC721.325/// @title Unique extensions for ERC721.
309/// @dev the ERC-165 identifier for this interface is 0xd74d154f326/// @dev the ERC-165 identifier for this interface is 0xd74d154f
327=======
328<<<<<<< HEAD
329// Selector: 780e9d63
330interface ERC721Enumerable is Dummy, ERC165 {
331 // @notice Enumerate valid NFTs
332 // @param index A counter less than `totalSupply()`
333 // @return The token identifier for the `index`th NFT,
334 // (sort order not specified)
335 //
336 // Selector: tokenByIndex(uint256) 4f6ccce7
337 function tokenByIndex(uint256 index) external view returns (uint256);
338
339 // @dev Not implemented
340 //
341 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
342 function tokenOfOwnerByIndex(address owner, uint256 index)
343 external
344 view
345 returns (uint256);
346
347 // @notice Count NFTs tracked by this contract
348 // @return A count of valid NFTs tracked by this contract, where each one of
349 // them has an assigned and queryable owner not equal to the zero address
350 //
351 // Selector: totalSupply() 18160ddd
352 function totalSupply() external view returns (uint256);
353}
354
355// Selector: d74d154f
356>>>>>>> misk: Update stubs
310interface ERC721UniqueExtensions is Dummy, ERC165 {357interface ERC721UniqueExtensions is Dummy, ERC165 {
311 /// @notice Transfer ownership of an NFT358 /// @notice Transfer ownership of an NFT
312 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`359 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
355 returns (bool);402 returns (bool);
356}403}
357404
405<<<<<<< HEAD
358/// @dev anonymous struct406/// @dev anonymous struct
359struct Tuple8 {407struct Tuple8 {
360 uint256 field_0;408 uint256 field_0;
361 string field_1;409 string field_1;
362}410}
411=======
412// Selector: ffe4da23
413=======
414// Selector: 765e2fae
415>>>>>>> misk: Update stubs
416interface Collection is Dummy, ERC165 {
417 // Set collection property.
418 //
419 // @param key Property key.
420 // @param value Propery value.
421 //
422 // Selector: setCollectionProperty(string,bytes) 2f073f66
423 function setCollectionProperty(string memory key, bytes memory value)
424 external;
425>>>>>>> misk: Update stubs
363426
364/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension427/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
365/// @dev See https://eips.ethereum.org/EIPS/eip-721428/// @dev See https://eips.ethereum.org/EIPS/eip-721
379 function tokenOfOwnerByIndex(address owner, uint256 index)442 function tokenOfOwnerByIndex(address owner, uint256 index)
380 external443 external
381 view444 view
445<<<<<<< HEAD
382 returns (uint256);446 returns (uint256);
447=======
448 returns (bytes memory);
449
450 // Set the sponsor of the collection.
451 //
452 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
453 //
454 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
455 //
456 // Selector: setCollectionSponsor(address) 7623402e
457 function setCollectionSponsor(address sponsor) external;
458
459 // Set the substrate sponsor of the collection.
460 //
461 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
462 //
463 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
464 //
465 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
466 function setCollectionSponsorSubstrate(uint256 sponsor) external;
467
468 // Selector: hasCollectionPendingSponsor() 058ac185
469 function hasCollectionPendingSponsor() external view returns (bool);
470
471 // Collection sponsorship confirmation.
472 //
473 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
474 //
475 // Selector: confirmCollectionSponsorship() 3c50e97a
476 function confirmCollectionSponsorship() external;
477
478 // Remove collection sponsor.
479 //
480 // Selector: removeCollectionSponsor() 6e0326a3
481 function removeCollectionSponsor() external;
482
483 // Get current sponsor.
484 //
485 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
486 //
487 // Selector: getCollectionSponsor() b66bbc14
488 function getCollectionSponsor() external view returns (Tuple1 memory);
489
490 // Set limits for the collection.
491 // @dev Throws error if limit not found.
492 // @param limit Name of the limit. Valid names:
493 // "accountTokenOwnershipLimit",
494 // "sponsoredDataSize",
495 // "sponsoredDataRateLimit",
496 // "tokenLimit",
497 // "sponsorTransferTimeout",
498 // "sponsorApproveTimeout"
499 // @param value Value of the limit.
500 //
501 // Selector: setCollectionLimit(string,uint32) 6a3841db
502 function setCollectionLimit(string memory limit, uint32 value) external;
503
504 // Set limits for the collection.
505 // @dev Throws error if limit not found.
506 // @param limit Name of the limit. Valid names:
507 // "ownerCanTransfer",
508 // "ownerCanDestroy",
509 // "transfersEnabled"
510 // @param value Value of the limit.
511 //
512 // Selector: setCollectionLimit(string,bool) 993b7fba
513 function setCollectionLimit(string memory limit, bool value) external;
514
515 // Get contract address.
516 //
517 // Selector: contractAddress() f6b4dfb4
518 function contractAddress() external view returns (address);
519
520 // Add collection admin by substrate address.
521 // @param new_admin Substrate administrator address.
522 //
523 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
524 function addCollectionAdminSubstrate(uint256 newAdmin) external;
525>>>>>>> misk: Update stubs
383526
384 /// @notice Count NFTs tracked by this contract527 /// @notice Count NFTs tracked by this contract
385 /// @return A count of valid NFTs tracked by this contract, where each one of528 /// @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
6/// @dev common stubs holder7/// @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
7interface Dummy {23interface Dummy {
824
9}25}
305 function finishMinting() external returns (bool);321 function finishMinting() external returns (bool);
306}322}
307323
324<<<<<<< HEAD
308/// @title Unique extensions for ERC721.325/// @title Unique extensions for ERC721.
309/// @dev the ERC-165 identifier for this interface is 0x7c3bef89326/// @dev the ERC-165 identifier for this interface is 0x7c3bef89
327=======
328<<<<<<< HEAD
329// Selector: 780e9d63
330interface ERC721Enumerable is Dummy, ERC165 {
331 // @notice Enumerate valid RFTs
332 // @param index A counter less than `totalSupply()`
333 // @return The token identifier for the `index`th NFT,
334 // (sort order not specified)
335 //
336 // Selector: tokenByIndex(uint256) 4f6ccce7
337 function tokenByIndex(uint256 index) external view returns (uint256);
338
339 // Not implemented
340 //
341 // Selector: tokenOfOwnerByIndex(address,uint256) 2f745c59
342 function tokenOfOwnerByIndex(address owner, uint256 index)
343 external
344 view
345 returns (uint256);
346
347 // @notice Count RFTs tracked by this contract
348 // @return A count of valid RFTs tracked by this contract, where each one of
349 // them has an assigned and queryable owner not equal to the zero address
350 //
351 // Selector: totalSupply() 18160ddd
352 function totalSupply() external view returns (uint256);
353}
354
355// Selector: 7c3bef89
356>>>>>>> misk: Update stubs
310interface ERC721UniqueExtensions is Dummy, ERC165 {357interface ERC721UniqueExtensions is Dummy, ERC165 {
311 /// @notice Transfer ownership of an RFT358 /// @notice Transfer ownership of an RFT
312 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`359 /// @dev Throws unless `msg.sender` is the current owner. Throws if `to`
367 returns (address);414 returns (address);
368}415}
369416
417<<<<<<< HEAD
370/// @dev anonymous struct418/// @dev anonymous struct
371struct Tuple8 {419struct Tuple8 {
372 uint256 field_0;420 uint256 field_0;
373 string field_1;421 string field_1;
374}422}
423=======
424// Selector: ffe4da23
425=======
426// Selector: 765e2fae
427>>>>>>> misk: Update stubs
428interface Collection is Dummy, ERC165 {
429 // Set collection property.
430 //
431 // @param key Property key.
432 // @param value Propery value.
433 //
434 // Selector: setCollectionProperty(string,bytes) 2f073f66
435 function setCollectionProperty(string memory key, bytes memory value)
436 external;
437>>>>>>> misk: Update stubs
375438
376/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension439/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
377/// @dev See https://eips.ethereum.org/EIPS/eip-721440/// @dev See https://eips.ethereum.org/EIPS/eip-721
391 function tokenOfOwnerByIndex(address owner, uint256 index)454 function tokenOfOwnerByIndex(address owner, uint256 index)
392 external455 external
393 view456 view
457<<<<<<< HEAD
394 returns (uint256);458 returns (uint256);
459=======
460 returns (bytes memory);
461
462 // Set the sponsor of the collection.
463 //
464 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
465 //
466 // @param sponsor Address of the sponsor from whose account funds will be debited for operations with the contract.
467 //
468 // Selector: setCollectionSponsor(address) 7623402e
469 function setCollectionSponsor(address sponsor) external;
470
471 // Set the substrate sponsor of the collection.
472 //
473 // @dev In order for sponsorship to work, it must be confirmed on behalf of the sponsor.
474 //
475 // @param sponsor Substrate address of the sponsor from whose account funds will be debited for operations with the contract.
476 //
477 // Selector: setCollectionSponsorSubstrate(uint256) c74d6751
478 function setCollectionSponsorSubstrate(uint256 sponsor) external;
479
480 // Selector: hasCollectionPendingSponsor() 058ac185
481 function hasCollectionPendingSponsor() external view returns (bool);
482
483 // Collection sponsorship confirmation.
484 //
485 // @dev After setting the sponsor for the collection, it must be confirmed with this function.
486 //
487 // Selector: confirmCollectionSponsorship() 3c50e97a
488 function confirmCollectionSponsorship() external;
489
490 // Remove collection sponsor.
491 //
492 // Selector: removeCollectionSponsor() 6e0326a3
493 function removeCollectionSponsor() external;
494
495 // Get current sponsor.
496 //
497 // @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
498 //
499 // Selector: getCollectionSponsor() b66bbc14
500 function getCollectionSponsor() external view returns (Tuple1 memory);
501
502 // Set limits for the collection.
503 // @dev Throws error if limit not found.
504 // @param limit Name of the limit. Valid names:
505 // "accountTokenOwnershipLimit",
506 // "sponsoredDataSize",
507 // "sponsoredDataRateLimit",
508 // "tokenLimit",
509 // "sponsorTransferTimeout",
510 // "sponsorApproveTimeout"
511 // @param value Value of the limit.
512 //
513 // Selector: setCollectionLimit(string,uint32) 6a3841db
514 function setCollectionLimit(string memory limit, uint32 value) external;
515
516 // Set limits for the collection.
517 // @dev Throws error if limit not found.
518 // @param limit Name of the limit. Valid names:
519 // "ownerCanTransfer",
520 // "ownerCanDestroy",
521 // "transfersEnabled"
522 // @param value Value of the limit.
523 //
524 // Selector: setCollectionLimit(string,bool) 993b7fba
525 function setCollectionLimit(string memory limit, bool value) external;
526
527 // Get contract address.
528 //
529 // Selector: contractAddress() f6b4dfb4
530 function contractAddress() external view returns (address);
531
532 // Add collection admin by substrate address.
533 // @param new_admin Substrate administrator address.
534 //
535 // Selector: addCollectionAdminSubstrate(uint256) 5730062b
536 function addCollectionAdminSubstrate(uint256 newAdmin) external;
537>>>>>>> misk: Update stubs
395538
396 /// @notice Count RFTs tracked by this contract539 /// @notice Count RFTs tracked by this contract
397 /// @return A count of valid RFTs tracked by this contract, where each one of540 /// @return A count of valid RFTs tracked by this contract, where each one of
modifiedtests/src/eth/fungibleAbi.jsondiffbeforeafterboth
170 },170 },
171 {171 {
172 "inputs": [],172 "inputs": [],
173 "name": "getCollectionSponsor",
174 "outputs": [
175 {
176 "components": [
177 { "internalType": "address", "name": "field_0", "type": "address" },
178 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
179 ],
180 "internalType": "struct Tuple0",
181 "name": "",
182 "type": "tuple"
183 }
184 ],
185 "stateMutability": "view",
186 "type": "function"
187 },
188 {
189 "inputs": [],
190 "name": "hasCollectionPendingSponsor",
191 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
192 "stateMutability": "view",
193 "type": "function"
194 },
195 {
196 "inputs": [],
173 "name": "name",197 "name": "name",
174 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],198 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
175 "stateMutability": "view",199 "stateMutability": "view",
194 "type": "function"218 "type": "function"
195 },219 },
196 {220 {
221 "inputs": [],
222 "name": "removeCollectionSponsor",
223 "outputs": [],
224 "stateMutability": "nonpayable",
225 "type": "function"
226 },
227 {
197 "inputs": [228 "inputs": [
198 { "internalType": "address", "name": "user", "type": "address" }229 { "internalType": "address", "name": "user", "type": "address" }
199 ],230 ],
278 },309 },
279 {310 {
280 "inputs": [311 "inputs": [
312<<<<<<< HEAD
281 { "internalType": "address", "name": "newOwner", "type": "address" }313 { "internalType": "address", "name": "newOwner", "type": "address" }
282 ],314 ],
283 "name": "setOwner",315 "name": "setOwner",
290 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }322 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
291 ],323 ],
292 "name": "setOwnerSubstrate",324 "name": "setOwnerSubstrate",
325=======
326 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
327 ],
328 "name": "setCollectionSponsorSubstrate",
329>>>>>>> misk: Update stubs
293 "outputs": [],330 "outputs": [],
294 "stateMutability": "nonpayable",331 "stateMutability": "nonpayable",
295 "type": "function"332 "type": "function"
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
200 "type": "function"200 "type": "function"
201 },201 },
202 {202 {
203 "inputs": [],
204 "name": "getCollectionSponsor",
205 "outputs": [
206 {
207 "components": [
208 { "internalType": "address", "name": "field_0", "type": "address" },
209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
210 ],
211 "internalType": "struct Tuple1",
212 "name": "",
213 "type": "tuple"
214 }
215 ],
216 "stateMutability": "view",
217 "type": "function"
218 },
219 {
220 "inputs": [],
221 "name": "hasCollectionPendingSponsor",
222 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
223 "stateMutability": "view",
224 "type": "function"
225 },
226 {
203 "inputs": [227 "inputs": [
204 { "internalType": "address", "name": "owner", "type": "address" },228 { "internalType": "address", "name": "owner", "type": "address" },
205 { "internalType": "address", "name": "operator", "type": "address" }229 { "internalType": "address", "name": "operator", "type": "address" }
335 "type": "function"359 "type": "function"
336 },360 },
337 {361 {
362 "inputs": [],
363 "name": "removeCollectionSponsor",
364 "outputs": [],
365 "stateMutability": "nonpayable",
366 "type": "function"
367 },
368 {
338 "inputs": [369 "inputs": [
339 { "internalType": "address", "name": "user", "type": "address" }370 { "internalType": "address", "name": "user", "type": "address" }
340 ],371 ],
452 },483 },
453 {484 {
454 "inputs": [485 "inputs": [
486<<<<<<< HEAD
455 { "internalType": "address", "name": "newOwner", "type": "address" }487 { "internalType": "address", "name": "newOwner", "type": "address" }
456 ],488 ],
457 "name": "setOwner",489 "name": "setOwner",
464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }496 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
465 ],497 ],
466 "name": "setOwnerSubstrate",498 "name": "setOwnerSubstrate",
499=======
500 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
501 ],
502 "name": "setCollectionSponsorSubstrate",
503>>>>>>> misk: Update stubs
467 "outputs": [],504 "outputs": [],
468 "stateMutability": "nonpayable",505 "stateMutability": "nonpayable",
469 "type": "function"506 "type": "function"
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
200 "type": "function"200 "type": "function"
201 },201 },
202 {202 {
203 "inputs": [],
204 "name": "getCollectionSponsor",
205 "outputs": [
206 {
207 "components": [
208 { "internalType": "address", "name": "field_0", "type": "address" },
209 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
210 ],
211 "internalType": "struct Tuple1",
212 "name": "",
213 "type": "tuple"
214 }
215 ],
216 "stateMutability": "view",
217 "type": "function"
218 },
219 {
220 "inputs": [],
221 "name": "hasCollectionPendingSponsor",
222 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
223 "stateMutability": "view",
224 "type": "function"
225 },
226 {
203 "inputs": [227 "inputs": [
204 { "internalType": "address", "name": "owner", "type": "address" },228 { "internalType": "address", "name": "owner", "type": "address" },
205 { "internalType": "address", "name": "operator", "type": "address" }229 { "internalType": "address", "name": "operator", "type": "address" }
335 "type": "function"359 "type": "function"
336 },360 },
337 {361 {
362 "inputs": [],
363 "name": "removeCollectionSponsor",
364 "outputs": [],
365 "stateMutability": "nonpayable",
366 "type": "function"
367 },
368 {
338 "inputs": [369 "inputs": [
339 { "internalType": "address", "name": "user", "type": "address" }370 { "internalType": "address", "name": "user", "type": "address" }
340 ],371 ],
452 },483 },
453 {484 {
454 "inputs": [485 "inputs": [
486<<<<<<< HEAD
455 { "internalType": "address", "name": "newOwner", "type": "address" }487 { "internalType": "address", "name": "newOwner", "type": "address" }
456 ],488 ],
457 "name": "setOwner",489 "name": "setOwner",
464 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }496 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }
465 ],497 ],
466 "name": "setOwnerSubstrate",498 "name": "setOwnerSubstrate",
499=======
500 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }
501 ],
502 "name": "setCollectionSponsorSubstrate",
503>>>>>>> misk: Update stubs
467 "outputs": [],504 "outputs": [],
468 "stateMutability": "nonpayable",505 "stateMutability": "nonpayable",
469 "type": "function"506 "type": "function"