@@ -228,16 +228,26 @@ pub(in crate::parse_token) fn parse_confidential_transfer_instruction(
228
228
// Assume that extra accounts are proof accounts and not multisig
229
229
// signers. This might be wrong, but it's the best possible option.
230
230
if offset < account_indexes. len ( ) - 1 {
231
+ let label = if withdrawal_data. equality_proof_instruction_offset == 0 {
232
+ "equalityProofContextStateAccount"
233
+ } else {
234
+ "equalityProofRecordAccount"
235
+ } ;
231
236
map. insert (
232
- "equalityProofAccount" . to_string ( ) ,
237
+ label . to_string ( ) ,
233
238
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
234
239
) ;
235
240
offset += 1 ;
236
241
}
237
242
238
243
if offset < account_indexes. len ( ) - 1 {
244
+ let label = if withdrawal_data. range_proof_instruction_offset == 0 {
245
+ "rangeProofContextStateAccount"
246
+ } else {
247
+ "rangeProofRecordAccount"
248
+ } ;
239
249
map. insert (
240
- "rangeProofAccount" . to_string ( ) ,
250
+ label . to_string ( ) ,
241
251
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
242
252
) ;
243
253
offset += 1 ;
@@ -287,24 +297,39 @@ pub(in crate::parse_token) fn parse_confidential_transfer_instruction(
287
297
// Assume that extra accounts are proof accounts and not multisig
288
298
// signers. This might be wrong, but it's the best possible option.
289
299
if offset < account_indexes. len ( ) - 1 {
300
+ let label = if transfer_data. equality_proof_instruction_offset == 0 {
301
+ "equalityProofContextStateAccount"
302
+ } else {
303
+ "equalityProofRecordAccount"
304
+ } ;
290
305
map. insert (
291
- "equalityProofAccount" . to_string ( ) ,
306
+ label . to_string ( ) ,
292
307
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
293
308
) ;
294
309
offset += 1 ;
295
310
}
296
311
297
312
if offset < account_indexes. len ( ) - 1 {
313
+ let label = if transfer_data. ciphertext_validity_proof_instruction_offset == 0 {
314
+ "ciphertextValidityProofContextStateAccount"
315
+ } else {
316
+ "ciphertextValidityProofRecordAccount"
317
+ } ;
298
318
map. insert (
299
- "ciphertextValidityProofAccount" . to_string ( ) ,
319
+ label . to_string ( ) ,
300
320
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
301
321
) ;
302
322
offset += 1 ;
303
323
}
304
324
305
325
if offset < account_indexes. len ( ) - 1 {
326
+ let label = if transfer_data. range_proof_instruction_offset == 0 {
327
+ "rangeProofContextStateAccount"
328
+ } else {
329
+ "rangeProofRecordAccount"
330
+ } ;
306
331
map. insert (
307
- "rangeProofAccount" . to_string ( ) ,
332
+ label . to_string ( ) ,
308
333
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
309
334
) ;
310
335
offset += 1 ;
@@ -368,36 +393,61 @@ pub(in crate::parse_token) fn parse_confidential_transfer_instruction(
368
393
// Assume that extra accounts are proof accounts and not multisig
369
394
// signers. This might be wrong, but it's the best possible option.
370
395
if offset < account_indexes. len ( ) - 1 {
396
+ let label = if equality_proof_instruction_offset == 0 {
397
+ "equalityProofContextStateAccount"
398
+ } else {
399
+ "equalityProofRecordAccount"
400
+ } ;
371
401
map. insert (
372
- "equalityProofAccount" . to_string ( ) ,
402
+ label . to_string ( ) ,
373
403
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
374
404
) ;
375
405
offset += 1 ;
376
406
}
377
407
if offset < account_indexes. len ( ) - 1 {
408
+ let label = if transfer_amount_ciphertext_validity_proof_instruction_offset == 0 {
409
+ "transferAmountCiphertextValidityProofContextStateAccount"
410
+ } else {
411
+ "transferAmountCiphertextValidityProofRecordAccount"
412
+ } ;
378
413
map. insert (
379
- "transferAmountCiphertextValidityProofAccount" . to_string ( ) ,
414
+ label . to_string ( ) ,
380
415
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
381
416
) ;
382
417
offset += 1 ;
383
418
}
384
419
if offset < account_indexes. len ( ) - 1 {
420
+ let label = if fee_ciphertext_validity_proof_instruction_offset == 0 {
421
+ "feeCiphertextValidityProofContextStateAccount"
422
+ } else {
423
+ "feeCiphertextValidityProofRecordAccount"
424
+ } ;
385
425
map. insert (
386
- "feeCiphertextValidityProofAccount" . to_string ( ) ,
426
+ label . to_string ( ) ,
387
427
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
388
428
) ;
389
429
offset += 1 ;
390
430
}
391
431
if offset < account_indexes. len ( ) - 1 {
432
+ let label = if fee_sigma_proof_instruction_offset == 0 {
433
+ "feeSigmaProofContextStateAccount"
434
+ } else {
435
+ "feeSigmaProofRecordAccount"
436
+ } ;
392
437
map. insert (
393
- "feeSigmaProofAccount" . to_string ( ) ,
438
+ label . to_string ( ) ,
394
439
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
395
440
) ;
396
441
offset += 1 ;
397
442
}
398
443
if offset < account_indexes. len ( ) - 1 {
444
+ let label = if range_proof_instruction_offset == 0 {
445
+ "rangeProofContextStateAccount"
446
+ } else {
447
+ "rangeProofRecordAccount"
448
+ } ;
399
449
map. insert (
400
- "rangeProofAccount" . to_string ( ) ,
450
+ label . to_string ( ) ,
401
451
json ! ( account_keys[ account_indexes[ offset] as usize ] . to_string( ) ) ,
402
452
) ;
403
453
offset += 1 ;
0 commit comments