forked from Jagadeeshftw/grainlify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild3.txt
More file actions
485 lines (444 loc) · 26.3 KB
/
Copy pathbuild3.txt
File metadata and controls
485 lines (444 loc) · 26.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
cargo : warning: unused imports: `Symbol`,
`contract`, and `contractimpl`
At line:1 char:82
+ ... tracts\bounty_escrow\contracts\escrow;
cargo build --lib 2>&1 | Out-F ...
+
~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified:
(warning: unused... `contractimpl`:Strin
g) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandE
rror
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:11:5
|
11 | contract, contracterror,
contractimpl, contracttype, symbol_short,
Address, BytesN, Env,
| ^^^^^^^^
^^^^^^^^^^^^
12 | String, Symbol, Vec,
| ^^^^^^
|
= note: `#[warn(unused_imports)]` (part
of `#[warn(unused)]`) on by default
warning: unused imports: `contract` and
`contractimpl`
--> C:\Users\user\Desktop\GIT\grainlify\cont
racts\grainlify-core\src\governance.rs:3:5
|
3 | contract, contractimpl,
contracttype, symbol_short, Address, BytesN,
Env, Map, Symbol,
| ^^^^^^^^ ^^^^^^^^^^^^
warning: unused import: `crate::errors`
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:125:
5
|
125 | use crate::errors;
| ^^^^^^^^^^^^^
warning: constant `CONFIG_SNAPSHOT_LIMIT` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:645:7
|
645 | const CONFIG_SNAPSHOT_LIMIT: u32 = 20;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` (part of
`#[warn(unused)]`) on by default
warning: function `contract_is_initialized`
is never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:730:4
|
730 | fn contract_is_initialized(env: &Env)
-> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^
warning: function `emit_migration_event` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\c
ontracts\grainlify-core\src\lib.rs:2228:4
|
2228 | fn emit_migration_event(env: &Env,
event: MigrationEvent) {
| ^^^^^^^^^^^^^^^^^^^^
warning: function `migrate_v1_to_v2` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\c
ontracts\grainlify-core\src\lib.rs:2268:4
|
2268 | fn migrate_v1_to_v2(_env: &Env) {
| ^^^^^^^^^^^^^^^^
warning: function `migrate_v2_to_v3` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\c
ontracts\grainlify-core\src\lib.rs:2304:4
|
2304 | fn migrate_v2_to_v3(_env: &Env) {
| ^^^^^^^^^^^^^^^^
warning: enum `MultiSigError` is never used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\multisig.rs:47:10
|
47 | pub enum MultiSigError {
| ^^^^^^^^^^^^^
warning: struct `MultiSig` is never
constructed
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\multisig.rs:62:12
|
62 | pub struct MultiSig;
| ^^^^^^^^
warning: multiple associated functions are
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\multisig.rs:66:12
|
64 | impl MultiSig {
| ------------- associated functions in
this implementation
65 | /// Initializes the signer set and
execution threshold.
66 | pub fn init(env: &Env, signers:
Vec<Address>, threshold: u32) {
| ^^^^
...
79 | pub fn propose(env: &Env,
proposer: Address) -> u64 {
| ^^^^^^^
...
115 | pub fn approve(env: &Env,
proposal_id: u64, signer: Address) {
| ^^^^^^^
...
142 | pub fn can_execute(env: &Env,
proposal_id: u64) -> bool {
| ^^^^^^^^^^^
...
154 | pub fn is_contract_paused(env:
&Env) -> bool {
| ^^^^^^^^^^^^^^^^^^
...
158 | pub fn pause(env: &Env, signer:
Address) {
| ^^^^^
...
166 | pub fn unpause(env: &Env, signer:
Address) {
| ^^^^^^^
...
174 | pub fn is_state_inconsistent(_env:
&Env) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^
...
179 | pub fn get_config_opt(env: &Env)
-> Option<MultiSigConfig> {
| ^^^^^^^^^^^^^^
...
184 | pub fn mark_executed(env: &Env,
proposal_id: u64) {
| ^^^^^^^^^^^^^
...
208 | fn get_config(env: &Env) ->
MultiSigConfig {
| ^^^^^^^^^^
...
215 | fn get_proposal(env: &Env,
proposal_id: u64) -> Proposal {
| ^^^^^^^^^^^^
...
222 | fn assert_signer(config:
&MultiSigConfig, signer: &Address) {
| ^^^^^^^^^^^^^
warning: constant `PROPOSALS` is never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:116:
11
|
116 | pub const PROPOSALS: Symbol =
symbol_short!("PROPOSALS");
| ^^^^^^^^^
warning: constant `PROPOSAL_COUNT` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:118:
11
|
118 | pub const PROPOSAL_COUNT: Symbol =
symbol_short!("PROP_CNT");
| ^^^^^^^^^^^^^^
warning: constant `VOTES` is never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:120:
11
|
120 | pub const VOTES: Symbol =
symbol_short!("VOTES");
| ^^^^^
warning: constant `GOVERNANCE_CONFIG` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:122:
11
|
122 | pub const GOVERNANCE_CONFIG: Symbol =
symbol_short!("GOV_CFG");
| ^^^^^^^^^^^^^^^^^
warning: function `validate_config` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:163:
15
|
163 | pub(crate) fn validate_config(config:
&GovernanceConfig) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^
warning: struct `GovernanceContract` is
never constructed
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:180:
12
|
180 | pub struct GovernanceContract;
| ^^^^^^^^^^^^^^^^^^
warning: associated functions
`init_governance_state`, `create_proposal`,
`cast_vote`, `finalize_proposal`,
`execute_proposal`, and `get_config` are
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\governance.rs:184:
12
|
182 | impl GovernanceContract {
| ----------------------- associated
functions in this implementation
183 | /// Initializes governance state
for the standalone governance contract.
184 | pub fn init_governance_state(
| ^^^^^^^^^^^^^^^^^^^^^
...
197 | pub fn create_proposal(
| ^^^^^^^^^^^^^^^
...
264 | pub fn cast_vote(
| ^^^^^^^^^
...
343 | pub fn finalize_proposal(env: Env,
proposal_id: u32) -> Result<ProposalStatus,
Error> {
| ^^^^^^^^^^^^^^^^^
...
426 | pub fn execute_proposal(env: Env,
proposal_id: u32) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^
...
466 | pub fn get_config(env: Env) ->
Result<GovernanceConfig, Error> {
| ^^^^^^^^^^
warning: constant `OPERATION_COUNT` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:85:11
|
85 | const OPERATION_COUNT: &str =
"op_count";
| ^^^^^^^^^^^^^^^
warning: constant `USER_COUNT` is never used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:86:11
|
86 | const USER_COUNT: &str =
"usr_count";
| ^^^^^^^^^^
warning: constant `ERROR_COUNT` is never used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:87:11
|
87 | const ERROR_COUNT: &str =
"err_count";
| ^^^^^^^^^^^
warning: constant `USER_INDEX` is never used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:88:11
|
88 | const USER_INDEX: &str =
"usr_index";
| ^^^^^^^^^^
warning: constant `LAST_OPERATION_TS` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\con
tracts\grainlify-core\src\lib.rs:89:11
|
89 | const LAST_OPERATION_TS: &str =
"last_op_ts";
| ^^^^^^^^^^^^^^^^^
warning: constant `MAX_TRACKED_FUNCTIONS` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:194:15
|
194 | pub const MAX_TRACKED_FUNCTIONS:
u32 = 50;
| ^^^^^^^^^^^^^^^^^^^^^
warning: constant `MAX_TRACKED_USERS` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:197:15
|
197 | pub const MAX_TRACKED_USERS: u32 =
64;
| ^^^^^^^^^^^^^^^^^
warning: function `get_counter` is never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:199:8
|
199 | fn get_counter(env: &Env, key:
&str) -> u64 {
| ^^^^^^^^^^^
warning: function `set_counter` is never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:206:8
|
206 | fn set_counter(env: &Env, key:
&str, value: u64) {
| ^^^^^^^^^^^
warning: function `get_tracked_users` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:212:8
|
212 | fn get_tracked_users(env: &Env) ->
Vec<Address> {
| ^^^^^^^^^^^^^^^^^
warning: function `track_unique_user` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:219:8
|
219 | fn track_unique_user(env: &Env,
caller: &Address) {
| ^^^^^^^^^^^^^^^^^
warning: function `version_semver_string` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:239:8
|
239 | fn version_semver_string(env:
&Env) -> String {
| ^^^^^^^^^^^^^^^^^^^^^
warning: function `track_operation` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:253:12
|
253 | pub fn track_operation(env: &Env,
operation: Symbol, caller: Address, success:
bool) {
| ^^^^^^^^^^^^^^^
warning: function `emit_performance` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:284:12
|
284 | pub fn emit_performance(env: &Env,
function: Symbol, duration: u64) {
| ^^^^^^^^^^^^^^^^
warning: function `health_check` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:356:12
|
356 | pub fn health_check(env: &Env) ->
HealthStatus {
| ^^^^^^^^^^^^
warning: function `get_analytics` is never
used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:368:12
|
368 | pub fn get_analytics(env: &Env) ->
Analytics {
| ^^^^^^^^^^^^^
warning: function `get_state_snapshot` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:388:12
|
388 | pub fn get_state_snapshot(env:
&Env) -> StateSnapshot {
| ^^^^^^^^^^^^^^^^^^
warning: function `get_performance_stats` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:401:12
|
401 | pub fn get_performance_stats(env:
&Env, function_name: Symbol) ->
PerformanceStats {
| ^^^^^^^^^^^^^^^^^^^^^
warning: function `check_invariants` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:423:12
|
423 | pub fn check_invariants(env: &Env)
-> InvariantReport {
| ^^^^^^^^^^^^^^^^
warning: function `verify_invariants` is
never used
--> C:\Users\user\Desktop\GIT\grainlify\co
ntracts\grainlify-core\src\lib.rs:498:12
|
498 | pub fn verify_invariants(env:
&Env) -> bool {
| ^^^^^^^^^^^^^^^^^
warning: `grainlify-core` (lib) generated 38
warnings (run `cargo fix --lib -p
grainlify-core` to apply 3 suggestions)
Compiling bounty-escrow v0.0.0 (C:\Users\u
ser\Desktop\GIT\grainlify\contracts\bounty_es
crow\contracts\escrow)
error: mismatched closing delimiter: `}`
--> contracts\escrow\src\lib.rs:4745:42
|
1053 | impl BountyEscrowContract {
| - closing
delimiter possibly meant for this
...
4745 | let result: Result<u32,
Error> = (|| {
|
^ unclosed delimiter
...
4890 | }
| ^ mismatched closing delimiter
error: this file contains an unclosed
delimiter
--> contracts\escrow\src\lib.rs:5027:3
|
1053 | impl BountyEscrowContract {
| - unclosed
delimiter
...
4279 | ) -> Result<(), Error> {
| - unclosed
delimiter
...
4745 | let result: Result<u32,
Error> = (|| {
|
- this delimiter might not be
properly closed...
...
4889 | }
| - ...as it matches this but it
has different indentation
...
5027 | }
| ^
error: could not compile `bounty-escrow`
(lib) due to 2 previous errors