@@ -66,12 +66,12 @@ impl TryFrom<SendZkappInput> for MinaBaseUserCommandStableV2 {
66
66
}
67
67
}
68
68
69
- #[ derive( GraphQLObject ) ]
69
+ #[ derive( GraphQLObject , Debug ) ]
70
70
pub struct GraphQLSendZkappResponse {
71
71
pub zkapp : GraphQLZkapp ,
72
72
}
73
73
74
- #[ derive( GraphQLObject ) ]
74
+ #[ derive( GraphQLObject , Debug ) ]
75
75
pub struct GraphQLZkapp {
76
76
pub hash : String ,
77
77
pub failure_reason : Option < Vec < GraphQLFailureReason > > ,
@@ -89,7 +89,7 @@ pub struct InputGraphQLZkapp {
89
89
pub zkapp_command : InputGraphQLZkappCommand ,
90
90
}
91
91
92
- #[ derive( GraphQLObject ) ]
92
+ #[ derive( GraphQLObject , Debug ) ]
93
93
pub struct GraphQLZkappCommand {
94
94
pub memo : String ,
95
95
pub account_updates : Vec < GraphQLAccountUpdate > ,
@@ -156,7 +156,6 @@ impl TryFrom<InputGraphQLZkappCommand> for MinaBaseUserCommandStableV2 {
156
156
fn try_tree_from_account_updates (
157
157
updates : List < InputGraphQLAccountUpdate > ,
158
158
) -> Result < List < MinaBaseZkappCommandTStableV1WireStableV1AccountUpdatesA > , ConversionError > {
159
- println ! ( "++++ Before the conversion {:?}" , updates) ;
160
159
let result =
161
160
try_tree_from_account_updates_aux ( updates) ?
162
161
. into_iter ( )
@@ -178,7 +177,6 @@ fn try_tree_from_account_updates(
178
177
MinaBaseZkappCommandTStableV1WireStableV1AccountUpdatesA { elt, stack_hash }
179
178
} )
180
179
. collect ( ) ;
181
- println ! ( "+++ After the conversion: {:?}" , result) ;
182
180
Ok ( result)
183
181
}
184
182
@@ -219,7 +217,7 @@ fn try_tree_from_account_updates_aux(
219
217
Ok ( result)
220
218
}
221
219
222
- #[ derive( GraphQLObject ) ]
220
+ #[ derive( GraphQLObject , Debug ) ]
223
221
pub struct GraphQLFeePayer {
224
222
pub body : GraphQLFeePayerBody ,
225
223
pub authorization : String ,
@@ -231,7 +229,7 @@ pub struct InputGraphQLFeePayer {
231
229
pub authorization : String ,
232
230
}
233
231
234
- #[ derive( GraphQLObject ) ]
232
+ #[ derive( GraphQLObject , Debug ) ]
235
233
pub struct GraphQLFeePayerBody {
236
234
pub public_key : String ,
237
235
pub fee : String ,
@@ -247,7 +245,7 @@ pub struct InputGraphQLFeePayerBody {
247
245
pub nonce : String ,
248
246
}
249
247
250
- #[ derive( GraphQLObject ) ]
248
+ #[ derive( GraphQLObject , Debug ) ]
251
249
pub struct GraphQLAccountUpdate {
252
250
pub body : GraphQLAccountUpdateBody ,
253
251
pub authorization : GraphQLAuthorization ,
@@ -259,7 +257,7 @@ pub struct InputGraphQLAccountUpdate {
259
257
pub authorization : InputGraphQLAuthorization ,
260
258
}
261
259
262
- #[ derive( GraphQLObject ) ]
260
+ #[ derive( GraphQLObject , Debug ) ]
263
261
pub struct GraphQLAuthorization {
264
262
pub proof : Option < String > ,
265
263
pub signature : Option < String > ,
@@ -320,7 +318,7 @@ impl TryFrom<InputGraphQLAuthorization> for MinaBaseControlStableV2 {
320
318
}
321
319
}
322
320
323
- #[ derive( GraphQLObject ) ]
321
+ #[ derive( GraphQLObject , Debug ) ]
324
322
pub struct GraphQLAccountUpdateBody {
325
323
pub public_key : String ,
326
324
pub token_id : String ,
@@ -356,7 +354,7 @@ pub struct InputGraphQLAccountUpdateBody {
356
354
pub implicit_account_creation_fee : bool ,
357
355
}
358
356
359
- #[ derive( GraphQLObject ) ]
357
+ #[ derive( GraphQLObject , Debug ) ]
360
358
pub struct GraphQLAuthorizationKind {
361
359
pub is_signed : bool ,
362
360
pub is_proved : bool ,
@@ -421,7 +419,7 @@ impl TryFrom<InputGraphQLAuthorizationKind> for MinaBaseAccountUpdateAuthorizati
421
419
}
422
420
}
423
421
424
- #[ derive( GraphQLObject ) ]
422
+ #[ derive( GraphQLObject , Debug ) ]
425
423
pub struct GraphQLMayUseToken {
426
424
pub parents_own_token : bool ,
427
425
pub inherit_from_parent : bool ,
@@ -464,7 +462,7 @@ impl From<InputGraphQLMayUseToken> for MinaBaseAccountUpdateMayUseTokenStableV1
464
462
}
465
463
}
466
464
467
- #[ derive( GraphQLObject ) ]
465
+ #[ derive( GraphQLObject , Debug ) ]
468
466
pub struct GraphQLEvent {
469
467
pub event : String ,
470
468
pub data : String ,
@@ -476,7 +474,7 @@ pub struct InputGraphQLEvent {
476
474
pub data : String ,
477
475
}
478
476
479
- #[ derive( GraphQLObject ) ]
477
+ #[ derive( GraphQLObject , Debug ) ]
480
478
pub struct GraphQLAction {
481
479
pub action : String ,
482
480
pub data : String ,
@@ -488,7 +486,7 @@ pub struct InputGraphQLAction {
488
486
pub data : String ,
489
487
}
490
488
491
- #[ derive( GraphQLObject ) ]
489
+ #[ derive( GraphQLObject , Debug ) ]
492
490
pub struct GraphQLPreconditions {
493
491
pub network : GraphQLPreconditionsNetwork ,
494
492
pub account : GraphQLPreconditionsAccount ,
@@ -502,7 +500,7 @@ pub struct InputGraphQLPreconditions {
502
500
pub valid_while : Option < InputGraphQLPreconditionsNetworkBounds > ,
503
501
}
504
502
505
- #[ derive( GraphQLObject ) ]
503
+ #[ derive( GraphQLObject , Debug ) ]
506
504
pub struct GraphQLPreconditionsAccount {
507
505
pub balance : Option < GraphQLPreconditionsNetworkBounds > ,
508
506
pub nonce : Option < GraphQLPreconditionsNetworkBounds > ,
@@ -685,7 +683,7 @@ impl TryFrom<InputGraphQLPreconditionsAccount>
685
683
} ) )
686
684
}
687
685
}
688
- #[ derive( GraphQLObject ) ]
686
+ #[ derive( GraphQLObject , Debug ) ]
689
687
pub struct GraphQLPreconditionsNetwork {
690
688
pub snarked_ledger_hash : Option < String > ,
691
689
pub blockchain_length : Option < GraphQLPreconditionsNetworkBounds > ,
@@ -707,7 +705,7 @@ pub struct InputGraphQLPreconditionsNetwork {
707
705
pub next_epoch_data : InputGraphQLPreconditionsNetworkEpochData ,
708
706
}
709
707
710
- #[ derive( GraphQLObject ) ]
708
+ #[ derive( GraphQLObject , Debug ) ]
711
709
pub struct GraphQLPreconditionsNetworkEpochData {
712
710
pub ledger : GraphQLPreconditionsNetworkLedger ,
713
711
pub seed : Option < String > ,
@@ -725,7 +723,7 @@ pub struct InputGraphQLPreconditionsNetworkEpochData {
725
723
pub epoch_length : Option < InputGraphQLPreconditionsNetworkBounds > ,
726
724
}
727
725
728
- #[ derive( GraphQLObject ) ]
726
+ #[ derive( GraphQLObject , Debug ) ]
729
727
pub struct GraphQLPreconditionsNetworkLedger {
730
728
pub hash : Option < String > ,
731
729
pub total_currency : Option < GraphQLPreconditionsNetworkBounds > ,
@@ -736,7 +734,7 @@ pub struct InputGraphQLPreconditionsNetworkLedger {
736
734
pub hash : Option < String > ,
737
735
pub total_currency : Option < InputGraphQLPreconditionsNetworkBounds > ,
738
736
}
739
- #[ derive( GraphQLObject ) ]
737
+ #[ derive( GraphQLObject , Debug ) ]
740
738
pub struct GraphQLPreconditionsNetworkBounds {
741
739
pub upper : String ,
742
740
pub lower : String ,
@@ -1008,7 +1006,7 @@ impl TryFrom<InputGraphQLPreconditionsNetwork> for MinaBaseZkappPreconditionProt
1008
1006
}
1009
1007
}
1010
1008
1011
- #[ derive( GraphQLObject ) ]
1009
+ #[ derive( GraphQLObject , Debug ) ]
1012
1010
pub struct GraphQLAccountUpdateUpdate {
1013
1011
pub app_state : Vec < Option < String > > ,
1014
1012
pub delegate : Option < String > ,
@@ -1020,7 +1018,7 @@ pub struct GraphQLAccountUpdateUpdate {
1020
1018
pub voting_for : Option < String > ,
1021
1019
}
1022
1020
1023
- #[ derive( GraphQLObject ) ]
1021
+ #[ derive( GraphQLObject , Debug ) ]
1024
1022
pub struct GraphQLVerificationKey {
1025
1023
pub data : String ,
1026
1024
pub hash : String ,
@@ -1044,7 +1042,7 @@ pub struct InputGraphQLVerificationKey {
1044
1042
pub hash : String ,
1045
1043
}
1046
1044
1047
- #[ derive( GraphQLObject ) ]
1045
+ #[ derive( GraphQLObject , Debug ) ]
1048
1046
pub struct GraphQLAccountUpdateUpdatePermissions {
1049
1047
pub edit_state : String ,
1050
1048
pub access : String ,
@@ -1061,7 +1059,7 @@ pub struct GraphQLAccountUpdateUpdatePermissions {
1061
1059
pub increment_nonce : String ,
1062
1060
}
1063
1061
1064
- #[ derive( GraphQLObject ) ]
1062
+ #[ derive( GraphQLObject , Debug ) ]
1065
1063
pub struct GraphQLSetVerificationKeyPermissions {
1066
1064
pub auth : String ,
1067
1065
pub txn_version : String ,
@@ -1141,7 +1139,7 @@ impl TryFrom<InputGraphQLAccountUpdateUpdatePermissions> for MinaBasePermissions
1141
1139
}
1142
1140
}
1143
1141
1144
- #[ derive( GraphQLObject ) ]
1142
+ #[ derive( GraphQLObject , Debug ) ]
1145
1143
pub struct GraphQLBalanceChange {
1146
1144
pub magnitude : String ,
1147
1145
pub sgn : String ,
@@ -1153,7 +1151,7 @@ pub struct InputGraphQLBalanceChange {
1153
1151
pub sgn : String ,
1154
1152
}
1155
1153
1156
- #[ derive( GraphQLObject ) ]
1154
+ #[ derive( GraphQLObject , Debug ) ]
1157
1155
pub struct GraphQLFailureReason {
1158
1156
pub index : String ,
1159
1157
pub failures : Vec < String > ,
@@ -1600,8 +1598,8 @@ mod test {
1600
1598
include_str ! ( "../../../../tests/files/zkapps/proof_string.txt" ) . to_string ( ) ,
1601
1599
) ,
1602
1600
} ;
1603
- let converted: MinaBaseControlStableV2 = proof. try_into ( ) . unwrap ( ) ;
1604
- println ! ( "{:?}" , converted) ;
1601
+ let converted: Result < MinaBaseControlStableV2 , _ > = proof. try_into ( ) ;
1602
+ assert ! ( converted. is_ok ( ) ) ;
1605
1603
}
1606
1604
1607
1605
fn create_input_graphql_zkapp ( ) -> InputGraphQLZkapp {
0 commit comments