git.delta.rocks / unique-network / refs/commits / 065efcff5337

difftreelog

Merge pull request #598 from UniqueNetwork/fix/rename_method_to_collectionSponsor

Yaroslav Bolyukin2022-09-19parents: #25e3cfa #2319928.patch.diff
in: master

24 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
194 /// Get current sponsor.194 /// Get current sponsor.
195 ///195 ///
196 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.196 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
197 fn get_collection_sponsor(&self) -> Result<(address, uint256)> {197 fn collection_sponsor(&self) -> Result<(address, uint256)> {
198 let sponsor = match self.collection.sponsorship.sponsor() {198 let sponsor = match self.collection.sponsorship.sponsor() {
199 Some(sponsor) => sponsor,199 Some(sponsor) => sponsor,
200 None => return Ok(Default::default()),200 None => return Ok(Default::default()),
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
169 ///169 ///
170 /// @param contractAddress The contract for which a sponsor is requested.170 /// @param contractAddress The contract for which a sponsor is requested.
171 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.171 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
172 fn get_sponsor(&self, contract_address: address) -> Result<(address, uint256)> {172 fn sponsor(&self, contract_address: address) -> Result<(address, uint256)> {
173 let sponsor =173 let sponsor =
174 Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?;174 Pallet::<T>::get_sponsor(contract_address).ok_or("Contract has no sponsor")?;
175 Ok(pallet_common::eth::convert_cross_account_to_tuple::<T>(175 Ok(pallet_common::eth::convert_cross_account_to_tuple::<T>(
220 /// Get current contract sponsoring rate limit220 /// Get current contract sponsoring rate limit
221 /// @param contractAddress Contract to get sponsoring rate limit of221 /// @param contractAddress Contract to get sponsoring rate limit of
222 /// @return uint32 Amount of blocks between two sponsored transactions222 /// @return uint32 Amount of blocks between two sponsored transactions
223 fn get_sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {223 fn sponsoring_rate_limit(&self, contract_address: address) -> Result<uint32> {
224 self.recorder().consume_sload()?;224 self.recorder().consume_sload()?;
225225
226 Ok(<SponsoringRateLimit<T>>::get(contract_address)226 Ok(<SponsoringRateLimit<T>>::get(contract_address)
273 /// @param contractAddress Contract to get sponsoring fee limit of273 /// @param contractAddress Contract to get sponsoring fee limit of
274 /// @return uint256 Maximum amount of fee that could be spent by single274 /// @return uint256 Maximum amount of fee that could be spent by single
275 /// transaction275 /// transaction
276 fn get_sponsoring_fee_limit(&self, contract_address: address) -> Result<uint256> {276 fn sponsoring_fee_limit(&self, contract_address: address) -> Result<uint256> {
277 self.recorder().consume_sload()?;277 self.recorder().consume_sload()?;
278278
279 Ok(get_sponsoring_fee_limit::<T>(contract_address))279 Ok(get_sponsoring_fee_limit::<T>(contract_address))
modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
32}25}
3326
34/// @title Magic contract, which allows users to reconfigure other contracts27/// @title Magic contract, which allows users to reconfigure other contracts
35/// @dev the ERC-165 identifier for this interface is 0x172cb4fb28/// @dev the ERC-165 identifier for this interface is 0x30afad04
36contract ContractHelpers is Dummy, ERC165, ContractHelpersEvents {29contract ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
37 /// Get user, which deployed specified contract30 /// Get user, which deployed specified contract
38 /// @dev May return zero address in case if contract is deployed31 /// @dev May return zero address in case if contract is deployed
105 ///94 ///
106 /// @param contractAddress The contract for which a sponsor is requested.95 /// @param contractAddress The contract for which a sponsor is requested.
107 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.96 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
108 /// @dev EVM selector for this function is: 0x743fc745,97 /// @dev EVM selector for this function is: 0x766c4f37,
109 /// or in textual repr: getSponsor(address)98 /// or in textual repr: sponsor(address)
110 function getSponsor(address contractAddress)99 function sponsor(address contractAddress) public view returns (Tuple0 memory) {
111 public
112 view
113 returns (Tuple0 memory)
173 /// Get current contract sponsoring rate limit150 /// Get current contract sponsoring rate limit
174 /// @param contractAddress Contract to get sponsoring rate limit of151 /// @param contractAddress Contract to get sponsoring rate limit of
175 /// @return uint32 Amount of blocks between two sponsored transactions152 /// @return uint32 Amount of blocks between two sponsored transactions
176 /// @dev EVM selector for this function is: 0x610cfabd,153 /// @dev EVM selector for this function is: 0xf29694d8,
177 /// or in textual repr: getSponsoringRateLimit(address)154 /// or in textual repr: sponsoringRateLimit(address)
178 function getSponsoringRateLimit(address contractAddress)155 function sponsoringRateLimit(address contractAddress) public view returns (uint32) {
179 public
180 view
181 returns (uint32)
224 /// @param contractAddress Contract to get sponsoring fee limit of193 /// @param contractAddress Contract to get sponsoring fee limit of
225 /// @return uint256 Maximum amount of fee that could be spent by single194 /// @return uint256 Maximum amount of fee that could be spent by single
226 /// transaction195 /// transaction
227 /// @dev EVM selector for this function is: 0xc3fdc9ee,196 /// @dev EVM selector for this function is: 0x75b73606,
228 /// or in textual repr: getSponsoringFeeLimit(address)197 /// or in textual repr: sponsoringFeeLimit(address)
229 function getSponsoringFeeLimit(address contractAddress)198 function sponsoringFeeLimit(address contractAddress) public view returns (uint256) {
230 public
231 view
232 returns (uint256)
modifiedpallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth
22}18}
2319
24/// @title A contract that allows you to work with collections.20/// @title A contract that allows you to work with collections.
25/// @dev the ERC-165 identifier for this interface is 0x9f70d4e021/// @dev the ERC-165 identifier for this interface is 0x47dbc105
26contract Collection is Dummy, ERC165 {22contract Collection is Dummy, ERC165 {
27 /// Set collection property.23 /// Set collection property.
28 ///24 ///
95 dummy = 0;85 dummy = 0;
96 }86 }
9787
88 /// Whether there is a pending sponsor.
98 /// @dev EVM selector for this function is: 0x058ac185,89 /// @dev EVM selector for this function is: 0x058ac185,
99 /// or in textual repr: hasCollectionPendingSponsor()90 /// or in textual repr: hasCollectionPendingSponsor()
100 function hasCollectionPendingSponsor() public view returns (bool) {91 function hasCollectionPendingSponsor() public view returns (bool) {
124 /// Get current sponsor.115 /// Get current sponsor.
125 ///116 ///
126 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.117 /// @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,118 /// @dev EVM selector for this function is: 0x6ec0a9f1,
128 /// or in textual repr: getCollectionSponsor()119 /// or in textual repr: collectionSponsor()
129 function getCollectionSponsor() public view returns (Tuple6 memory) {120 function collectionSponsor() public view returns (Tuple6 memory) {
130 require(false, stub_error);121 require(false, stub_error);
131 dummy;122 dummy;
132 return Tuple6(0x0000000000000000000000000000000000000000, 0);123 return Tuple6(0x0000000000000000000000000000000000000000, 0);
353 /// @return `Fungible` or `NFT` or `ReFungible`342 /// @return `Fungible` or `NFT` or `ReFungible`
354 /// @dev EVM selector for this function is: 0xd34b55b8,343 /// @dev EVM selector for this function is: 0xd34b55b8,
355 /// or in textual repr: uniqueCollectionType()344 /// or in textual repr: uniqueCollectionType()
356 function uniqueCollectionType() public returns (string memory) {345 function uniqueCollectionType() public view returns (string memory) {
357 require(false, stub_error);346 require(false, stub_error);
358 dummy = 0;347 dummy;
359 return "";348 return "";
360 }349 }
361350
modifiedpallets/nonfungible/src/stubs/UniqueNFT.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/nonfungible/src/stubs/UniqueNFT.soldiffbeforeafterboth
99}91}
10092
101/// @title A contract that allows you to work with collections.93/// @title A contract that allows you to work with collections.
102/// @dev the ERC-165 identifier for this interface is 0x9f70d4e094/// @dev the ERC-165 identifier for this interface is 0x47dbc105
103contract Collection is Dummy, ERC165 {95contract Collection is Dummy, ERC165 {
104 /// Set collection property.96 /// Set collection property.
105 ///97 ///
172 dummy = 0;158 dummy = 0;
173 }159 }
174160
161 /// Whether there is a pending sponsor.
175 /// @dev EVM selector for this function is: 0x058ac185,162 /// @dev EVM selector for this function is: 0x058ac185,
176 /// or in textual repr: hasCollectionPendingSponsor()163 /// or in textual repr: hasCollectionPendingSponsor()
177 function hasCollectionPendingSponsor() public view returns (bool) {164 function hasCollectionPendingSponsor() public view returns (bool) {
201 /// Get current sponsor.188 /// Get current sponsor.
202 ///189 ///
203 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.190 /// @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,191 /// @dev EVM selector for this function is: 0x6ec0a9f1,
205 /// or in textual repr: getCollectionSponsor()192 /// or in textual repr: collectionSponsor()
206 function getCollectionSponsor() public view returns (Tuple17 memory) {193 function collectionSponsor() public view returns (Tuple17 memory) {
207 require(false, stub_error);194 require(false, stub_error);
208 dummy;195 dummy;
209 return Tuple17(0x0000000000000000000000000000000000000000, 0);196 return Tuple17(0x0000000000000000000000000000000000000000, 0);
430 /// @return `Fungible` or `NFT` or `ReFungible`415 /// @return `Fungible` or `NFT` or `ReFungible`
431 /// @dev EVM selector for this function is: 0xd34b55b8,416 /// @dev EVM selector for this function is: 0xd34b55b8,
432 /// or in textual repr: uniqueCollectionType()417 /// or in textual repr: uniqueCollectionType()
433 function uniqueCollectionType() public returns (string memory) {418 function uniqueCollectionType() public view returns (string memory) {
434 require(false, stub_error);419 require(false, stub_error);
435 dummy = 0;420 dummy;
436 return "";421 return "";
437 }422 }
438423
modifiedpallets/refungible/src/stubs/UniqueRefungible.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungible.soldiffbeforeafterboth
99}91}
10092
101/// @title A contract that allows you to work with collections.93/// @title A contract that allows you to work with collections.
102/// @dev the ERC-165 identifier for this interface is 0x9f70d4e094/// @dev the ERC-165 identifier for this interface is 0x47dbc105
103contract Collection is Dummy, ERC165 {95contract Collection is Dummy, ERC165 {
104 /// Set collection property.96 /// Set collection property.
105 ///97 ///
172 dummy = 0;158 dummy = 0;
173 }159 }
174160
161 /// Whether there is a pending sponsor.
175 /// @dev EVM selector for this function is: 0x058ac185,162 /// @dev EVM selector for this function is: 0x058ac185,
176 /// or in textual repr: hasCollectionPendingSponsor()163 /// or in textual repr: hasCollectionPendingSponsor()
177 function hasCollectionPendingSponsor() public view returns (bool) {164 function hasCollectionPendingSponsor() public view returns (bool) {
201 /// Get current sponsor.188 /// Get current sponsor.
202 ///189 ///
203 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.190 /// @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,191 /// @dev EVM selector for this function is: 0x6ec0a9f1,
205 /// or in textual repr: getCollectionSponsor()192 /// or in textual repr: collectionSponsor()
206 function getCollectionSponsor() public view returns (Tuple17 memory) {193 function collectionSponsor() public view returns (Tuple17 memory) {
207 require(false, stub_error);194 require(false, stub_error);
208 dummy;195 dummy;
209 return Tuple17(0x0000000000000000000000000000000000000000, 0);196 return Tuple17(0x0000000000000000000000000000000000000000, 0);
430 /// @return `Fungible` or `NFT` or `ReFungible`415 /// @return `Fungible` or `NFT` or `ReFungible`
431 /// @dev EVM selector for this function is: 0xd34b55b8,416 /// @dev EVM selector for this function is: 0xd34b55b8,
432 /// or in textual repr: uniqueCollectionType()417 /// or in textual repr: uniqueCollectionType()
433 function uniqueCollectionType() public returns (string memory) {418 function uniqueCollectionType() public view returns (string memory) {
434 require(false, stub_error);419 require(false, stub_error);
435 dummy = 0;420 dummy;
436 return "";421 return "";
437 }422 }
438423
modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.rawdiffbeforeafterboth

binary blob — no preview

modifiedpallets/refungible/src/stubs/UniqueRefungibleToken.soldiffbeforeafterboth

no syntactic changes

modifiedpallets/unique/src/eth/stubs/CollectionHelpers.rawdiffbeforeafterboth

binary blob — no preview

modifiedtests/src/eth/api/ContractHelpers.soldiffbeforeafterboth
23}20}
2421
25/// @title Magic contract, which allows users to reconfigure other contracts22/// @title Magic contract, which allows users to reconfigure other contracts
26/// @dev the ERC-165 identifier for this interface is 0x172cb4fb23/// @dev the ERC-165 identifier for this interface is 0x30afad04
27interface ContractHelpers is Dummy, ERC165, ContractHelpersEvents {24interface ContractHelpers is Dummy, ERC165, ContractHelpersEvents {
28 /// Get user, which deployed specified contract25 /// Get user, which deployed specified contract
29 /// @dev May return zero address in case if contract is deployed26 /// @dev May return zero address in case if contract is deployed
73 ///67 ///
74 /// @param contractAddress The contract for which a sponsor is requested.68 /// @param contractAddress The contract for which a sponsor is requested.
75 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.69 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
76 /// @dev EVM selector for this function is: 0x743fc745,70 /// @dev EVM selector for this function is: 0x766c4f37,
77 /// or in textual repr: getSponsor(address)71 /// or in textual repr: sponsor(address)
78 function getSponsor(address contractAddress)72 function sponsor(address contractAddress) external view returns (Tuple0 memory);
79 external
80 view
81 returns (Tuple0 memory);
113 /// Get current contract sponsoring rate limit98 /// Get current contract sponsoring rate limit
114 /// @param contractAddress Contract to get sponsoring rate limit of99 /// @param contractAddress Contract to get sponsoring rate limit of
115 /// @return uint32 Amount of blocks between two sponsored transactions100 /// @return uint32 Amount of blocks between two sponsored transactions
116 /// @dev EVM selector for this function is: 0x610cfabd,101 /// @dev EVM selector for this function is: 0xf29694d8,
117 /// or in textual repr: getSponsoringRateLimit(address)102 /// or in textual repr: sponsoringRateLimit(address)
118 function getSponsoringRateLimit(address contractAddress)103 function sponsoringRateLimit(address contractAddress) external view returns (uint32);
119 external
120 view
121 returns (uint32);
146 /// @param contractAddress Contract to get sponsoring fee limit of126 /// @param contractAddress Contract to get sponsoring fee limit of
147 /// @return uint256 Maximum amount of fee that could be spent by single127 /// @return uint256 Maximum amount of fee that could be spent by single
148 /// transaction128 /// transaction
149 /// @dev EVM selector for this function is: 0xc3fdc9ee,129 /// @dev EVM selector for this function is: 0x75b73606,
150 /// or in textual repr: getSponsoringFeeLimit(address)130 /// or in textual repr: sponsoringFeeLimit(address)
151 function getSponsoringFeeLimit(address contractAddress)131 function sponsoringFeeLimit(address contractAddress) external view returns (uint256);
152 external
153 view
154 returns (uint256);
modifiedtests/src/eth/api/UniqueFungible.soldiffbeforeafterboth
13}13}
1414
15/// @title A contract that allows you to work with collections.15/// @title A contract that allows you to work with collections.
16/// @dev the ERC-165 identifier for this interface is 0x9f70d4e016/// @dev the ERC-165 identifier for this interface is 0x47dbc105
17interface Collection is Dummy, ERC165 {17interface Collection is Dummy, ERC165 {
18 /// Set collection property.18 /// Set collection property.
19 ///19 ///
62 /// or in textual repr: setCollectionSponsorSubstrate(uint256)58 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
63 function setCollectionSponsorSubstrate(uint256 sponsor) external;59 function setCollectionSponsorSubstrate(uint256 sponsor) external;
6460
61 /// Whether there is a pending sponsor.
65 /// @dev EVM selector for this function is: 0x058ac185,62 /// @dev EVM selector for this function is: 0x058ac185,
66 /// or in textual repr: hasCollectionPendingSponsor()63 /// or in textual repr: hasCollectionPendingSponsor()
67 function hasCollectionPendingSponsor() external view returns (bool);64 function hasCollectionPendingSponsor() external view returns (bool);
81 /// Get current sponsor.78 /// Get current sponsor.
82 ///79 ///
83 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.80 /// @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,81 /// @dev EVM selector for this function is: 0x6ec0a9f1,
85 /// or in textual repr: getCollectionSponsor()82 /// or in textual repr: collectionSponsor()
86 function getCollectionSponsor() external view returns (Tuple6 memory);83 function collectionSponsor() external view returns (Tuple6 memory);
8784
88 /// Set limits for the collection.85 /// Set limits for the collection.
89 /// @dev Throws error if limit not found.86 /// @dev Throws error if limit not found.
227 /// @return `Fungible` or `NFT` or `ReFungible`223 /// @return `Fungible` or `NFT` or `ReFungible`
228 /// @dev EVM selector for this function is: 0xd34b55b8,224 /// @dev EVM selector for this function is: 0xd34b55b8,
229 /// or in textual repr: uniqueCollectionType()225 /// or in textual repr: uniqueCollectionType()
230 function uniqueCollectionType() external returns (string memory);226 function uniqueCollectionType() external view returns (string memory);
231227
232 /// Get collection owner.228 /// Get collection owner.
233 ///229 ///
modifiedtests/src/eth/api/UniqueNFT.soldiffbeforeafterboth
65}62}
6663
67/// @title A contract that allows you to work with collections.64/// @title A contract that allows you to work with collections.
68/// @dev the ERC-165 identifier for this interface is 0x9f70d4e065/// @dev the ERC-165 identifier for this interface is 0x47dbc105
69interface Collection is Dummy, ERC165 {66interface Collection is Dummy, ERC165 {
70 /// Set collection property.67 /// Set collection property.
71 ///68 ///
114 /// or in textual repr: setCollectionSponsorSubstrate(uint256)107 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
115 function setCollectionSponsorSubstrate(uint256 sponsor) external;108 function setCollectionSponsorSubstrate(uint256 sponsor) external;
116109
110 /// Whether there is a pending sponsor.
117 /// @dev EVM selector for this function is: 0x058ac185,111 /// @dev EVM selector for this function is: 0x058ac185,
118 /// or in textual repr: hasCollectionPendingSponsor()112 /// or in textual repr: hasCollectionPendingSponsor()
119 function hasCollectionPendingSponsor() external view returns (bool);113 function hasCollectionPendingSponsor() external view returns (bool);
133 /// Get current sponsor.127 /// Get current sponsor.
134 ///128 ///
135 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.129 /// @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,130 /// @dev EVM selector for this function is: 0x6ec0a9f1,
137 /// or in textual repr: getCollectionSponsor()131 /// or in textual repr: collectionSponsor()
138 function getCollectionSponsor() external view returns (Tuple17 memory);132 function collectionSponsor() external view returns (Tuple17 memory);
139133
140 /// Set limits for the collection.134 /// Set limits for the collection.
141 /// @dev Throws error if limit not found.135 /// @dev Throws error if limit not found.
279 /// @return `Fungible` or `NFT` or `ReFungible`272 /// @return `Fungible` or `NFT` or `ReFungible`
280 /// @dev EVM selector for this function is: 0xd34b55b8,273 /// @dev EVM selector for this function is: 0xd34b55b8,
281 /// or in textual repr: uniqueCollectionType()274 /// or in textual repr: uniqueCollectionType()
282 function uniqueCollectionType() external returns (string memory);275 function uniqueCollectionType() external view returns (string memory);
283276
284 /// Get collection owner.277 /// Get collection owner.
285 ///278 ///
modifiedtests/src/eth/api/UniqueRefungible.soldiffbeforeafterboth
65}62}
6663
67/// @title A contract that allows you to work with collections.64/// @title A contract that allows you to work with collections.
68/// @dev the ERC-165 identifier for this interface is 0x9f70d4e065/// @dev the ERC-165 identifier for this interface is 0x47dbc105
69interface Collection is Dummy, ERC165 {66interface Collection is Dummy, ERC165 {
70 /// Set collection property.67 /// Set collection property.
71 ///68 ///
114 /// or in textual repr: setCollectionSponsorSubstrate(uint256)107 /// or in textual repr: setCollectionSponsorSubstrate(uint256)
115 function setCollectionSponsorSubstrate(uint256 sponsor) external;108 function setCollectionSponsorSubstrate(uint256 sponsor) external;
116109
110 /// Whether there is a pending sponsor.
117 /// @dev EVM selector for this function is: 0x058ac185,111 /// @dev EVM selector for this function is: 0x058ac185,
118 /// or in textual repr: hasCollectionPendingSponsor()112 /// or in textual repr: hasCollectionPendingSponsor()
119 function hasCollectionPendingSponsor() external view returns (bool);113 function hasCollectionPendingSponsor() external view returns (bool);
133 /// Get current sponsor.127 /// Get current sponsor.
134 ///128 ///
135 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.129 /// @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,130 /// @dev EVM selector for this function is: 0x6ec0a9f1,
137 /// or in textual repr: getCollectionSponsor()131 /// or in textual repr: collectionSponsor()
138 function getCollectionSponsor() external view returns (Tuple17 memory);132 function collectionSponsor() external view returns (Tuple17 memory);
139133
140 /// Set limits for the collection.134 /// Set limits for the collection.
141 /// @dev Throws error if limit not found.135 /// @dev Throws error if limit not found.
279 /// @return `Fungible` or `NFT` or `ReFungible`272 /// @return `Fungible` or `NFT` or `ReFungible`
280 /// @dev EVM selector for this function is: 0xd34b55b8,273 /// @dev EVM selector for this function is: 0xd34b55b8,
281 /// or in textual repr: uniqueCollectionType()274 /// or in textual repr: uniqueCollectionType()
282 function uniqueCollectionType() external returns (string memory);275 function uniqueCollectionType() external view returns (string memory);
283276
284 /// Get collection owner.277 /// Get collection owner.
285 ///278 ///
modifiedtests/src/eth/api/UniqueRefungibleToken.soldiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
56 await submitTransactionAsync(sponsor, confirmTx);56 await submitTransactionAsync(sponsor, confirmTx);
57 expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;57 expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false;
58 58
59 const sponsorTuple = await collectionEvm.methods.getCollectionSponsor().call({from: owner});59 const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
60 expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);60 expect(bigIntToSub(api, BigInt(sponsorTuple[1]))).to.be.eq(sponsor.address);
61 });61 });
6262
77 77
78 await collectionEvm.methods.removeCollectionSponsor().send({from: owner});78 await collectionEvm.methods.removeCollectionSponsor().send({from: owner});
79 79
80 const sponsorTuple = await collectionEvm.methods.getCollectionSponsor().call({from: owner});80 const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
81 expect(sponsorTuple.field_0).to.be.eq('0x0000000000000000000000000000000000000000');81 expect(sponsorTuple.field_0).to.be.eq('0x0000000000000000000000000000000000000000');
82 });82 });
8383
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
223 const helpers = contractHelpers(web3, owner);223 const helpers = contractHelpers(web3, owner);
224 await helpers.methods.selfSponsoredEnable(flipper.options.address).send();224 await helpers.methods.selfSponsoredEnable(flipper.options.address).send();
225 225
226 const result = await helpers.methods.getSponsor(flipper.options.address).call();226 const result = await helpers.methods.sponsor(flipper.options.address).call();
227227
228 expect(result[0]).to.be.eq(flipper.options.address);228 expect(result[0]).to.be.eq(flipper.options.address);
229 expect(result[1]).to.be.eq('0');229 expect(result[1]).to.be.eq('0');
237 await helpers.methods.setSponsor(flipper.options.address, sponsor).send();237 await helpers.methods.setSponsor(flipper.options.address, sponsor).send();
238 await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor});238 await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor});
239 239
240 const result = await helpers.methods.getSponsor(flipper.options.address).call();240 const result = await helpers.methods.sponsor(flipper.options.address).call();
241241
242 expect(result[0]).to.be.eq(sponsor);242 expect(result[0]).to.be.eq(sponsor);
243 expect(result[1]).to.be.eq('0');243 expect(result[1]).to.be.eq('0');
482 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);482 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
483 const flipper = await deployFlipper(web3, owner);483 const flipper = await deployFlipper(web3, owner);
484 const helpers = contractHelpers(web3, owner);484 const helpers = contractHelpers(web3, owner);
485 expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');485 expect(await helpers.methods.sponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
486 });486 });
487});487});
488488
551 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);551 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
552 const flipper = await deployFlipper(web3, owner);552 const flipper = await deployFlipper(web3, owner);
553 const helpers = contractHelpers(web3, owner);553 const helpers = contractHelpers(web3, owner);
554 expect(await helpers.methods.getSponsoringFeeLimit(flipper.options.address).call()).to.be.equals('115792089237316195423570985008687907853269984665640564039457584007913129639935');554 expect(await helpers.methods.sponsoringFeeLimit(flipper.options.address).call()).to.be.equals('115792089237316195423570985008687907853269984665640564039457584007913129639935');
555 });555 });
556556
557 itWeb3('Set fee limit', async ({api, web3, privateKeyWrapper}) => {557 itWeb3('Set fee limit', async ({api, web3, privateKeyWrapper}) => {
558 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);558 const owner = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
559 const flipper = await deployFlipper(web3, owner);559 const flipper = await deployFlipper(web3, owner);
560 const helpers = contractHelpers(web3, owner);560 const helpers = contractHelpers(web3, owner);
561 await helpers.methods.setSponsoringFeeLimit(flipper.options.address, 100).send();561 await helpers.methods.setSponsoringFeeLimit(flipper.options.address, 100).send();
562 expect(await helpers.methods.getSponsoringFeeLimit(flipper.options.address).call()).to.be.equals('100');562 expect(await helpers.methods.sponsoringFeeLimit(flipper.options.address).call()).to.be.equals('100');
563 });563 });
564564
565 itWeb3('Negative test - set fee limit by non-owner', async ({api, web3, privateKeyWrapper}) => {565 itWeb3('Negative test - set fee limit by non-owner', async ({api, web3, privateKeyWrapper}) => {
modifiedtests/src/eth/fungibleAbi.jsondiffbeforeafterboth
157 "stateMutability": "view",157 "stateMutability": "view",
158 "type": "function"158 "type": "function"
159 },159 },
160 {
161 "inputs": [],
162 "name": "collectionSponsor",
163 "outputs": [
164 {
165 "components": [
166 { "internalType": "address", "name": "field_0", "type": "address" },
167 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
168 ],
169 "internalType": "struct Tuple6",
170 "name": "",
171 "type": "tuple"
172 }
173 ],
174 "stateMutability": "view",
175 "type": "function"
176 },
160 {177 {
161 "inputs": [],178 "inputs": [],
162 "name": "confirmCollectionSponsorship",179 "name": "confirmCollectionSponsorship",
185 "stateMutability": "nonpayable",202 "stateMutability": "nonpayable",
186 "type": "function"203 "type": "function"
187 },204 },
188 {
189 "inputs": [],
190 "name": "getCollectionSponsor",
191 "outputs": [
192 {
193 "components": [
194 { "internalType": "address", "name": "field_0", "type": "address" },
195 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
196 ],
197 "internalType": "struct Tuple6",
198 "name": "",
199 "type": "tuple"
200 }
201 ],
202 "stateMutability": "view",
203 "type": "function"
204 },
205 {205 {
206 "inputs": [],206 "inputs": [],
207 "name": "hasCollectionPendingSponsor",207 "name": "hasCollectionPendingSponsor",
453 "inputs": [],453 "inputs": [],
454 "name": "uniqueCollectionType",454 "name": "uniqueCollectionType",
455 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],455 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
456 "stateMutability": "nonpayable",456 "stateMutability": "view",
457 "type": "function"457 "type": "function"
458 }458 }
459]459]
modifiedtests/src/eth/nonFungibleAbi.jsondiffbeforeafterboth
187 "stateMutability": "view",187 "stateMutability": "view",
188 "type": "function"188 "type": "function"
189 },189 },
190 {
191 "inputs": [],
192 "name": "collectionSponsor",
193 "outputs": [
194 {
195 "components": [
196 { "internalType": "address", "name": "field_0", "type": "address" },
197 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
198 ],
199 "internalType": "struct Tuple17",
200 "name": "",
201 "type": "tuple"
202 }
203 ],
204 "stateMutability": "view",
205 "type": "function"
206 },
190 {207 {
191 "inputs": [],208 "inputs": [],
192 "name": "confirmCollectionSponsorship",209 "name": "confirmCollectionSponsorship",
234 "stateMutability": "view",251 "stateMutability": "view",
235 "type": "function"252 "type": "function"
236 },253 },
237 {
238 "inputs": [],
239 "name": "getCollectionSponsor",
240 "outputs": [
241 {
242 "components": [
243 { "internalType": "address", "name": "field_0", "type": "address" },
244 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
245 ],
246 "internalType": "struct Tuple17",
247 "name": "",
248 "type": "tuple"
249 }
250 ],
251 "stateMutability": "view",
252 "type": "function"
253 },
254 {254 {
255 "inputs": [],255 "inputs": [],
256 "name": "hasCollectionPendingSponsor",256 "name": "hasCollectionPendingSponsor",
651 "inputs": [],651 "inputs": [],
652 "name": "uniqueCollectionType",652 "name": "uniqueCollectionType",
653 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],653 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
654 "stateMutability": "nonpayable",654 "stateMutability": "view",
655 "type": "function"655 "type": "function"
656 }656 }
657]657]
modifiedtests/src/eth/reFungibleAbi.jsondiffbeforeafterboth
187 "stateMutability": "view",187 "stateMutability": "view",
188 "type": "function"188 "type": "function"
189 },189 },
190 {
191 "inputs": [],
192 "name": "collectionSponsor",
193 "outputs": [
194 {
195 "components": [
196 { "internalType": "address", "name": "field_0", "type": "address" },
197 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
198 ],
199 "internalType": "struct Tuple17",
200 "name": "",
201 "type": "tuple"
202 }
203 ],
204 "stateMutability": "view",
205 "type": "function"
206 },
190 {207 {
191 "inputs": [],208 "inputs": [],
192 "name": "confirmCollectionSponsorship",209 "name": "confirmCollectionSponsorship",
234 "stateMutability": "view",251 "stateMutability": "view",
235 "type": "function"252 "type": "function"
236 },253 },
237 {
238 "inputs": [],
239 "name": "getCollectionSponsor",
240 "outputs": [
241 {
242 "components": [
243 { "internalType": "address", "name": "field_0", "type": "address" },
244 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
245 ],
246 "internalType": "struct Tuple17",
247 "name": "",
248 "type": "tuple"
249 }
250 ],
251 "stateMutability": "view",
252 "type": "function"
253 },
254 {254 {
255 "inputs": [],255 "inputs": [],
256 "name": "hasCollectionPendingSponsor",256 "name": "hasCollectionPendingSponsor",
660 "inputs": [],660 "inputs": [],
661 "name": "uniqueCollectionType",661 "name": "uniqueCollectionType",
662 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],662 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
663 "stateMutability": "nonpayable",663 "stateMutability": "view",
664 "type": "function"664 "type": "function"
665 }665 }
666]666]
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
103 "stateMutability": "view",103 "stateMutability": "view",
104 "type": "function"104 "type": "function"
105 },105 },
106 {
107 "inputs": [
108 {
109 "internalType": "address",
110 "name": "contractAddress",
111 "type": "address"
112 }
113 ],
114 "name": "getSponsor",
115 "outputs": [
116 {
117 "components": [
118 { "internalType": "address", "name": "field_0", "type": "address" },
119 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
120 ],
121 "internalType": "struct Tuple0",
122 "name": "",
123 "type": "tuple"
124 }
125 ],
126 "stateMutability": "view",
127 "type": "function"
128 },
129 {
130 "inputs": [
131 {
132 "internalType": "address",
133 "name": "contractAddress",
134 "type": "address"
135 }
136 ],
137 "name": "getSponsoringFeeLimit",
138 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
139 "stateMutability": "view",
140 "type": "function"
141 },
142 {
143 "inputs": [
144 {
145 "internalType": "address",
146 "name": "contractAddress",
147 "type": "address"
148 }
149 ],
150 "name": "getSponsoringRateLimit",
151 "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
152 "stateMutability": "view",
153 "type": "function"
154 },
155 {106 {
156 "inputs": [107 "inputs": [
157 {108 {
260 "stateMutability": "nonpayable",211 "stateMutability": "nonpayable",
261 "type": "function"212 "type": "function"
262 },213 },
214 {
215 "inputs": [
216 {
217 "internalType": "address",
218 "name": "contractAddress",
219 "type": "address"
220 }
221 ],
222 "name": "sponsor",
223 "outputs": [
224 {
225 "components": [
226 { "internalType": "address", "name": "field_0", "type": "address" },
227 { "internalType": "uint256", "name": "field_1", "type": "uint256" }
228 ],
229 "internalType": "struct Tuple0",
230 "name": "",
231 "type": "tuple"
232 }
233 ],
234 "stateMutability": "view",
235 "type": "function"
236 },
263 {237 {
264 "inputs": [238 "inputs": [
265 {239 {
273 "stateMutability": "view",247 "stateMutability": "view",
274 "type": "function"248 "type": "function"
275 },249 },
250 {
251 "inputs": [
252 {
253 "internalType": "address",
254 "name": "contractAddress",
255 "type": "address"
256 }
257 ],
258 "name": "sponsoringFeeLimit",
259 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
260 "stateMutability": "view",
261 "type": "function"
262 },
263 {
264 "inputs": [
265 {
266 "internalType": "address",
267 "name": "contractAddress",
268 "type": "address"
269 }
270 ],
271 "name": "sponsoringRateLimit",
272 "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
273 "stateMutability": "view",
274 "type": "function"
275 },
276 {276 {
277 "inputs": [277 "inputs": [
278 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }278 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }