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

difftreelog

path: add stubs

Trubnikov Sergey2022-08-05parent: #0285730.patch.diff
in: master

3 files changed

modifiedpallets/evm-contract-helpers/src/stubs/ContractHelpers.soldiffbeforeafterboth
21 }21 }
22}22}
2323
24<<<<<<< HEAD
24/// @title Magic contract, which allows users to reconfigure other contracts25/// @title Magic contract, which allows users to reconfigure other contracts
25/// @dev the ERC-165 identifier for this interface is 0xd77fab7026/// @dev the ERC-165 identifier for this interface is 0xd77fab70
27=======
28<<<<<<< HEAD
29// Selector: 6073d917
30=======
31// Selector: 06fc42e9
32>>>>>>> path: add stubs
33>>>>>>> path: add stubs
26contract ContractHelpers is Dummy, ERC165 {34contract ContractHelpers is Dummy, ERC165 {
27 /// Get user, which deployed specified contract35 /// Get user, which deployed specified contract
28 /// @dev May return zero address in case if contract is deployed36 /// @dev May return zero address in case if contract is deployed
44 return 0x0000000000000000000000000000000000000000;52 return 0x0000000000000000000000000000000000000000;
45 }53 }
4654
55<<<<<<< HEAD
47 /// Set sponsor.56 /// Set sponsor.
48 /// @param contractAddress Contract for which a sponsor is being established.57 /// @param contractAddress Contract for which a sponsor is being established.
49 /// @param sponsor User address who set as pending sponsor.58 /// @param sponsor User address who set as pending sponsor.
50 /// @dev EVM selector for this function is: 0xf01fba93,59 /// @dev EVM selector for this function is: 0xf01fba93,
51 /// or in textual repr: setSponsor(address,address)60 /// or in textual repr: setSponsor(address,address)
61=======
62<<<<<<< HEAD
63 // Set sponsor.
64 //
65 // @param contract_address Contract for which a sponsor is being established.
66 // @param sponsor User address who set as pending sponsor.
67 //
68=======
69>>>>>>> path: add stubs
70 // Selector: setSponsor(address,address) f01fba93
71>>>>>>> path: add stubs
52 function setSponsor(address contractAddress, address sponsor) public {72 function setSponsor(address contractAddress, address sponsor) public {
53 require(false, stub_error);73 require(false, stub_error);
54 contractAddress;74 contractAddress;
55 sponsor;75 sponsor;
56 dummy = 0;76 dummy = 0;
57 }77 }
5878
79<<<<<<< HEAD
59 /// Set contract as self sponsored.80 /// Set contract as self sponsored.
60 ///81 ///
61 /// @param contractAddress Contract for which a self sponsoring is being enabled.82 /// @param contractAddress Contract for which a self sponsoring is being enabled.
62 /// @dev EVM selector for this function is: 0x89f7d9ae,83 /// @dev EVM selector for this function is: 0x89f7d9ae,
63 /// or in textual repr: selfSponsoredEnable(address)84 /// or in textual repr: selfSponsoredEnable(address)
85=======
86<<<<<<< HEAD
87 // Set contract as self sponsored.
88 //
89 // @param contract_address Contract for which a self sponsoring is being enabled.
90 //
91 // Selector: selfSponsoredEnable(address) 89f7d9ae
92>>>>>>> path: add stubs
64 function selfSponsoredEnable(address contractAddress) public {93 function selfSponsoredEnable(address contractAddress) public {
94=======
95 // Selector: confirmSponsorship(address) abc00001
96 function confirmSponsorship(address contractAddress) public {
97>>>>>>> path: add stubs
65 require(false, stub_error);98 require(false, stub_error);
66 contractAddress;99 contractAddress;
67 dummy = 0;100 dummy = 0;
68 }101 }
69102
103<<<<<<< HEAD
70 /// Remove sponsor.104 /// Remove sponsor.
71 ///105 ///
72 /// @param contractAddress Contract for which a sponsorship is being removed.106 /// @param contractAddress Contract for which a sponsorship is being removed.
73 /// @dev EVM selector for this function is: 0xef784250,107 /// @dev EVM selector for this function is: 0xef784250,
74 /// or in textual repr: removeSponsor(address)108 /// or in textual repr: removeSponsor(address)
109=======
110<<<<<<< HEAD
111 // Remove sponsor.
112 //
113 // @param contract_address Contract for which a sponsorship is being removed.
114 //
115 // Selector: removeSponsor(address) ef784250
116>>>>>>> path: add stubs
75 function removeSponsor(address contractAddress) public {117 function removeSponsor(address contractAddress) public {
76 require(false, stub_error);118 require(false, stub_error);
77 contractAddress;119 contractAddress;
98 /// @dev EVM selector for this function is: 0x743fc745,140 /// @dev EVM selector for this function is: 0x743fc745,
99 /// or in textual repr: getSponsor(address)141 /// or in textual repr: getSponsor(address)
100 function getSponsor(address contractAddress)142 function getSponsor(address contractAddress)
143=======
144 // Selector: getSponsor(address) 743fc745
145 function getSponsor(address contractAddress)
101 public146 public
102 view147 view
103 returns (Tuple0 memory)148 returns (Tuple0 memory)
108 return Tuple0(0x0000000000000000000000000000000000000000, 0);153 return Tuple0(0x0000000000000000000000000000000000000000, 0);
109 }154 }
110155
156 // Selector: hasSponsor(address) 97418603
157 function hasSponsor(address contractAddress) public view returns (bool) {
158 require(false, stub_error);
159 contractAddress;
160 dummy;
161 return false;
162 }
163
164 // Selector: hasPendingSponsor(address) 39b9b242
165 function hasPendingSponsor(address contractAddress)
166>>>>>>> path: add stubs
167 public
168 view
169 returns (Tuple0 memory)
170 {
171 require(false, stub_error);
172 contractAddress;
173 dummy;
174 return Tuple0(0x0000000000000000000000000000000000000000, 0);
175 }
176
111 /// Check tat contract has confirmed sponsor.177 /// Check tat contract has confirmed sponsor.
112 ///178 ///
113 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.179 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
121 return false;187 return false;
122 }188 }
123189
190<<<<<<< HEAD
124 /// Check tat contract has pending sponsor.191 /// Check tat contract has pending sponsor.
125 ///192 ///
126 /// @param contractAddress The contract for which the presence of a pending sponsor is checked.193 /// @param contractAddress The contract for which the presence of a pending sponsor is checked.
127 /// @return **true** if contract has pending sponsor.194 /// @return **true** if contract has pending sponsor.
128 /// @dev EVM selector for this function is: 0x39b9b242,195 /// @dev EVM selector for this function is: 0x39b9b242,
129 /// or in textual repr: hasPendingSponsor(address)196 /// or in textual repr: hasPendingSponsor(address)
197=======
198<<<<<<< HEAD
199 // Check tat contract has pending sponsor.
200 //
201 // @param contract_address The contract for which the presence of a pending sponsor is checked.
202 // @return **true** if contract has pending sponsor.
203 //
204 // Selector: hasPendingSponsor(address) 39b9b242
205>>>>>>> path: add stubs
130 function hasPendingSponsor(address contractAddress)206 function hasPendingSponsor(address contractAddress)
207=======
208 // Selector: sponsoringEnabled(address) 6027dc61
209 function sponsoringEnabled(address contractAddress)
210>>>>>>> path: add stubs
131 public211 public
132 view212 view
133 returns (bool)213 returns (bool)
136 contractAddress;216 contractAddress;
137 dummy;217 dummy;
138 return false;218 return false;
219<<<<<<< HEAD
139 }220 }
140221
141 /// @dev EVM selector for this function is: 0x6027dc61,222 /// @dev EVM selector for this function is: 0x6027dc61,
149 contractAddress;230 contractAddress;
150 dummy;231 dummy;
151 return false;232 return false;
233=======
234>>>>>>> path: add stubs
152 }235 }
153236
154 /// @dev EVM selector for this function is: 0xfde8a560,237 /// @dev EVM selector for this function is: 0xfde8a560,
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
15/// @title Magic contract, which allows users to reconfigure other contracts16/// @title Magic contract, which allows users to reconfigure other contracts
16/// @dev the ERC-165 identifier for this interface is 0xd77fab7017/// @dev the ERC-165 identifier for this interface is 0xd77fab70
18=======
19<<<<<<< HEAD
20// Selector: 6073d917
21=======
22// Selector: 06fc42e9
23>>>>>>> path: add stubs
24>>>>>>> path: add stubs
17interface ContractHelpers is Dummy, ERC165 {25interface ContractHelpers is Dummy, ERC165 {
18 /// Get user, which deployed specified contract26 /// Get user, which deployed specified contract
19 /// @dev May return zero address in case if contract is deployed27 /// @dev May return zero address in case if contract is deployed
29 view37 view
30 returns (address);38 returns (address);
3139
40<<<<<<< HEAD
32 /// Set sponsor.41 /// Set sponsor.
33 /// @param contractAddress Contract for which a sponsor is being established.42 /// @param contractAddress Contract for which a sponsor is being established.
34 /// @param sponsor User address who set as pending sponsor.43 /// @param sponsor User address who set as pending sponsor.
35 /// @dev EVM selector for this function is: 0xf01fba93,44 /// @dev EVM selector for this function is: 0xf01fba93,
36 /// or in textual repr: setSponsor(address,address)45 /// or in textual repr: setSponsor(address,address)
46=======
47<<<<<<< HEAD
48 // Set sponsor.
49 //
50 // @param contract_address Contract for which a sponsor is being established.
51 // @param sponsor User address who set as pending sponsor.
52 //
53 // Selector: setSponsor(address,address) f01fba93
54>>>>>>> path: add stubs
37 function setSponsor(address contractAddress, address sponsor) external;55 function setSponsor(address contractAddress, address sponsor) external;
3856
39 /// Set contract as self sponsored.57 /// Set contract as self sponsored.
59 /// or in textual repr: confirmSponsorship(address)77 /// or in textual repr: confirmSponsorship(address)
60 function confirmSponsorship(address contractAddress) external;78 function confirmSponsorship(address contractAddress) external;
6179
80<<<<<<< HEAD
62 /// Get current sponsor.81 /// Get current sponsor.
63 ///82 ///
64 /// @param contractAddress The contract for which a sponsor is requested.83 /// @param contractAddress The contract for which a sponsor is requested.
65 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.84 /// @return Tuble with sponsor address and his substrate mirror. If there is no confirmed sponsor error "Contract has no sponsor" throw.
66 /// @dev EVM selector for this function is: 0x743fc745,85 /// @dev EVM selector for this function is: 0x743fc745,
67 /// or in textual repr: getSponsor(address)86 /// or in textual repr: getSponsor(address)
87=======
88 // Get current sponsor.
89 //
90 // @param contract_address 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.
92 //
93=======
94 // Selector: setSponsor(address,address) f01fba93
95 function setSponsor(address contractAddress, address sponsor) external;
96
97 // Selector: confirmSponsorship(address) abc00001
98 function confirmSponsorship(address contractAddress) external;
99
100>>>>>>> path: add stubs
101 // Selector: getSponsor(address) 743fc745
102>>>>>>> path: add stubs
68 function getSponsor(address contractAddress)103 function getSponsor(address contractAddress)
69 external104 external
70 view105 view
71 returns (Tuple0 memory);106 returns (Tuple0 memory);
72107
108<<<<<<< HEAD
73 /// Check tat contract has confirmed sponsor.109 /// Check tat contract has confirmed sponsor.
74 ///110 ///
75 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.111 /// @param contractAddress The contract for which the presence of a confirmed sponsor is checked.
84 /// @return **true** if contract has pending sponsor.120 /// @return **true** if contract has pending sponsor.
85 /// @dev EVM selector for this function is: 0x39b9b242,121 /// @dev EVM selector for this function is: 0x39b9b242,
86 /// or in textual repr: hasPendingSponsor(address)122 /// or in textual repr: hasPendingSponsor(address)
123=======
124<<<<<<< HEAD
125 // Check tat contract has confirmed sponsor.
126 //
127 // @param contract_address The contract for which the presence of a confirmed sponsor is checked.
128 // @return **true** if contract has confirmed sponsor.
129 //
130 // Selector: hasSponsor(address) 97418603
131 function hasSponsor(address contractAddress) external view returns (bool);
132
133 // Check tat contract has pending sponsor.
134 //
135 // @param contract_address The contract for which the presence of a pending sponsor is checked.
136 // @return **true** if contract has pending sponsor.
137 //
138=======
139 // Selector: hasSponsor(address) 97418603
140 function hasSponsor(address contractAddress) external view returns (bool);
141
142>>>>>>> path: add stubs
143 // Selector: hasPendingSponsor(address) 39b9b242
144>>>>>>> path: add stubs
87 function hasPendingSponsor(address contractAddress)145 function hasPendingSponsor(address contractAddress)
88 external146 external
89 view147 view
modifiedtests/src/eth/util/contractHelpersAbi.jsondiffbeforeafterboth
120 "internalType": "address",120 "internalType": "address",
121 "name": "contractAddress",121 "name": "contractAddress",
122 "type": "address"122 "type": "address"
123<<<<<<< HEAD
123 }124 }
124 ],125 ],
125 "name": "removeSponsor",126 "name": "removeSponsor",
146 "internalType": "address",147 "internalType": "address",
147 "name": "contractAddress",148 "name": "contractAddress",
148 "type": "address"149 "type": "address"
150=======
151>>>>>>> path: add stubs
149 },152 },
150 { "internalType": "address", "name": "sponsor", "type": "address" }153 { "internalType": "address", "name": "sponsor", "type": "address" }
151 ],154 ],