feat(platform)!: token support [WIP] #5078
Annotations
10 warnings and 1 notice
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L25
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:25:9
|
25 | / if old.conventions != new.conventions
26 | | || old.conventions_change_rules != new.conventions_change_rules
27 | | {
28 | | if !old.conventions_change_rules.can_change_to(
... |
45 | | }
46 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
25 ~ if (old.conventions != new.conventions || old.conventions_change_rules != new.conventions_change_rules) && !old.conventions_change_rules.can_change_to(
26 + &new.conventions_change_rules,
27 + contract_owner_id,
28 + self.main_control_group(),
29 + groups,
30 + action_taker,
31 + goal,
32 + ) {
33 + return SimpleConsensusValidationResult::new_with_error(
34 + DataContractTokenConfigurationUpdateError::new(
35 + "update".to_string(),
36 + "conventions or conventionsRules".to_string(),
37 + self.clone(),
38 + new_config.clone(),
39 + )
40 + .into(),
41 + );
42 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L62
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:62:9
|
62 | / if old.max_supply != new.max_supply
63 | | || old.max_supply_change_rules != new.max_supply_change_rules
64 | | {
65 | | if !old.max_supply_change_rules.can_change_to(
... |
82 | | }
83 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
62 ~ if (old.max_supply != new.max_supply || old.max_supply_change_rules != new.max_supply_change_rules) && !old.max_supply_change_rules.can_change_to(
63 + &new.max_supply_change_rules,
64 + contract_owner_id,
65 + self.main_control_group(),
66 + groups,
67 + action_taker,
68 + goal,
69 + ) {
70 + return SimpleConsensusValidationResult::new_with_error(
71 + DataContractTokenConfigurationUpdateError::new(
72 + "update".to_string(),
73 + "maxSupply or maxSupplyChangeRules".to_string(),
74 + self.clone(),
75 + new_config.clone(),
76 + )
77 + .into(),
78 + );
79 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L86
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:86:9
|
86 | / if old.new_tokens_destination_identity != new.new_tokens_destination_identity
87 | | || old.new_tokens_destination_identity_rules
88 | | != new.new_tokens_destination_identity_rules
89 | | {
... |
108 | | }
109 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
86 ~ if (old.new_tokens_destination_identity != new.new_tokens_destination_identity || old.new_tokens_destination_identity_rules
87 + != new.new_tokens_destination_identity_rules) && !old.new_tokens_destination_identity_rules.can_change_to(
88 + &new.new_tokens_destination_identity_rules,
89 + contract_owner_id,
90 + self.main_control_group(),
91 + groups,
92 + action_taker,
93 + goal,
94 + ) {
95 + return SimpleConsensusValidationResult::new_with_error(
96 + DataContractTokenConfigurationUpdateError::new(
97 + "update".to_string(),
98 + "newTokensDestinationIdentity or newTokensDestinationIdentityRules"
99 + .to_string(),
100 + self.clone(),
101 + new_config.clone(),
102 + )
103 + .into(),
104 + );
105 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L112
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:112:9
|
112 | / if old.minting_allow_choosing_destination != new.minting_allow_choosing_destination
113 | | || old.minting_allow_choosing_destination_rules
114 | | != new.minting_allow_choosing_destination_rules
115 | | {
... |
134 | | }
135 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
112 ~ if (old.minting_allow_choosing_destination != new.minting_allow_choosing_destination || old.minting_allow_choosing_destination_rules
113 + != new.minting_allow_choosing_destination_rules) && !old.minting_allow_choosing_destination_rules.can_change_to(
114 + &new.minting_allow_choosing_destination_rules,
115 + contract_owner_id,
116 + self.main_control_group(),
117 + groups,
118 + action_taker,
119 + goal,
120 + ) {
121 + return SimpleConsensusValidationResult::new_with_error(
122 + DataContractTokenConfigurationUpdateError::new(
123 + "update".to_string(),
124 + "mintingAllowChoosingDestination or mintingAllowChoosingDestinationRules"
125 + .to_string(),
126 + self.clone(),
127 + new_config.clone(),
128 + )
129 + .into(),
130 + );
131 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L138
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:138:9
|
138 | / if old.manual_minting_rules != new.manual_minting_rules {
139 | | if !old.manual_minting_rules.can_change_to(
140 | | &new.manual_minting_rules,
141 | | contract_owner_id,
... |
156 | | }
157 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
138 ~ if old.manual_minting_rules != new.manual_minting_rules && !old.manual_minting_rules.can_change_to(
139 + &new.manual_minting_rules,
140 + contract_owner_id,
141 + self.main_control_group(),
142 + groups,
143 + action_taker,
144 + goal,
145 + ) {
146 + return SimpleConsensusValidationResult::new_with_error(
147 + DataContractTokenConfigurationUpdateError::new(
148 + "update".to_string(),
149 + "manualMintingRules".to_string(),
150 + self.clone(),
151 + new_config.clone(),
152 + )
153 + .into(),
154 + );
155 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L160
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:160:9
|
160 | / if old.manual_burning_rules != new.manual_burning_rules {
161 | | if !old.manual_burning_rules.can_change_to(
162 | | &new.manual_burning_rules,
163 | | contract_owner_id,
... |
178 | | }
179 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
160 ~ if old.manual_burning_rules != new.manual_burning_rules && !old.manual_burning_rules.can_change_to(
161 + &new.manual_burning_rules,
162 + contract_owner_id,
163 + self.main_control_group(),
164 + groups,
165 + action_taker,
166 + goal,
167 + ) {
168 + return SimpleConsensusValidationResult::new_with_error(
169 + DataContractTokenConfigurationUpdateError::new(
170 + "update".to_string(),
171 + "manualBurningRules".to_string(),
172 + self.clone(),
173 + new_config.clone(),
174 + )
175 + .into(),
176 + );
177 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L182
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:182:9
|
182 | / if old.freeze_rules != new.freeze_rules {
183 | | if !old.freeze_rules.can_change_to(
184 | | &new.freeze_rules,
185 | | contract_owner_id,
... |
200 | | }
201 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
182 ~ if old.freeze_rules != new.freeze_rules && !old.freeze_rules.can_change_to(
183 + &new.freeze_rules,
184 + contract_owner_id,
185 + self.main_control_group(),
186 + groups,
187 + action_taker,
188 + goal,
189 + ) {
190 + return SimpleConsensusValidationResult::new_with_error(
191 + DataContractTokenConfigurationUpdateError::new(
192 + "update".to_string(),
193 + "freezeRules".to_string(),
194 + self.clone(),
195 + new_config.clone(),
196 + )
197 + .into(),
198 + );
199 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L204
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:204:9
|
204 | / if old.unfreeze_rules != new.unfreeze_rules {
205 | | if !old.unfreeze_rules.can_change_to(
206 | | &new.unfreeze_rules,
207 | | contract_owner_id,
... |
222 | | }
223 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
204 ~ if old.unfreeze_rules != new.unfreeze_rules && !old.unfreeze_rules.can_change_to(
205 + &new.unfreeze_rules,
206 + contract_owner_id,
207 + self.main_control_group(),
208 + groups,
209 + action_taker,
210 + goal,
211 + ) {
212 + return SimpleConsensusValidationResult::new_with_error(
213 + DataContractTokenConfigurationUpdateError::new(
214 + "update".to_string(),
215 + "unfreezeRules".to_string(),
216 + self.clone(),
217 + new_config.clone(),
218 + )
219 + .into(),
220 + );
221 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L226
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:226:9
|
226 | / if old.destroy_frozen_funds_rules != new.destroy_frozen_funds_rules {
227 | | if !old.destroy_frozen_funds_rules.can_change_to(
228 | | &new.destroy_frozen_funds_rules,
229 | | contract_owner_id,
... |
244 | | }
245 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
226 ~ if old.destroy_frozen_funds_rules != new.destroy_frozen_funds_rules && !old.destroy_frozen_funds_rules.can_change_to(
227 + &new.destroy_frozen_funds_rules,
228 + contract_owner_id,
229 + self.main_control_group(),
230 + groups,
231 + action_taker,
232 + goal,
233 + ) {
234 + return SimpleConsensusValidationResult::new_with_error(
235 + DataContractTokenConfigurationUpdateError::new(
236 + "update".to_string(),
237 + "destroyFrozenFundsRules".to_string(),
238 + self.clone(),
239 + new_config.clone(),
240 + )
241 + .into(),
242 + );
243 + }
|
|
Run clechasseur/rs-clippy-check@v3:
packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs#L248
warning: this `if` statement can be collapsed
--> packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs:248:9
|
248 | / if old.emergency_action_rules != new.emergency_action_rules {
249 | | if !old.emergency_action_rules.can_change_to(
250 | | &new.emergency_action_rules,
251 | | contract_owner_id,
... |
266 | | }
267 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
248 ~ if old.emergency_action_rules != new.emergency_action_rules && !old.emergency_action_rules.can_change_to(
249 + &new.emergency_action_rules,
250 + contract_owner_id,
251 + self.main_control_group(),
252 + groups,
253 + action_taker,
254 + goal,
255 + ) {
256 + return SimpleConsensusValidationResult::new_with_error(
257 + DataContractTokenConfigurationUpdateError::new(
258 + "update".to_string(),
259 + "emergencyActionRules".to_string(),
260 + self.clone(),
261 + new_config.clone(),
262 + )
263 + .into(),
264 + );
265 + }
|
|
Post Setup sccache
100% - 196 hits, 0 misses, 0 errors
|
Loading