forked from SoroSusu-Protocol/sorosusu-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollateral_check.txt
More file actions
373 lines (360 loc) · 16.4 KB
/
Copy pathcollateral_check.txt
File metadata and controls
373 lines (360 loc) · 16.4 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
cargo : Checking
sorosusu-contracts v0.1.0 (C:\
Users\USER\sorosusu-contracts)
At line:1 char:1
+ cargo check --test
collateral_test >
collateral_check.txt 2>&1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
+ CategoryInfo :
NotSpecified: ( Check
ing so...susu-contracts):
String) [], RemoteExcepti
on
+ FullyQualifiedErrorId :
NativeCommandError
warning: unused variable:
`token_client`
--> src\lib.rs:722:13
|
722 | let
token_client =
token::Client::new(&env,
&circle.token);
|
^^^^^^^^^^^^ help: if this is
intentional, prefix it with
an underscore: `_token_client`
|
= note:
`#[warn(unused_variables)]`
(part of `#[warn(unused)]`)
on by default
warning: `sorosusu-contracts`
(lib) generated 1 warning
(run `cargo fix --lib -p
sorosusu-contracts` to apply
1 suggestion)
warning: unused import:
`String`
-->
tests\collateral_test.rs:1:58
|
1 | use soroban_sdk::{testutil
s::Address as _, Address,
Env, String, Symbol};
|
^^^^^^
|
= note:
`#[warn(unused_imports)]`
(part of `#[warn(unused)]`)
on by default
error[E0061]: this method
takes 8 arguments but 7
arguments were supplied
-->
tests\collateral_test.rs:57:28
|
57 | let circle_id =
client.create_circle(
| _______________________
_____^^^^^^^^^^^^^-
58 | | &creator,
59 | | &low_amount,
60 | | &max_members,
... |
64 | | &nft_contract,
65 | | );
| |_____- argument #8 of
type `&u32` is missing
|
note: method defined here
--> src\lib.rs:239:8
|
239 | fn create_circle(
| ^^^^^^^^^^^^^
help: provide the argument
|
57 ~ let circle_id =
client.create_circle(
58 + &creator,
59 + &low_amount,
60 + &max_members,
61 + &token,
62 + &86400u64,
63 + &100u32,
64 + &nft_contract,
65 + /* &u32 */,
66 ~ );
|
error[E0277]: the trait bound
`():
From<soroban_sdk::Error>` is
not satisfied
--> tests\collateral_test.r
s:150:22
|
150 | let result =
env.try_invoke_contract::<_,
()>(
|
^^^^^^^^^^^^^^^^^^^ the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
|
help: the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
but trait `From<soroban_
sdk::xdr::Error>` is
implemented for it
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\stellar-xdr-21.2
.0\src\curr\generated.rs:221:1
|
221 | impl From<Error> for ()
{
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait
implementation, expected
`soroban_sdk::xdr::Error`,
found `soroban_sdk::Error`
= note: required for
`soroban_sdk::Error` to
implement `Into<()>`
= note: required for `()`
to implement
`TryFrom<soroban_sdk::Error>`
error[E0308]: mismatched types
-->
tests\collateral_test.rs:153:9
|
150 | let result =
env.try_invoke_contract::<_,
()>(
|
----------------------------
arguments to this method are
incorrect
...
153 | (user.clone(),
circle_id, 1u32,
Option::<Address>::None),
| ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^ expected
`Vec<Val>`, found `(Address,
u64, u32, Option<Address>)`
|
= note: expected struct `s
oroban_sdk::Vec<soroban_sdk::V
al>`
found tuple
`(soroban_sdk::Address, u64,
u32, std::option::Option<sorob
an_sdk::Address>)`
note: method defined here
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\soroban-sdk-21.7
.7\src\env.rs:393:12
|
393 | pub fn
try_invoke_contract<T, E>(
|
^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound
`():
From<soroban_sdk::Error>` is
not satisfied
--> tests\collateral_test.r
s:312:22
|
312 | let result =
env.try_invoke_contract::<_,
()>(
|
^^^^^^^^^^^^^^^^^^^ the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
|
help: the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
but trait `From<soroban_
sdk::xdr::Error>` is
implemented for it
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\stellar-xdr-21.2
.0\src\curr\generated.rs:221:1
|
221 | impl From<Error> for ()
{
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait
implementation, expected
`soroban_sdk::xdr::Error`,
found `soroban_sdk::Error`
= note: required for
`soroban_sdk::Error` to
implement `Into<()>`
= note: required for `()`
to implement
`TryFrom<soroban_sdk::Error>`
error[E0308]: mismatched types
-->
tests\collateral_test.rs:315:9
|
312 | let result =
env.try_invoke_contract::<_,
()>(
|
----------------------------
arguments to this method are
incorrect
...
315 | (user,
circle_id,
insufficient_amount),
| ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
expected `Vec<Val>`, found
`(Address, u64, i128)`
|
= note: expected struct `s
oroban_sdk::Vec<soroban_sdk::V
al>`
found tuple
`(soroban_sdk::Address, u64,
i128)`
note: method defined here
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\soroban-sdk-21.7
.7\src\env.rs:393:12
|
393 | pub fn
try_invoke_contract<T, E>(
|
^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound
`():
From<soroban_sdk::Error>` is
not satisfied
--> tests\collateral_test.r
s:357:22
|
357 | let result =
env.try_invoke_contract::<_,
()>(
|
^^^^^^^^^^^^^^^^^^^ the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
|
help: the trait
`From<soroban_sdk::Error>` is
not implemented for `()`
but trait `From<soroban_
sdk::xdr::Error>` is
implemented for it
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\stellar-xdr-21.2
.0\src\curr\generated.rs:221:1
|
221 | impl From<Error> for ()
{
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: for that trait
implementation, expected
`soroban_sdk::xdr::Error`,
found `soroban_sdk::Error`
= note: required for
`soroban_sdk::Error` to
implement `Into<()>`
= note: required for `()`
to implement
`TryFrom<soroban_sdk::Error>`
error[E0308]: mismatched types
-->
tests\collateral_test.rs:360:9
|
357 | let result =
env.try_invoke_contract::<_,
()>(
|
----------------------------
arguments to this method are
incorrect
...
360 | (user,
circle_id,
required_collateral),
| ^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^
expected `Vec<Val>`, found
`(Address, u64, i128)`
|
= note: expected struct `s
oroban_sdk::Vec<soroban_sdk::V
al>`
found tuple
`(soroban_sdk::Address, u64,
i128)`
note: method defined here
--> C:\Users\USER\.cargo\re
gistry\src\index.crates.io-194
9cf8c6b5b557f\soroban-sdk-21.7
.7\src\env.rs:393:12
|
393 | pub fn
try_invoke_contract<T, E>(
|
^^^^^^^^^^^^^^^^^^^
warning: unused import:
`SoroSusuTrait`
-->
tests\collateral_test.rs:2:36
|
2 | use sorosusu_contracts::{S
oroSusu, SoroSusuTrait,
DataKey, CollateralStatus,
MemberStatus};
|
^^^^^^^^^^^^^
warning: variable does not
need to be mutable
-->
tests\collateral_test.rs:254:9
|
254 | let mut member_info
= sorosusu_contracts::Member {
| ----^^^^^^^^^^^
| |
| help: remove
this `mut`
|
= note:
`#[warn(unused_mut)]` (part
of `#[warn(unused)]`) on by
default
Some errors have detailed
explanations: E0061, E0277,
E0308.
For more information about an
error, try `rustc --explain
E0061`.
warning: `sorosusu-contracts`
(test "collateral_test")
generated 3 warnings
error: could not compile
`sorosusu-contracts` (test
"collateral_test") due to 7
previous errors; 3 warnings
emitted