-
Notifications
You must be signed in to change notification settings - Fork 0
/
DealClient.json
1214 lines (1214 loc) · 320 KB
/
DealClient.json
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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"address": "0xf8B7524c3dbfDe0d3e6E06d371A06a9B7430333a",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "int256",
"name": "errorCode",
"type": "int256"
}
],
"name": "ActorError",
"type": "error"
},
{
"inputs": [],
"name": "ActorNotFound",
"type": "error"
},
{
"inputs": [],
"name": "FailToCallActor",
"type": "error"
},
{
"inputs": [],
"name": "InvalidAddress",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"name": "InvalidCodec",
"type": "error"
},
{
"inputs": [],
"name": "InvalidResponseLength",
"type": "error"
},
{
"inputs": [],
"name": "NegativeValueNotAllowed",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "NotEnoughBalance",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "id",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint64",
"name": "size",
"type": "uint64"
},
{
"indexed": true,
"internalType": "bool",
"name": "verified",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "DealProposalCreate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "received",
"type": "string"
}
],
"name": "ReceivedDataCap",
"type": "event"
},
{
"inputs": [],
"name": "AUTHENTICATE_MESSAGE_METHOD_NUM",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DATACAP_ACTOR_ETH_ADDRESS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DATACAP_RECEIVER_HOOK_METHOD_NUM",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MARKET_ACTOR_ETH_ADDRESS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MARKET_NOTIFY_DEAL_METHOD_NUM",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "addBalance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "dealRequestIdx",
"outputs": [
{
"internalType": "uint256",
"name": "idx",
"type": "uint256"
},
{
"internalType": "bool",
"name": "valid",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "dealRequests",
"outputs": [
{
"internalType": "bytes",
"name": "piece_cid",
"type": "bytes"
},
{
"internalType": "uint64",
"name": "piece_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "verified_deal",
"type": "bool"
},
{
"internalType": "string",
"name": "label",
"type": "string"
},
{
"internalType": "int64",
"name": "start_epoch",
"type": "int64"
},
{
"internalType": "int64",
"name": "end_epoch",
"type": "int64"
},
{
"internalType": "uint256",
"name": "storage_price_per_epoch",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "provider_collateral",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "client_collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "extra_params_version",
"type": "uint64"
},
{
"components": [
{
"internalType": "string",
"name": "location_ref",
"type": "string"
},
{
"internalType": "uint64",
"name": "car_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "skip_ipni_announce",
"type": "bool"
},
{
"internalType": "bool",
"name": "remove_unsealed_copy",
"type": "bool"
}
],
"internalType": "struct ExtraParamsV1",
"name": "extra_params",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "dealsLength",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "getDealByIndex",
"outputs": [
{
"components": [
{
"internalType": "bytes",
"name": "piece_cid",
"type": "bytes"
},
{
"internalType": "uint64",
"name": "piece_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "verified_deal",
"type": "bool"
},
{
"internalType": "string",
"name": "label",
"type": "string"
},
{
"internalType": "int64",
"name": "start_epoch",
"type": "int64"
},
{
"internalType": "int64",
"name": "end_epoch",
"type": "int64"
},
{
"internalType": "uint256",
"name": "storage_price_per_epoch",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "provider_collateral",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "client_collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "extra_params_version",
"type": "uint64"
},
{
"components": [
{
"internalType": "string",
"name": "location_ref",
"type": "string"
},
{
"internalType": "uint64",
"name": "car_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "skip_ipni_announce",
"type": "bool"
},
{
"internalType": "bool",
"name": "remove_unsealed_copy",
"type": "bool"
}
],
"internalType": "struct ExtraParamsV1",
"name": "extra_params",
"type": "tuple"
}
],
"internalType": "struct DealRequest",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "proposalId",
"type": "bytes32"
}
],
"name": "getDealProposal",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "proposalId",
"type": "bytes32"
}
],
"name": "getExtraParams",
"outputs": [
{
"internalType": "bytes",
"name": "extra_params",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "cid",
"type": "bytes"
}
],
"name": "getProposalIdSet",
"outputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "requestId",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "valid",
"type": "bool"
}
],
"internalType": "struct RequestId",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "cid",
"type": "bytes"
}
],
"name": "getProviderSet",
"outputs": [
{
"components": [
{
"internalType": "bytes",
"name": "provider",
"type": "bytes"
},
{
"internalType": "bool",
"name": "valid",
"type": "bool"
}
],
"internalType": "struct ProviderSet",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint64",
"name": "method",
"type": "uint64"
},
{
"internalType": "uint64",
"name": "",
"type": "uint64"
},
{
"internalType": "bytes",
"name": "params",
"type": "bytes"
}
],
"name": "handle_filecoin_method",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
},
{
"internalType": "uint64",
"name": "",
"type": "uint64"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "piece_cid",
"type": "bytes"
},
{
"internalType": "uint64",
"name": "piece_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "verified_deal",
"type": "bool"
},
{
"internalType": "string",
"name": "label",
"type": "string"
},
{
"internalType": "int64",
"name": "start_epoch",
"type": "int64"
},
{
"internalType": "int64",
"name": "end_epoch",
"type": "int64"
},
{
"internalType": "uint256",
"name": "storage_price_per_epoch",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "provider_collateral",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "client_collateral",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "extra_params_version",
"type": "uint64"
},
{
"components": [
{
"internalType": "string",
"name": "location_ref",
"type": "string"
},
{
"internalType": "uint64",
"name": "car_size",
"type": "uint64"
},
{
"internalType": "bool",
"name": "skip_ipni_announce",
"type": "bool"
},
{
"internalType": "bool",
"name": "remove_unsealed_copy",
"type": "bool"
}
],
"internalType": "struct ExtraParamsV1",
"name": "extra_params",
"type": "tuple"
}
],
"internalType": "struct DealRequest",
"name": "deal",
"type": "tuple"
}
],
"name": "makeDealProposal",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "pieceDeals",
"outputs": [
{
"internalType": "uint64",
"name": "",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "pieceProviders",
"outputs": [
{
"internalType": "bytes",
"name": "provider",
"type": "bytes"
},
{
"internalType": "bool",
"name": "valid",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "pieceRequests",
"outputs": [
{
"internalType": "bytes32",
"name": "requestId",
"type": "bytes32"
},
{
"internalType": "bool",
"name": "valid",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "pieceStatus",
"outputs": [
{
"internalType": "enum DealClient.Status",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "pieceCid",
"type": "bytes"
}
],
"name": "updateActivationStatus",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "client",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "withdrawBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0xc917b8d4b288f200b5ff2c28f5a5d3718038fa954d6d58ba5489f7a6c44a464f",
"receipt": {
"to": null,
"from": "0x0ed18cFf1e16Db3f8b76D05c84182E4849ab03D4",
"contractAddress": "0xf8B7524c3dbfDe0d3e6E06d371A06a9B7430333a",
"transactionIndex": 0,
"gasUsed": "154664478",
"logsBloom": "0xcc2000014070440630888000000400b44c1100400042009040c190000000010ea40493090048018800002442100884240002000007944000080000000035100430001308384050021253520c02ba929160012088e08c2800101214000830400008800220370004080232423044800a0806808d00040081004040a0304065426808001944007c0500404000000000905090054802e02080008004c00101088a001b022004281000020048812000040a0c05300020e082b64092208519902440088a60053308004000410a0400010762200a0a8230b000aa62410010a005786004015103a008420800022030000040389310800860029401106082640001500123",
"blockHash": "0xaa64a244eaf1ba3122cd871432c991b2a9162b75693d1c1f9910a4ec378ebe6b",
"transactionHash": "0xc917b8d4b288f200b5ff2c28f5a5d3718038fa954d6d58ba5489f7a6c44a464f",
"logs": [],
"blockNumber": 354993,
"cumulativeGasUsed": "0",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "8a39585a9296f31db9a9d8a2e014a1b2",
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"errorCode\",\"type\":\"int256\"}],\"name\":\"ActorError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ActorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailToCallActor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"InvalidCodec\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidResponseLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NegativeValueNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"NotEnoughBalance\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"size\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"verified\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"DealProposalCreate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"received\",\"type\":\"string\"}],\"name\":\"ReceivedDataCap\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHENTICATE_MESSAGE_METHOD_NUM\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DATACAP_ACTOR_ETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DATACAP_RECEIVER_HOOK_METHOD_NUM\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MARKET_ACTOR_ETH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MARKET_NOTIFY_DEAL_METHOD_NUM\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"addBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dealRequestIdx\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"dealRequests\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"piece_cid\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"piece_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"verified_deal\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"int64\",\"name\":\"start_epoch\",\"type\":\"int64\"},{\"internalType\":\"int64\",\"name\":\"end_epoch\",\"type\":\"int64\"},{\"internalType\":\"uint256\",\"name\":\"storage_price_per_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"provider_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"client_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"extra_params_version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"location_ref\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"car_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"skip_ipni_announce\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"remove_unsealed_copy\",\"type\":\"bool\"}],\"internalType\":\"struct ExtraParamsV1\",\"name\":\"extra_params\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dealsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getDealByIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"piece_cid\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"piece_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"verified_deal\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"int64\",\"name\":\"start_epoch\",\"type\":\"int64\"},{\"internalType\":\"int64\",\"name\":\"end_epoch\",\"type\":\"int64\"},{\"internalType\":\"uint256\",\"name\":\"storage_price_per_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"provider_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"client_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"extra_params_version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"location_ref\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"car_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"skip_ipni_announce\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"remove_unsealed_copy\",\"type\":\"bool\"}],\"internalType\":\"struct ExtraParamsV1\",\"name\":\"extra_params\",\"type\":\"tuple\"}],\"internalType\":\"struct DealRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalId\",\"type\":\"bytes32\"}],\"name\":\"getDealProposal\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"proposalId\",\"type\":\"bytes32\"}],\"name\":\"getExtraParams\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extra_params\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"cid\",\"type\":\"bytes\"}],\"name\":\"getProposalIdSet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"internalType\":\"struct RequestId\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"cid\",\"type\":\"bytes\"}],\"name\":\"getProviderSet\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"provider\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"internalType\":\"struct ProviderSet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"method\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"}],\"name\":\"handle_filecoin_method\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"piece_cid\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"piece_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"verified_deal\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"label\",\"type\":\"string\"},{\"internalType\":\"int64\",\"name\":\"start_epoch\",\"type\":\"int64\"},{\"internalType\":\"int64\",\"name\":\"end_epoch\",\"type\":\"int64\"},{\"internalType\":\"uint256\",\"name\":\"storage_price_per_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"provider_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"client_collateral\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"extra_params_version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"location_ref\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"car_size\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"skip_ipni_announce\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"remove_unsealed_copy\",\"type\":\"bool\"}],\"internalType\":\"struct ExtraParamsV1\",\"name\":\"extra_params\",\"type\":\"tuple\"}],\"internalType\":\"struct DealRequest\",\"name\":\"deal\",\"type\":\"tuple\"}],\"name\":\"makeDealProposal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"pieceDeals\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"pieceProviders\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"provider\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"pieceRequests\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"valid\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"pieceStatus\",\"outputs\":[{\"internalType\":\"enum DealClient.Status\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"pieceCid\",\"type\":\"bytes\"}],\"name\":\"updateActivationStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"client\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"withdrawBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"errors\":{\"ActorError(int256)\":[{\"notice\":\"the called actor returned an error as part of its expected behaviour\"}],\"ActorNotFound()\":[{\"notice\":\"the actor is not found\"}],\"FailToCallActor()\":[{\"notice\":\"an error happened trying to call the actor\"}],\"InvalidCodec(uint64)\":[{\"notice\":\"the codec received is not valid\"}],\"InvalidResponseLength()\":[{\"notice\":\"the response received is not correct. In some case no response is expected and we received one, or a response was indeed expected and we received none.\"}],\"NotEnoughBalance(uint256,uint256)\":[{\"notice\":\"the smart contract has no enough balance to transfer\"}]},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/DealClient.sol\":\"DealClient\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":false},\"runs\":1000},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-2-Clause\\npragma solidity ^0.8.4;\\n\\n/**\\n* @dev A library for working with mutable byte buffers in Solidity.\\n*\\n* Byte buffers are mutable and expandable, and provide a variety of primitives\\n* for appending to them. At any time you can fetch a bytes object containing the\\n* current contents of the buffer. The bytes object should not be stored between\\n* operations, as it may change due to resizing of the buffer.\\n*/\\nlibrary Buffer {\\n /**\\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\\n * a capacity. The capacity may be longer than the current value, in\\n * which case it can be extended without the need to allocate more memory.\\n */\\n struct buffer {\\n bytes buf;\\n uint capacity;\\n }\\n\\n /**\\n * @dev Initializes a buffer with an initial capacity.\\n * @param buf The buffer to initialize.\\n * @param capacity The number of bytes of space to allocate the buffer.\\n * @return The buffer, for chaining.\\n */\\n function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\\n if (capacity % 32 != 0) {\\n capacity += 32 - (capacity % 32);\\n }\\n // Allocate space for the buffer data\\n buf.capacity = capacity;\\n assembly {\\n let ptr := mload(0x40)\\n mstore(buf, ptr)\\n mstore(ptr, 0)\\n let fpm := add(32, add(ptr, capacity))\\n if lt(fpm, ptr) {\\n revert(0, 0)\\n }\\n mstore(0x40, fpm)\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Initializes a new buffer from an existing bytes object.\\n * Changes to the buffer may mutate the original value.\\n * @param b The bytes object to initialize the buffer with.\\n * @return A new buffer.\\n */\\n function fromBytes(bytes memory b) internal pure returns(buffer memory) {\\n buffer memory buf;\\n buf.buf = b;\\n buf.capacity = b.length;\\n return buf;\\n }\\n\\n function resize(buffer memory buf, uint capacity) private pure {\\n bytes memory oldbuf = buf.buf;\\n init(buf, capacity);\\n append(buf, oldbuf);\\n }\\n\\n /**\\n * @dev Sets buffer length to 0.\\n * @param buf The buffer to truncate.\\n * @return The original buffer, for chaining..\\n */\\n function truncate(buffer memory buf) internal pure returns (buffer memory) {\\n assembly {\\n let bufptr := mload(buf)\\n mstore(bufptr, 0)\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Appends len bytes of a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes memory data, uint len) internal pure returns(buffer memory) {\\n require(len <= data.length);\\n\\n uint off = buf.buf.length;\\n uint newCapacity = off + len;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(newCapacity, buflen) {\\n mstore(bufptr, newCapacity)\\n }\\n src := add(data, 32)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\\n return append(buf, data, data.length);\\n }\\n\\n /**\\n * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\\n * capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint offPlusOne = off + 1;\\n if (off >= buf.capacity) {\\n resize(buf, offPlusOne * 2);\\n }\\n\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + off\\n let dest := add(add(bufptr, off), 32)\\n mstore8(dest, data)\\n // Update buffer length if we extended it\\n if gt(offPlusOne, mload(bufptr)) {\\n mstore(bufptr, offPlusOne)\\n }\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Appends len bytes of bytes32 to a buffer. Resizes if doing so would\\n * exceed the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to write (left-aligned).\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes32 data, uint len) private pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint newCapacity = len + off;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n unchecked {\\n uint mask = (256 ** len) - 1;\\n // Right-align data\\n data = data >> (8 * (32 - len));\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + newCapacity\\n let dest := add(bufptr, newCapacity)\\n mstore(dest, or(and(mload(dest), not(mask)), data))\\n // Update buffer length if we extended it\\n if gt(newCapacity, mload(bufptr)) {\\n mstore(bufptr, newCapacity)\\n }\\n }\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chhaining.\\n */\\n function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\\n return append(buf, bytes32(data), 20);\\n }\\n\\n /**\\n * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\\n return append(buf, data, 32);\\n }\\n\\n /**\\n * @dev Appends a byte to the end of the buffer. Resizes if doing so would\\n * exceed the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to write (right-aligned).\\n * @return The original buffer.\\n */\\n function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint newCapacity = len + off;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n uint mask = (256 ** len) - 1;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + newCapacity\\n let dest := add(bufptr, newCapacity)\\n mstore(dest, or(and(mload(dest), not(mask)), data))\\n // Update buffer length if we extended it\\n if gt(newCapacity, mload(bufptr)) {\\n mstore(bufptr, newCapacity)\\n }\\n }\\n return buf;\\n }\\n}\\n\",\"keccak256\":\"0xd6dd3b0b327288f8e1b711a609f4040fea602e2ad4bba9febdf2f33b4e56eb0c\",\"license\":\"BSD-2-Clause\"},\"@zondax/filecoin-solidity/contracts/v0.8/MarketAPI.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"./types/MarketTypes.sol\\\";\\nimport \\\"./cbor/MarketCbor.sol\\\";\\nimport \\\"./cbor/BytesCbor.sol\\\";\\nimport \\\"./cbor/FilecoinCbor.sol\\\";\\n\\nimport \\\"./types/CommonTypes.sol\\\";\\nimport \\\"./utils/Misc.sol\\\";\\nimport \\\"./utils/Actor.sol\\\";\\n\\n/// @title This library is a proxy to the singleton Storage Market actor (address: f05). Calling one of its methods will result in a cross-actor call being performed.\\n/// @author Zondax AG\\nlibrary MarketAPI {\\n using BytesCBOR for bytes;\\n using MarketCBOR for *;\\n using FilecoinCBOR for *;\\n\\n /// @notice Deposits the received value into the balance held in escrow.\\n function addBalance(CommonTypes.FilAddress memory providerOrClient, uint256 value) internal {\\n bytes memory raw_request = providerOrClient.serializeAddress();\\n\\n bytes memory data = Actor.callByID(MarketTypes.ActorID, MarketTypes.AddBalanceMethodNum, Misc.CBOR_CODEC, raw_request, value, false);\\n if (data.length != 0) {\\n revert Actor.InvalidResponseLength();\\n }\\n }\\n\\n /// @notice Attempt to withdraw the specified amount from the balance held in escrow.\\n /// @notice If less than the specified amount is available, yields the entire available balance.\\n function withdrawBalance(MarketTypes.WithdrawBalanceParams memory params) internal returns (CommonTypes.BigInt memory) {\\n bytes memory raw_request = params.serializeWithdrawBalanceParams();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.WithdrawBalanceMethodNum, Misc.CBOR_CODEC, raw_request, 0, false);\\n\\n return result.deserializeBytesBigInt();\\n }\\n\\n /// @notice Return the escrow balance and locked amount for an address.\\n /// @return the escrow balance and locked amount for an address.\\n function getBalance(CommonTypes.FilAddress memory addr) internal returns (MarketTypes.GetBalanceReturn memory) {\\n bytes memory raw_request = addr.serializeAddress();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetBalanceMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeGetBalanceReturn();\\n }\\n\\n /// @notice This will be available after the deal is published (whether or not is is activated) and up until some undefined period after it is terminated.\\n /// @return the data commitment and size of a deal proposal.\\n function getDealDataCommitment(uint64 dealID) internal returns (MarketTypes.GetDealDataCommitmentReturn memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealDataCommitmentMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeGetDealDataCommitmentReturn();\\n }\\n\\n /// @notice get the client of the deal proposal.\\n /// @return the client of a deal proposal.\\n function getDealClient(uint64 dealID) internal returns (uint64) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealClientMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeUint64();\\n }\\n\\n /// @notice get the provider of a deal proposal.\\n /// @return the provider of a deal proposal.\\n function getDealProvider(uint64 dealID) internal returns (uint64) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealProviderMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeUint64();\\n }\\n\\n /// @notice Get the label of a deal proposal.\\n /// @return the label of a deal proposal.\\n function getDealLabel(uint64 dealID) internal returns (CommonTypes.DealLabel memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealLabelMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeDealLabel();\\n }\\n\\n /// @notice Get the start epoch and duration(in epochs) of a deal proposal.\\n /// @return the start epoch and duration (in epochs) of a deal proposal.\\n function getDealTerm(uint64 dealID) internal returns (MarketTypes.GetDealTermReturn memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealTermMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeGetDealTermReturn();\\n }\\n\\n /// @notice get the total price that will be paid from the client to the provider for this deal.\\n /// @return the per-epoch price of a deal proposal.\\n function getDealTotalPrice(uint64 dealID) internal returns (CommonTypes.BigInt memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealTotalPriceMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeBytesBigInt();\\n }\\n\\n /// @notice get the client collateral requirement for a deal proposal.\\n /// @return the client collateral requirement for a deal proposal.\\n function getDealClientCollateral(uint64 dealID) internal returns (CommonTypes.BigInt memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealClientCollateralMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeBytesBigInt();\\n }\\n\\n /// @notice get the provide collateral requirement for a deal proposal.\\n /// @return the provider collateral requirement for a deal proposal.\\n function getDealProviderCollateral(uint64 dealID) internal returns (CommonTypes.BigInt memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealProviderCollateralMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeBytesBigInt();\\n }\\n\\n /// @notice get the verified flag for a deal proposal.\\n /// @notice Note that the source of truth for verified allocations and claims is the verified registry actor.\\n /// @return the verified flag for a deal proposal.\\n function getDealVerified(uint64 dealID) internal returns (bool) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealVerifiedMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeBool();\\n }\\n\\n /// @notice Fetches activation state for a deal.\\n /// @notice This will be available from when the proposal is published until an undefined period after the deal finishes (either normally or by termination).\\n /// @return USR_NOT_FOUND if the deal doesn't exist (yet), or EX_DEAL_EXPIRED if the deal has been removed from state.\\n function getDealActivation(uint64 dealID) internal returns (MarketTypes.GetDealActivationReturn memory) {\\n bytes memory raw_request = dealID.serializeDealID();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.GetDealActivationMethodNum, Misc.CBOR_CODEC, raw_request, 0, true);\\n\\n return result.deserializeGetDealActivationReturn();\\n }\\n\\n /// @notice Publish a new set of storage deals (not yet included in a sector).\\n function publishStorageDeals(MarketTypes.PublishStorageDealsParams memory params) internal returns (MarketTypes.PublishStorageDealsReturn memory) {\\n bytes memory raw_request = params.serializePublishStorageDealsParams();\\n\\n bytes memory result = Actor.callByID(MarketTypes.ActorID, MarketTypes.PublishStorageDealsMethodNum, Misc.CBOR_CODEC, raw_request, 0, false);\\n\\n return result.deserializePublishStorageDealsReturn();\\n }\\n}\\n\",\"keccak256\":\"0xe2adcdda00cc16069016580c9ecfff6062f98315c40e4e584924d5808c4704fc\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/cbor/AccountCbor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"solidity-cborutils/contracts/CBOR.sol\\\";\\n\\nimport \\\"../types/AccountTypes.sol\\\";\\n\\nimport \\\"../utils/CborDecode.sol\\\";\\nimport \\\"../utils/Misc.sol\\\";\\n\\n/// @title This library is a set of functions meant to handle CBOR parameters serialization and return values deserialization for Account actor exported methods.\\n/// @author Zondax AG\\nlibrary AccountCBOR {\\n using CBOR for CBOR.CBORBuffer;\\n using CBORDecoder for bytes;\\n\\n /// @notice serialize AuthenticateMessageParams struct to cbor in order to pass as arguments to an account actor\\n /// @param params AuthenticateMessageParams to serialize as cbor\\n /// @return cbor serialized data as bytes\\n function serializeAuthenticateMessageParams(AccountTypes.AuthenticateMessageParams memory params) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n\\n capacity += Misc.getPrefixSize(2);\\n capacity += Misc.getBytesSize(params.signature);\\n capacity += Misc.getBytesSize(params.message);\\n\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(2);\\n buf.writeBytes(params.signature);\\n buf.writeBytes(params.message);\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize AuthenticateMessageParams struct from cbor encoded bytes coming from an account actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of AuthenticateMessageParams created based on parsed data\\n function deserializeAuthenticateMessageParams(bytes memory rawResp) internal pure returns (AccountTypes.AuthenticateMessageParams memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (ret.signature, byteIdx) = rawResp.readBytes(byteIdx);\\n (ret.message, byteIdx) = rawResp.readBytes(byteIdx);\\n\\n return ret;\\n }\\n}\\n\",\"keccak256\":\"0xbc15538954ef494595fa3916532574ba00805ce09d8679d6bcebf59b5dc069cc\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/cbor/BigIntCbor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\n/// @title This library is a set of functions meant to handle CBOR serialization and deserialization for BigInt type\\n/// @author Zondax AG\\nlibrary BigIntCBOR {\\n /// @notice serialize BigInt instance to bytes\\n /// @param num BigInt instance to serialize\\n /// @return serialized BigInt as bytes\\n function serializeBigInt(CommonTypes.BigInt memory num) internal pure returns (bytes memory) {\\n bytes memory raw = new bytes(num.val.length + 1);\\n\\n raw[0] = num.neg == true ? bytes1(0x01) : bytes1(0x00);\\n\\n uint index = 1;\\n for (uint i = 0; i < num.val.length; i++) {\\n raw[index] = num.val[i];\\n index++;\\n }\\n\\n return raw;\\n }\\n\\n /// @notice deserialize big int (encoded as bytes) to BigInt instance\\n /// @param raw as bytes to parse\\n /// @return parsed BigInt instance\\n function deserializeBigInt(bytes memory raw) internal pure returns (CommonTypes.BigInt memory) {\\n if (raw.length == 0) {\\n return CommonTypes.BigInt(hex\\\"00\\\", false);\\n }\\n\\n bytes memory val = new bytes(raw.length - 1);\\n bool neg = false;\\n\\n if (raw[0] == 0x01) {\\n neg = true;\\n }\\n\\n for (uint i = 1; i < raw.length; i++) {\\n val[i - 1] = raw[i];\\n }\\n\\n return CommonTypes.BigInt(val, neg);\\n }\\n}\\n\",\"keccak256\":\"0xbe9eb7f33f943e12a2ca6d8a02178c30cef91f8c9db1c1b50f88a77e31784ac4\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/cbor/BytesCbor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"solidity-cborutils/contracts/CBOR.sol\\\";\\n\\nimport \\\"../utils/CborDecode.sol\\\";\\nimport \\\"../utils/Misc.sol\\\";\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\nimport \\\"./BigIntCbor.sol\\\";\\n\\n/// @title This library is a set of functions meant to handle CBOR serialization and deserialization for bytes\\n/// @author Zondax AG\\nlibrary BytesCBOR {\\n using CBOR for CBOR.CBORBuffer;\\n using CBORDecoder for bytes;\\n using BigIntCBOR for bytes;\\n\\n /// @notice serialize raw bytes as cbor bytes string encoded\\n /// @param data raw data in bytes\\n /// @return encoded cbor bytes\\n function serializeBytes(bytes memory data) internal pure returns (bytes memory) {\\n uint256 capacity = Misc.getBytesSize(data);\\n\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.writeBytes(data);\\n\\n return buf.data();\\n }\\n\\n /// @notice serialize raw address (in bytes) as cbor bytes string encoded (how an address is passed to filecoin actors)\\n /// @param addr raw address in bytes\\n /// @return encoded address as cbor bytes\\n function serializeAddress(bytes memory addr) internal pure returns (bytes memory) {\\n return serializeBytes(addr);\\n }\\n\\n /// @notice encoded null value as cbor\\n /// @return cbor encoded null\\n function serializeNull() internal pure returns (bytes memory) {\\n CBOR.CBORBuffer memory buf = CBOR.create(1);\\n\\n buf.writeNull();\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize cbor encoded filecoin address to bytes\\n /// @param ret cbor encoded filecoin address\\n /// @return raw bytes representing a filecoin address\\n function deserializeAddress(bytes memory ret) internal pure returns (bytes memory) {\\n bytes memory addr;\\n uint byteIdx = 0;\\n\\n (addr, byteIdx) = ret.readBytes(byteIdx);\\n\\n return addr;\\n }\\n\\n /// @notice deserialize cbor encoded string\\n /// @param ret cbor encoded string (in bytes)\\n /// @return decoded string\\n function deserializeString(bytes memory ret) internal pure returns (string memory) {\\n string memory response;\\n uint byteIdx = 0;\\n\\n (response, byteIdx) = ret.readString(byteIdx);\\n\\n return response;\\n }\\n\\n /// @notice deserialize cbor encoded bool\\n /// @param ret cbor encoded bool (in bytes)\\n /// @return decoded bool\\n function deserializeBool(bytes memory ret) internal pure returns (bool) {\\n bool response;\\n uint byteIdx = 0;\\n\\n (response, byteIdx) = ret.readBool(byteIdx);\\n\\n return response;\\n }\\n\\n /// @notice deserialize cbor encoded BigInt\\n /// @param ret cbor encoded BigInt (in bytes)\\n /// @return decoded BigInt\\n /// @dev BigInts are cbor encoded as bytes string first. That is why it unwraps the cbor encoded bytes first, and then parse the result into BigInt\\n function deserializeBytesBigInt(bytes memory ret) internal pure returns (CommonTypes.BigInt memory) {\\n bytes memory tmp;\\n uint byteIdx = 0;\\n\\n if (ret.length > 0) {\\n (tmp, byteIdx) = ret.readBytes(byteIdx);\\n if (tmp.length > 0) {\\n return tmp.deserializeBigInt();\\n }\\n }\\n\\n return CommonTypes.BigInt(new bytes(0), false);\\n }\\n\\n /// @notice deserialize cbor encoded uint64\\n /// @param rawResp cbor encoded uint64 (in bytes)\\n /// @return decoded uint64\\n function deserializeUint64(bytes memory rawResp) internal pure returns (uint64) {\\n uint byteIdx = 0;\\n uint64 value;\\n\\n (value, byteIdx) = rawResp.readUInt64(byteIdx);\\n return value;\\n }\\n\\n /// @notice deserialize cbor encoded int64\\n /// @param rawResp cbor encoded int64 (in bytes)\\n /// @return decoded int64\\n function deserializeInt64(bytes memory rawResp) internal pure returns (int64) {\\n uint byteIdx = 0;\\n int64 value;\\n\\n (value, byteIdx) = rawResp.readInt64(byteIdx);\\n return value;\\n }\\n}\\n\",\"keccak256\":\"0x092be34452eead511a33e8d5c0a0878bf53ac5747ada8788099a81bdf888eccf\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/cbor/FilecoinCbor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"solidity-cborutils/contracts/CBOR.sol\\\";\\nimport \\\"@ensdomains/buffer/contracts/Buffer.sol\\\";\\n\\nimport \\\"../utils/CborDecode.sol\\\";\\nimport \\\"../utils/Misc.sol\\\";\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\nimport \\\"../cbor/BigIntCbor.sol\\\";\\n\\n/// @title This library is a set of functions meant to handle CBOR serialization and deserialization for general data types on the filecoin network.\\n/// @author Zondax AG\\nlibrary FilecoinCBOR {\\n using Buffer for Buffer.buffer;\\n using CBOR for CBOR.CBORBuffer;\\n using CBORDecoder for *;\\n using BigIntCBOR for *;\\n\\n uint8 private constant MAJOR_TYPE_TAG = 6;\\n uint8 private constant TAG_TYPE_CID_CODE = 42;\\n uint8 private constant PAYLOAD_LEN_8_BITS = 24;\\n\\n /// @notice Write a CID into a CBOR buffer.\\n /// @dev The CBOR major will be 6 (type 'tag') and the tag type value is 42, as per CBOR tag assignments.\\n /// @dev https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml\\n /// @param buf buffer containing the actual CBOR serialization process\\n /// @param value CID value to serialize as CBOR\\n function writeCid(CBOR.CBORBuffer memory buf, bytes memory value) internal pure {\\n buf.buf.appendUint8(uint8(((MAJOR_TYPE_TAG << 5) | PAYLOAD_LEN_8_BITS)));\\n buf.buf.appendUint8(TAG_TYPE_CID_CODE);\\n // See https://ipld.io/specs/codecs/dag-cbor/spec/#links for explanation on 0x00 prefix.\\n buf.writeBytes(bytes.concat(hex'00', value));\\n }\\n\\n function readCid(bytes memory cborData, uint byteIdx) internal pure returns (CommonTypes.Cid memory, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = cborData.parseCborHeader(byteIdx);\\n require(maj == MAJOR_TYPE_TAG, \\\"expected major type tag when parsing cid\\\");\\n require(value == TAG_TYPE_CID_CODE, \\\"expected tag 42 when parsing cid\\\");\\n\\n bytes memory raw;\\n (raw, byteIdx) = cborData.readBytes(byteIdx);\\n require(raw[0] == 0x00, \\\"expected first byte to be 0 when parsing cid\\\");\\n\\n // Pop off the first byte, which corresponds to the historical multibase 0x00 byte.\\n // https://ipld.io/specs/codecs/dag-cbor/spec/#links\\n CommonTypes.Cid memory ret;\\n ret.data = new bytes(raw.length - 1);\\n for (uint256 i = 1; i < raw.length; i++) {\\n ret.data[i-1] = raw[i];\\n }\\n\\n return (ret, byteIdx);\\n }\\n\\n /// @notice serialize filecoin address to cbor encoded\\n /// @param addr filecoin address to serialize\\n /// @return cbor serialized data as bytes\\n function serializeAddress(CommonTypes.FilAddress memory addr) internal pure returns (bytes memory) {\\n uint256 capacity = Misc.getBytesSize(addr.data);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.writeBytes(addr.data);\\n\\n return buf.data();\\n }\\n\\n /// @notice serialize a BigInt value wrapped in a cbor fixed array.\\n /// @param value BigInt to serialize as cbor inside an\\n /// @return cbor serialized data as bytes\\n function serializeArrayBigInt(CommonTypes.BigInt memory value) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n bytes memory valueBigInt = value.serializeBigInt();\\n\\n capacity += Misc.getPrefixSize(1);\\n capacity += Misc.getBytesSize(valueBigInt);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(1);\\n buf.writeBytes(value.serializeBigInt());\\n\\n return buf.data();\\n }\\n\\n /// @notice serialize a FilAddress value wrapped in a cbor fixed array.\\n /// @param addr FilAddress to serialize as cbor inside an\\n /// @return cbor serialized data as bytes\\n function serializeArrayFilAddress(CommonTypes.FilAddress memory addr) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n\\n capacity += Misc.getPrefixSize(1);\\n capacity += Misc.getBytesSize(addr.data);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(1);\\n buf.writeBytes(addr.data);\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize a FilAddress wrapped on a cbor fixed array coming from a actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of FilAddress created based on parsed data\\n function deserializeArrayFilAddress(bytes memory rawResp) internal pure returns (CommonTypes.FilAddress memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n require(len == 1, \\\"Wrong numbers of parameters (should find 1)\\\");\\n\\n (ret.data, byteIdx) = rawResp.readBytes(byteIdx);\\n\\n return ret;\\n }\\n\\n /// @notice deserialize a BigInt wrapped on a cbor fixed array coming from a actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of BigInt created based on parsed data\\n function deserializeArrayBigInt(bytes memory rawResp) internal pure returns (CommonTypes.BigInt memory) {\\n uint byteIdx = 0;\\n uint len;\\n bytes memory tmp;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 1);\\n\\n (tmp, byteIdx) = rawResp.readBytes(byteIdx);\\n return tmp.deserializeBigInt();\\n }\\n\\n /// @notice serialize UniversalReceiverParams struct to cbor in order to pass as arguments to an actor\\n /// @param params UniversalReceiverParams to serialize as cbor\\n /// @return cbor serialized data as bytes\\n function serializeUniversalReceiverParams(CommonTypes.UniversalReceiverParams memory params) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n\\n capacity += Misc.getPrefixSize(2);\\n capacity += Misc.getPrefixSize(params.type_);\\n capacity += Misc.getBytesSize(params.payload);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(2);\\n buf.writeUInt64(params.type_);\\n buf.writeBytes(params.payload);\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize UniversalReceiverParams cbor to struct when receiving a message\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of UniversalReceiverParams created based on parsed data\\n function deserializeUniversalReceiverParams(bytes memory rawResp) internal pure returns (CommonTypes.UniversalReceiverParams memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n require(len == 2, \\\"Wrong numbers of parameters (should find 2)\\\");\\n\\n (ret.type_, byteIdx) = rawResp.readUInt32(byteIdx);\\n (ret.payload, byteIdx) = rawResp.readBytes(byteIdx);\\n }\\n\\n /// @notice attempt to read a FilActorId value\\n /// @param rawResp cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return a FilActorId decoded from input bytes and the byte index after moving past the value\\n function readFilActorId(bytes memory rawResp, uint byteIdx) internal pure returns (CommonTypes.FilActorId, uint) {\\n uint64 tmp = 0;\\n\\n (tmp, byteIdx) = rawResp.readUInt64(byteIdx);\\n return (CommonTypes.FilActorId.wrap(tmp), byteIdx);\\n }\\n\\n /// @notice write FilActorId into a cbor buffer\\n /// @dev FilActorId is just wrapping a uint64\\n /// @param buf buffer containing the actual cbor serialization process\\n /// @param id FilActorId to serialize as cbor\\n function writeFilActorId(CBOR.CBORBuffer memory buf, CommonTypes.FilActorId id) internal pure {\\n buf.writeUInt64(CommonTypes.FilActorId.unwrap(id));\\n }\\n\\n /// @notice attempt to read a ChainEpoch value\\n /// @param rawResp cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return a ChainEpoch decoded from input bytes and the byte index after moving past the value\\n function readChainEpoch(bytes memory rawResp, uint byteIdx) internal pure returns (CommonTypes.ChainEpoch, uint) {\\n int64 tmp = 0;\\n\\n (tmp, byteIdx) = rawResp.readInt64(byteIdx);\\n return (CommonTypes.ChainEpoch.wrap(tmp), byteIdx);\\n }\\n\\n /// @notice write ChainEpoch into a cbor buffer\\n /// @dev ChainEpoch is just wrapping a int64\\n /// @param buf buffer containing the actual cbor serialization process\\n /// @param id ChainEpoch to serialize as cbor\\n function writeChainEpoch(CBOR.CBORBuffer memory buf, CommonTypes.ChainEpoch id) internal pure {\\n buf.writeInt64(CommonTypes.ChainEpoch.unwrap(id));\\n }\\n\\n /// @notice write DealLabel into a cbor buffer\\n /// @param buf buffer containing the actual cbor serialization process\\n /// @param label DealLabel to serialize as cbor\\n function writeDealLabel(CBOR.CBORBuffer memory buf, CommonTypes.DealLabel memory label) internal pure {\\n label.isString ? buf.writeString(string(label.data)) : buf.writeBytes(label.data);\\n }\\n\\n /// @notice deserialize DealLabel cbor to struct when receiving a message\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of DealLabel created based on parsed data\\n function deserializeDealLabel(bytes memory rawResp) internal pure returns (CommonTypes.DealLabel memory) {\\n uint byteIdx = 0;\\n CommonTypes.DealLabel memory label;\\n\\n (label, byteIdx) = readDealLabel(rawResp, byteIdx);\\n return label;\\n }\\n\\n /// @notice attempt to read a DealLabel value\\n /// @param rawResp cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return a DealLabel decoded from input bytes and the byte index after moving past the value\\n function readDealLabel(bytes memory rawResp, uint byteIdx) internal pure returns (CommonTypes.DealLabel memory, uint) {\\n uint8 maj;\\n uint len;\\n\\n (maj, len, byteIdx) = CBORDecoder.parseCborHeader(rawResp, byteIdx);\\n require(maj == MajByteString || maj == MajTextString, \\\"invalid maj (expected MajByteString or MajTextString)\\\");\\n\\n uint max_len = byteIdx + len;\\n bytes memory slice = new bytes(len);\\n uint slice_index = 0;\\n for (uint256 i = byteIdx; i < max_len; i++) {\\n slice[slice_index] = rawResp[i];\\n slice_index++;\\n }\\n\\n return (CommonTypes.DealLabel(slice, maj == MajTextString), byteIdx + len);\\n }\\n}\\n\",\"keccak256\":\"0x9c73c2969df5325f1f86c401b05b8983e633e8bd21c1c72b2b9039a731174098\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/cbor/MarketCbor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"solidity-cborutils/contracts/CBOR.sol\\\";\\n\\nimport \\\"../types/MarketTypes.sol\\\";\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\nimport \\\"../utils/Misc.sol\\\";\\nimport \\\"../utils/FilAddresses.sol\\\";\\nimport \\\"../utils/CborDecode.sol\\\";\\n\\nimport \\\"./FilecoinCbor.sol\\\";\\nimport \\\"./BigIntCbor.sol\\\";\\nimport \\\"./FilecoinCbor.sol\\\";\\n\\n/// @title This library is a set of functions meant to handle CBOR parameters serialization and return values deserialization for Market actor exported methods.\\n/// @author Zondax AG\\nlibrary MarketCBOR {\\n using CBOR for CBOR.CBORBuffer;\\n using CBORDecoder for bytes;\\n using BigIntCBOR for *;\\n using FilecoinCBOR for *;\\n\\n /// @notice serialize WithdrawBalanceParams struct to cbor in order to pass as arguments to the market actor\\n /// @param params WithdrawBalanceParams to serialize as cbor\\n /// @return response cbor serialized data as bytes\\n function serializeWithdrawBalanceParams(MarketTypes.WithdrawBalanceParams memory params) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n bytes memory tokenAmount = params.tokenAmount.serializeBigInt();\\n\\n capacity += Misc.getPrefixSize(2);\\n capacity += Misc.getBytesSize(params.provider_or_client.data);\\n capacity += Misc.getBytesSize(tokenAmount);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(2);\\n buf.writeBytes(params.provider_or_client.data);\\n buf.writeBytes(tokenAmount);\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize GetBalanceReturn struct from cbor encoded bytes coming from a market actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of GetBalanceReturn created based on parsed data\\n function deserializeGetBalanceReturn(bytes memory rawResp) internal pure returns (MarketTypes.GetBalanceReturn memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n bytes memory tmp;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (tmp, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.balance = tmp.deserializeBigInt();\\n\\n (tmp, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.locked = tmp.deserializeBigInt();\\n\\n return ret;\\n }\\n\\n /// @notice deserialize GetDealDataCommitmentReturn struct from cbor encoded bytes coming from a market actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of GetDealDataCommitmentReturn created based on parsed data\\n function deserializeGetDealDataCommitmentReturn(bytes memory rawResp) internal pure returns (MarketTypes.GetDealDataCommitmentReturn memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n\\n if (len > 0) {\\n (ret.data, byteIdx) = rawResp.readBytes(byteIdx);\\n (ret.size, byteIdx) = rawResp.readUInt64(byteIdx);\\n } else {\\n ret.data = new bytes(0);\\n ret.size = 0;\\n }\\n\\n return ret;\\n }\\n\\n /// @notice deserialize GetDealTermReturn struct from cbor encoded bytes coming from a market actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of GetDealTermReturn created based on parsed data\\n function deserializeGetDealTermReturn(bytes memory rawResp) internal pure returns (MarketTypes.GetDealTermReturn memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (ret.start, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n (ret.end, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n\\n return ret;\\n }\\n\\n /// @notice deserialize GetDealActivationReturn struct from cbor encoded bytes coming from a market actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of GetDealActivationReturn created based on parsed data\\n function deserializeGetDealActivationReturn(bytes memory rawResp) internal pure returns (MarketTypes.GetDealActivationReturn memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (ret.activated, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n (ret.terminated, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n\\n return ret;\\n }\\n\\n /// @notice serialize PublishStorageDealsParams struct to cbor in order to pass as arguments to the market actor\\n /// @param params PublishStorageDealsParams to serialize as cbor\\n /// @return cbor serialized data as bytes\\n function serializePublishStorageDealsParams(MarketTypes.PublishStorageDealsParams memory params) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n\\n capacity += Misc.getPrefixSize(1);\\n capacity += Misc.getPrefixSize(params.deals.length);\\n\\n for (uint64 i = 0; i < params.deals.length; i++) {\\n capacity += Misc.getPrefixSize(2);\\n capacity += Misc.getPrefixSize(11);\\n\\n capacity += Misc.getCidSize(params.deals[i].proposal.piece_cid.data);\\n capacity += Misc.getPrefixSize(params.deals[i].proposal.piece_size);\\n capacity += Misc.getBoolSize();\\n capacity += Misc.getBytesSize(params.deals[i].proposal.client.data);\\n capacity += Misc.getBytesSize(params.deals[i].proposal.provider.data);\\n capacity += Misc.getBytesSize(params.deals[i].proposal.label.data);\\n capacity += Misc.getChainEpochSize(params.deals[i].proposal.start_epoch);\\n capacity += Misc.getChainEpochSize(params.deals[i].proposal.end_epoch);\\n capacity += Misc.getBytesSize(params.deals[i].proposal.storage_price_per_epoch.serializeBigInt());\\n capacity += Misc.getBytesSize(params.deals[i].proposal.provider_collateral.serializeBigInt());\\n capacity += Misc.getBytesSize(params.deals[i].proposal.client_collateral.serializeBigInt());\\n\\n capacity += Misc.getBytesSize(params.deals[i].client_signature);\\n }\\n\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(1);\\n buf.startFixedArray(uint64(params.deals.length));\\n\\n for (uint64 i = 0; i < params.deals.length; i++) {\\n buf.startFixedArray(2);\\n\\n buf.startFixedArray(11);\\n\\n buf.writeCid(params.deals[i].proposal.piece_cid.data);\\n buf.writeUInt64(params.deals[i].proposal.piece_size);\\n buf.writeBool(params.deals[i].proposal.verified_deal);\\n buf.writeBytes(params.deals[i].proposal.client.data);\\n buf.writeBytes(params.deals[i].proposal.provider.data);\\n buf.writeDealLabel(params.deals[i].proposal.label);\\n buf.writeChainEpoch(params.deals[i].proposal.start_epoch);\\n buf.writeChainEpoch(params.deals[i].proposal.end_epoch);\\n buf.writeBytes(params.deals[i].proposal.storage_price_per_epoch.serializeBigInt());\\n buf.writeBytes(params.deals[i].proposal.provider_collateral.serializeBigInt());\\n buf.writeBytes(params.deals[i].proposal.client_collateral.serializeBigInt());\\n\\n buf.writeBytes(params.deals[i].client_signature);\\n }\\n\\n return buf.data();\\n }\\n\\n /// @notice deserialize PublishStorageDealsReturn struct from cbor encoded bytes coming from a market actor call\\n /// @param rawResp cbor encoded response\\n /// @return ret new instance of PublishStorageDealsReturn created based on parsed data\\n function deserializePublishStorageDealsReturn(bytes memory rawResp) internal pure returns (MarketTypes.PublishStorageDealsReturn memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n ret.ids = new uint64[](len);\\n\\n for (uint i = 0; i < len; i++) {\\n (ret.ids[i], byteIdx) = rawResp.readUInt64(byteIdx);\\n }\\n\\n (ret.valid_deals, byteIdx) = rawResp.readBytes(byteIdx);\\n\\n return ret;\\n }\\n\\n /// @notice serialize deal id (uint64) to cbor in order to pass as arguments to the market actor\\n /// @param id deal id to serialize as cbor\\n /// @return cbor serialized data as bytes\\n function serializeDealID(uint64 id) internal pure returns (bytes memory) {\\n uint256 capacity = Misc.getPrefixSize(uint256(id));\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.writeUInt64(id);\\n\\n return buf.data();\\n }\\n\\n function deserializeMarketDealNotifyParams(bytes memory rawResp) internal pure returns (MarketTypes.MarketDealNotifyParams memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 2);\\n\\n (ret.dealProposal, byteIdx) = rawResp.readBytes(byteIdx);\\n (ret.dealId, byteIdx) = rawResp.readUInt64(byteIdx);\\n }\\n\\n function serializeDealProposal(MarketTypes.DealProposal memory dealProposal) internal pure returns (bytes memory) {\\n uint256 capacity = 0;\\n bytes memory storage_price_per_epoch = dealProposal.storage_price_per_epoch.serializeBigInt();\\n bytes memory provider_collateral = dealProposal.provider_collateral.serializeBigInt();\\n bytes memory client_collateral = dealProposal.client_collateral.serializeBigInt();\\n\\n capacity += Misc.getPrefixSize(11);\\n capacity += Misc.getCidSize(dealProposal.piece_cid.data);\\n capacity += Misc.getPrefixSize(dealProposal.piece_size);\\n capacity += Misc.getBoolSize();\\n capacity += Misc.getBytesSize(dealProposal.client.data);\\n capacity += Misc.getBytesSize(dealProposal.provider.data);\\n capacity += Misc.getBytesSize(dealProposal.label.data);\\n capacity += Misc.getChainEpochSize(dealProposal.start_epoch);\\n capacity += Misc.getChainEpochSize(dealProposal.end_epoch);\\n capacity += Misc.getBytesSize(storage_price_per_epoch);\\n capacity += Misc.getBytesSize(provider_collateral);\\n capacity += Misc.getBytesSize(client_collateral);\\n CBOR.CBORBuffer memory buf = CBOR.create(capacity);\\n\\n buf.startFixedArray(11);\\n\\n buf.writeCid(dealProposal.piece_cid.data);\\n buf.writeUInt64(dealProposal.piece_size);\\n buf.writeBool(dealProposal.verified_deal);\\n buf.writeBytes(dealProposal.client.data);\\n buf.writeBytes(dealProposal.provider.data);\\n buf.writeDealLabel(dealProposal.label);\\n buf.writeChainEpoch(dealProposal.start_epoch);\\n buf.writeChainEpoch(dealProposal.end_epoch);\\n buf.writeBytes(storage_price_per_epoch);\\n buf.writeBytes(provider_collateral);\\n buf.writeBytes(client_collateral);\\n\\n return buf.data();\\n }\\n\\n function deserializeDealProposal(bytes memory rawResp) internal pure returns (MarketTypes.DealProposal memory ret) {\\n uint byteIdx = 0;\\n uint len;\\n bytes memory tmp;\\n\\n (len, byteIdx) = rawResp.readFixedArray(byteIdx);\\n assert(len == 11);\\n\\n (ret.piece_cid, byteIdx) = rawResp.readCid(byteIdx);\\n (ret.piece_size, byteIdx) = rawResp.readUInt64(byteIdx);\\n (ret.verified_deal, byteIdx) = rawResp.readBool(byteIdx);\\n (tmp, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.client = FilAddresses.fromBytes(tmp);\\n\\n (tmp, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.provider = FilAddresses.fromBytes(tmp);\\n\\n (ret.label, byteIdx) = rawResp.readDealLabel(byteIdx);\\n\\n (ret.start_epoch, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n (ret.end_epoch, byteIdx) = rawResp.readChainEpoch(byteIdx);\\n\\n bytes memory storage_price_per_epoch_bytes;\\n (storage_price_per_epoch_bytes, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.storage_price_per_epoch = storage_price_per_epoch_bytes.deserializeBigInt();\\n\\n bytes memory provider_collateral_bytes;\\n (provider_collateral_bytes, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.provider_collateral = provider_collateral_bytes.deserializeBigInt();\\n\\n bytes memory client_collateral_bytes;\\n (client_collateral_bytes, byteIdx) = rawResp.readBytes(byteIdx);\\n ret.client_collateral = client_collateral_bytes.deserializeBigInt();\\n }\\n}\\n\",\"keccak256\":\"0x181e7688efec53b7b300ac9423ff0211dab43e1092340f4905f6528fbd30023a\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/types/AccountTypes.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"./CommonTypes.sol\\\";\\n\\n/// @title Filecoin account actor types for Solidity.\\n/// @author Zondax AG\\nlibrary AccountTypes {\\n uint constant AuthenticateMessageMethodNum = 2643134072;\\n\\n /// @param it should be a raw byte of signature, NOT a serialized signature object with a signatureType.\\n /// @param message The message which is signed by the corresponding account address.\\n struct AuthenticateMessageParams {\\n bytes signature;\\n bytes message;\\n }\\n}\\n\",\"keccak256\":\"0x87555cec6962a4b6bd761a2390a24d66e01119d5b761048a27d1df0673a71263\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\n\\n/// @title Filecoin actors' common types for Solidity.\\n/// @author Zondax AG\\nlibrary CommonTypes {\\n uint constant UniversalReceiverHookMethodNum = 3726118371;\\n\\n /// @param idx index for the failure in batch\\n /// @param code failure code\\n struct FailCode {\\n uint32 idx;\\n uint32 code;\\n }\\n\\n /// @param success_count total successes in batch\\n /// @param fail_codes list of failures code and index for each failure in batch\\n struct BatchReturn {\\n uint32 success_count;\\n FailCode[] fail_codes;\\n }\\n\\n /// @param type_ asset type\\n /// @param payload payload corresponding to asset type\\n struct UniversalReceiverParams {\\n uint32 type_;\\n bytes payload;\\n }\\n\\n /// @param val contains the actual arbitrary number written as binary\\n /// @param neg indicates if val is negative or not\\n struct BigInt {\\n bytes val;\\n bool neg;\\n }\\n\\n /// @param data filecoin address in bytes format\\n struct FilAddress {\\n bytes data;\\n }\\n\\n /// @param data cid in bytes format\\n struct Cid {\\n bytes data;\\n }\\n\\n /// @param data deal proposal label in bytes format (it can be utf8 string or arbitrary bytes string).\\n /// @param isString indicates if the data is string or raw bytes\\n struct DealLabel {\\n bytes data;\\n bool isString;\\n }\\n\\n type FilActorId is uint64;\\n\\n type ChainEpoch is int64;\\n}\\n\",\"keccak256\":\"0x1819b8e82cf53f0fadc446d064a380979888b97a0004f1e70c9fa1a6f4f13ed9\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n//\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"../cbor/BigIntCbor.sol\\\";\\nimport \\\"./CommonTypes.sol\\\";\\n\\n/// @title Filecoin market actor types for Solidity.\\n/// @author Zondax AG\\nlibrary MarketTypes {\\n CommonTypes.FilActorId constant ActorID = CommonTypes.FilActorId.wrap(5);\\n uint constant AddBalanceMethodNum = 822473126;\\n uint constant WithdrawBalanceMethodNum = 2280458852;\\n uint constant GetBalanceMethodNum = 726108461;\\n uint constant GetDealDataCommitmentMethodNum = 1157985802;\\n uint constant GetDealClientMethodNum = 128053329;\\n uint constant GetDealProviderMethodNum = 935081690;\\n uint constant GetDealLabelMethodNum = 46363526;\\n uint constant GetDealTermMethodNum = 163777312;\\n uint constant GetDealTotalPriceMethodNum = 4287162428;\\n uint constant GetDealClientCollateralMethodNum = 200567895;\\n uint constant GetDealProviderCollateralMethodNum = 2986712137;\\n uint constant GetDealVerifiedMethodNum = 2627389465;\\n uint constant GetDealActivationMethodNum = 2567238399;\\n uint constant PublishStorageDealsMethodNum = 2236929350;\\n\\n /// @param provider_or_client the address of provider or client.\\n /// @param tokenAmount the token amount to withdraw.\\n struct WithdrawBalanceParams {\\n CommonTypes.FilAddress provider_or_client;\\n CommonTypes.BigInt tokenAmount;\\n }\\n\\n /// @param balance the escrow balance for this address.\\n /// @param locked the escrow locked amount for this address.\\n struct GetBalanceReturn {\\n CommonTypes.BigInt balance;\\n CommonTypes.BigInt locked;\\n }\\n\\n /// @param data the data commitment of this deal.\\n /// @param size the size of this deal.\\n struct GetDealDataCommitmentReturn {\\n bytes data;\\n uint64 size;\\n }\\n\\n /// @param start the chain epoch to start the deal.\\n /// @param endthe chain epoch to end the deal.\\n struct GetDealTermReturn {\\n CommonTypes.ChainEpoch start;\\n CommonTypes.ChainEpoch end;\\n }\\n\\n /// @param activated Epoch at which the deal was activated, or -1.\\n /// @param terminated Epoch at which the deal was terminated abnormally, or -1.\\n struct GetDealActivationReturn {\\n CommonTypes.ChainEpoch activated;\\n CommonTypes.ChainEpoch terminated;\\n }\\n\\n /// @param deals list of deal proposals signed by a client\\n struct PublishStorageDealsParams {\\n ClientDealProposal[] deals;\\n }\\n\\n /// @param ids returned storage deal IDs.\\n /// @param valid_deals represent all the valid deals.\\n struct PublishStorageDealsReturn {\\n uint64[] ids;\\n bytes valid_deals;\\n }\\n\\n /// @param piece_cid PieceCID.\\n /// @param piece_size the size of the piece.\\n /// @param verified_deal if the deal is verified or not.\\n /// @param client the address of the storage client.\\n /// @param provider the address of the storage provider.\\n /// @param label any label that client choose for the deal.\\n /// @param start_epoch the chain epoch to start the deal.\\n /// @param end_epoch the chain epoch to end the deal.\\n /// @param storage_price_per_epoch the token amount to pay to provider per epoch.\\n /// @param provider_collateral the token amount as collateral paid by the provider.\\n /// @param client_collateral the token amount as collateral paid by the client.\\n struct DealProposal {\\n CommonTypes.Cid piece_cid;\\n uint64 piece_size;\\n bool verified_deal;\\n CommonTypes.FilAddress client;\\n CommonTypes.FilAddress provider;\\n CommonTypes.DealLabel label;\\n CommonTypes.ChainEpoch start_epoch;\\n CommonTypes.ChainEpoch end_epoch;\\n CommonTypes.BigInt storage_price_per_epoch;\\n CommonTypes.BigInt provider_collateral;\\n CommonTypes.BigInt client_collateral;\\n }\\n\\n /// @param proposal Proposal\\n /// @param client_signature the signature signed by the client.\\n struct ClientDealProposal {\\n DealProposal proposal;\\n bytes client_signature;\\n }\\n\\n struct MarketDealNotifyParams {\\n bytes dealProposal;\\n uint64 dealId;\\n }\\n}\\n\",\"keccak256\":\"0xcbffb585561b6057c72c1e1cfea6090d918341cc347e785a988ee9c3c70533be\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/Actor.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"./Misc.sol\\\";\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\n/// @title Call actors utilities library, meant to interact with Filecoin builtin actors\\n/// @author Zondax AG\\nlibrary Actor {\\n /// @notice precompile address for the call_actor precompile\\n address constant CALL_ACTOR_ADDRESS = 0xfe00000000000000000000000000000000000003;\\n\\n /// @notice precompile address for the call_actor_id precompile\\n address constant CALL_ACTOR_ID = 0xfe00000000000000000000000000000000000005;\\n\\n /// @notice flag used to indicate that the call_actor or call_actor_id should perform a static_call to the desired actor\\n uint64 constant READ_ONLY_FLAG = 0x00000001;\\n\\n /// @notice flag used to indicate that the call_actor or call_actor_id should perform a call to the desired actor\\n uint64 constant DEFAULT_FLAG = 0x00000000;\\n\\n /// @notice the provided address is not valid\\n error InvalidAddress(bytes addr);\\n\\n /// @notice the smart contract has no enough balance to transfer\\n error NotEnoughBalance(uint256 balance, uint256 value);\\n\\n /// @notice the provided actor id is not valid\\n error InvalidActorID(CommonTypes.FilActorId actorId);\\n\\n /// @notice an error happened trying to call the actor\\n error FailToCallActor();\\n\\n /// @notice the response received is not correct. In some case no response is expected and we received one, or a response was indeed expected and we received none.\\n error InvalidResponseLength();\\n\\n /// @notice the codec received is not valid\\n error InvalidCodec(uint64);\\n\\n /// @notice the called actor returned an error as part of its expected behaviour\\n error ActorError(int256 errorCode);\\n\\n /// @notice the actor is not found\\n error ActorNotFound();\\n\\n /// @notice allows to interact with an specific actor by its address (bytes format)\\n /// @param actor_address actor address (bytes format) to interact with\\n /// @param method_num id of the method from the actor to call\\n /// @param codec how the request data passed as argument is encoded\\n /// @param raw_request encoded arguments to be passed in the call\\n /// @param value tokens to be transferred to the called actor\\n /// @param static_call indicates if the call will be allowed to change the actor state or not (just read the state)\\n /// @return payload (in bytes) with the actual response data (without codec or response code)\\n function callByAddress(\\n bytes memory actor_address,\\n uint256 method_num,\\n uint64 codec,\\n bytes memory raw_request,\\n uint256 value,\\n bool static_call\\n ) internal returns (bytes memory) {\\n if (actor_address.length < 2) {\\n revert InvalidAddress(actor_address);\\n }\\n\\n validatePrecompileCall(CALL_ACTOR_ADDRESS, value);\\n\\n // We have to delegate-call the call-actor precompile because the call-actor precompile will\\n // call the target actor on our behalf. This will _not_ delegate to the target `actor_address`.\\n //\\n // Specifically:\\n //\\n // - `static_call == false`: `CALLER (you) --(DELEGATECALL)-> CALL_ACTOR_PRECOMPILE --(CALL)-> actor_address\\n // - `static_call == true`: `CALLER (you) --(DELEGATECALL)-> CALL_ACTOR_PRECOMPILE --(STATICCALL)-> actor_address\\n (bool success, bytes memory data) = address(CALL_ACTOR_ADDRESS).delegatecall(\\n abi.encode(uint64(method_num), value, static_call ? READ_ONLY_FLAG : DEFAULT_FLAG, codec, raw_request, actor_address)\\n );\\n if (!success) {\\n revert FailToCallActor();\\n }\\n\\n return readRespData(data);\\n }\\n\\n /// @notice allows to interact with an specific actor by its id (uint64)\\n /// @param target actor id (uint64) to interact with\\n /// @param method_num id of the method from the actor to call\\n /// @param codec how the request data passed as argument is encoded\\n /// @param raw_request encoded arguments to be passed in the call\\n /// @param value tokens to be transferred to the called actor\\n /// @param static_call indicates if the call will be allowed to change the actor state or not (just read the state)\\n /// @return payload (in bytes) with the actual response data (without codec or response code)\\n function callByID(\\n CommonTypes.FilActorId target,\\n uint256 method_num,\\n uint64 codec,\\n bytes memory raw_request,\\n uint256 value,\\n bool static_call\\n ) internal returns (bytes memory) {\\n validatePrecompileCall(CALL_ACTOR_ID, value);\\n\\n (bool success, bytes memory data) = address(CALL_ACTOR_ID).delegatecall(\\n abi.encode(uint64(method_num), value, static_call ? READ_ONLY_FLAG : DEFAULT_FLAG, codec, raw_request, target)\\n );\\n if (!success) {\\n revert FailToCallActor();\\n }\\n\\n return readRespData(data);\\n }\\n\\n /// @notice allows to run some generic validations before calling the precompile actor\\n /// @param addr precompile actor address to run check to\\n /// @param value tokens to be transferred to the called actor\\n function validatePrecompileCall(address addr, uint256 value) internal view {\\n uint balance = address(this).balance;\\n if (balance < value) {\\n revert NotEnoughBalance(balance, value);\\n }\\n\\n bool actorExists = Misc.addressExists(addr);\\n if (!actorExists) {\\n revert ActorNotFound();\\n }\\n }\\n\\n /// @notice allows to interact with an non-singleton actors by its id (uint64)\\n /// @param target actor id (uint64) to interact with\\n /// @param method_num id of the method from the actor to call\\n /// @param codec how the request data passed as argument is encoded\\n /// @param raw_request encoded arguments to be passed in the call\\n /// @param value tokens to be transfered to the called actor\\n /// @param static_call indicates if the call will be allowed to change the actor state or not (just read the state)\\n /// @dev it requires the id to be bigger than 99, as singleton actors are smaller than that\\n function callNonSingletonByID(\\n CommonTypes.FilActorId target,\\n uint256 method_num,\\n uint64 codec,\\n bytes memory raw_request,\\n uint256 value,\\n bool static_call\\n ) internal returns (bytes memory) {\\n if (CommonTypes.FilActorId.unwrap(target) < 100) {\\n revert InvalidActorID(target);\\n }\\n\\n return callByID(target, method_num, codec, raw_request, value, static_call);\\n }\\n\\n /// @notice parse the response an actor returned\\n /// @notice it will validate the return code (success) and the codec (valid one)\\n /// @param raw_response raw data (bytes) the actor returned\\n /// @return the actual raw data (payload, in bytes) to be parsed according to the actor and method called\\n function readRespData(bytes memory raw_response) internal pure returns (bytes memory) {\\n (int256 exit, uint64 return_codec, bytes memory return_value) = abi.decode(raw_response, (int256, uint64, bytes));\\n\\n if (return_codec == Misc.NONE_CODEC) {\\n if (return_value.length != 0) {\\n revert InvalidResponseLength();\\n }\\n } else if (return_codec == Misc.CBOR_CODEC || return_codec == Misc.DAG_CBOR_CODEC) {\\n if (return_value.length == 0) {\\n revert InvalidResponseLength();\\n }\\n } else {\\n revert InvalidCodec(return_codec);\\n }\\n\\n if (exit != 0) {\\n revert ActorError(exit);\\n }\\n\\n return return_value;\\n }\\n}\\n\",\"keccak256\":\"0xa4b9eb4d84491477a3c11336a431c4f3a0796977efb92779bd062f273824c67a\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/BigInts.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"@zondax/solidity-bignumber/src/BigNumbers.sol\\\";\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\nimport \\\"../utils/Misc.sol\\\";\\n\\n/// @notice This library is a set a functions that allows to handle filecoin addresses conversions and validations\\n/// @author Zondax AG\\nlibrary BigInts {\\n uint256 constant MAX_UINT = (2 ** 256) - 1;\\n uint256 constant MAX_INT = ((2 ** 256) / 2) - 1;\\n\\n error NegativeValueNotAllowed();\\n\\n /// @notice allow to get a BigInt from a uint256 value\\n /// @param value uint256 number\\n /// @return new BigInt\\n function fromUint256(uint256 value) internal view returns (CommonTypes.BigInt memory) {\\n BigNumber memory bigNum = BigNumbers.init(value, false);\\n return CommonTypes.BigInt(bigNum.val, bigNum.neg);\\n }\\n\\n /// @notice allow to get a BigInt from a int256 value\\n /// @param value int256 number\\n /// @return new BigInt\\n function fromInt256(int256 value) internal view returns (CommonTypes.BigInt memory) {\\n uint256 valueAbs = Misc.abs(value);\\n BigNumber memory bigNum = BigNumbers.init(valueAbs, value < 0);\\n return CommonTypes.BigInt(bigNum.val, bigNum.neg);\\n }\\n\\n /// @notice allow to get a uint256 from a BigInt value.\\n /// @notice If the value is negative, it will generate an error.\\n /// @param value BigInt number\\n /// @return a uint256 value and flog that indicates whether it was possible to convert or not (the value overflows uint256 type)\\n function toUint256(CommonTypes.BigInt memory value) internal view returns (uint256, bool) {\\n if (value.neg) {\\n revert NegativeValueNotAllowed();\\n }\\n\\n BigNumber memory max = BigNumbers.init(MAX_UINT, false);\\n BigNumber memory bigNumValue = BigNumbers.init(value.val, value.neg);\\n if (BigNumbers.gt(bigNumValue, max)) {\\n return (0, true);\\n }\\n\\n return (uint256(bytes32(bigNumValue.val)), false);\\n }\\n\\n /// @notice allow to get a int256 from a BigInt value.\\n /// @notice If the value is grater than what a int256 can store, it will generate an error.\\n /// @param value BigInt number\\n /// @return a int256 value and flog that indicates whether it was possible to convert or not (the value overflows int256 type)\\n function toInt256(CommonTypes.BigInt memory value) internal view returns (int256, bool) {\\n BigNumber memory max = BigNumbers.init(MAX_INT, false);\\n BigNumber memory bigNumValue = BigNumbers.init(value.val, false);\\n if (BigNumbers.gt(bigNumValue, max)) {\\n return (0, true);\\n }\\n\\n int256 parsedValue = int256(uint256(bytes32(bigNumValue.val)));\\n return (value.neg ? -1 * parsedValue : parsedValue, false);\\n }\\n}\\n\",\"keccak256\":\"0x1dff7b0421b352b8430b829065aa816e07cbb8efef76d930a6dba4cf16039a42\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/CborDecode.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\n// \\tMajUnsignedInt = 0\\n// \\tMajSignedInt = 1\\n// \\tMajByteString = 2\\n// \\tMajTextString = 3\\n// \\tMajArray = 4\\n// \\tMajMap = 5\\n// \\tMajTag = 6\\n// \\tMajOther = 7\\n\\nuint8 constant MajUnsignedInt = 0;\\nuint8 constant MajSignedInt = 1;\\nuint8 constant MajByteString = 2;\\nuint8 constant MajTextString = 3;\\nuint8 constant MajArray = 4;\\nuint8 constant MajMap = 5;\\nuint8 constant MajTag = 6;\\nuint8 constant MajOther = 7;\\n\\nuint8 constant TagTypeBigNum = 2;\\nuint8 constant TagTypeNegativeBigNum = 3;\\n\\nuint8 constant True_Type = 21;\\nuint8 constant False_Type = 20;\\n\\n/// @notice This library is a set a functions that allows anyone to decode cbor encoded bytes\\n/// @dev methods in this library try to read the data type indicated from cbor encoded data stored in bytes at a specific index\\n/// @dev if it successes, methods will return the read value and the new index (intial index plus read bytes)\\n/// @author Zondax AG\\nlibrary CBORDecoder {\\n /// @notice check if next value on the cbor encoded data is null\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n function isNullNext(bytes memory cborData, uint byteIdx) internal pure returns (bool) {\\n return cborData[byteIdx] == hex\\\"f6\\\";\\n }\\n\\n /// @notice attempt to read a bool value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return a bool decoded from input bytes and the byte index after moving past the value\\n function readBool(bytes memory cborData, uint byteIdx) internal pure returns (bool, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajOther, \\\"invalid maj (expected MajOther)\\\");\\n assert(value == True_Type || value == False_Type);\\n\\n return (value != False_Type, byteIdx);\\n }\\n\\n /// @notice attempt to read the length of a fixed array\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return length of the fixed array decoded from input bytes and the byte index after moving past the value\\n function readFixedArray(bytes memory cborData, uint byteIdx) internal pure returns (uint, uint) {\\n uint8 maj;\\n uint len;\\n\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajArray, \\\"invalid maj (expected MajArray)\\\");\\n\\n return (len, byteIdx);\\n }\\n\\n /// @notice attempt to read an arbitrary length string value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return arbitrary length string decoded from input bytes and the byte index after moving past the value\\n function readString(bytes memory cborData, uint byteIdx) internal pure returns (string memory, uint) {\\n uint8 maj;\\n uint len;\\n\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajTextString, \\\"invalid maj (expected MajTextString)\\\");\\n\\n uint max_len = byteIdx + len;\\n bytes memory slice = new bytes(len);\\n uint slice_index = 0;\\n for (uint256 i = byteIdx; i < max_len; i++) {\\n slice[slice_index] = cborData[i];\\n slice_index++;\\n }\\n\\n return (string(slice), byteIdx + len);\\n }\\n\\n /// @notice attempt to read an arbitrary byte string value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return arbitrary byte string decoded from input bytes and the byte index after moving past the value\\n function readBytes(bytes memory cborData, uint byteIdx) internal pure returns (bytes memory, uint) {\\n uint8 maj;\\n uint len;\\n\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajTag || maj == MajByteString, \\\"invalid maj (expected MajTag or MajByteString)\\\");\\n\\n if (maj == MajTag) {\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n assert(maj == MajByteString);\\n }\\n\\n uint max_len = byteIdx + len;\\n bytes memory slice = new bytes(len);\\n uint slice_index = 0;\\n for (uint256 i = byteIdx; i < max_len; i++) {\\n slice[slice_index] = cborData[i];\\n slice_index++;\\n }\\n\\n return (slice, byteIdx + len);\\n }\\n\\n /// @notice attempt to read a bytes32 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return a bytes32 decoded from input bytes and the byte index after moving past the value\\n function readBytes32(bytes memory cborData, uint byteIdx) internal pure returns (bytes32, uint) {\\n uint8 maj;\\n uint len;\\n\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajByteString, \\\"invalid maj (expected MajByteString)\\\");\\n\\n uint max_len = byteIdx + len;\\n bytes memory slice = new bytes(32);\\n uint slice_index = 32 - len;\\n for (uint256 i = byteIdx; i < max_len; i++) {\\n slice[slice_index] = cborData[i];\\n slice_index++;\\n }\\n\\n return (bytes32(slice), byteIdx + len);\\n }\\n\\n /// @notice attempt to read a uint256 value encoded per cbor specification\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an uint256 decoded from input bytes and the byte index after moving past the value\\n function readUInt256(bytes memory cborData, uint byteIdx) internal pure returns (uint256, uint) {\\n uint8 maj;\\n uint256 value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajTag || maj == MajUnsignedInt, \\\"invalid maj (expected MajTag or MajUnsignedInt)\\\");\\n\\n if (maj == MajTag) {\\n require(value == TagTypeBigNum, \\\"invalid tag (expected TagTypeBigNum)\\\");\\n\\n uint len;\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajByteString, \\\"invalid maj (expected MajByteString)\\\");\\n\\n require(cborData.length >= byteIdx + len, \\\"slicing out of range\\\");\\n assembly {\\n value := mload(add(cborData, add(len, byteIdx)))\\n }\\n\\n return (value, byteIdx + len);\\n }\\n\\n return (value, byteIdx);\\n }\\n\\n /// @notice attempt to read a int256 value encoded per cbor specification\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an int256 decoded from input bytes and the byte index after moving past the value\\n function readInt256(bytes memory cborData, uint byteIdx) internal pure returns (int256, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajTag || maj == MajSignedInt, \\\"invalid maj (expected MajTag or MajSignedInt)\\\");\\n\\n if (maj == MajTag) {\\n assert(value == TagTypeNegativeBigNum);\\n\\n uint len;\\n (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajByteString, \\\"invalid maj (expected MajByteString)\\\");\\n\\n require(cborData.length >= byteIdx + len, \\\"slicing out of range\\\");\\n assembly {\\n value := mload(add(cborData, add(len, byteIdx)))\\n }\\n\\n return (int256(value), byteIdx + len);\\n }\\n\\n return (int256(value), byteIdx);\\n }\\n\\n /// @notice attempt to read a uint64 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an uint64 decoded from input bytes and the byte index after moving past the value\\n function readUInt64(bytes memory cborData, uint byteIdx) internal pure returns (uint64, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajUnsignedInt, \\\"invalid maj (expected MajUnsignedInt)\\\");\\n\\n return (uint64(value), byteIdx);\\n }\\n\\n /// @notice attempt to read a uint32 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an uint32 decoded from input bytes and the byte index after moving past the value\\n function readUInt32(bytes memory cborData, uint byteIdx) internal pure returns (uint32, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajUnsignedInt, \\\"invalid maj (expected MajUnsignedInt)\\\");\\n\\n return (uint32(value), byteIdx);\\n }\\n\\n /// @notice attempt to read a uint16 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an uint16 decoded from input bytes and the byte index after moving past the value\\n function readUInt16(bytes memory cborData, uint byteIdx) internal pure returns (uint16, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajUnsignedInt, \\\"invalid maj (expected MajUnsignedInt)\\\");\\n\\n return (uint16(value), byteIdx);\\n }\\n\\n /// @notice attempt to read a uint8 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an uint8 decoded from input bytes and the byte index after moving past the value\\n function readUInt8(bytes memory cborData, uint byteIdx) internal pure returns (uint8, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajUnsignedInt, \\\"invalid maj (expected MajUnsignedInt)\\\");\\n\\n return (uint8(value), byteIdx);\\n }\\n\\n /// @notice attempt to read a int64 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an int64 decoded from input bytes and the byte index after moving past the value\\n function readInt64(bytes memory cborData, uint byteIdx) internal pure returns (int64, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajSignedInt || maj == MajUnsignedInt, \\\"invalid maj (expected MajSignedInt or MajUnsignedInt)\\\");\\n\\n return (int64(uint64(value)), byteIdx);\\n }\\n\\n /// @notice attempt to read a int32 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an int32 decoded from input bytes and the byte index after moving past the value\\n function readInt32(bytes memory cborData, uint byteIdx) internal pure returns (int32, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajSignedInt || maj == MajUnsignedInt, \\\"invalid maj (expected MajSignedInt or MajUnsignedInt)\\\");\\n\\n return (int32(uint32(value)), byteIdx);\\n }\\n\\n /// @notice attempt to read a int16 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an int16 decoded from input bytes and the byte index after moving past the value\\n function readInt16(bytes memory cborData, uint byteIdx) internal pure returns (int16, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajSignedInt || maj == MajUnsignedInt, \\\"invalid maj (expected MajSignedInt or MajUnsignedInt)\\\");\\n\\n return (int16(uint16(value)), byteIdx);\\n }\\n\\n /// @notice attempt to read a int8 value\\n /// @param cborData cbor encoded bytes to parse from\\n /// @param byteIdx current position to read on the cbor encoded bytes\\n /// @return an int8 decoded from input bytes and the byte index after moving past the value\\n function readInt8(bytes memory cborData, uint byteIdx) internal pure returns (int8, uint) {\\n uint8 maj;\\n uint value;\\n\\n (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx);\\n require(maj == MajSignedInt || maj == MajUnsignedInt, \\\"invalid maj (expected MajSignedInt or MajUnsignedInt)\\\");\\n\\n return (int8(uint8(value)), byteIdx);\\n }\\n\\n /// @notice slice uint8 from bytes starting at a given index\\n /// @param bs bytes to slice from\\n /// @param start current position to slice from bytes\\n /// @return uint8 sliced from bytes\\n function sliceUInt8(bytes memory bs, uint start) internal pure returns (uint8) {\\n require(bs.length >= start + 1, \\\"slicing out of range\\\");\\n return uint8(bs[start]);\\n }\\n\\n /// @notice slice uint16 from bytes starting at a given index\\n /// @param bs bytes to slice from\\n /// @param start current position to slice from bytes\\n /// @return uint16 sliced from bytes\\n function sliceUInt16(bytes memory bs, uint start) internal pure returns (uint16) {\\n require(bs.length >= start + 2, \\\"slicing out of range\\\");\\n bytes2 x;\\n assembly {\\n x := mload(add(bs, add(0x20, start)))\\n }\\n return uint16(x);\\n }\\n\\n /// @notice slice uint32 from bytes starting at a given index\\n /// @param bs bytes to slice from\\n /// @param start current position to slice from bytes\\n /// @return uint32 sliced from bytes\\n function sliceUInt32(bytes memory bs, uint start) internal pure returns (uint32) {\\n require(bs.length >= start + 4, \\\"slicing out of range\\\");\\n bytes4 x;\\n assembly {\\n x := mload(add(bs, add(0x20, start)))\\n }\\n return uint32(x);\\n }\\n\\n /// @notice slice uint64 from bytes starting at a given index\\n /// @param bs bytes to slice from\\n /// @param start current position to slice from bytes\\n /// @return uint64 sliced from bytes\\n function sliceUInt64(bytes memory bs, uint start) internal pure returns (uint64) {\\n require(bs.length >= start + 8, \\\"slicing out of range\\\");\\n bytes8 x;\\n assembly {\\n x := mload(add(bs, add(0x20, start)))\\n }\\n return uint64(x);\\n }\\n\\n /// @notice Parse cbor header for major type and extra info.\\n /// @param cbor cbor encoded bytes to parse from\\n /// @param byteIndex current position to read on the cbor encoded bytes\\n /// @return major type, extra info and the byte index after moving past header bytes\\n function parseCborHeader(bytes memory cbor, uint byteIndex) internal pure returns (uint8, uint64, uint) {\\n uint8 first = sliceUInt8(cbor, byteIndex);\\n byteIndex += 1;\\n uint8 maj = (first & 0xe0) >> 5;\\n uint8 low = first & 0x1f;\\n // We don't handle CBOR headers with extra > 27, i.e. no indefinite lengths\\n require(low < 28, \\\"cannot handle headers with extra > 27\\\");\\n\\n // extra is lower bits\\n if (low < 24) {\\n return (maj, low, byteIndex);\\n }\\n\\n // extra in next byte\\n if (low == 24) {\\n uint8 next = sliceUInt8(cbor, byteIndex);\\n byteIndex += 1;\\n require(next >= 24, \\\"invalid cbor\\\"); // otherwise this is invalid cbor\\n return (maj, next, byteIndex);\\n }\\n\\n // extra in next 2 bytes\\n if (low == 25) {\\n uint16 extra16 = sliceUInt16(cbor, byteIndex);\\n byteIndex += 2;\\n return (maj, extra16, byteIndex);\\n }\\n\\n // extra in next 4 bytes\\n if (low == 26) {\\n uint32 extra32 = sliceUInt32(cbor, byteIndex);\\n byteIndex += 4;\\n return (maj, extra32, byteIndex);\\n }\\n\\n // extra in next 8 bytes\\n assert(low == 27);\\n uint64 extra64 = sliceUInt64(cbor, byteIndex);\\n byteIndex += 8;\\n return (maj, extra64, byteIndex);\\n }\\n}\\n\",\"keccak256\":\"0x3babe3c71558c21f0bef9de09088c42b8b148d16d856f84a350b9c43b4da6018\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/FilAddresses.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\nimport \\\"../utils/Leb128.sol\\\";\\nimport \\\"@ensdomains/buffer/contracts/Buffer.sol\\\";\\n\\n/// @notice This library is a set a functions that allows to handle filecoin addresses conversions and validations\\n/// @author Zondax AG\\nlibrary FilAddresses {\\n using Buffer for Buffer.buffer;\\n\\n error InvalidAddress();\\n\\n /// @notice allow to get a FilAddress from an eth address\\n /// @param addr eth address to convert\\n /// @return new filecoin address\\n function fromEthAddress(address addr) internal pure returns (CommonTypes.FilAddress memory) {\\n return CommonTypes.FilAddress(abi.encodePacked(hex\\\"040a\\\", addr));\\n }\\n\\n /// @notice allow to create a Filecoin address from an actorID\\n /// @param actorID uint64 actorID\\n /// @return address filecoin address\\n function fromActorID(uint64 actorID) internal pure returns (CommonTypes.FilAddress memory) {\\n Buffer.buffer memory result = Leb128.encodeUnsignedLeb128FromUInt64(actorID);\\n return CommonTypes.FilAddress(abi.encodePacked(hex\\\"00\\\", result.buf));\\n }\\n\\n /// @notice allow to create a Filecoin address from bytes\\n /// @param data address in bytes format\\n /// @return filecoin address\\n function fromBytes(bytes memory data) internal pure returns (CommonTypes.FilAddress memory) {\\n CommonTypes.FilAddress memory newAddr = CommonTypes.FilAddress(data);\\n if (!validate(newAddr)) {\\n revert InvalidAddress();\\n }\\n\\n return newAddr;\\n }\\n\\n /// @notice allow to validate if an address is valid or not\\n /// @dev we are only validating known address types. If the type is not known, the default value is true\\n /// @param addr the filecoin address to validate\\n /// @return whether the address is valid or not\\n function validate(CommonTypes.FilAddress memory addr) internal pure returns (bool) {\\n if (addr.data[0] == 0x00) {\\n return addr.data.length <= 10;\\n } else if (addr.data[0] == 0x01 || addr.data[0] == 0x02) {\\n return addr.data.length == 21;\\n } else if (addr.data[0] == 0x03) {\\n return addr.data.length == 49;\\n } else if (addr.data[0] == 0x04) {\\n return addr.data.length <= 64;\\n }\\n\\n return addr.data.length <= 256;\\n }\\n}\\n\",\"keccak256\":\"0x3ca8652660af7a3ff1b894b7c8a875645999b561499e960198dfe330d39ce387\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/Leb128.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2023 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"@ensdomains/buffer/contracts/Buffer.sol\\\";\\n\\n/// @notice This library implement the leb128\\n/// @author Zondax AG\\nlibrary Leb128 {\\n using Buffer for Buffer.buffer;\\n\\n /// @notice encode a unsigned integer 64bits into bytes\\n /// @param value the actor ID to encode\\n /// @return result return the value in bytes\\n function encodeUnsignedLeb128FromUInt64(uint64 value) internal pure returns (Buffer.buffer memory result) {\\n while (true) {\\n uint64 byte_ = value & 0x7f;\\n value >>= 7;\\n if (value == 0) {\\n result.appendUint8(uint8(byte_));\\n return result;\\n }\\n result.appendUint8(uint8(byte_ | 0x80));\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe1f4d71cdc933b0c2ac8eb81d711bf63457ed8e79b748ca9f826d40a3b4f143b\",\"license\":\"Apache-2.0\"},\"@zondax/filecoin-solidity/contracts/v0.8/utils/Misc.sol\":{\"content\":\"/*******************************************************************************\\n * (c) 2022 Zondax AG\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n ********************************************************************************/\\n// THIS CODE WAS SECURITY REVIEWED BY KUDELSKI SECURITY, BUT NOT FORMALLY AUDITED\\n\\n// SPDX-License-Identifier: Apache-2.0\\npragma solidity ^0.8.17;\\n\\nimport \\\"../types/CommonTypes.sol\\\";\\n\\n/// @title Library containing miscellaneous functions used on the project\\n/// @author Zondax AG\\nlibrary Misc {\\n uint64 constant DAG_CBOR_CODEC = 0x71;\\n uint64 constant CBOR_CODEC = 0x51;\\n uint64 constant NONE_CODEC = 0x00;\\n\\n // Code taken from Openzeppelin repo\\n // Link: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/0320a718e8e07b1d932f5acb8ad9cec9d9eed99b/contracts/utils/math/SignedMath.sol#L37-L42\\n /// @notice get the abs from a signed number\\n /// @param n number to get abs from\\n /// @return unsigned number\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n\\n /// @notice validate if an address exists or not\\n /// @dev read this article for more information https://blog.finxter.com/how-to-find-out-if-an-ethereum-address-is-a-contract/\\n /// @param addr address to check\\n /// @return whether the address exists or not\\n function addressExists(address addr) internal view returns (bool) {\\n bytes32 codehash;\\n assembly {\\n codehash := extcodehash(addr)\\n }\\n return codehash != 0x0;\\n }\\n\\n /// Returns the data size required by CBOR.writeFixedNumeric\\n function getPrefixSize(uint256 data_size) internal pure returns (uint256) {\\n if (data_size <= 23) {\\n return 1;\\n } else if (data_size <= 0xFF) {\\n return 2;\\n } else if (data_size <= 0xFFFF) {\\n return 3;\\n } else if (data_size <= 0xFFFFFFFF) {\\n return 5;\\n }\\n return 9;\\n }\\n\\n function getBytesSize(bytes memory value) internal pure returns (uint256) {\\n return getPrefixSize(value.length) + value.length;\\n }\\n\\n function getCidSize(bytes memory value) internal pure returns (uint256) {\\n return getPrefixSize(2) + value.length;\\n }\\n\\n function getFilActorIdSize(CommonTypes.FilActorId value) internal pure returns (uint256) {\\n uint64 val = CommonTypes.FilActorId.unwrap(value);\\n return getPrefixSize(uint256(val));\\n }\\n\\n function getChainEpochSize(CommonTypes.ChainEpoch value) internal pure returns (uint256) {\\n int64 val = CommonTypes.ChainEpoch.unwrap(value);\\n if (val >= 0) {\\n return getPrefixSize(uint256(uint64(val)));\\n } else {\\n return getPrefixSize(uint256(uint64(-1 - val)));\\n }\\n }\\n\\n function getBoolSize() internal pure returns (uint256) {\\n return getPrefixSize(1);\\n }\\n}\\n\",\"keccak256\":\"0x97b02c3ab9cb11169b0b1a143b513017c6bf0f2cba2fc4f81a77345b5dfe96b4\",\"license\":\"Apache-2.0\"},\"@zondax/solidity-bignumber/src/BigNumbers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.17;\\n\\n// Definition here allows both the lib and inheriting contracts to use BigNumber directly.\\nstruct BigNumber { \\n bytes val;\\n bool neg;\\n uint bitlen;\\n}\\n\\n/**\\n * @notice BigNumbers library for Solidity.\\n */\\nlibrary BigNumbers {\\n \\n /// @notice the value for number 0 of a BigNumber instance.\\n bytes constant ZERO = hex\\\"0000000000000000000000000000000000000000000000000000000000000000\\\";\\n /// @notice the value for number 1 of a BigNumber instance.\\n bytes constant ONE = hex\\\"0000000000000000000000000000000000000000000000000000000000000001\\\";\\n /// @notice the value for number 2 of a BigNumber instance.\\n bytes constant TWO = hex\\\"0000000000000000000000000000000000000000000000000000000000000002\\\";\\n\\n // ***************** BEGIN EXPOSED MANAGEMENT FUNCTIONS ******************\\n /** @notice verify a BN instance\\n * @dev checks if the BN is in the correct format. operations should only be carried out on\\n * verified BNs, so it is necessary to call this if your function takes an arbitrary BN\\n * as input.\\n *\\n * @param bn BigNumber instance\\n */\\n function verify(\\n BigNumber memory bn\\n ) internal pure {\\n uint msword; \\n bytes memory val = bn.val;\\n assembly {msword := mload(add(val,0x20))} //get msword of result\\n if(msword==0) require(isZero(bn));\\n else require((bn.val.length % 32 == 0) && (msword>>((bn.bitlen%256)-1)==1));\\n }\\n\\n /** @notice initialize a BN instance\\n * @dev wrapper function for _init. initializes from bytes value.\\n * Allows passing bitLength of value. This is NOT verified in the internal function. Only use where bitlen is\\n * explicitly known; otherwise use the other init function.\\n *\\n * @param val BN value. may be of any size.\\n * @param neg neg whether the BN is +/-\\n * @param bitlen bit length of output.\\n * @return BigNumber instance\\n */\\n function init(\\n bytes memory val, \\n bool neg, \\n uint bitlen\\n ) internal view returns(BigNumber memory){\\n return _init(val, neg, bitlen);\\n }\\n \\n /** @notice initialize a BN instance\\n * @dev wrapper function for _init. initializes from bytes value.\\n *\\n * @param val BN value. may be of any size.\\n * @param neg neg whether the BN is +/-\\n * @return BigNumber instance\\n */\\n function init(\\n bytes memory val, \\n bool neg\\n ) internal view returns(BigNumber memory){\\n return _init(val, neg, 0);\\n }\\n\\n /** @notice initialize a BN instance\\n * @dev wrapper function for _init. initializes from uint value (converts to bytes); \\n * tf. resulting BN is in the range -2^256-1 ... 2^256-1.\\n *\\n * @param val uint value.\\n * @param neg neg whether the BN is +/-\\n * @return BigNumber instance\\n */\\n function init(\\n uint val, \\n bool neg\\n ) internal view returns(BigNumber memory){\\n return _init(abi.encodePacked(val), neg, 0);\\n }\\n // ***************** END EXPOSED MANAGEMENT FUNCTIONS ******************\\n\\n\\n\\n\\n // ***************** BEGIN EXPOSED CORE CALCULATION FUNCTIONS ******************\\n /** @notice BigNumber addition: a + b.\\n * @dev add: Initially prepare BigNumbers for addition operation; internally calls actual addition/subtraction,\\n * depending on inputs.\\n * In order to do correct addition or subtraction we have to handle the sign.\\n * This function discovers the sign of the result based on the inputs, and calls the correct operation.\\n *\\n * @param a first BN\\n * @param b second BN\\n * @return r result - addition of a and b.\\n */\\n function add(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(BigNumber memory r) {\\n if(a.bitlen==0 && b.bitlen==0) return zero();\\n if(a.bitlen==0) return b;\\n if(b.bitlen==0) return a;\\n bytes memory val;\\n uint bitlen;\\n int compare = cmp(a,b,false);\\n\\n if(a.neg || b.neg){\\n if(a.neg && b.neg){\\n if(compare>=0) (val, bitlen) = _add(a.val,b.val,a.bitlen);\\n else (val, bitlen) = _add(b.val,a.val,b.bitlen);\\n r.neg = true;\\n }\\n else {\\n if(compare==1){\\n (val, bitlen) = _sub(a.val,b.val);\\n r.neg = a.neg;\\n }\\n else if(compare==-1){\\n (val, bitlen) = _sub(b.val,a.val);\\n r.neg = !a.neg;\\n }\\n else return zero();//one pos and one neg, and same value.\\n }\\n }\\n else{\\n if(compare>=0){ // a>=b\\n (val, bitlen) = _add(a.val,b.val,a.bitlen);\\n }\\n else {\\n (val, bitlen) = _add(b.val,a.val,b.bitlen);\\n }\\n r.neg = false;\\n }\\n\\n r.val = val;\\n r.bitlen = (bitlen);\\n }\\n\\n /** @notice BigNumber subtraction: a - b.\\n * @dev sub: Initially prepare BigNumbers for subtraction operation; internally calls actual addition/subtraction,\\n depending on inputs.\\n * In order to do correct addition or subtraction we have to handle the sign.\\n * This function discovers the sign of the result based on the inputs, and calls the correct operation.\\n *\\n * @param a first BN\\n * @param b second BN\\n * @return r result - subtraction of a and b.\\n */ \\n function sub(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(BigNumber memory r) {\\n if(a.bitlen==0 && b.bitlen==0) return zero();\\n bytes memory val;\\n int compare;\\n uint bitlen;\\n compare = cmp(a,b,false);\\n if(a.neg || b.neg) {\\n if(a.neg && b.neg){ \\n if(compare == 1) { \\n (val,bitlen) = _sub(a.val,b.val); \\n r.neg = true;\\n }\\n else if(compare == -1) { \\n\\n (val,bitlen) = _sub(b.val,a.val); \\n r.neg = false;\\n }\\n else return zero();\\n }\\n else {\\n if(compare >= 0) (val,bitlen) = _add(a.val,b.val,a.bitlen);\\n else (val,bitlen) = _add(b.val,a.val,b.bitlen);\\n \\n r.neg = (a.neg) ? true : false;\\n }\\n }\\n else {\\n if(compare == 1) {\\n (val,bitlen) = _sub(a.val,b.val);\\n r.neg = false;\\n }\\n else if(compare == -1) { \\n (val,bitlen) = _sub(b.val,a.val);\\n r.neg = true;\\n }\\n else return zero(); \\n }\\n \\n r.val = val;\\n r.bitlen = (bitlen);\\n }\\n\\n /** @notice BigNumber multiplication: a * b.\\n * @dev mul: takes two BigNumbers and multiplys them. Order is irrelevant.\\n * multiplication achieved using modexp precompile:\\n * (a * b) = ((a + b)**2 - (a - b)**2) / 4\\n *\\n * @param a first BN\\n * @param b second BN\\n * @return r result - multiplication of a and b.\\n */\\n function mul(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal view returns(BigNumber memory r){\\n \\n BigNumber memory lhs = add(a,b);\\n BigNumber memory fst = modexp(lhs, two(), _powModulus(lhs, 2)); // (a+b)^2\\n \\n // no need to do subtraction part of the equation if a == b; if so, it has no effect on final result.\\n if(!eq(a,b)) {\\n BigNumber memory rhs = sub(a,b);\\n BigNumber memory snd = modexp(rhs, two(), _powModulus(rhs, 2)); // (a-b)^2\\n r = _shr(sub(fst, snd) , 2); // (a * b) = (((a + b)**2 - (a - b)**2) / 4\\n }\\n else {\\n r = _shr(fst, 2); // a==b ? (((a + b)**2 / 4\\n }\\n }\\n\\n /** @notice BigNumber division verification: a * b.\\n * @dev div: takes three BigNumbers (a,b and result), and verifies that a/b == result.\\n * Performing BigNumber division on-chain is a significantly expensive operation. As a result, \\n * we expose the ability to verify the result of a division operation, which is a constant time operation. \\n * (a/b = result) == (a = b * result)\\n * Integer division only; therefore:\\n * verify ((b*result) + (a % (b*result))) == a.\\n * eg. 17/7 == 2:\\n * verify (7*2) + (17 % (7*2)) == 17.\\n * The function returns a bool on successful verification. The require statements will ensure that false can never\\n * be returned, however inheriting contracts may also want to put this function inside a require statement.\\n * \\n * @param a first BigNumber\\n * @param b second BigNumber\\n * @param r result BigNumber\\n * @return bool whether or not the operation was verified\\n */\\n function divVerify(\\n BigNumber memory a, \\n BigNumber memory b, \\n BigNumber memory r\\n ) internal view returns(bool) {\\n\\n // first do zero check.\\n // if a<b (always zero) and r==zero (input check), return true.\\n if(cmp(a, b, false) == -1){\\n require(cmp(zero(), r, false)==0);\\n return true;\\n }\\n\\n // Following zero check:\\n //if both negative: result positive\\n //if one negative: result negative\\n //if neither negative: result positive\\n bool positiveResult = ( a.neg && b.neg ) || (!a.neg && !b.neg);\\n require(positiveResult ? !r.neg : r.neg);\\n \\n // require denominator to not be zero.\\n require(!(cmp(b,zero(),true)==0));\\n \\n // division result check assumes inputs are positive.\\n // we have already checked for result sign so this is safe.\\n bool[3] memory negs = [a.neg, b.neg, r.neg];\\n a.neg = false;\\n b.neg = false;\\n r.neg = false;\\n\\n // do multiplication (b * r)\\n BigNumber memory fst = mul(b,r);\\n // check if we already have 'a' (ie. no remainder after division). if so, no mod necessary, and return true.\\n if(cmp(fst,a,true)==0) return true;\\n //a mod (b*r)\\n BigNumber memory snd = modexp(a,one(),fst); \\n // ((b*r) + a % (b*r)) == a\\n require(cmp(add(fst,snd),a,true)==0); \\n\\n a.neg = negs[0];\\n b.neg = negs[1];\\n r.neg = negs[2];\\n\\n return true;\\n }\\n\\n /** @notice BigNumber exponentiation: a ^ b.\\n * @dev pow: takes a BigNumber and a uint (a,e), and calculates a^e.\\n * modexp precompile is used to achieve a^e; for this is work, we need to work out the minimum modulus value \\n * such that the modulus passed to modexp is not used. the result of a^e can never be more than size bitlen(a) * e.\\n * \\n * @param a BigNumber\\n * @param e exponent\\n * @return r result BigNumber\\n */\\n function pow(\\n BigNumber memory a, \\n uint e\\n ) internal view returns(BigNumber memory){\\n return modexp(a, init(e, false), _powModulus(a, e));\\n }\\n\\n /** @notice BigNumber modulus: a % n.\\n * @dev mod: takes a BigNumber and modulus BigNumber (a,n), and calculates a % n.\\n * modexp precompile is used to achieve a % n; an exponent of value '1' is passed.\\n * @param a BigNumber\\n * @param n modulus BigNumber\\n * @return r result BigNumber\\n */\\n function mod(\\n BigNumber memory a, \\n BigNumber memory n\\n ) internal view returns(BigNumber memory){\\n return modexp(a,one(),n);\\n }\\n\\n /** @notice BigNumber modular exponentiation: a^e mod n.\\n * @dev modexp: takes base, exponent, and modulus, internally computes base^exponent % modulus using the precompile at address 0x5, and creates new BigNumber.\\n * this function is overloaded: it assumes the exponent is positive. if not, the other method is used, whereby the inverse of the base is also passed.\\n *\\n * @param a base BigNumber\\n * @param e exponent BigNumber\\n * @param n modulus BigNumber\\n * @return result BigNumber\\n */ \\n function modexp(\\n BigNumber memory a, \\n BigNumber memory e, \\n BigNumber memory n\\n ) internal view returns(BigNumber memory) {\\n //if exponent is negative, other method with this same name should be used.\\n //if modulus is negative or zero, we cannot perform the operation.\\n require( e.neg==false\\n && n.neg==false\\n && !isZero(n.val));\\n\\n bytes memory _result = _modexp(a.val,e.val,n.val);\\n //get bitlen of result (TODO: optimise. we know bitlen is in the same byte as the modulus bitlen byte)\\n uint bitlen = bitLength(_result);\\n \\n // if result is 0, immediately return.\\n if(bitlen == 0) return zero();\\n // if base is negative AND exponent is odd, base^exp is negative, and tf. result is negative;\\n // in that case we make the result positive by adding the modulus.\\n if(a.neg && isOdd(e)) return add(BigNumber(_result, true, bitlen), n);\\n // in any other case we return the positive result.\\n return BigNumber(_result, false, bitlen);\\n }\\n\\n /** @notice BigNumber modular exponentiation with negative base: inv(a)==a_inv && a_inv^e mod n.\\n /** @dev modexp: takes base, base inverse, exponent, and modulus, asserts inverse(base)==base inverse, \\n * internally computes base_inverse^exponent % modulus and creates new BigNumber.\\n * this function is overloaded: it assumes the exponent is negative. \\n * if not, the other method is used, where the inverse of the base is not passed.\\n *\\n * @param a base BigNumber\\n * @param ai base inverse BigNumber\\n * @param e exponent BigNumber\\n * @param a modulus\\n * @return BigNumber memory result.\\n */ \\n function modexp(\\n BigNumber memory a, \\n BigNumber memory ai, \\n BigNumber memory e, \\n BigNumber memory n) \\n internal view returns(BigNumber memory) {\\n // base^-exp = (base^-1)^exp\\n require(!a.neg && e.neg);\\n\\n //if modulus is negative or zero, we cannot perform the operation.\\n require(!n.neg && !isZero(n.val));\\n\\n //base_inverse == inverse(base, modulus)\\n require(modinvVerify(a, n, ai)); \\n \\n bytes memory _result = _modexp(ai.val,e.val,n.val);\\n //get bitlen of result (TODO: optimise. we know bitlen is in the same byte as the modulus bitlen byte)\\n uint bitlen = bitLength(_result);\\n\\n // if result is 0, immediately return.\\n if(bitlen == 0) return zero();\\n // if base_inverse is negative AND exponent is odd, base_inverse^exp is negative, and tf. result is negative;\\n // in that case we make the result positive by adding the modulus.\\n if(ai.neg && isOdd(e)) return add(BigNumber(_result, true, bitlen), n);\\n // in any other case we return the positive result.\\n return BigNumber(_result, false, bitlen);\\n }\\n \\n /** @notice modular multiplication: (a*b) % n.\\n * @dev modmul: Takes BigNumbers for a, b, and modulus, and computes (a*b) % modulus\\n * We call mul for the two input values, before calling modexp, passing exponent as 1.\\n * Sign is taken care of in sub-functions.\\n *\\n * @param a BigNumber\\n * @param b BigNumber\\n * @param n Modulus BigNumber\\n * @return result BigNumber\\n */\\n function modmul(\\n BigNumber memory a, \\n BigNumber memory b, \\n BigNumber memory n) internal view returns(BigNumber memory) { \\n return mod(mul(a,b), n); \\n }\\n\\n /** @notice modular inverse verification: Verifies that (a*r) % n == 1.\\n * @dev modinvVerify: Takes BigNumbers for base, modulus, and result, verifies (base*result)%modulus==1, and returns result.\\n * Similar to division, it's far cheaper to verify an inverse operation on-chain than it is to calculate it, so we allow the user to pass their own result.\\n *\\n * @param a base BigNumber\\n * @param n modulus BigNumber\\n * @param r result BigNumber\\n * @return boolean result\\n */\\n function modinvVerify(\\n BigNumber memory a, \\n BigNumber memory n, \\n BigNumber memory r\\n ) internal view returns(bool) {\\n require(!a.neg && !n.neg); //assert positivity of inputs.\\n /*\\n * the following proves:\\n * - user result passed is correct for values base and modulus\\n * - modular inverse exists for values base and modulus.\\n * otherwise it fails.\\n */ \\n require(cmp(modmul(a, r, n),one(),true)==0);\\n \\n return true;\\n }\\n // ***************** END EXPOSED CORE CALCULATION FUNCTIONS ******************\\n\\n\\n\\n\\n // ***************** START EXPOSED HELPER FUNCTIONS ******************\\n /** @notice BigNumber odd number check\\n * @dev isOdd: returns 1 if BigNumber value is an odd number and 0 otherwise.\\n * \\n * @param a BigNumber\\n * @return r Boolean result\\n */ \\n function isOdd(\\n BigNumber memory a\\n ) internal pure returns(bool r){\\n assembly{\\n let a_ptr := add(mload(a), mload(mload(a))) // go to least significant word\\n r := mod(mload(a_ptr),2) // mod it with 2 (returns 0 or 1) \\n }\\n }\\n\\n /** @notice BigNumber comparison\\n * @dev cmp: Compares BigNumbers a and b. 'signed' parameter indiciates whether to consider the sign of the inputs.\\n * 'trigger' is used to decide this - \\n * if both negative, invert the result; \\n * if both positive (or signed==false), trigger has no effect;\\n * if differing signs, we return immediately based on input.\\n * returns -1 on a<b, 0 on a==b, 1 on a>b.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @param signed whether to consider sign of inputs\\n * @return int result\\n */\\n function cmp(\\n BigNumber memory a, \\n BigNumber memory b, \\n bool signed\\n ) internal pure returns(int){\\n int trigger = 1;\\n if(signed){\\n if(a.neg && b.neg) trigger = -1;\\n else if(a.neg==false && b.neg==true) return 1;\\n else if(a.neg==true && b.neg==false) return -1;\\n }\\n\\n if(a.bitlen>b.bitlen) return trigger; // 1*trigger\\n if(b.bitlen>a.bitlen) return -1*trigger;\\n\\n uint a_ptr;\\n uint b_ptr;\\n uint a_word;\\n uint b_word;\\n\\n uint len = a.val.length; //bitlen is same so no need to check length.\\n\\n assembly{\\n a_ptr := add(mload(a),0x20) \\n b_ptr := add(mload(b),0x20)\\n }\\n\\n for(uint i=0; i<len;i+=32){\\n assembly{\\n a_word := mload(add(a_ptr,i))\\n b_word := mload(add(b_ptr,i))\\n }\\n\\n if(a_word>b_word) return trigger; // 1*trigger\\n if(b_word>a_word) return -1*trigger; \\n\\n }\\n\\n return 0; //same value.\\n }\\n\\n /** @notice BigNumber equality\\n * @dev eq: returns true if a==b. sign always considered.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @return boolean result\\n */\\n function eq(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(bool){\\n int result = cmp(a, b, true);\\n return (result==0) ? true : false;\\n }\\n\\n /** @notice BigNumber greater than\\n * @dev eq: returns true if a>b. sign always considered.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @return boolean result\\n */\\n function gt(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(bool){\\n int result = cmp(a, b, true);\\n return (result==1) ? true : false;\\n }\\n\\n /** @notice BigNumber greater than or equal to\\n * @dev eq: returns true if a>=b. sign always considered.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @return boolean result\\n */\\n function gte(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(bool){\\n int result = cmp(a, b, true);\\n return (result==1 || result==0) ? true : false;\\n }\\n\\n /** @notice BigNumber less than\\n * @dev eq: returns true if a<b. sign always considered.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @return boolean result\\n */\\n function lt(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(bool){\\n int result = cmp(a, b, true);\\n return (result==-1) ? true : false;\\n }\\n\\n /** @notice BigNumber less than or equal o\\n * @dev eq: returns true if a<=b. sign always considered.\\n * \\n * @param a BigNumber\\n * @param b BigNumber\\n * @return boolean result\\n */\\n function lte(\\n BigNumber memory a, \\n BigNumber memory b\\n ) internal pure returns(bool){\\n int result = cmp(a, b, true);\\n return (result==-1 || result==0) ? true : false;\\n }\\n\\n /** @notice right shift BigNumber value\\n * @dev shr: right shift BigNumber a by 'bits' bits.\\n copies input value to new memory location before shift and calls _shr function after. \\n * @param a BigNumber value to shift\\n * @param bits amount of bits to shift by\\n * @return result BigNumber\\n */\\n function shr(\\n BigNumber memory a, \\n uint bits\\n ) internal view returns(BigNumber memory){\\n require(!a.neg);\\n return _shr(a, bits);\\n }\\n\\n /** @notice right shift BigNumber memory 'dividend' by 'bits' bits.\\n * @dev _shr: Shifts input value in-place, ie. does not create new memory. shr function does this.\\n * right shift does not necessarily have to copy into a new memory location. where the user wishes the modify\\n * the existing value they have in place, they can use this. \\n * @param bn value to shift\\n * @param bits amount of bits to shift by\\n * @return r result\\n */\\n function _shr(BigNumber memory bn, uint bits) internal view returns(BigNumber memory){\\n uint length;\\n assembly { length := mload(mload(bn)) }\\n\\n // if bits is >= the bitlength of the value the result is always 0\\n if(bits >= bn.bitlen) return BigNumber(ZERO,false,0); \\n \\n // set bitlen initially as we will be potentially modifying 'bits'\\n bn.bitlen = bn.bitlen-(bits);\\n\\n // handle shifts greater than 256:\\n // if bits is greater than 256 we can simply remove any trailing words, by altering the BN length. \\n // we also update 'bits' so that it is now in the range 0..256.\\n assembly {\\n if or(gt(bits, 0x100), eq(bits, 0x100)) {\\n length := sub(length, mul(div(bits, 0x100), 0x20))\\n mstore(mload(bn), length)\\n bits := mod(bits, 0x100)\\n }\\n\\n // if bits is multiple of 8 (byte size), we can simply use identity precompile for cheap memcopy.\\n // otherwise we shift each word, starting at the least signifcant word, one-by-one using the mask technique.\\n // TODO it is possible to do this without the last two operations, see SHL identity copy.\\n let bn_val_ptr := mload(bn)\\n switch eq(mod(bits, 8), 0)\\n case 1 { \\n let bytes_shift := div(bits, 8)\\n let in := mload(bn)\\n let inlength := mload(in)\\n let insize := add(inlength, 0x20)\\n let out := add(in, bytes_shift)\\n let outsize := sub(insize, bytes_shift)\\n let success := staticcall(450, 0x4, in, insize, out, insize)\\n mstore8(add(out, 0x1f), 0) // maintain our BN layout following identity call:\\n mstore(in, inlength) // set current length byte to 0, and reset old length.\\n }\\n default {\\n let mask\\n let lsw\\n let mask_shift := sub(0x100, bits)\\n let lsw_ptr := add(bn_val_ptr, length) \\n for { let i := length } eq(eq(i,0),0) { i := sub(i, 0x20) } { // for(int i=max_length; i!=0; i-=32)\\n switch eq(i,0x20) // if i==32:\\n case 1 { mask := 0 } // - handles lsword: no mask needed.\\n default { mask := mload(sub(lsw_ptr,0x20)) } // - else get mask (previous word)\\n lsw := shr(bits, mload(lsw_ptr)) // right shift current by bits\\n mask := shl(mask_shift, mask) // left shift next significant word by mask_shift\\n mstore(lsw_ptr, or(lsw,mask)) // store OR'd mask and shifted bits in-place\\n lsw_ptr := sub(lsw_ptr, 0x20) // point to next bits.\\n }\\n }\\n\\n // The following removes the leading word containing all zeroes in the result should it exist, \\n // as well as updating lengths and pointers as necessary.\\n let msw_ptr := add(bn_val_ptr,0x20)\\n switch eq(mload(msw_ptr), 0) \\n case 1 {\\n mstore(msw_ptr, sub(mload(bn_val_ptr), 0x20)) // store new length in new position\\n mstore(bn, msw_ptr) // update pointer from bn\\n }\\n default {}\\n }\\n \\n\\n return bn;\\n }\\n\\n /** @notice left shift BigNumber value\\n * @dev shr: left shift BigNumber a by 'bits' bits.\\n ensures the value is not negative before calling the private function.\\n * @param a BigNumber value to shift\\n * @param bits amount of bits to shift by\\n * @return result BigNumber\\n */\\n function shl(\\n BigNumber memory a, \\n uint bits\\n ) internal view returns(BigNumber memory){\\n require(!a.neg);\\n return _shl(a, bits);\\n }\\n\\n /** @notice sha3 hash a BigNumber.\\n * @dev hash: takes a BigNumber and performs sha3 hash on it.\\n * we hash each BigNumber WITHOUT it's first word - first word is a pointer to the start of the bytes value,\\n * and so is different for each struct.\\n * \\n * @param a BigNumber\\n * @return h bytes32 hash.\\n */\\n function hash(\\n BigNumber memory a\\n ) internal pure returns(bytes32 h) {\\n //amount of words to hash = all words of the value and three extra words: neg, bitlen & value length. \\n assembly {\\n h := keccak256( add(a,0x20), add (mload(mload(a)), 0x60 ) ) \\n }\\n }\\n\\n /** @notice BigNumber full zero check\\n * @dev isZero: checks if the BigNumber is in the default zero format for BNs (ie. the result from zero()).\\n * \\n * @param a BigNumber\\n * @return boolean result.\\n */\\n function isZero(\\n BigNumber memory a\\n ) internal pure returns(bool) {\\n return isZero(a.val) && a.val.length==0x20 && !a.neg && a.bitlen == 0;\\n }\\n\\n\\n /** @notice bytes zero check\\n * @dev isZero: checks if input bytes value resolves to zero.\\n * \\n * @param a bytes value\\n * @return boolean result.\\n */\\n function isZero(\\n bytes memory a\\n ) internal pure returns(bool) {\\n uint msword;\\n uint msword_ptr;\\n assembly {\\n msword_ptr := add(a,0x20)\\n }\\n for(uint i=0; i<a.length; i+=32) {\\n assembly { msword := mload(msword_ptr) } // get msword of input\\n if(msword > 0) return false;\\n assembly { msword_ptr := add(msword_ptr, 0x20) }\\n }\\n return true;\\n\\n }\\n\\n /** @notice BigNumber value bit length\\n * @dev bitLength: returns BigNumber value bit length- ie. log2 (most significant bit of value)\\n * \\n * @param a BigNumber\\n * @return uint bit length result.\\n */\\n function bitLength(\\n BigNumber memory a\\n ) internal pure returns(uint){\\n return bitLength(a.val);\\n }\\n\\n /** @notice bytes bit length\\n * @dev bitLength: returns bytes bit length- ie. log2 (most significant bit of value)\\n * \\n * @param a bytes value\\n * @return r uint bit length result.\\n */\\n function bitLength(\\n bytes memory a\\n ) internal pure returns(uint r){\\n if(isZero(a)) return 0;\\n uint msword; \\n assembly {\\n msword := mload(add(a,0x20)) // get msword of input\\n }\\n r = bitLength(msword); // get bitlen of msword, add to size of remaining words.\\n assembly { \\n r := add(r, mul(sub(mload(a), 0x20) , 8)) // res += (val.length-32)*8; \\n }\\n }\\n\\n /** @notice uint bit length\\n @dev bitLength: get the bit length of a uint input - ie. log2 (most significant bit of 256 bit value (one EVM word))\\n * credit: Tjaden Hess @ ethereum.stackexchange \\n * @param a uint value\\n * @return r uint bit length result.\\n */\\n function bitLength(\\n uint a\\n ) internal pure returns (uint r){\\n assembly {\\n switch eq(a, 0)\\n case 1 {\\n r := 0\\n }\\n default {\\n let arg := a\\n a := sub(a,1)\\n a := or(a, div(a, 0x02))\\n a := or(a, div(a, 0x04))\\n a := or(a, div(a, 0x10))\\n a := or(a, div(a, 0x100))\\n a := or(a, div(a, 0x10000))\\n a := or(a, div(a, 0x100000000))\\n a := or(a, div(a, 0x10000000000000000))\\n a := or(a, div(a, 0x100000000000000000000000000000000))\\n a := add(a, 1)\\n let m := mload(0x40)\\n mstore(m, 0xf8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd)\\n mstore(add(m,0x20), 0xf5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe)\\n mstore(add(m,0x40), 0xf6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a8272523616)\\n mstore(add(m,0x60), 0xc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff)\\n mstore(add(m,0x80), 0xf7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e)\\n mstore(add(m,0xa0), 0xe39ed557db96902cd38ed14fad815115c786af479b7e83247363534337271707)\\n mstore(add(m,0xc0), 0xc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d2362422606)\\n mstore(add(m,0xe0), 0x753a6d1b65325d0c552a4d1345224105391a310b29122104190a110309020100)\\n mstore(0x40, add(m, 0x100))\\n let magic := 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff\\n let shift := 0x100000000000000000000000000000000000000000000000000000000000000\\n let _a := div(mul(a, magic), shift)\\n r := div(mload(add(m,sub(255,_a))), shift)\\n r := add(r, mul(256, gt(arg, 0x8000000000000000000000000000000000000000000000000000000000000000)))\\n // where a is a power of two, result needs to be incremented. we use the power of two trick here: if(arg & arg-1 == 0) ++r;\\n if eq(and(arg, sub(arg, 1)), 0) {\\n r := add(r, 1) \\n }\\n }\\n }\\n }\\n\\n /** @notice BigNumber zero value\\n @dev zero: returns zero encoded as a BigNumber\\n * @return zero encoded as BigNumber\\n */\\n function zero(\\n ) internal pure returns(BigNumber memory) {\\n return BigNumber(ZERO, false, 0);\\n }\\n\\n /** @notice BigNumber one value\\n @dev one: returns one encoded as a BigNumber\\n * @return one encoded as BigNumber\\n */\\n function one(\\n ) internal pure returns(BigNumber memory) {\\n return BigNumber(ONE, false, 1);\\n }\\n\\n /** @notice BigNumber two value\\n @dev two: returns two encoded as a BigNumber\\n * @return two encoded as BigNumber\\n */\\n function two(\\n ) internal pure returns(BigNumber memory) {\\n return BigNumber(TWO, false, 2);\\n }\\n // ***************** END EXPOSED HELPER FUNCTIONS ******************\\n\\n\\n\\n\\n\\n // ***************** START PRIVATE MANAGEMENT FUNCTIONS ******************\\n /** @notice Create a new BigNumber.\\n @dev init: overloading allows caller to obtionally pass bitlen where it is known - as it is cheaper to do off-chain and verify on-chain. \\n * we assert input is in data structure as defined above, and that bitlen, if passed, is correct.\\n * 'copy' parameter indicates whether or not to copy the contents of val to a new location in memory (for example where you pass \\n * the contents of another variable's value in)\\n * @param val bytes - bignum value.\\n * @param neg bool - sign of value\\n * @param bitlen uint - bit length of value\\n * @return r BigNumber initialized value.\\n */\\n function _init(\\n bytes memory val, \\n bool neg, \\n uint bitlen\\n ) private view returns(BigNumber memory r){ \\n // use identity at location 0x4 for cheap memcpy.\\n // grab contents of val, load starting from memory end, update memory end pointer.\\n assembly {\\n let data := add(val, 0x20)\\n let length := mload(val)\\n let out\\n let freemem := msize()\\n switch eq(mod(length, 0x20), 0) // if(val.length % 32 == 0)\\n case 1 {\\n out := add(freemem, 0x20) // freememory location + length word\\n mstore(freemem, length) // set new length \\n }\\n default { \\n let offset := sub(0x20, mod(length, 0x20)) // offset: 32 - (length % 32)\\n out := add(add(freemem, offset), 0x20) // freememory location + offset + length word\\n mstore(freemem, add(length, offset)) // set new length \\n }\\n pop(staticcall(450, 0x4, data, length, out, length)) // copy into 'out' memory location\\n mstore(0x40, add(freemem, add(mload(freemem), 0x20))) // update the free memory pointer\\n \\n // handle leading zero words. assume freemem is pointer to bytes value\\n let bn_length := mload(freemem)\\n for { } eq ( eq(bn_length, 0x20), 0) { } { // for(; length!=32; length-=32)\\n switch eq(mload(add(freemem, 0x20)),0) // if(msword==0):\\n case 1 { freemem := add(freemem, 0x20) } // update length pointer\\n default { break } // else: loop termination. non-zero word found\\n bn_length := sub(bn_length,0x20) \\n } \\n mstore(freemem, bn_length) \\n\\n mstore(r, freemem) // store new bytes value in r\\n mstore(add(r, 0x20), neg) // store neg value in r\\n }\\n\\n r.bitlen = bitlen == 0 ? bitLength(r.val) : bitlen;\\n }\\n // ***************** END PRIVATE MANAGEMENT FUNCTIONS ******************\\n\\n\\n\\n\\n\\n // ***************** START PRIVATE CORE CALCULATION FUNCTIONS ******************\\n /** @notice takes two BigNumber memory values and the bitlen of the max value, and adds them.\\n * @dev _add: This function is private and only callable from add: therefore the values may be of different sizes,\\n * in any order of size, and of different signs (handled in add).\\n * As values may be of different sizes, inputs are considered starting from the least significant \\n * words, working back. \\n * The function calculates the new bitlen (basically if bitlens are the same for max and min, \\n * max_bitlen++) and returns a new BigNumber memory value.\\n *\\n * @param max bytes - biggest value (determined from add)\\n * @param min bytes - smallest value (determined from add)\\n * @param max_bitlen uint - bit length of max value.\\n * @return bytes result - max + min.\\n * @return uint - bit length of result.\\n */\\n function _add(\\n bytes memory max, \\n bytes memory min, \\n uint max_bitlen\\n ) private pure returns (bytes memory, uint) {\\n bytes memory result;\\n assembly {\\n\\n let result_start := msize() // Get the highest available block of memory\\n let carry := 0\\n let uint_max := sub(0,1)\\n\\n let max_ptr := add(max, mload(max))\\n let min_ptr := add(min, mload(min)) // point to last word of each byte array.\\n\\n let result_ptr := add(add(result_start,0x20), mload(max)) // set result_ptr end.\\n\\n for { let i := mload(max) } eq(eq(i,0),0) { i := sub(i, 0x20) } { // for(int i=max_length; i!=0; i-=32)\\n let max_val := mload(max_ptr) // get next word for 'max'\\n switch gt(i,sub(mload(max),mload(min))) // if(i>(max_length-min_length)). while \\n // 'min' words are still available.\\n case 1{ \\n let min_val := mload(min_ptr) // get next word for 'min'\\n mstore(result_ptr, add(add(max_val,min_val),carry)) // result_word = max_word+min_word+carry\\n switch gt(max_val, sub(uint_max,sub(min_val,carry))) // this switch block finds whether or\\n // not to set the carry bit for the\\n // next iteration.\\n case 1 { carry := 1 }\\n default {\\n switch and(eq(max_val,uint_max),or(gt(carry,0), gt(min_val,0)))\\n case 1 { carry := 1 }\\n default{ carry := 0 }\\n }\\n \\n min_ptr := sub(min_ptr,0x20) // point to next 'min' word\\n }\\n default{ // else: remainder after 'min' words are complete.\\n mstore(result_ptr, add(max_val,carry)) // result_word = max_word+carry\\n \\n switch and( eq(uint_max,max_val), eq(carry,1) ) // this switch block finds whether or \\n // not to set the carry bit for the \\n // next iteration.\\n case 1 { carry := 1 }\\n default { carry := 0 }\\n }\\n result_ptr := sub(result_ptr,0x20) // point to next 'result' word\\n max_ptr := sub(max_ptr,0x20) // point to next 'max' word\\n }\\n\\n switch eq(carry,0) \\n case 1{ result_start := add(result_start,0x20) } // if carry is 0, increment result_start, ie.\\n // length word for result is now one word \\n // position ahead.\\n default { mstore(result_ptr, 1) } // else if carry is 1, store 1; overflow has\\n // occured, so length word remains in the \\n // same position.\\n\\n result := result_start // point 'result' bytes value to the correct\\n // address in memory.\\n mstore(result,add(mload(max),mul(0x20,carry))) // store length of result. we are finished \\n // with the byte array.\\n \\n mstore(0x40, add(result,add(mload(result),0x20))) // Update freemem pointer to point to new \\n // end of memory.\\n\\n // we now calculate the result's bit length.\\n // with addition, if we assume that some a is at least equal to some b, then the resulting bit length will\\n // be a's bit length or (a's bit length)+1, depending on carry bit.this is cheaper than calling bitLength.\\n let msword := mload(add(result,0x20)) // get most significant word of result\\n // if(msword==1 || msword>>(max_bitlen % 256)==1):\\n if or( eq(msword, 1), eq(shr(mod(max_bitlen,256),msword),1) ) {\\n max_bitlen := add(max_bitlen, 1) // if msword's bit length is 1 greater \\n // than max_bitlen, OR overflow occured,\\n // new bitlen is max_bitlen+1.\\n }\\n }\\n \\n\\n return (result, max_bitlen);\\n }\\n\\n /** @notice takes two BigNumber memory values and subtracts them.\\n * @dev _sub: This function is private and only callable from add: therefore the values may be of different sizes, \\n * in any order of size, and of different signs (handled in add).\\n * As values may be of different sizes, inputs are considered starting from the least significant words,\\n * working back. \\n * The function calculates the new bitlen (basically if bitlens are the same for max and min, \\n * max_bitlen++) and returns a new BigNumber memory value.\\n *\\n * @param max bytes - biggest value (determined from add)\\n * @param min bytes - smallest value (determined from add)\\n * @return bytes result - max + min.\\n * @return uint - bit length of result.\\n */\\n function _sub(\\n bytes memory max, \\n bytes memory min\\n ) internal pure returns (bytes memory, uint) {\\n bytes memory result;\\n uint carry = 0;\\n uint uint_max = type(uint256).max;\\n assembly {\\n \\n let result_start := msize() // Get the highest available block of \\n // memory\\n \\n let max_len := mload(max)\\n let min_len := mload(min) // load lengths of inputs\\n \\n let len_diff := sub(max_len,min_len) // get differences in lengths.\\n \\n let max_ptr := add(max, max_len)\\n let min_ptr := add(min, min_len) // go to end of arrays\\n let result_ptr := add(result_start, max_len) // point to least significant result \\n // word.\\n let memory_end := add(result_ptr,0x20) // save memory_end to update free memory\\n // pointer at the end.\\n \\n for { let i := max_len } eq(eq(i,0),0) { i := sub(i, 0x20) } { // for(int i=max_length; i!=0; i-=32)\\n let max_val := mload(max_ptr) // get next word for 'max'\\n switch gt(i,len_diff) // if(i>(max_length-min_length)). while\\n // 'min' words are still available.\\n case 1{ \\n let min_val := mload(min_ptr) // get next word for 'min'\\n \\n mstore(result_ptr, sub(sub(max_val,min_val),carry)) // result_word = (max_word-min_word)-carry\\n \\n switch or(lt(max_val, add(min_val,carry)), \\n and(eq(min_val,uint_max), eq(carry,1))) // this switch block finds whether or \\n // not to set the carry bit for the next iteration.\\n case 1 { carry := 1 }\\n default { carry := 0 }\\n \\n min_ptr := sub(min_ptr,0x20) // point to next 'result' word\\n }\\n default { // else: remainder after 'min' words are complete.\\n\\n mstore(result_ptr, sub(max_val,carry)) // result_word = max_word-carry\\n \\n switch and( eq(max_val,0), eq(carry,1) ) // this switch block finds whether or \\n // not to set the carry bit for the \\n // next iteration.\\n case 1 { carry := 1 }\\n default { carry := 0 }\\n\\n }\\n result_ptr := sub(result_ptr,0x20) // point to next 'result' word\\n max_ptr := sub(max_ptr,0x20) // point to next 'max' word\\n } \\n\\n //the following code removes any leading words containing all zeroes in the result.\\n result_ptr := add(result_ptr,0x20) \\n\\n // for(result_ptr+=32;; result==0; result_ptr+=32)\\n for { } eq(mload(result_ptr), 0) { result_ptr := add(result_ptr,0x20) } { \\n result_start := add(result_start, 0x20) // push up the start pointer for the result\\n max_len := sub(max_len,0x20) // subtract a word (32 bytes) from the \\n // result length.\\n } \\n\\n result := result_start // point 'result' bytes value to \\n // the correct address in memory\\n \\n mstore(result,max_len) // store length of result. we \\n // are finished with the byte array.\\n \\n mstore(0x40, memory_end) // Update freemem pointer.\\n }\\n\\n uint new_bitlen = bitLength(result); // calculate the result's \\n // bit length.\\n \\n return (result, new_bitlen);\\n }\\n\\n /** @notice gets the modulus value necessary for calculating exponetiation.\\n * @dev _powModulus: we must pass the minimum modulus value which would return JUST the a^b part of the calculation\\n * in modexp. the rationale here is:\\n * if 'a' has n bits, then a^e has at most n*e bits.\\n * using this modulus in exponetiation will result in simply a^e.\\n * therefore the value may be many words long.\\n * This is done by:\\n * - storing total modulus byte length\\n * - storing first word of modulus with correct bit set\\n * - updating the free memory pointer to come after total length.\\n *\\n * @param a BigNumber base\\n * @param e uint exponent\\n * @return BigNumber modulus result\\n */\\n function _powModulus(\\n BigNumber memory a, \\n uint e\\n ) private pure returns(BigNumber memory){\\n bytes memory _modulus = ZERO;\\n uint mod_index;\\n\\n assembly {\\n mod_index := mul(mload(add(a, 0x40)), e) // a.bitlen * e is the max bitlength of result\\n let first_word_modulus := shl(mod(mod_index, 256), 1) // set bit in first modulus word.\\n mstore(_modulus, mul(add(div(mod_index,256),1),0x20)) // store length of modulus\\n mstore(add(_modulus,0x20), first_word_modulus) // set first modulus word\\n mstore(0x40, add(_modulus, add(mload(_modulus),0x20))) // update freemem pointer to be modulus index\\n // + length\\n }\\n\\n //create modulus BigNumber memory for modexp function\\n return BigNumber(_modulus, false, mod_index); \\n }\\n\\n /** @notice Modular Exponentiation: Takes bytes values for base, exp, mod and calls precompile for (base^exp)%^mod\\n * @dev modexp: Wrapper for built-in modexp (contract 0x5) as described here: \\n * https://github.com/ethereum/EIPs/pull/198\\n *\\n * @param _b bytes base\\n * @param _e bytes base_inverse \\n * @param _m bytes exponent\\n * @param r bytes result.\\n */\\n function _modexp(\\n bytes memory _b, \\n bytes memory _e, \\n bytes memory _m\\n ) private view returns(bytes memory r) {\\n assembly {\\n \\n let bl := mload(_b)\\n let el := mload(_e)\\n let ml := mload(_m)\\n \\n \\n let freemem := mload(0x40) // Free memory pointer is always stored at 0x40\\n \\n \\n mstore(freemem, bl) // arg[0] = base.length @ +0\\n \\n mstore(add(freemem,32), el) // arg[1] = exp.length @ +32\\n \\n mstore(add(freemem,64), ml) // arg[2] = mod.length @ +64\\n \\n // arg[3] = base.bits @ + 96\\n // Use identity built-in (contract 0x4) as a cheap memcpy\\n let success := staticcall(450, 0x4, add(_b,32), bl, add(freemem,96), bl)\\n \\n // arg[4] = exp.bits @ +96+base.length\\n let size := add(96, bl)\\n success := staticcall(450, 0x4, add(_e,32), el, add(freemem,size), el)\\n \\n // arg[5] = mod.bits @ +96+base.length+exp.length\\n size := add(size,el)\\n success := staticcall(450, 0x4, add(_m,32), ml, add(freemem,size), ml)\\n \\n switch success case 0 { invalid() } //fail where we haven't enough gas to make the call\\n\\n // Total size of input = 96+base.length+exp.length+mod.length\\n size := add(size,ml)\\n // Invoke contract 0x5, put return value right after mod.length, @ +96\\n success := staticcall(sub(gas(), 1350), 0x5, freemem, size, add(freemem, 0x60), ml)\\n\\n switch success case 0 { invalid() } //fail where we haven't enough gas to make the call\\n\\n let length := ml\\n let msword_ptr := add(freemem, 0x60)\\n\\n ///the following code removes any leading words containing all zeroes in the result.\\n for { } eq ( eq(length, 0x20), 0) { } { // for(; length!=32; length-=32)\\n switch eq(mload(msword_ptr),0) // if(msword==0):\\n case 1 { msword_ptr := add(msword_ptr, 0x20) } // update length pointer\\n default { break } // else: loop termination. non-zero word found\\n length := sub(length,0x20) \\n } \\n r := sub(msword_ptr,0x20)\\n mstore(r, length)\\n \\n // point to the location of the return value (length, bits)\\n //assuming mod length is multiple of 32, return value is already in the right format.\\n mstore(0x40, add(add(96, freemem),ml)) //deallocate freemem pointer\\n } \\n }\\n // ***************** END PRIVATE CORE CALCULATION FUNCTIONS ******************\\n\\n\\n\\n\\n\\n // ***************** START PRIVATE HELPER FUNCTIONS ******************\\n /** @notice left shift BigNumber memory 'dividend' by 'value' bits.\\n * @param bn value to shift\\n * @param bits amount of bits to shift by\\n * @return r result\\n */\\n function _shl(\\n BigNumber memory bn, \\n uint bits\\n ) private view returns(BigNumber memory r) {\\n if(bits==0 || bn.bitlen==0) return bn;\\n \\n // we start by creating an empty bytes array of the size of the output, based on 'bits'.\\n // for that we must get the amount of extra words needed for the output.\\n uint length = bn.val.length;\\n // position of bitlen in most significnat word\\n uint bit_position = ((bn.bitlen-1) % 256) + 1;\\n // total extra words. we check if the bits remainder will add one more word.\\n uint extra_words = (bits / 256) + ( (bits % 256) >= (256 - bit_position) ? 1 : 0);\\n // length of output\\n uint total_length = length + (extra_words * 0x20);\\n\\n r.bitlen = bn.bitlen+(bits);\\n r.neg = bn.neg;\\n bits %= 256;\\n\\n \\n bytes memory bn_shift;\\n uint bn_shift_ptr;\\n // the following efficiently creates an empty byte array of size 'total_length'\\n assembly {\\n let freemem_ptr := mload(0x40) // get pointer to free memory\\n mstore(freemem_ptr, total_length) // store bytes length\\n let mem_end := add(freemem_ptr, total_length) // end of memory\\n mstore(mem_end, 0) // store 0 at memory end\\n bn_shift := freemem_ptr // set pointer to bytes\\n bn_shift_ptr := add(bn_shift, 0x20) // get bn_shift pointer\\n mstore(0x40, add(mem_end, 0x20)) // update freemem pointer\\n }\\n\\n // use identity for cheap copy if bits is multiple of 8.\\n if(bits % 8 == 0) {\\n // calculate the position of the first byte in the result.\\n uint bytes_pos = ((256-(((bn.bitlen-1)+bits) % 256))-1) / 8;\\n uint insize = (bn.bitlen / 8) + ((bn.bitlen % 8 != 0) ? 1 : 0);\\n assembly {\\n let in := add(add(mload(bn), 0x20), div(sub(256, bit_position), 8))\\n let out := add(bn_shift_ptr, bytes_pos)\\n let success := staticcall(450, 0x4, in, insize, out, length)\\n }\\n r.val = bn_shift;\\n return r;\\n }\\n\\n\\n uint mask;\\n uint mask_shift = 0x100-bits;\\n uint msw;\\n uint msw_ptr;\\n\\n assembly {\\n msw_ptr := add(mload(bn), 0x20) \\n }\\n \\n // handle first word before loop if the shift adds any extra words.\\n // the loop would handle it if the bit shift doesn't wrap into the next word, \\n // so we check only for that condition.\\n if((bit_position+bits) > 256){\\n assembly {\\n msw := mload(msw_ptr)\\n mstore(bn_shift_ptr, shr(mask_shift, msw))\\n bn_shift_ptr := add(bn_shift_ptr, 0x20)\\n }\\n }\\n \\n // as a result of creating the empty array we just have to operate on the words in the original bn.\\n for(uint i=bn.val.length; i!=0; i-=0x20){ // for each word:\\n assembly {\\n msw := mload(msw_ptr) // get most significant word\\n switch eq(i,0x20) // if i==32:\\n case 1 { mask := 0 } // handles msword: no mask needed.\\n default { mask := mload(add(msw_ptr,0x20)) } // else get mask (next word)\\n msw := shl(bits, msw) // left shift current msw by 'bits'\\n mask := shr(mask_shift, mask) // right shift next significant word by mask_shift\\n mstore(bn_shift_ptr, or(msw,mask)) // store OR'd mask and shifted bits in-place\\n msw_ptr := add(msw_ptr, 0x20)\\n bn_shift_ptr := add(bn_shift_ptr, 0x20)\\n }\\n }\\n\\n r.val = bn_shift;\\n }\\n // ***************** END PRIVATE HELPER FUNCTIONS ******************\\n}\\n\",\"keccak256\":\"0x581b5e7b7700a01eeec9ac00825ddb81753cfea182c9211e733eaf883584f7de\",\"license\":\"MIT\"},\"contracts/DealClient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.17;\\n\\nimport {MarketAPI} from \\\"@zondax/filecoin-solidity/contracts/v0.8/MarketAPI.sol\\\";\\nimport {CommonTypes} from \\\"@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol\\\";\\nimport {MarketTypes} from \\\"@zondax/filecoin-solidity/contracts/v0.8/types/MarketTypes.sol\\\";\\nimport {AccountTypes} from \\\"@zondax/filecoin-solidity/contracts/v0.8/types/AccountTypes.sol\\\";\\nimport {CommonTypes} from \\\"@zondax/filecoin-solidity/contracts/v0.8/types/CommonTypes.sol\\\";\\nimport {AccountCBOR} from \\\"@zondax/filecoin-solidity/contracts/v0.8/cbor/AccountCbor.sol\\\";\\nimport {MarketCBOR} from \\\"@zondax/filecoin-solidity/contracts/v0.8/cbor/MarketCbor.sol\\\";\\nimport {BytesCBOR} from \\\"@zondax/filecoin-solidity/contracts/v0.8/cbor/BytesCbor.sol\\\";\\nimport {BigNumbers, BigNumber} from \\\"@zondax/solidity-bignumber/src/BigNumbers.sol\\\";\\nimport {BigInts} from \\\"@zondax/filecoin-solidity/contracts/v0.8/utils/BigInts.sol\\\";\\nimport {CBOR} from \\\"solidity-cborutils/contracts/CBOR.sol\\\";\\nimport {Misc} from \\\"@zondax/filecoin-solidity/contracts/v0.8/utils/Misc.sol\\\";\\nimport {FilAddresses} from \\\"@zondax/filecoin-solidity/contracts/v0.8/utils/FilAddresses.sol\\\";\\n\\nusing CBOR for CBOR.CBORBuffer;\\n\\nstruct RequestId {\\n bytes32 requestId;\\n bool valid;\\n}\\n\\nstruct RequestIdx {\\n uint256 idx;\\n bool valid;\\n}\\n\\nstruct ProviderSet {\\n bytes provider;\\n bool valid;\\n}\\n\\n// User request for this contract to make a deal. This structure is modelled after Filecoin's Deal\\n// Proposal, but leaves out the provider, since any provider can pick up a deal broadcast by this\\n// contract.\\nstruct DealRequest {\\n bytes piece_cid;\\n uint64 piece_size;\\n bool verified_deal;\\n string label;\\n int64 start_epoch;\\n int64 end_epoch;\\n uint256 storage_price_per_epoch;\\n uint256 provider_collateral;\\n uint256 client_collateral;\\n uint64 extra_params_version;\\n ExtraParamsV1 extra_params;\\n}\\n\\n// Extra parameters associated with the deal request. These are off-protocol flags that\\n// the storage provider will need.\\nstruct ExtraParamsV1 {\\n string location_ref;\\n uint64 car_size;\\n bool skip_ipni_announce;\\n bool remove_unsealed_copy;\\n}\\n\\nfunction serializeExtraParamsV1(\\n ExtraParamsV1 memory params\\n) pure returns (bytes memory) {\\n CBOR.CBORBuffer memory buf = CBOR.create(64);\\n buf.startFixedArray(4);\\n buf.writeString(params.location_ref);\\n buf.writeUInt64(params.car_size);\\n buf.writeBool(params.skip_ipni_announce);\\n buf.writeBool(params.remove_unsealed_copy);\\n return buf.data();\\n}\\n\\ncontract DealClient {\\n using AccountCBOR for *;\\n using MarketCBOR for *;\\n\\n uint64 public constant AUTHENTICATE_MESSAGE_METHOD_NUM = 2643134072;\\n uint64 public constant DATACAP_RECEIVER_HOOK_METHOD_NUM = 3726118371;\\n uint64 public constant MARKET_NOTIFY_DEAL_METHOD_NUM = 4186741094;\\n address public constant MARKET_ACTOR_ETH_ADDRESS =\\n address(0xff00000000000000000000000000000000000005);\\n address public constant DATACAP_ACTOR_ETH_ADDRESS =\\n address(0xfF00000000000000000000000000000000000007);\\n\\n\\n enum Status {\\n None,\\n RequestSubmitted,\\n DealPublished,\\n DealActivated,\\n DealTerminated\\n }\\n\\n mapping(bytes32 => RequestIdx) public dealRequestIdx; // contract deal id -> deal index\\n DealRequest[] public dealRequests;\\n\\n mapping(bytes => RequestId) public pieceRequests; // commP -> dealProposalID\\n mapping(bytes => ProviderSet) public pieceProviders; // commP -> provider\\n mapping(bytes => uint64) public pieceDeals; // commP -> deal ID\\n mapping(bytes => Status) public pieceStatus;\\n\\n event ReceivedDataCap(string received);\\n event DealProposalCreate(\\n bytes32 indexed id,\\n uint64 size,\\n bool indexed verified,\\n uint256 price\\n );\\n\\n address public owner;\\n\\n constructor() {\\n owner = msg.sender;\\n }\\n\\n function getProviderSet(\\n bytes calldata cid\\n ) public view returns (ProviderSet memory) {\\n return pieceProviders[cid];\\n }\\n\\n function getProposalIdSet(\\n bytes calldata cid\\n ) public view returns (RequestId memory) {\\n return pieceRequests[cid];\\n }\\n\\n function dealsLength() public view returns (uint256) {\\n return dealRequests.length;\\n }\\n\\n function getDealByIndex(\\n uint256 index\\n ) public view returns (DealRequest memory) {\\n return dealRequests[index];\\n }\\n\\n function makeDealProposal(\\n DealRequest calldata deal\\n ) public returns (bytes32) {\\n require(msg.sender == owner);\\n\\n if (pieceStatus[deal.piece_cid] == Status.DealPublished ||\\n pieceStatus[deal.piece_cid] == Status.DealActivated) {\\n revert(\\\"deal with this pieceCid already published\\\");\\n }\\n\\n uint256 index = dealRequests.length;\\n dealRequests.push(deal);\\n\\n // creates a unique ID for the deal proposal -- there are many ways to do this\\n bytes32 id = keccak256(\\n abi.encodePacked(block.timestamp, msg.sender, index)\\n );\\n dealRequestIdx[id] = RequestIdx(index, true);\\n\\n pieceRequests[deal.piece_cid] = RequestId(id, true);\\n pieceStatus[deal.piece_cid] = Status.RequestSubmitted;\\n\\n // writes the proposal metadata to the event log\\n emit DealProposalCreate(\\n id,\\n deal.piece_size,\\n deal.verified_deal,\\n deal.storage_price_per_epoch\\n );\\n\\n return id;\\n }\\n\\n // helper function to get deal request based from id\\n function getDealRequest(\\n bytes32 requestId\\n ) internal view returns (DealRequest memory) {\\n RequestIdx memory ri = dealRequestIdx[requestId];\\n require(ri.valid, \\\"proposalId not available\\\");\\n return dealRequests[ri.idx];\\n }\\n\\n // Returns a CBOR-encoded DealProposal.\\n function getDealProposal(\\n bytes32 proposalId\\n ) public view returns (bytes memory) {\\n DealRequest memory deal = getDealRequest(proposalId);\\n\\n MarketTypes.DealProposal memory ret;\\n ret.piece_cid = CommonTypes.Cid(deal.piece_cid);\\n ret.piece_size = deal.piece_size;\\n ret.verified_deal = deal.verified_deal;\\n ret.client = FilAddresses.fromEthAddress(address(this));\\n // Set a dummy provider. The provider that picks up this deal will need to set its own address.\\n ret.provider = FilAddresses.fromActorID(0);\\n ret.label = CommonTypes.DealLabel(bytes(deal.label), true);\\n ret.start_epoch = CommonTypes.ChainEpoch.wrap(deal.start_epoch);\\n ret.end_epoch = CommonTypes.ChainEpoch.wrap(deal.end_epoch);\\n ret.storage_price_per_epoch = BigInts.fromUint256(\\n deal.storage_price_per_epoch\\n );\\n ret.provider_collateral = BigInts.fromUint256(deal.provider_collateral);\\n ret.client_collateral = BigInts.fromUint256(deal.client_collateral);\\n\\n return MarketCBOR.serializeDealProposal(ret);\\n }\\n\\n function getExtraParams(\\n bytes32 proposalId\\n ) public view returns (bytes memory extra_params) {\\n DealRequest memory deal = getDealRequest(proposalId);\\n return serializeExtraParamsV1(deal.extra_params);\\n }\\n\\n\\n // authenticateMessage is the callback from the market actor into the contract\\n // as part of PublishStorageDeals. This message holds the deal proposal from the\\n // miner, which needs to be validated by the contract in accordance with the\\n // deal requests made and the contract's own policies\\n // @params - cbor byte array of AccountTypes.AuthenticateMessageParams\\n function authenticateMessage(bytes memory params) internal view {\\n require(\\n msg.sender == MARKET_ACTOR_ETH_ADDRESS,\\n \\\"msg.sender needs to be market actor f05\\\"\\n );\\n\\n AccountTypes.AuthenticateMessageParams memory amp = params\\n .deserializeAuthenticateMessageParams();\\n MarketTypes.DealProposal memory proposal = MarketCBOR.deserializeDealProposal(\\n amp.message\\n );\\n\\n bytes memory pieceCid = proposal.piece_cid.data;\\n require(pieceRequests[pieceCid].valid, \\\"piece cid must be added before authorizing\\\");\\n require(!pieceProviders[pieceCid].valid, \\\"deal failed policy check: provider already claimed this cid\\\");\\n\\n DealRequest memory req = getDealRequest(pieceRequests[pieceCid].requestId);\\n require(proposal.verified_deal == req.verified_deal, \\\"verified_deal param mismatch\\\");\\n (uint256 proposalStoragePricePerEpoch, bool storagePriceConverted) = BigInts.toUint256(proposal.storage_price_per_epoch);\\n require(!storagePriceConverted, \\\"Issues converting uint256 to BigInt, may not have accurate values\\\");\\n (uint256 proposalClientCollateral, bool collateralConverted) = BigInts.toUint256(proposal.client_collateral);\\n require(!collateralConverted, \\\"Issues converting uint256 to BigInt, may not have accurate values\\\");\\n require(proposalStoragePricePerEpoch <= req.storage_price_per_epoch, \\\"storage price greater than request amount\\\");\\n require(proposalClientCollateral <= req.client_collateral, \\\"client collateral greater than request amount\\\");\\n\\n }\\n\\n // dealNotify is the callback from the market actor into the contract at the end\\n // of PublishStorageDeals. This message holds the previously approved deal proposal\\n // and the associated dealID. The dealID is stored as part of the contract state\\n // and the completion of this call marks the success of PublishStorageDeals\\n // @params - cbor byte array of MarketDealNotifyParams\\n function dealNotify(bytes memory params) internal {\\n require(\\n msg.sender == MARKET_ACTOR_ETH_ADDRESS,\\n \\\"msg.sender needs to be market actor f05\\\"\\n );\\n\\n MarketTypes.MarketDealNotifyParams memory mdnp = MarketCBOR.deserializeMarketDealNotifyParams(\\n params\\n );\\n MarketTypes.DealProposal memory proposal = MarketCBOR.deserializeDealProposal(\\n mdnp.dealProposal\\n );\\n\\n // These checks prevent race conditions between the authenticateMessage and\\n // marketDealNotify calls where someone could have 2 of the same deal proposals\\n // within the same PSD msg, which would then get validated by authenticateMessage\\n // However, only one of those deals should be allowed\\n require(\\n pieceRequests[proposal.piece_cid.data].valid,\\n \\\"piece cid must be added before authorizing\\\"\\n );\\n require(\\n !pieceProviders[proposal.piece_cid.data].valid,\\n \\\"deal failed policy check: provider already claimed this cid\\\"\\n );\\n\\n pieceProviders[proposal.piece_cid.data] = ProviderSet(\\n proposal.provider.data,\\n true\\n );\\n pieceDeals[proposal.piece_cid.data] = mdnp.dealId;\\n pieceStatus[proposal.piece_cid.data] = Status.DealPublished;\\n }\\n\\n\\n // This function can be called/smartly polled to retrieve the deal activation status\\n // associated with provided pieceCid and update the contract state based on that\\n // info\\n // @pieceCid - byte representation of pieceCid\\n function updateActivationStatus(bytes memory pieceCid) public {\\n require(pieceDeals[pieceCid] > 0, \\\"no deal published for this piece cid\\\");\\n\\n MarketTypes.GetDealActivationReturn memory ret = MarketAPI.getDealActivation(pieceDeals[pieceCid]);\\n if (CommonTypes.ChainEpoch.unwrap(ret.terminated) > 0) {\\n pieceStatus[pieceCid] = Status.DealTerminated;\\n } else if (CommonTypes.ChainEpoch.unwrap(ret.activated) > 0) {\\n pieceStatus[pieceCid] = Status.DealActivated;\\n }\\n }\\n\\n // addBalance funds the builtin storage market actor's escrow\\n // with funds from the contract's own balance\\n // @value - amount to be added in escrow in attoFIL\\n function addBalance(uint256 value) public {\\n require(msg.sender == owner);\\n MarketAPI.addBalance(FilAddresses.fromEthAddress(address(this)), value);\\n }\\n\\n // This function attempts to withdraw the specified amount from the contract addr's escrow balance\\n // If less than the given amount is available, the full escrow balance is withdrawn\\n // @client - Eth address where the balance is withdrawn to. This can be the contract address or an external address\\n // @value - amount to be withdrawn in escrow in attoFIL\\n function withdrawBalance(\\n address client,\\n uint256 value\\n ) public returns (uint) {\\n require(msg.sender == owner);\\n\\n MarketTypes.WithdrawBalanceParams memory params = MarketTypes\\n .WithdrawBalanceParams(\\n FilAddresses.fromEthAddress(client),\\n BigInts.fromUint256(value)\\n );\\n CommonTypes.BigInt memory ret = MarketAPI.withdrawBalance(params);\\n\\n (uint256 withdrawBalanceAmount, bool withdrawBalanceConverted) = BigInts.toUint256(ret);\\n require(withdrawBalanceConverted, \\\"Problems converting withdraw balance into Big Int, may cause an overflow\\\");\\n\\n return withdrawBalanceAmount;\\n }\\n\\n function receiveDataCap(bytes memory params) internal {\\n require(\\n msg.sender == DATACAP_ACTOR_ETH_ADDRESS,\\n \\\"msg.sender needs to be datacap actor f07\\\"\\n );\\n emit ReceivedDataCap(\\\"DataCap Received!\\\");\\n // Add get datacap balance api and store datacap amount\\n }\\n\\n\\n // handle_filecoin_method is the universal entry point for any evm based\\n // actor for a call coming from a builtin filecoin actor\\n // @method - FRC42 method number for the specific method hook\\n // @params - CBOR encoded byte array params\\n function handle_filecoin_method(\\n uint64 method,\\n uint64,\\n bytes memory params\\n ) public returns (uint32, uint64, bytes memory) {\\n bytes memory ret;\\n uint64 codec;\\n // dispatch methods\\n if (method == AUTHENTICATE_MESSAGE_METHOD_NUM) {\\n authenticateMessage(params);\\n // If we haven't reverted, we should return a CBOR true to indicate that verification passed.\\n CBOR.CBORBuffer memory buf = CBOR.create(1);\\n buf.writeBool(true);\\n ret = buf.data();\\n codec = Misc.CBOR_CODEC;\\n } else if (method == MARKET_NOTIFY_DEAL_METHOD_NUM) {\\n dealNotify(params);\\n } else if (method == DATACAP_RECEIVER_HOOK_METHOD_NUM) {\\n receiveDataCap(params);\\n } else {\\n revert(\\\"the filecoin method that was called is not handled\\\");\\n }\\n return (0, codec, ret);\\n }\\n}\\n\",\"keccak256\":\"0xe487cfb82226c6a2f5555da4d10e43b8fb786dcdfb335a1f1478076bd6565d85\",\"license\":\"MIT\"},\"solidity-cborutils/contracts/CBOR.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@ensdomains/buffer/contracts/Buffer.sol\\\";\\n\\n/**\\n* @dev A library for populating CBOR encoded payload in Solidity.\\n*\\n* https://datatracker.ietf.org/doc/html/rfc7049\\n*\\n* The library offers various write* and start* methods to encode values of different types.\\n* The resulted buffer can be obtained with data() method.\\n* Encoding of primitive types is staightforward, whereas encoding of sequences can result\\n* in an invalid CBOR if start/write/end flow is violated.\\n* For the purpose of gas saving, the library does not verify start/write/end flow internally,\\n* except for nested start/end pairs.\\n*/\\n\\nlibrary CBOR {\\n using Buffer for Buffer.buffer;\\n\\n struct CBORBuffer {\\n Buffer.buffer buf;\\n uint256 depth;\\n }\\n\\n uint8 private constant MAJOR_TYPE_INT = 0;\\n uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;\\n uint8 private constant MAJOR_TYPE_BYTES = 2;\\n uint8 private constant MAJOR_TYPE_STRING = 3;\\n uint8 private constant MAJOR_TYPE_ARRAY = 4;\\n uint8 private constant MAJOR_TYPE_MAP = 5;\\n uint8 private constant MAJOR_TYPE_TAG = 6;\\n uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;\\n\\n uint8 private constant TAG_TYPE_BIGNUM = 2;\\n uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3;\\n\\n uint8 private constant CBOR_FALSE = 20;\\n uint8 private constant CBOR_TRUE = 21;\\n uint8 private constant CBOR_NULL = 22;\\n uint8 private constant CBOR_UNDEFINED = 23;\\n\\n function create(uint256 capacity) internal pure returns(CBORBuffer memory cbor) {\\n Buffer.init(cbor.buf, capacity);\\n cbor.depth = 0;\\n return cbor;\\n }\\n\\n function data(CBORBuffer memory buf) internal pure returns(bytes memory) {\\n require(buf.depth == 0, \\\"Invalid CBOR\\\");\\n return buf.buf.buf;\\n }\\n\\n function writeUInt256(CBORBuffer memory buf, uint256 value) internal pure {\\n buf.buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM));\\n writeBytes(buf, abi.encode(value));\\n }\\n\\n function writeInt256(CBORBuffer memory buf, int256 value) internal pure {\\n if (value < 0) {\\n buf.buf.appendUint8(\\n uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM)\\n );\\n writeBytes(buf, abi.encode(uint256(-1 - value)));\\n } else {\\n writeUInt256(buf, uint256(value));\\n }\\n }\\n\\n function writeUInt64(CBORBuffer memory buf, uint64 value) internal pure {\\n writeFixedNumeric(buf, MAJOR_TYPE_INT, value);\\n }\\n\\n function writeInt64(CBORBuffer memory buf, int64 value) internal pure {\\n if(value >= 0) {\\n writeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(value));\\n } else{\\n writeFixedNumeric(buf, MAJOR_TYPE_NEGATIVE_INT, uint64(-1 - value));\\n }\\n }\\n\\n function writeBytes(CBORBuffer memory buf, bytes memory value) internal pure {\\n writeFixedNumeric(buf, MAJOR_TYPE_BYTES, uint64(value.length));\\n buf.buf.append(value);\\n }\\n\\n function writeString(CBORBuffer memory buf, string memory value) internal pure {\\n writeFixedNumeric(buf, MAJOR_TYPE_STRING, uint64(bytes(value).length));\\n buf.buf.append(bytes(value));\\n }\\n\\n function writeBool(CBORBuffer memory buf, bool value) internal pure {\\n writeContentFree(buf, value ? CBOR_TRUE : CBOR_FALSE);\\n }\\n\\n function writeNull(CBORBuffer memory buf) internal pure {\\n writeContentFree(buf, CBOR_NULL);\\n }\\n\\n function writeUndefined(CBORBuffer memory buf) internal pure {\\n writeContentFree(buf, CBOR_UNDEFINED);\\n }\\n\\n function startArray(CBORBuffer memory buf) internal pure {\\n writeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);\\n buf.depth += 1;\\n }\\n\\n function startFixedArray(CBORBuffer memory buf, uint64 length) internal pure {\\n writeDefiniteLengthType(buf, MAJOR_TYPE_ARRAY, length);\\n }\\n\\n function startMap(CBORBuffer memory buf) internal pure {\\n writeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);\\n buf.depth += 1;\\n }\\n\\n function startFixedMap(CBORBuffer memory buf, uint64 length) internal pure {\\n writeDefiniteLengthType(buf, MAJOR_TYPE_MAP, length);\\n }\\n\\n function endSequence(CBORBuffer memory buf) internal pure {\\n writeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);\\n buf.depth -= 1;\\n }\\n\\n function writeKVString(CBORBuffer memory buf, string memory key, string memory value) internal pure {\\n writeString(buf, key);\\n writeString(buf, value);\\n }\\n\\n function writeKVBytes(CBORBuffer memory buf, string memory key, bytes memory value) internal pure {\\n writeString(buf, key);\\n writeBytes(buf, value);\\n }\\n\\n function writeKVUInt256(CBORBuffer memory buf, string memory key, uint256 value) internal pure {\\n writeString(buf, key);\\n writeUInt256(buf, value);\\n }\\n\\n function writeKVInt256(CBORBuffer memory buf, string memory key, int256 value) internal pure {\\n writeString(buf, key);\\n writeInt256(buf, value);\\n }\\n\\n function writeKVUInt64(CBORBuffer memory buf, string memory key, uint64 value) internal pure {\\n writeString(buf, key);\\n writeUInt64(buf, value);\\n }\\n\\n function writeKVInt64(CBORBuffer memory buf, string memory key, int64 value) internal pure {\\n writeString(buf, key);\\n writeInt64(buf, value);\\n }\\n\\n function writeKVBool(CBORBuffer memory buf, string memory key, bool value) internal pure {\\n writeString(buf, key);\\n writeBool(buf, value);\\n }\\n\\n function writeKVNull(CBORBuffer memory buf, string memory key) internal pure {\\n writeString(buf, key);\\n writeNull(buf);\\n }\\n\\n function writeKVUndefined(CBORBuffer memory buf, string memory key) internal pure {\\n writeString(buf, key);\\n writeUndefined(buf);\\n }\\n\\n function writeKVMap(CBORBuffer memory buf, string memory key) internal pure {\\n writeString(buf, key);\\n startMap(buf);\\n }\\n\\n function writeKVArray(CBORBuffer memory buf, string memory key) internal pure {\\n writeString(buf, key);\\n startArray(buf);\\n }\\n\\n function writeFixedNumeric(\\n CBORBuffer memory buf,\\n uint8 major,\\n uint64 value\\n ) private pure {\\n if (value <= 23) {\\n buf.buf.appendUint8(uint8((major << 5) | value));\\n } else if (value <= 0xFF) {\\n buf.buf.appendUint8(uint8((major << 5) | 24));\\n buf.buf.appendInt(value, 1);\\n } else if (value <= 0xFFFF) {\\n buf.buf.appendUint8(uint8((major << 5) | 25));\\n buf.buf.appendInt(value, 2);\\n } else if (value <= 0xFFFFFFFF) {\\n buf.buf.appendUint8(uint8((major << 5) | 26));\\n buf.buf.appendInt(value, 4);\\n } else {\\n buf.buf.appendUint8(uint8((major << 5) | 27));\\n buf.buf.appendInt(value, 8);\\n }\\n }\\n\\n function writeIndefiniteLengthType(CBORBuffer memory buf, uint8 major)\\n private\\n pure\\n {\\n buf.buf.appendUint8(uint8((major << 5) | 31));\\n }\\n\\n function writeDefiniteLengthType(CBORBuffer memory buf, uint8 major, uint64 length)\\n private\\n pure\\n {\\n writeFixedNumeric(buf, major, length);\\n }\\n\\n function writeContentFree(CBORBuffer memory buf, uint8 value) private pure {\\n buf.buf.appendUint8(uint8((MAJOR_TYPE_CONTENT_FREE << 5) | value));\\n }\\n}\",\"keccak256\":\"0xe03d8889bf66e7a30e8010b022b6c86ad0f8c19764cc6c7f50b6bb4ad860cb9b\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50600680546001600160a01b03191633179055615bf680620000336000396000f3fe608060405234801561001057600080fd5b506004361061018c5760003560e01c8063868e10c4116100e3578063be965ce71161008c578063f44a890311610066578063f44a890314610426578063f4b2e4d814610446578063f82704f01461045957600080fd5b8063be965ce7146103e5578063d91921ed14610400578063dd27fe901461041357600080fd5b8063a6d1b7b8116100bd578063a6d1b7b81461036d578063b34ba252146103b0578063bad79de9146103bb57600080fd5b8063868e10c4146103185780638da5cb5b1461033a57806396925ae61461034d57600080fd5b806329aa3d2a116101455780636067f4541161011f5780636067f454146102d857806366263735146102e357806378133bb2146102f857600080fd5b806329aa3d2a146102515780634634aed5146102795780634e8a3ca41461029957600080fd5b80630cf20cc9116101765780630cf20cc9146101ee5780631adf7eb11461020e578063297ab4861461024957600080fd5b8062706790146101915780630a0e0c91146101b2575b600080fd5b61019c639d8b067881565b6040516101a99190613e73565b60405180910390f35b61019c6101c0366004613f79565b600481805160208101820180518482526020830160208501209152546001600160401b031693508492505050565b6102016101fc366004613ff4565b61047a565b6040516101a99190614037565b61023b61021c366004614045565b6000602052806000526040600020805460019091015490915060ff1682565b6040516101a992919061406e565b600154610201565b61026c73ff0000000000000000000000000000000000000581565b6040516101a99190614092565b61028c610287366004614045565b61050b565b6040516101a991906140fc565b61023b6102a7366004613f79565b600281805160208101820180518482526020830160208501209152805460019091015490945060ff16925084915050565b61019c63f98c996681565b6102f66102f1366004613f79565b61052f565b005b61030b610306366004614157565b610620565b6040516101a991906141ca565b61032b6103263660046141f5565b610710565b6040516101a99392919061426b565b60065461026c906001600160a01b031681565b61036061035b366004614045565b6107cc565b6040516101a991906143de565b6103a361037b366004613f79565b6005818051602081018201805184825260208301602085012091525460ff1693508492505050565b6040516101a99190614433565b61019c63de180de381565b6103ce6103c9366004614045565b610a8c565b6040516101a99b9a99989796959493929190614441565b61026c73ff0000000000000000000000000000000000000781565b6102f661040e366004614045565b610d05565b61020161042136600461450d565b610d31565b610439610434366004614157565b610f90565b6040516101a9919061456a565b61028c610454366004614045565b610fef565b61046c610467366004613f79565b6110d7565b6040516101a9929190614578565b6006546000906001600160a01b0316331461049457600080fd5b600060405180604001604052806104aa86611192565b81526020016104b8856111db565b9052905060006104c782611227565b90506000806104d583611271565b91509150806104ff5760405162461bcd60e51b81526004016104f69061461b565b60405180910390fd5b50925050505b92915050565b6060600061051883611308565b9050610528816101400151611618565b9392505050565b60006004826040516105419190614653565b9081526020016040518091039020546001600160401b0316116105765760405162461bcd60e51b81526004016104f6906146bc565b60006105a860048360405161058b9190614653565b9081526020016040518091039020546001600160401b0316611675565b90506000816020015160070b13156105fd5760046005836040516105cc9190614653565b9081526020016040518091039020805460ff191660018360048111156105f4576105f46143ef565b02179055505050565b6000815160070b131561061c5760036005836040516105cc9190614653565b5050565b61063b60405160408082019052606081526000602082015290565b6003838360405161064d9291906146df565b908152602001604051809103902060405180604001604052908160008201805461067690614702565b80601f01602080910402602001604051908101604052809291908181526020018280546106a290614702565b80156106ef5780601f106106c4576101008083540402835291602001916106ef565b820191906000526020600020905b8154815290600101906020018083116106d257829003601f168201915b50505091835250506001919091015460ff1615156020909101529392505050565b60008060608082639d8b0677196001600160401b0389160161076357610735866116c8565b600061074160016118b3565b905061074e8160016118d3565b610757816118ea565b925060519150506107bc565b63f98c9965196001600160401b038916016107865761078186611917565b6107bc565b63de180de2196001600160401b038916016107a45761078186611adb565b60405162461bcd60e51b81526004016104f690614782565b6000989097509095509350505050565b6107d4613c96565b600182815481106107e7576107e7614792565b90600052602060002090600a02016040518061016001604052908160008201805461081190614702565b80601f016020809104026020016040519081016040528092919081815260200182805461083d90614702565b801561088a5780601f1061085f5761010080835404028352916020019161088a565b820191906000526020600020905b81548152906001019060200180831161086d57829003601f168201915b505050918352505060018201546001600160401b0381166020830152600160401b900460ff16151560408201526002820180546060909201916108cc90614702565b80601f01602080910402602001604051908101604052809291908181526020018280546108f890614702565b80156109455780601f1061091a57610100808354040283529160200191610945565b820191906000526020600020905b81548152906001019060200180831161092857829003601f168201915b50505091835250506003820154600781810b6020840152600160401b909104810b6040808401919091526004840154606084015260058401546080840152600684015460a0840152908301546001600160401b031660c083015260e0909101906008830190518060800160405290816000820180546109c390614702565b80601f01602080910402602001604051908101604052809291908181526020018280546109ef90614702565b8015610a3c5780601f10610a1157610100808354040283529160200191610a3c565b820191906000526020600020905b815481529060010190602001808311610a1f57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b8204811615156040840152690100000000000000000090910416151560609091015290525092915050565b60018181548110610a9c57600080fd5b906000526020600020600a9091020180549091508190610abb90614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae790614702565b8015610b345780601f10610b0957610100808354040283529160200191610b34565b820191906000526020600020905b815481529060010190602001808311610b1757829003601f168201915b50505050600183015460028401805493946001600160401b03831694600160401b90930460ff16935091610b6790614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9390614702565b8015610be05780601f10610bb557610100808354040283529160200191610be0565b820191906000526020600020905b815481529060010190602001808311610bc357829003601f168201915b505050506003830154600484015460058501546006860154600780880154969785820b97600160401b90960490910b95509293919290916001600160401b03169060088101604051806080016040529081600082018054610c4090614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6c90614702565b8015610cb95780601f10610c8e57610100808354040283529160200191610cb9565b820191906000526020600020905b815481529060010190602001808311610c9c57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b8204811615156040840152690100000000000000000090910416151560609091015290508b565b6006546001600160a01b03163314610d1c57600080fd5b610d2e610d2830611192565b82611b46565b50565b6006546000906001600160a01b03163314610d4b57600080fd5b60026005610d5984806147a8565b604051610d679291906146df565b90815260200160405180910390205460ff166004811115610d8a57610d8a6143ef565b1480610dd2575060036005610d9f84806147a8565b604051610dad9291906146df565b90815260200160405180910390205460ff166004811115610dd057610dd06143ef565b145b15610def5760405162461bcd60e51b81526004016104f690614860565b6001805480820182556000918252908390829060209020600a90910201610e168282614d63565b50506000423383604051602001610e2f93929190614d95565b60405160208183030381529060405280519060200120905060405160408082018152838252600160208084019190915260008481529081905220815181556020820151600191909101805460ff19169115159190911790555060405160408082019052818152600160208201526002610ea886806147a8565b604051610eb69291906146df565b90815260200160405180910390208151815560208201516001918201805460ff191691151591909117905590506005610eef86806147a8565b604051610efd9291906146df565b9081526020016040518091039020805460ff19166001836004811115610f2557610f256143ef565b0217905550610f3a6060850160408601614dd7565b1515817ffd6419d07e4c269e58d0c63969756c2124155b4a8d6dd08b8cd46e3a9acbf625610f6e6040880160208901614df8565b8760c00135604051610f81929190614e19565b60405180910390a39392505050565b610faa604051604080820190526000808252602082015290565b60028383604051610fbc9291906146df565b9081526020016040518091039020604051604081810190528154815260019091015460ff16151560208201529392505050565b60606000610ffc83611308565b9050611006613d30565b604051602081016040528083519052815260208201516001600160401b0316602082015260408201511515604082015261103f30611192565b606082015261104e6000611b92565b6080820152604051806040016040528083606001518152600160209091015260a0820152608082015160070b60c082015260a082015160070b60e082015261109960c08301516111db565b6101008201526110ac60e08301516111db565b6101208201526110c06101008301516111db565b6101408201526110cf81611bea565b949350505050565b600381805160208101820180518482526020830160208501209152805490945084935061110692509050614702565b80601f016020809104026020016040519081016040528092919081815260200182805461113290614702565b801561117f5780601f106111545761010080835404028352916020019161117f565b820191906000526020600020905b81548152906001019060200180831161116257829003601f168201915b5050506001909301549192505060ff1682565b6111a6604051602081016040526060815290565b6040518060200160405280836040516020016111c29190614e34565b6040516020818303038152906040528152509050919050565b6111f660405160408082019052606081526000602082015290565b6000611203836000611e07565b90506040516040808201905280825181526020018260200151151590529392505050565b61124260405160408082019052606081526000602082015290565b600061124d83611e58565b9050600061126660056387ed0a64605185600080611eef565b90506110cf81611ffe565b6000808260200151156112b0576040517f83041cea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006112bf6000196000611e07565b905060006112d285518660200151612092565b90506112de81836120c4565b156112f157506000946001945092505050565b80516112fc90614e79565b95600095509350505050565b611310613c96565b6000828152602081905260408120604051604080820190528154815260019091015460ff161515602082019081529091505161135e5760405162461bcd60e51b81526004016104f690614ef3565b600181518154811061137257611372614792565b90600052602060002090600a02016040518061016001604052908160008201805461139c90614702565b80601f01602080910402602001604051908101604052809291908181526020018280546113c890614702565b80156114155780601f106113ea57610100808354040283529160200191611415565b820191906000526020600020905b8154815290600101906020018083116113f857829003601f168201915b505050918352505060018201546001600160401b0381166020830152600160401b900460ff161515604082015260028201805460609092019161145790614702565b80601f016020809104026020016040519081016040528092919081815260200182805461148390614702565b80156114d05780601f106114a5576101008083540402835291602001916114d0565b820191906000526020600020905b8154815290600101906020018083116114b357829003601f168201915b50505091835250506003820154600781810b6020840152600160401b909104810b6040808401919091526004840154606084015260058401546080840152600684015460a0840152908301546001600160401b031660c083015260e09091019060088301905180608001604052908160008201805461154e90614702565b80601f016020809104026020016040519081016040528092919081815260200182805461157a90614702565b80156115c75780601f1061159c576101008083540402835291602001916115c7565b820191906000526020600020905b8154815290600101906020018083116115aa57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b820481161515604084015269010000000000000000009091041615156060909101529052509392505050565b6060600061162660406118b3565b90506116338160046120ee565b61163f835182906120fa565b61164e83602001518290612118565b61165d836040015182906118d3565b61166c836060015182906118d3565b610528816118ea565b61168f604051604080820190526000808252602082015290565b60006116a3836001600160401b0316612124565b905060006116bd6005639904f2ff60518560006001611eef565b90506110cf8161215c565b3373ff00000000000000000000000000000000000005146116fb5760405162461bcd60e51b81526004016104f690614f5d565b6000611706826121c6565b905060006117178260200151612228565b9050600081515190506002816040516117309190614653565b90815260200160405180910390206001015460ff166117615760405162461bcd60e51b81526004016104f690614fc7565b6003816040516117719190614653565b90815260200160405180910390206001015460ff16156117a35760405162461bcd60e51b81526004016104f690615031565b60006117cc6002836040516117b89190614653565b908152602001604051809103902054611308565b90508060400151151583604001511515146117f95760405162461bcd60e51b81526004016104f690615075565b60008061180a856101000151611271565b91509150801561182c5760405162461bcd60e51b81526004016104f690615105565b60008061183d876101400151611271565b91509150801561185f5760405162461bcd60e51b81526004016104f690615105565b8460c001518411156118835760405162461bcd60e51b81526004016104f69061516f565b8461010001518211156118a85760405162461bcd60e51b81526004016104f6906151d9565b505050505050505050565b6118bb613e2f565b6118c6815183612375565b5060006020820152919050565b61061c82826118e35760146123f2565b60156123f2565b606081602001511561190e5760405162461bcd60e51b81526004016104f69061521d565b81515192915050565b3373ff000000000000000000000000000000000000051461194a5760405162461bcd60e51b81526004016104f690614f5d565b600061195582612401565b905060006119638251612228565b905060028151516040516119779190614653565b90815260200160405180910390206001015460ff166119a85760405162461bcd60e51b81526004016104f690614fc7565b60038151516040516119ba9190614653565b90815260200160405180910390206001015460ff16156119ec5760405162461bcd60e51b81526004016104f690615031565b6040518060400160405280826080015151815260016020909101526003825151604051611a199190614653565b908152602001604051809103902081518190611a35908261522d565b506020820151600191909101805460ff19169115159190911790555060208201516004825151604051611a689190614653565b9081526020016040518091039020805467ffffffffffffffff19166001600160401b039290921691909117905560026005825151604051611aa99190614653565b9081526020016040518091039020805460ff19166001836004811115611ad157611ad16143ef565b0217905550505050565b3373ff0000000000000000000000000000000000000714611b0e5760405162461bcd60e51b81526004016104f690615364565b7f10aa319ed8cad9bceb033c0c2788c4ae17469ac844e4c6e2c2e20e74ca8a7be8604051611b3b906153a8565b60405180910390a150565b6000611b518361246d565b90506000611b6a6005633105f1a6605185876000611eef565b9050805115611b8c57604051630e74990760e01b815260040160405180910390fd5b50505050565b611ba6604051602081016040526060815290565b6000611bb183612496565b905060405160208101604052808251604051602001611bd091906153c5565b604051602081830303815290604052815250915050919050565b6060600080611bfd8461010001516124f7565b90506000611c0f8561012001516124f7565b90506000611c218661014001516124f7565b9050611c2d600b612615565b611c3790856153f2565b9350611c44865151612663565b611c4e90856153f2565b9350611c6686602001516001600160401b0316612615565b611c7090856153f2565b9350611c7a61267b565b611c8490856153f2565b9350611c9486606001515161268c565b611c9e90856153f2565b9350611cae86608001515161268c565b611cb890856153f2565b9350611cc88660a001515161268c565b611cd290856153f2565b9350611ce18660c0015161269a565b611ceb90856153f2565b9350611cfa8660e0015161269a565b611d0490856153f2565b9350611d0f8361268c565b611d1990856153f2565b9350611d248261268c565b611d2e90856153f2565b9350611d398161268c565b611d4390856153f2565b93506000611d50856118b3565b9050611d5d81600b6120ee565b611d6a87515182906126dd565b611d7987602001518290612118565b611d88876040015182906118d3565b611d98876060015151829061272b565b611da8876080015151829061272b565b611db78760a001518290612738565b611dc68760c001518290612759565b611dd58760e001518290612759565b611ddf818561272b565b611de9818461272b565b611df3818361272b565b611dfc816118ea565b979650505050505050565b611e2d604051806060016040528060608152602001600015158152602001600081525090565b61052883604051602001611e419190615405565b604051602081830303815290604052836000612763565b6060600080611e6a84602001516124f7565b9050611e766002612615565b611e8090836153f2565b9150611e8d84515161268c565b611e9790836153f2565b9150611ea28161268c565b611eac90836153f2565b91506000611eb9836118b3565b9050611ec68160026120ee565b611ed3855151829061272b565b611edd818361272b565b611ee6816118ea565b95945050505050565b6060611f0f73fe0000000000000000000000000000000000000584612838565b60008073fe00000000000000000000000000000000000005888686611f35576000611f38565b60015b8a8a8e604051602001611f5096959493929190615423565b604051602081830303815290604052604051611f6c9190614653565b600060405180830381855af49150503d8060008114611fa7576040513d603f01601f191681016040523d815291503d6000602084013e611fac565b606091505b509150915081611fe8576040517f8a7db5bf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ff1816128b2565b9998505050505050505050565b61201960405160408082019052606081526000602082015290565b6060600080845111156120485761203084826129bb565b9092509050600082511115612048576110cf82612b2e565b60405160408082019052806000604051818152601f19601f830116810160200160405290801561207f576020820181803683370190505b5081526000602090910152949350505050565b6120b8604051806060016040528060608152602001600015158152602001600081525090565b61052883836000612763565b6000806120d384846001612c94565b9050806001146120e45760006110cf565b6001949350505050565b61061c82600483612dd4565b6121078260038351612ddb565b61211381835190612ef8565b505050565b61061c82600083612ddb565b6060600061213a836001600160401b0316612615565b90506000612147826118b3565b90506121538185612118565b6110cf816118ea565b612176604051604080820190526000808252602082015290565b6000806121838482612f1f565b925090506002811461219757612197615479565b6121a18483612f6b565b60079190910b845291506121b58483612f6b565b5060070b6020840152509092915050565b6121e0604051604080820190526060808252602082015290565b6000806121ed8482612f1f565b925090506002811461220157612201615479565b61220b84836129bb565b908452915061221a84836129bb565b506020840152509092915050565b612230613d30565b600080606061223f8583612f1f565b93509150600b821461225357612253615479565b61225d8584612f85565b908552925061226c858461312e565b6001600160401b0390911660208601529250612288858461316f565b9015156040860152925061229c85846129bb565b935090506122a9816131da565b60608501526122b885846129bb565b935090506122c5816131da565b60808501526122d4858461323e565b60a086019190915292506122e88584612f6b565b60079190910b60c086015292506122ff8584612f6b565b60079190910b60e08601529250606061231886856129bb565b9450905061232581612b2e565b610100860152606061233787866129bb565b9550905061234481612b2e565b610120870152606061235688876129bb565b9650905061236381612b2e565b61014088015250949695505050505050565b61239060405160408082019052606081526000602082015290565b61239b6020836154a5565b156123c3576123ab6020836154a5565b6123b69060206154b9565b6123c090836153f2565b91505b6020830182905260405180845260008152828101602001818110156123e757600080fd5b604052509192915050565b61211360e08217835190613398565b61241c60405160408082019052606081526000602082015290565b6000806124298482612f1f565b925090506002811461243d5761243d615479565b61244784836129bb565b9084529150612456848361312e565b506001600160401b03166020840152509092915050565b6060600061247b835161268c565b90506000612488826118b3565b90506121538451829061272b565b6124b160405160408082019052606081526000602082015290565b6701ffffffffffffff600783901c1691607f1660008390036124de576124d78282613398565b5050919050565b6124eb8260808317613398565b50506124b1565b919050565b606060008251516125099060016153f2565b6001600160401b0381111561252057612520613e81565b604051818152601f19601f830116810160200160405290801561254a576020820181803683370190505b50905082602001511515600114612562576000612568565b600160f81b5b8160008151811061257b5761257b614792565b60200101906001600160f81b031916908160001a905350600160005b84515181101561260c57845181815181106125b4576125b4614792565b60200101516001600160f81b0319168383815181106125d5576125d5614792565b60200101906001600160f81b031916908160001a905350816125f6816154cc565b9250508080612604906154cc565b915050612597565b50909392505050565b60006017821161262757506001919050565b60ff821161263757506002919050565b61ffff821161264857506003919050565b63ffffffff821161265b57506005919050565b506009919050565b600081516126716002612615565b61050591906153f2565b60006126876001612615565b905090565b600081516126718351612615565b600081600781900b82136126ba57610528816001600160401b0316612615565b6105286126c9826000196154df565b6001600160401b0316612615565b50919050565b6126ea60d8835190613398565b506126f8602a835190613398565b5061061c8160405160200161270d9190615522565b6040516020818303038152906040528361272b90919063ffffffff16565b6121078260028351612ddb565b806020015161274d5761061c8151839061272b565b61061c815183906120fa565b61061c828261340b565b612789604051806060016040528060608152602001600015158152602001600081525090565b602084018451600059601f831615600181146127b757601f84166020908103808601845283010192506127c1565b6020820192508382525b508282848660046101c2fa506020815101810160405280515b60208114612808576000602083015114600181146127f85750612808565b60208301925050601f19016127da565b81528452505050602081018390528115612822578161282c565b61282c8151613439565b60408201529392505050565b47818110156128775780826040517f8f0f42060000000000000000000000000000000000000000000000000000000081526004016104f6929190615537565b823f151580611b8c576040517f64d954b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600080806020850185518101906128cb91906155bb565b919450925090506001600160401b0382166129055780511561290057604051630e74990760e01b815260040160405180910390fd5b612981565b6001600160401b0382166051148061292657506001600160401b0382166071145b1561294d57805160000361290057604051630e74990760e01b815260040160405180910390fd5b816040517ff1f6bced0000000000000000000000000000000000000000000000000000000081526004016104f69190613e73565b82156110cf57826040517fd4bb66710000000000000000000000000000000000000000000000000000000081526004016104f69190614037565b606060008060006129cc8686613477565b96509092506001600160401b0316905060ff8216600614806129f1575060ff82166002145b612a0d5760405162461bcd60e51b81526004016104f690615675565b60051960ff831601612a4657612a238686613477565b96509092506001600160401b0316905060ff8216600214612a4657612a46615479565b6000612a5282876153f2565b90506000826001600160401b03811115612a6e57612a6e613e81565b604051818152601f19601f8301168101602001604052908015612a98576020820181803683370190505b5090506000875b83811015612b1157898181518110612ab957612ab9614792565b60200101516001600160f81b031916838381518110612ada57612ada614792565b60200101906001600160f81b031916908160001a90535081612afb816154cc565b9250508080612b09906154cc565b915050612a9f565b5081612b1d858a6153f2565b9650965050505050505b9250929050565b612b4960405160408082019052606081526000602082015290565b8151600003612b8157604051806040016040528060405160408082019052600181526000602080830182905291835291015292915050565b600060018351612b9191906154b9565b6001600160401b03811115612ba857612ba8613e81565b604051818152601f19601f8301168101602001604052908015612bd2576020820181803683370190505b509050600083600081518110612bea57612bea614792565b60200101516001600160f81b031916600160f81b03612c07575060015b60015b8451811015612c7957848181518110612c2557612c25614792565b60200101516001600160f81b03191683612c406001846154b9565b81518110612c5057612c50614792565b60200101906001600160f81b031916908160001a90535080612c71816154cc565b915050612c0a565b50604051604080820190529182521515602082015292915050565b600060018215612d0d5784602001518015612cb0575083602001515b15612cbe5750600019612d0d565b8460200151158015612cd65750836020015115156001145b15612ce5576001915050610528565b846020015115156001148015612cfd57508360200151155b15612d0d57600019915050610528565b836040015185604001511115612d24579050610528565b846040015184604001511115612d4857612d4081600019615685565b915050610528565b600080808080895151905060208a510194506020895101935060005b81811015612dc35780860151935080850151925082841115612d8f5786975050505050505050610528565b83831115612db157612da387600019615685565b975050505050505050610528565b612dbc6020826153f2565b9050612d64565b5060009a9950505050505050505050565b6121138383835b6017816001600160401b031611612e0157611b8c60e0600584901b168217845190613398565b60ff816001600160401b031611612e4257612e296018611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166001855191906135f4565b61ffff816001600160401b031611612e8457612e6b6019611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166002855191906135f4565b63ffffffff816001600160401b031611612ec857612eaf601a611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166004855191906135f4565b612edf601b611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166008855191906135f4565b612f1360405160408082019052606081526000602082015290565b61052883838451613683565b600080600080612f2f8686613477565b96509092506001600160401b0316905060ff8216600414612f625760405162461bcd60e51b81526004016104f6906156f1565b95939450505050565b60008080612f79858561375d565b90969095509350505050565b612f99604051602081016040526060815290565b60008080612fa78686613477565b96509092506001600160401b0316905060ff8216600614612fda5760405162461bcd60e51b81526004016104f69061575b565b602a8114612ffa5760405162461bcd60e51b81526004016104f69061579d565b606061300687876129bb565b965090508060008151811061301d5761301d614792565b60200101516001600160f81b031916156130495760405162461bcd60e51b81526004016104f690615807565b61305d604051602081016040526060815290565b6001825161306b91906154b9565b6001600160401b0381111561308257613082613e81565b604051818152601f19601f83011681016020016040529080156130ac576020820181803683370190505b50815260015b8251811015613122578281815181106130cd576130cd614792565b60200101516001600160f81b03191682516130e96001846154b9565b815181106130f9576130f9614792565b60200101906001600160f81b031916908160001a9053508061311a816154cc565b9150506130b2565b50979596505050505050565b60008060008061313e8686613477565b96509092506001600160401b0316905060ff821615612f625760405162461bcd60e51b81526004016104f690615871565b60008060008061317f8686613477565b96509092506001600160401b0316905060ff82166007146131b25760405162461bcd60e51b81526004016104f6906158b5565b60158114806131c15750601481145b6131cd576131cd615479565b6014141595939450505050565b6131ee604051602081016040526060815290565b6000604051602081016040528381529050613208816137ac565b610505576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61325960405160408082019052606081526000602082015290565b60008060006132688686613477565b96509092506001600160401b0316905060ff82166002148061328d575060ff82166003145b6132a95760405162461bcd60e51b81526004016104f69061591f565b60006132b582876153f2565b90506000826001600160401b038111156132d1576132d1613e81565b604051818152601f19601f83011681016020016040529080156132fb576020820181803683370190505b5090506000875b838110156133745789818151811061331c5761331c614792565b60200101516001600160f81b03191683838151811061333d5761333d614792565b60200101906001600160f81b031916908160001a9053508161335e816154cc565b925050808061336c906154cc565b915050613302565b506040516040808201905282815260ff86166003146020820152612b1d858a6153f2565b6133b360405160408082019052606081526000602082015290565b6000835151905060006133c78260016153f2565b9050846020015182106133e8576133e8856133e383600261592f565b613924565b84516020838201018581538151831115613400578282525b509495945050505050565b60008160070b126134225761061c82600083612ddb565b61061c826001613434846000196154df565b612ddb565b60006134448261393f565b1561345157506000919050565b60006020830151905061346381613988565b915060086020845103028201915050919050565b6000806000806134878686613b85565b90506134946001866153f2565b94506007600582901c16601f8216601c81106134c25760405162461bcd60e51b81526004016104f6906159a1565b60188160ff1610156134e05790945060ff1692508491506135ed9050565b8060ff1660180361353d5760006134f78989613b85565b90506135046001896153f2565b975060188160ff16101561352a5760405162461bcd60e51b81526004016104f6906159e5565b9195505060ff1692508491506135ed9050565b8060ff166019036135775760006135548989613bd3565b90506135616002896153f2565b97509195505061ffff1692508491506135ed9050565b8060ff16601a036135b357600061358e8989613c14565b905061359b6004896153f2565b97509195505063ffffffff1692508491506135ed9050565b8060ff16601b146135c6576135c6615479565b60006135d28989613c55565b90506135df6008896153f2565b975091955090935085925050505b9250925092565b61360f60405160408082019052606081526000602082015290565b60008451519050600061362282856153f2565b9050856020015181111561363f5761363f866133e383600261592f565b6000600161364f86610100615b03565b61365991906154b9565b905086518281018783198251161781528151841115613676578382525b5096979650505050505050565b61369e60405160408082019052606081526000602082015290565b82518211156136ac57600080fd5b6000845151905060006136bf84836153f2565b905085602001518111156136dc576136dc866133e383600261592f565b600080875180518560208301019350808511156136f7578482525b505050602086015b6020861061373757805182526137166020836153f2565b91506137236020826153f2565b90506137306020876154b9565b95506136ff565b60001960208790036101000a018019825116818451161790925250959695505050505050565b60008060008061376d8686613477565b96509092506001600160401b0316905060ff821660011480613790575060ff8216155b612f625760405162461bcd60e51b81526004016104f690615b6c565b600081516000815181106137c2576137c2614792565b60200101516001600160f81b0319166000036137e557600a825151111592915050565b81516000815181106137f9576137f9614792565b60200101516001600160f81b031916600160f81b148061385a5750815160008151811061382857613828614792565b60200101516001600160f81b0319167f0200000000000000000000000000000000000000000000000000000000000000145b1561386b5781515160151492915050565b815160008151811061387f5761387f614792565b60200101516001600160f81b0319167f0300000000000000000000000000000000000000000000000000000000000000036138c05781515160311492915050565b81516000815181106138d4576138d4614792565b60200101516001600160f81b0319167f040000000000000000000000000000000000000000000000000000000000000003613916576040825151111592915050565b610100825151111592915050565b6000825190506139348383612375565b50611b8c8382612ef8565b60008060208301815b845181101561397d5781519250821561396657506000949350505050565b60209182019161397690826153f2565b9050613948565b506001949350505050565b6000811560018114613b7c57700100000000000000000000000000000000600160401b640100000000620100006101006010600460026000198b019081041790810417908104179081041790810417908104179081041790810417600101926040517ff8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd81527ff5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe60208201527ff6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a827252361660408201527fc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff60608201527ff7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e60808201527fe39ed557db96902cd38ed14fad815115c786af479b7e8324736353433727170760a08201527fc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d236242260660c08201527f753a6d1b65325d0c552a4d1345224105391a310b29122104190a11030902010060e082015261010081016040527e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff600160f81b8082880204818160ff0385015104600160ff1b86116101000201965060001985018516613b72576001870196505b50505050506126d7565b50600092915050565b6000613b928260016153f2565b83511015613bb25760405162461bcd60e51b81526004016104f690615bb0565b828281518110613bc457613bc4614792565b602001015160f81c9392505050565b6000613be08260026153f2565b83511015613c005760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160f01c949350505050565b6000613c218260046153f2565b83511015613c415760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160e01c949350505050565b6000613c628260086153f2565b83511015613c825760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160c01c949350505050565b6040518061016001604052806060815260200160006001600160401b0316815260200160001515815260200160608152602001600060070b8152602001600060070b815260200160008152602001600081526020016000815260200160006001600160401b03168152602001613d2b604051608081016040908152606080835260006020840181905291830182905282015290565b905290565b604051806101600160405280613d50604051602081016040526060815290565b815260200160006001600160401b03168152602001600015158152602001613d82604051602081016040526060815290565b8152602001613d9b604051602081016040526060815290565b8152602001613dbb60405160408082019052606081526000602082015290565b8152602001600060070b8152602001600060070b8152602001613def60405160408082019052606081526000602082015290565b8152602001613e0f60405160408082019052606081526000602082015290565b8152602001613d2b60405160408082019052606081526000602082015290565b6040518060400160405280613e5560405160408082019052606081526000602082015290565b8152602001600081525090565b6001600160401b0381165b82525050565b602081016105058284613e62565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715613ebc57613ebc613e81565b6040525050565b6000613ed26000604051905090565b90506124f28282613e97565b60006001600160401b03821115613ef757613ef7613e81565b601f19601f83011660200192915050565b82818337506000910152565b6000613f27613f2284613ede565b613ec3565b905082815260208101848484011115613f4257613f42600080fd5b613f4d848285613f08565b509392505050565b600082601f830112613f6957613f69600080fd5b81356110cf848260208601613f14565b600060208284031215613f8e57613f8e600080fd5b81356001600160401b03811115613fa757613fa7600080fd5b6110cf84828501613f55565b60006001600160a01b038216610505565b613fcd81613fb3565b8114610d2e57600080fd5b803561050581613fc4565b80613fcd565b803561050581613fe3565b6000806040838503121561400a5761400a600080fd5b60006140168585613fd8565b925050602061402785828601613fe9565b9150509250929050565b80613e6d565b602081016105058284614031565b60006020828403121561405a5761405a600080fd5b60006110cf8484613fe9565b801515613e6d565b6040810161407c8285614031565b6105286020830184614066565b613e6d81613fb3565b602081016105058284614089565b60005b838110156140bb5780820151838201526020016140a3565b50506000910152565b60006140d4826000815192915050565b8084526020840193506140eb8185602086016140a0565b601f01601f19169290920192915050565b6020808252810161052881846140c4565b60008083601f84011261412257614122600080fd5b5081356001600160401b0381111561413c5761413c600080fd5b602083019150836001820283011115612b2757612b27600080fd5b6000806020838503121561416d5761416d600080fd5b82356001600160401b0381111561418657614186600080fd5b6141928582860161410d565b92509250509250929050565b600060408301825184820385526141b582826140c4565b9150506020830151613f4d6020860182614066565b60208082528101610528818461419e565b6001600160401b038116613fcd565b8035610505816141db565b60008060006060848603121561420d5761420d600080fd5b600061421986866141ea565b935050602061422a868287016141ea565b92505060408401356001600160401b0381111561424957614249600080fd5b61425586828701613f55565b9150509250925092565b63ffffffff8116613e6d565b60608101614279828661425f565b6142866020830185613e62565b8181036040830152611ee681846140c4565b613e6d8160070b90565b600060808301825184820385526142b982826140c4565b91505060208301516142ce6020860182613e62565b5060408301516142e16040860182614066565b506060830151613f4d6060860182614066565b600061016083018251848203855261430c82826140c4565b91505060208301516143216020860182613e62565b5060408301516143346040860182614066565b506060830151848203606086015261434c82826140c4565b91505060808301516143616080860182614298565b5060a083015161437460a0860182614298565b5060c083015161438760c0860182614031565b5060e083015161439a60e0860182614031565b506101008301516143af610100860182614031565b506101208301516143c4610120860182613e62565b50610140830151848203610140860152611ee682826142a2565b6020808252810161052881846142f4565b634e487b7160e01b600052602160045260246000fd5b60058110610d2e57610d2e6143ef565b806124f281614405565b600061050582614415565b613e6d8161441f565b60208101610505828461442a565b6101608082528101614453818e6140c4565b9050614462602083018d613e62565b61446f604083018c614066565b8181036060830152614481818b6140c4565b9050614490608083018a614298565b61449d60a0830189614298565b6144aa60c0830188614031565b6144b760e0830187614031565b6144c5610100830186614031565b6144d3610120830185613e62565b8181036101408301526144e681846142a2565b9d9c50505050505050505050505050565b600061016082840312156126d7576126d7600080fd5b60006020828403121561452257614522600080fd5b81356001600160401b0381111561453b5761453b600080fd5b6110cf848285016144f7565b6040820181516145578482614031565b506020820151611b8c6020850182614066565b604081016105058284614547565b6040808252810161458981856140c4565b90506105286020830184614066565b604881526000602082017f50726f626c656d7320636f6e76657274696e672077697468647261772062616c81527f616e636520696e746f2042696720496e742c206d617920636175736520616e2060208201527f6f766572666c6f77000000000000000000000000000000000000000000000000604082015291505b5060600190565b6020808252810161050581614598565b600061463b826000815192915050565b6146498185602086016140a0565b9290920192915050565b6000610528828461462b565b602481526000602082017f6e6f206465616c207075626c697368656420666f72207468697320706965636581527f2063696400000000000000000000000000000000000000000000000000000000602082015291505b5060400190565b602080825281016105058161465f565b60006146d9838584613f08565b50500190565b60006110cf8284866146cc565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061471657607f821691505b6020821081036126d7576126d76146ec565b603281526000602082017f7468652066696c65636f696e206d6574686f642074686174207761732063616c81527f6c6564206973206e6f742068616e646c65640000000000000000000000000000602082015291506146b5565b6020808252810161050581614728565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19368590030181126147c3576147c3600080fd5b8084019250823591506001600160401b038211156147e3576147e3600080fd5b6020830192506001820236038313156147fe576147fe600080fd5b509250929050565b602981526000602082017f6465616c2077697468207468697320706965636543696420616c72656164792081527f7075626c69736865640000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614806565b600061050561487c8381565b90565b61488883614870565b81546008840282811b60001990911b908116901990911617825550505050565b600061211381848461487f565b8181101561061c576148c86000826148a8565b6001016148b5565b601f821115612113576148ee81600081815281906020902092915050565b6020601f850104810160208510156149035750805b6149156020601f8601048301826148b5565b5050505050565b826001600160401b0381111561493457614934613e81565b61493e8254614702565b6149498282856148d0565b6000601f83116001811461497d57600084156149655750858201355b600019600886021c19811660028602178655506149e3565b601f19841661499786600081815281906020902092915050565b60005b828110156149ba578885013582556020948501946001909201910161499a565b868310156149d657600019601f88166008021c19858a01351682555b6001600288020188555050505b50505050505050565b61211383838361491c565b60008135610505816141db565b60006001600160401b03835b81169019929092169190911792915050565b60006001600160401b038216610505565b614a3c82614a22565b614a47818354614a04565b8255505050565b801515613fcd565b6000813561050581614a4e565b600068ff0000000000000000614a108460401b90565b6000811515610505565b614a8c82614a79565b614a47818354614a63565b613fcd8160070b90565b6000813561050581614a97565b6000610505614ac061487c8460070b90565b60070b90565b614a3c82614aae565b60006fffffffffffffffff0000000000000000614a108460401b90565b614af582614aae565b614a47818354614acf565b6000813561050581613fe3565b600060001983614a10565b614b2182614870565b614a47818354614b0d565b60008235607e1936849003018112614b4657614b46600080fd5b9190910192915050565b600069ff000000000000000000614a108460481b90565b614b7082614a79565b614a47818354614b50565b8082614b8781806147a8565b614b928183866149ec565b50505050600181016020830180614ba8816149f7565b9050614bb48184614a33565b505050600181016040830180614bc981614a56565b9050614bd58184614a83565b505050600181016060830180614bea81614a56565b90506149158184614b67565b61061c8282614b7b565b8082614c0c81806147a8565b614c178183866149ec565b50505050600181016020830180614c2d816149f7565b9050614c398184614a33565b505050600181016040830180614c4e81614a56565b9050614c5a8184614a83565b5050506002810160608301614c6f81856147a8565b614c7a8183866149ec565b50505050600381016080830180614c9081614aa1565b9050614c9c8184614ac6565b5050506003810160a0830180614cb181614aa1565b9050614cbd8184614aec565b5050506004810160c0830180614cd281614b00565b9050614cde8184614b18565b5050506005810160e0830180614cf381614b00565b9050614cff8184614b18565b50505060068101610100830180614d1581614b00565b9050614d218184614b18565b50505060078101610120830180614d37816149f7565b9050614d438184614a33565b505050600881016101408301614d598185614b2c565b6149158184614bf6565b61061c8282614c00565b60006105058260601b90565b600061050582614d6d565b613e6d614d9082613fb3565b614d79565b6000614da18286614031565b602082019150614db18285614d84565b601482019150614dc18284614031565b506020019392505050565b803561050581614a4e565b600060208284031215614dec57614dec600080fd5b60006110cf8484614dcc565b600060208284031215614e0d57614e0d600080fd5b60006110cf84846141ea565b60408101614e278285613e62565b6105286020830184614031565b7f040a00000000000000000000000000000000000000000000000000000000000081526002016000614e668284614d84565b50601401919050565b6000610505825190565b6000614e89826000815192915050565b60208301614e9681614e6f565b925060208210156124d757614eb2600019836020036008021b90565b9092169392505050565b601881526000602082017f70726f706f73616c4964206e6f7420617661696c61626c650000000000000000815291505b5060200190565b6020808252810161050581614ebc565b602781526000602082017f6d73672e73656e646572206e6565647320746f206265206d61726b657420616381527f746f722066303500000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614f03565b602a81526000602082017f706965636520636964206d757374206265206164646564206265666f7265206181527f7574686f72697a696e6700000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614f6d565b603b81526000602082017f6465616c206661696c656420706f6c69637920636865636b3a2070726f76696481527f657220616c726561647920636c61696d65642074686973206369640000000000602082015291506146b5565b6020808252810161050581614fd7565b601c81526000602082017f76657269666965645f6465616c20706172616d206d69736d617463680000000081529150614eec565b6020808252810161050581615041565b604181526000602082017f49737375657320636f6e76657274696e672075696e7432353620746f2042696781527f496e742c206d6179206e6f7420686176652061636375726174652076616c756560208201527f730000000000000000000000000000000000000000000000000000000000000060408201529150614614565b6020808252810161050581615085565b602981526000602082017f73746f726167652070726963652067726561746572207468616e20726571756581527f737420616d6f756e740000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615115565b602d81526000602082017f636c69656e7420636f6c6c61746572616c2067726561746572207468616e207281527f65717565737420616d6f756e7400000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161517f565b600c81526000602082017f496e76616c69642043424f52000000000000000000000000000000000000000081529150614eec565b60208082528101610505816151e9565b61523b826000815192915050565b6001600160401b0381111561525257615252613e81565b61525c8254614702565b6152678282856148d0565b6020601f83116001811461529c5760008415615284578287015190505b600019600886021c1981166002860217865550615302565b601f1984166152b686600081815281906020902092915050565b60005b828110156152d957848901518255602094850194600190920191016152b9565b868310156152f55784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b602881526000602082017f6d73672e73656e646572206e6565647320746f2062652064617461636170206181527f63746f7220663037000000000000000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161530a565b601181526000602082017f446174614361702052656365697665642100000000000000000000000000000081529150614eec565b6020808252810161050581615374565b60008082525b5060010190565b60006153d0826153b8565b9150610528828461462b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610505576105056153dc565b60006154118284614031565b50602001919050565b613e6d81614a22565b60c081016154318289613e62565b61543e6020830188614031565b61544b6040830187613e62565b6154586060830186613e62565b818103608083015261546a81856140c4565b9050611dfc60a083018461541a565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826154b4576154b461548f565b500690565b81810381811115610505576105056153dc565b600060001982036153be576153be6153dc565b60006154eb8260070b90565b91506154f78360070b90565b925050818103677fffffffffffffff198112677fffffffffffffff82131715610505576105056153dc565b6000808252600182019150610528828461462b565b60408101614e278285614031565b60008151905061050581613fe3565b600081519050610505816141db565b6000615571613f2284613ede565b90508281526020810184848401111561558c5761558c600080fd5b613f4d8482856140a0565b600082601f8301126155ab576155ab600080fd5b81516110cf848260208601615563565b6000806000606084860312156155d3576155d3600080fd5b60006155df8686615545565b93505060206155f086828701615554565b92505060408401516001600160401b0381111561560f5761560f600080fd5b61425586828701615597565b602e81526000602082017f696e76616c6964206d616a20286578706563746564204d616a546167206f722081527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161561b565b8181028060008312600160ff1b851416156156a2576156a26153dc565b82820584148315176156b6576156b66153dc565b5092915050565b601f81526000602082017f696e76616c6964206d616a20286578706563746564204d616a4172726179290081529150614eec565b60208082528101610505816156bd565b602881526000602082017f6578706563746564206d616a6f72207479706520746167207768656e2070617281527f73696e6720636964000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615701565b60208082527f657870656374656420746167203432207768656e2070617273696e672063696491019081526000614eec565b602080825281016105058161576b565b602c81526000602082017f6578706563746564206669727374206279746520746f2062652030207768656e81527f2070617273696e67206369640000000000000000000000000000000000000000602082015291506146b5565b60208082528101610505816157ad565b602581526000602082017f696e76616c6964206d616a20286578706563746564204d616a556e7369676e6581527f64496e7429000000000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615817565b601f81526000602082017f696e76616c6964206d616a20286578706563746564204d616a4f74686572290081529150614eec565b6020808252810161050581615881565b603581526000602082017f696e76616c6964206d616a20286578706563746564204d616a4279746553747281527f696e67206f72204d616a54657874537472696e67290000000000000000000000602082015291506146b5565b60208082528101610505816158c5565b8181028082158382048514176156b6576156b66153dc565b602581526000602082017f63616e6e6f742068616e646c652068656164657273207769746820657874726181527f203e203237000000000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615947565b600c81526000602082017f696e76616c69642063626f72000000000000000000000000000000000000000081529150614eec565b60208082528101610505816159b1565b80825b6001851115615a3457808604811115615a1357615a136153dc565b6001851615615a2157908102905b8002615a2d8560011c90565b94506159f8565b94509492505050565b600082615a4c57506001610528565b81615a5957506000610528565b8160018114615a6f5760028114615a7957615aa6565b6001915050610528565b60ff841115615a8a57615a8a6153dc565b8360020a915084821115615aa057615aa06153dc565b50610528565b5060208310610133831016604e8410600b8410161715615ad9575081810a83811115615ad457615ad46153dc565b610528565b615ae684848460016159f5565b92509050818404811115615afc57615afc6153dc565b0292915050565b60006105286000198484615a3d565b603581526000602082017f696e76616c6964206d616a20286578706563746564204d616a5369676e65644981527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015291506146b5565b6020808252810161050581615b12565b601481526000602082017f736c6963696e67206f7574206f662072616e676500000000000000000000000081529150614eec565b6020808252810161050581615b7c56fea2646970667358221220fa1ed04421fc46af5688b833cc2a1931f0ce664c79dc503984c40afde48a460a64736f6c63430008110033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018c5760003560e01c8063868e10c4116100e3578063be965ce71161008c578063f44a890311610066578063f44a890314610426578063f4b2e4d814610446578063f82704f01461045957600080fd5b8063be965ce7146103e5578063d91921ed14610400578063dd27fe901461041357600080fd5b8063a6d1b7b8116100bd578063a6d1b7b81461036d578063b34ba252146103b0578063bad79de9146103bb57600080fd5b8063868e10c4146103185780638da5cb5b1461033a57806396925ae61461034d57600080fd5b806329aa3d2a116101455780636067f4541161011f5780636067f454146102d857806366263735146102e357806378133bb2146102f857600080fd5b806329aa3d2a146102515780634634aed5146102795780634e8a3ca41461029957600080fd5b80630cf20cc9116101765780630cf20cc9146101ee5780631adf7eb11461020e578063297ab4861461024957600080fd5b8062706790146101915780630a0e0c91146101b2575b600080fd5b61019c639d8b067881565b6040516101a99190613e73565b60405180910390f35b61019c6101c0366004613f79565b600481805160208101820180518482526020830160208501209152546001600160401b031693508492505050565b6102016101fc366004613ff4565b61047a565b6040516101a99190614037565b61023b61021c366004614045565b6000602052806000526040600020805460019091015490915060ff1682565b6040516101a992919061406e565b600154610201565b61026c73ff0000000000000000000000000000000000000581565b6040516101a99190614092565b61028c610287366004614045565b61050b565b6040516101a991906140fc565b61023b6102a7366004613f79565b600281805160208101820180518482526020830160208501209152805460019091015490945060ff16925084915050565b61019c63f98c996681565b6102f66102f1366004613f79565b61052f565b005b61030b610306366004614157565b610620565b6040516101a991906141ca565b61032b6103263660046141f5565b610710565b6040516101a99392919061426b565b60065461026c906001600160a01b031681565b61036061035b366004614045565b6107cc565b6040516101a991906143de565b6103a361037b366004613f79565b6005818051602081018201805184825260208301602085012091525460ff1693508492505050565b6040516101a99190614433565b61019c63de180de381565b6103ce6103c9366004614045565b610a8c565b6040516101a99b9a99989796959493929190614441565b61026c73ff0000000000000000000000000000000000000781565b6102f661040e366004614045565b610d05565b61020161042136600461450d565b610d31565b610439610434366004614157565b610f90565b6040516101a9919061456a565b61028c610454366004614045565b610fef565b61046c610467366004613f79565b6110d7565b6040516101a9929190614578565b6006546000906001600160a01b0316331461049457600080fd5b600060405180604001604052806104aa86611192565b81526020016104b8856111db565b9052905060006104c782611227565b90506000806104d583611271565b91509150806104ff5760405162461bcd60e51b81526004016104f69061461b565b60405180910390fd5b50925050505b92915050565b6060600061051883611308565b9050610528816101400151611618565b9392505050565b60006004826040516105419190614653565b9081526020016040518091039020546001600160401b0316116105765760405162461bcd60e51b81526004016104f6906146bc565b60006105a860048360405161058b9190614653565b9081526020016040518091039020546001600160401b0316611675565b90506000816020015160070b13156105fd5760046005836040516105cc9190614653565b9081526020016040518091039020805460ff191660018360048111156105f4576105f46143ef565b02179055505050565b6000815160070b131561061c5760036005836040516105cc9190614653565b5050565b61063b60405160408082019052606081526000602082015290565b6003838360405161064d9291906146df565b908152602001604051809103902060405180604001604052908160008201805461067690614702565b80601f01602080910402602001604051908101604052809291908181526020018280546106a290614702565b80156106ef5780601f106106c4576101008083540402835291602001916106ef565b820191906000526020600020905b8154815290600101906020018083116106d257829003601f168201915b50505091835250506001919091015460ff1615156020909101529392505050565b60008060608082639d8b0677196001600160401b0389160161076357610735866116c8565b600061074160016118b3565b905061074e8160016118d3565b610757816118ea565b925060519150506107bc565b63f98c9965196001600160401b038916016107865761078186611917565b6107bc565b63de180de2196001600160401b038916016107a45761078186611adb565b60405162461bcd60e51b81526004016104f690614782565b6000989097509095509350505050565b6107d4613c96565b600182815481106107e7576107e7614792565b90600052602060002090600a02016040518061016001604052908160008201805461081190614702565b80601f016020809104026020016040519081016040528092919081815260200182805461083d90614702565b801561088a5780601f1061085f5761010080835404028352916020019161088a565b820191906000526020600020905b81548152906001019060200180831161086d57829003601f168201915b505050918352505060018201546001600160401b0381166020830152600160401b900460ff16151560408201526002820180546060909201916108cc90614702565b80601f01602080910402602001604051908101604052809291908181526020018280546108f890614702565b80156109455780601f1061091a57610100808354040283529160200191610945565b820191906000526020600020905b81548152906001019060200180831161092857829003601f168201915b50505091835250506003820154600781810b6020840152600160401b909104810b6040808401919091526004840154606084015260058401546080840152600684015460a0840152908301546001600160401b031660c083015260e0909101906008830190518060800160405290816000820180546109c390614702565b80601f01602080910402602001604051908101604052809291908181526020018280546109ef90614702565b8015610a3c5780601f10610a1157610100808354040283529160200191610a3c565b820191906000526020600020905b815481529060010190602001808311610a1f57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b8204811615156040840152690100000000000000000090910416151560609091015290525092915050565b60018181548110610a9c57600080fd5b906000526020600020600a9091020180549091508190610abb90614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae790614702565b8015610b345780601f10610b0957610100808354040283529160200191610b34565b820191906000526020600020905b815481529060010190602001808311610b1757829003601f168201915b50505050600183015460028401805493946001600160401b03831694600160401b90930460ff16935091610b6790614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9390614702565b8015610be05780601f10610bb557610100808354040283529160200191610be0565b820191906000526020600020905b815481529060010190602001808311610bc357829003601f168201915b505050506003830154600484015460058501546006860154600780880154969785820b97600160401b90960490910b95509293919290916001600160401b03169060088101604051806080016040529081600082018054610c4090614702565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6c90614702565b8015610cb95780601f10610c8e57610100808354040283529160200191610cb9565b820191906000526020600020905b815481529060010190602001808311610c9c57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b8204811615156040840152690100000000000000000090910416151560609091015290508b565b6006546001600160a01b03163314610d1c57600080fd5b610d2e610d2830611192565b82611b46565b50565b6006546000906001600160a01b03163314610d4b57600080fd5b60026005610d5984806147a8565b604051610d679291906146df565b90815260200160405180910390205460ff166004811115610d8a57610d8a6143ef565b1480610dd2575060036005610d9f84806147a8565b604051610dad9291906146df565b90815260200160405180910390205460ff166004811115610dd057610dd06143ef565b145b15610def5760405162461bcd60e51b81526004016104f690614860565b6001805480820182556000918252908390829060209020600a90910201610e168282614d63565b50506000423383604051602001610e2f93929190614d95565b60405160208183030381529060405280519060200120905060405160408082018152838252600160208084019190915260008481529081905220815181556020820151600191909101805460ff19169115159190911790555060405160408082019052818152600160208201526002610ea886806147a8565b604051610eb69291906146df565b90815260200160405180910390208151815560208201516001918201805460ff191691151591909117905590506005610eef86806147a8565b604051610efd9291906146df565b9081526020016040518091039020805460ff19166001836004811115610f2557610f256143ef565b0217905550610f3a6060850160408601614dd7565b1515817ffd6419d07e4c269e58d0c63969756c2124155b4a8d6dd08b8cd46e3a9acbf625610f6e6040880160208901614df8565b8760c00135604051610f81929190614e19565b60405180910390a39392505050565b610faa604051604080820190526000808252602082015290565b60028383604051610fbc9291906146df565b9081526020016040518091039020604051604081810190528154815260019091015460ff16151560208201529392505050565b60606000610ffc83611308565b9050611006613d30565b604051602081016040528083519052815260208201516001600160401b0316602082015260408201511515604082015261103f30611192565b606082015261104e6000611b92565b6080820152604051806040016040528083606001518152600160209091015260a0820152608082015160070b60c082015260a082015160070b60e082015261109960c08301516111db565b6101008201526110ac60e08301516111db565b6101208201526110c06101008301516111db565b6101408201526110cf81611bea565b949350505050565b600381805160208101820180518482526020830160208501209152805490945084935061110692509050614702565b80601f016020809104026020016040519081016040528092919081815260200182805461113290614702565b801561117f5780601f106111545761010080835404028352916020019161117f565b820191906000526020600020905b81548152906001019060200180831161116257829003601f168201915b5050506001909301549192505060ff1682565b6111a6604051602081016040526060815290565b6040518060200160405280836040516020016111c29190614e34565b6040516020818303038152906040528152509050919050565b6111f660405160408082019052606081526000602082015290565b6000611203836000611e07565b90506040516040808201905280825181526020018260200151151590529392505050565b61124260405160408082019052606081526000602082015290565b600061124d83611e58565b9050600061126660056387ed0a64605185600080611eef565b90506110cf81611ffe565b6000808260200151156112b0576040517f83041cea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006112bf6000196000611e07565b905060006112d285518660200151612092565b90506112de81836120c4565b156112f157506000946001945092505050565b80516112fc90614e79565b95600095509350505050565b611310613c96565b6000828152602081905260408120604051604080820190528154815260019091015460ff161515602082019081529091505161135e5760405162461bcd60e51b81526004016104f690614ef3565b600181518154811061137257611372614792565b90600052602060002090600a02016040518061016001604052908160008201805461139c90614702565b80601f01602080910402602001604051908101604052809291908181526020018280546113c890614702565b80156114155780601f106113ea57610100808354040283529160200191611415565b820191906000526020600020905b8154815290600101906020018083116113f857829003601f168201915b505050918352505060018201546001600160401b0381166020830152600160401b900460ff161515604082015260028201805460609092019161145790614702565b80601f016020809104026020016040519081016040528092919081815260200182805461148390614702565b80156114d05780601f106114a5576101008083540402835291602001916114d0565b820191906000526020600020905b8154815290600101906020018083116114b357829003601f168201915b50505091835250506003820154600781810b6020840152600160401b909104810b6040808401919091526004840154606084015260058401546080840152600684015460a0840152908301546001600160401b031660c083015260e09091019060088301905180608001604052908160008201805461154e90614702565b80601f016020809104026020016040519081016040528092919081815260200182805461157a90614702565b80156115c75780601f1061159c576101008083540402835291602001916115c7565b820191906000526020600020905b8154815290600101906020018083116115aa57829003601f168201915b5050509183525050600191909101546001600160401b038116602083015260ff600160401b820481161515604084015269010000000000000000009091041615156060909101529052509392505050565b6060600061162660406118b3565b90506116338160046120ee565b61163f835182906120fa565b61164e83602001518290612118565b61165d836040015182906118d3565b61166c836060015182906118d3565b610528816118ea565b61168f604051604080820190526000808252602082015290565b60006116a3836001600160401b0316612124565b905060006116bd6005639904f2ff60518560006001611eef565b90506110cf8161215c565b3373ff00000000000000000000000000000000000005146116fb5760405162461bcd60e51b81526004016104f690614f5d565b6000611706826121c6565b905060006117178260200151612228565b9050600081515190506002816040516117309190614653565b90815260200160405180910390206001015460ff166117615760405162461bcd60e51b81526004016104f690614fc7565b6003816040516117719190614653565b90815260200160405180910390206001015460ff16156117a35760405162461bcd60e51b81526004016104f690615031565b60006117cc6002836040516117b89190614653565b908152602001604051809103902054611308565b90508060400151151583604001511515146117f95760405162461bcd60e51b81526004016104f690615075565b60008061180a856101000151611271565b91509150801561182c5760405162461bcd60e51b81526004016104f690615105565b60008061183d876101400151611271565b91509150801561185f5760405162461bcd60e51b81526004016104f690615105565b8460c001518411156118835760405162461bcd60e51b81526004016104f69061516f565b8461010001518211156118a85760405162461bcd60e51b81526004016104f6906151d9565b505050505050505050565b6118bb613e2f565b6118c6815183612375565b5060006020820152919050565b61061c82826118e35760146123f2565b60156123f2565b606081602001511561190e5760405162461bcd60e51b81526004016104f69061521d565b81515192915050565b3373ff000000000000000000000000000000000000051461194a5760405162461bcd60e51b81526004016104f690614f5d565b600061195582612401565b905060006119638251612228565b905060028151516040516119779190614653565b90815260200160405180910390206001015460ff166119a85760405162461bcd60e51b81526004016104f690614fc7565b60038151516040516119ba9190614653565b90815260200160405180910390206001015460ff16156119ec5760405162461bcd60e51b81526004016104f690615031565b6040518060400160405280826080015151815260016020909101526003825151604051611a199190614653565b908152602001604051809103902081518190611a35908261522d565b506020820151600191909101805460ff19169115159190911790555060208201516004825151604051611a689190614653565b9081526020016040518091039020805467ffffffffffffffff19166001600160401b039290921691909117905560026005825151604051611aa99190614653565b9081526020016040518091039020805460ff19166001836004811115611ad157611ad16143ef565b0217905550505050565b3373ff0000000000000000000000000000000000000714611b0e5760405162461bcd60e51b81526004016104f690615364565b7f10aa319ed8cad9bceb033c0c2788c4ae17469ac844e4c6e2c2e20e74ca8a7be8604051611b3b906153a8565b60405180910390a150565b6000611b518361246d565b90506000611b6a6005633105f1a6605185876000611eef565b9050805115611b8c57604051630e74990760e01b815260040160405180910390fd5b50505050565b611ba6604051602081016040526060815290565b6000611bb183612496565b905060405160208101604052808251604051602001611bd091906153c5565b604051602081830303815290604052815250915050919050565b6060600080611bfd8461010001516124f7565b90506000611c0f8561012001516124f7565b90506000611c218661014001516124f7565b9050611c2d600b612615565b611c3790856153f2565b9350611c44865151612663565b611c4e90856153f2565b9350611c6686602001516001600160401b0316612615565b611c7090856153f2565b9350611c7a61267b565b611c8490856153f2565b9350611c9486606001515161268c565b611c9e90856153f2565b9350611cae86608001515161268c565b611cb890856153f2565b9350611cc88660a001515161268c565b611cd290856153f2565b9350611ce18660c0015161269a565b611ceb90856153f2565b9350611cfa8660e0015161269a565b611d0490856153f2565b9350611d0f8361268c565b611d1990856153f2565b9350611d248261268c565b611d2e90856153f2565b9350611d398161268c565b611d4390856153f2565b93506000611d50856118b3565b9050611d5d81600b6120ee565b611d6a87515182906126dd565b611d7987602001518290612118565b611d88876040015182906118d3565b611d98876060015151829061272b565b611da8876080015151829061272b565b611db78760a001518290612738565b611dc68760c001518290612759565b611dd58760e001518290612759565b611ddf818561272b565b611de9818461272b565b611df3818361272b565b611dfc816118ea565b979650505050505050565b611e2d604051806060016040528060608152602001600015158152602001600081525090565b61052883604051602001611e419190615405565b604051602081830303815290604052836000612763565b6060600080611e6a84602001516124f7565b9050611e766002612615565b611e8090836153f2565b9150611e8d84515161268c565b611e9790836153f2565b9150611ea28161268c565b611eac90836153f2565b91506000611eb9836118b3565b9050611ec68160026120ee565b611ed3855151829061272b565b611edd818361272b565b611ee6816118ea565b95945050505050565b6060611f0f73fe0000000000000000000000000000000000000584612838565b60008073fe00000000000000000000000000000000000005888686611f35576000611f38565b60015b8a8a8e604051602001611f5096959493929190615423565b604051602081830303815290604052604051611f6c9190614653565b600060405180830381855af49150503d8060008114611fa7576040513d603f01601f191681016040523d815291503d6000602084013e611fac565b606091505b509150915081611fe8576040517f8a7db5bf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ff1816128b2565b9998505050505050505050565b61201960405160408082019052606081526000602082015290565b6060600080845111156120485761203084826129bb565b9092509050600082511115612048576110cf82612b2e565b60405160408082019052806000604051818152601f19601f830116810160200160405290801561207f576020820181803683370190505b5081526000602090910152949350505050565b6120b8604051806060016040528060608152602001600015158152602001600081525090565b61052883836000612763565b6000806120d384846001612c94565b9050806001146120e45760006110cf565b6001949350505050565b61061c82600483612dd4565b6121078260038351612ddb565b61211381835190612ef8565b505050565b61061c82600083612ddb565b6060600061213a836001600160401b0316612615565b90506000612147826118b3565b90506121538185612118565b6110cf816118ea565b612176604051604080820190526000808252602082015290565b6000806121838482612f1f565b925090506002811461219757612197615479565b6121a18483612f6b565b60079190910b845291506121b58483612f6b565b5060070b6020840152509092915050565b6121e0604051604080820190526060808252602082015290565b6000806121ed8482612f1f565b925090506002811461220157612201615479565b61220b84836129bb565b908452915061221a84836129bb565b506020840152509092915050565b612230613d30565b600080606061223f8583612f1f565b93509150600b821461225357612253615479565b61225d8584612f85565b908552925061226c858461312e565b6001600160401b0390911660208601529250612288858461316f565b9015156040860152925061229c85846129bb565b935090506122a9816131da565b60608501526122b885846129bb565b935090506122c5816131da565b60808501526122d4858461323e565b60a086019190915292506122e88584612f6b565b60079190910b60c086015292506122ff8584612f6b565b60079190910b60e08601529250606061231886856129bb565b9450905061232581612b2e565b610100860152606061233787866129bb565b9550905061234481612b2e565b610120870152606061235688876129bb565b9650905061236381612b2e565b61014088015250949695505050505050565b61239060405160408082019052606081526000602082015290565b61239b6020836154a5565b156123c3576123ab6020836154a5565b6123b69060206154b9565b6123c090836153f2565b91505b6020830182905260405180845260008152828101602001818110156123e757600080fd5b604052509192915050565b61211360e08217835190613398565b61241c60405160408082019052606081526000602082015290565b6000806124298482612f1f565b925090506002811461243d5761243d615479565b61244784836129bb565b9084529150612456848361312e565b506001600160401b03166020840152509092915050565b6060600061247b835161268c565b90506000612488826118b3565b90506121538451829061272b565b6124b160405160408082019052606081526000602082015290565b6701ffffffffffffff600783901c1691607f1660008390036124de576124d78282613398565b5050919050565b6124eb8260808317613398565b50506124b1565b919050565b606060008251516125099060016153f2565b6001600160401b0381111561252057612520613e81565b604051818152601f19601f830116810160200160405290801561254a576020820181803683370190505b50905082602001511515600114612562576000612568565b600160f81b5b8160008151811061257b5761257b614792565b60200101906001600160f81b031916908160001a905350600160005b84515181101561260c57845181815181106125b4576125b4614792565b60200101516001600160f81b0319168383815181106125d5576125d5614792565b60200101906001600160f81b031916908160001a905350816125f6816154cc565b9250508080612604906154cc565b915050612597565b50909392505050565b60006017821161262757506001919050565b60ff821161263757506002919050565b61ffff821161264857506003919050565b63ffffffff821161265b57506005919050565b506009919050565b600081516126716002612615565b61050591906153f2565b60006126876001612615565b905090565b600081516126718351612615565b600081600781900b82136126ba57610528816001600160401b0316612615565b6105286126c9826000196154df565b6001600160401b0316612615565b50919050565b6126ea60d8835190613398565b506126f8602a835190613398565b5061061c8160405160200161270d9190615522565b6040516020818303038152906040528361272b90919063ffffffff16565b6121078260028351612ddb565b806020015161274d5761061c8151839061272b565b61061c815183906120fa565b61061c828261340b565b612789604051806060016040528060608152602001600015158152602001600081525090565b602084018451600059601f831615600181146127b757601f84166020908103808601845283010192506127c1565b6020820192508382525b508282848660046101c2fa506020815101810160405280515b60208114612808576000602083015114600181146127f85750612808565b60208301925050601f19016127da565b81528452505050602081018390528115612822578161282c565b61282c8151613439565b60408201529392505050565b47818110156128775780826040517f8f0f42060000000000000000000000000000000000000000000000000000000081526004016104f6929190615537565b823f151580611b8c576040517f64d954b000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600080806020850185518101906128cb91906155bb565b919450925090506001600160401b0382166129055780511561290057604051630e74990760e01b815260040160405180910390fd5b612981565b6001600160401b0382166051148061292657506001600160401b0382166071145b1561294d57805160000361290057604051630e74990760e01b815260040160405180910390fd5b816040517ff1f6bced0000000000000000000000000000000000000000000000000000000081526004016104f69190613e73565b82156110cf57826040517fd4bb66710000000000000000000000000000000000000000000000000000000081526004016104f69190614037565b606060008060006129cc8686613477565b96509092506001600160401b0316905060ff8216600614806129f1575060ff82166002145b612a0d5760405162461bcd60e51b81526004016104f690615675565b60051960ff831601612a4657612a238686613477565b96509092506001600160401b0316905060ff8216600214612a4657612a46615479565b6000612a5282876153f2565b90506000826001600160401b03811115612a6e57612a6e613e81565b604051818152601f19601f8301168101602001604052908015612a98576020820181803683370190505b5090506000875b83811015612b1157898181518110612ab957612ab9614792565b60200101516001600160f81b031916838381518110612ada57612ada614792565b60200101906001600160f81b031916908160001a90535081612afb816154cc565b9250508080612b09906154cc565b915050612a9f565b5081612b1d858a6153f2565b9650965050505050505b9250929050565b612b4960405160408082019052606081526000602082015290565b8151600003612b8157604051806040016040528060405160408082019052600181526000602080830182905291835291015292915050565b600060018351612b9191906154b9565b6001600160401b03811115612ba857612ba8613e81565b604051818152601f19601f8301168101602001604052908015612bd2576020820181803683370190505b509050600083600081518110612bea57612bea614792565b60200101516001600160f81b031916600160f81b03612c07575060015b60015b8451811015612c7957848181518110612c2557612c25614792565b60200101516001600160f81b03191683612c406001846154b9565b81518110612c5057612c50614792565b60200101906001600160f81b031916908160001a90535080612c71816154cc565b915050612c0a565b50604051604080820190529182521515602082015292915050565b600060018215612d0d5784602001518015612cb0575083602001515b15612cbe5750600019612d0d565b8460200151158015612cd65750836020015115156001145b15612ce5576001915050610528565b846020015115156001148015612cfd57508360200151155b15612d0d57600019915050610528565b836040015185604001511115612d24579050610528565b846040015184604001511115612d4857612d4081600019615685565b915050610528565b600080808080895151905060208a510194506020895101935060005b81811015612dc35780860151935080850151925082841115612d8f5786975050505050505050610528565b83831115612db157612da387600019615685565b975050505050505050610528565b612dbc6020826153f2565b9050612d64565b5060009a9950505050505050505050565b6121138383835b6017816001600160401b031611612e0157611b8c60e0600584901b168217845190613398565b60ff816001600160401b031611612e4257612e296018611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166001855191906135f4565b61ffff816001600160401b031611612e8457612e6b6019611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166002855191906135f4565b63ffffffff816001600160401b031611612ec857612eaf601a611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166004855191906135f4565b612edf601b611fe0600585901b1617845190613398565b50611b8c6001600160401b0382166008855191906135f4565b612f1360405160408082019052606081526000602082015290565b61052883838451613683565b600080600080612f2f8686613477565b96509092506001600160401b0316905060ff8216600414612f625760405162461bcd60e51b81526004016104f6906156f1565b95939450505050565b60008080612f79858561375d565b90969095509350505050565b612f99604051602081016040526060815290565b60008080612fa78686613477565b96509092506001600160401b0316905060ff8216600614612fda5760405162461bcd60e51b81526004016104f69061575b565b602a8114612ffa5760405162461bcd60e51b81526004016104f69061579d565b606061300687876129bb565b965090508060008151811061301d5761301d614792565b60200101516001600160f81b031916156130495760405162461bcd60e51b81526004016104f690615807565b61305d604051602081016040526060815290565b6001825161306b91906154b9565b6001600160401b0381111561308257613082613e81565b604051818152601f19601f83011681016020016040529080156130ac576020820181803683370190505b50815260015b8251811015613122578281815181106130cd576130cd614792565b60200101516001600160f81b03191682516130e96001846154b9565b815181106130f9576130f9614792565b60200101906001600160f81b031916908160001a9053508061311a816154cc565b9150506130b2565b50979596505050505050565b60008060008061313e8686613477565b96509092506001600160401b0316905060ff821615612f625760405162461bcd60e51b81526004016104f690615871565b60008060008061317f8686613477565b96509092506001600160401b0316905060ff82166007146131b25760405162461bcd60e51b81526004016104f6906158b5565b60158114806131c15750601481145b6131cd576131cd615479565b6014141595939450505050565b6131ee604051602081016040526060815290565b6000604051602081016040528381529050613208816137ac565b610505576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61325960405160408082019052606081526000602082015290565b60008060006132688686613477565b96509092506001600160401b0316905060ff82166002148061328d575060ff82166003145b6132a95760405162461bcd60e51b81526004016104f69061591f565b60006132b582876153f2565b90506000826001600160401b038111156132d1576132d1613e81565b604051818152601f19601f83011681016020016040529080156132fb576020820181803683370190505b5090506000875b838110156133745789818151811061331c5761331c614792565b60200101516001600160f81b03191683838151811061333d5761333d614792565b60200101906001600160f81b031916908160001a9053508161335e816154cc565b925050808061336c906154cc565b915050613302565b506040516040808201905282815260ff86166003146020820152612b1d858a6153f2565b6133b360405160408082019052606081526000602082015290565b6000835151905060006133c78260016153f2565b9050846020015182106133e8576133e8856133e383600261592f565b613924565b84516020838201018581538151831115613400578282525b509495945050505050565b60008160070b126134225761061c82600083612ddb565b61061c826001613434846000196154df565b612ddb565b60006134448261393f565b1561345157506000919050565b60006020830151905061346381613988565b915060086020845103028201915050919050565b6000806000806134878686613b85565b90506134946001866153f2565b94506007600582901c16601f8216601c81106134c25760405162461bcd60e51b81526004016104f6906159a1565b60188160ff1610156134e05790945060ff1692508491506135ed9050565b8060ff1660180361353d5760006134f78989613b85565b90506135046001896153f2565b975060188160ff16101561352a5760405162461bcd60e51b81526004016104f6906159e5565b9195505060ff1692508491506135ed9050565b8060ff166019036135775760006135548989613bd3565b90506135616002896153f2565b97509195505061ffff1692508491506135ed9050565b8060ff16601a036135b357600061358e8989613c14565b905061359b6004896153f2565b97509195505063ffffffff1692508491506135ed9050565b8060ff16601b146135c6576135c6615479565b60006135d28989613c55565b90506135df6008896153f2565b975091955090935085925050505b9250925092565b61360f60405160408082019052606081526000602082015290565b60008451519050600061362282856153f2565b9050856020015181111561363f5761363f866133e383600261592f565b6000600161364f86610100615b03565b61365991906154b9565b905086518281018783198251161781528151841115613676578382525b5096979650505050505050565b61369e60405160408082019052606081526000602082015290565b82518211156136ac57600080fd5b6000845151905060006136bf84836153f2565b905085602001518111156136dc576136dc866133e383600261592f565b600080875180518560208301019350808511156136f7578482525b505050602086015b6020861061373757805182526137166020836153f2565b91506137236020826153f2565b90506137306020876154b9565b95506136ff565b60001960208790036101000a018019825116818451161790925250959695505050505050565b60008060008061376d8686613477565b96509092506001600160401b0316905060ff821660011480613790575060ff8216155b612f625760405162461bcd60e51b81526004016104f690615b6c565b600081516000815181106137c2576137c2614792565b60200101516001600160f81b0319166000036137e557600a825151111592915050565b81516000815181106137f9576137f9614792565b60200101516001600160f81b031916600160f81b148061385a5750815160008151811061382857613828614792565b60200101516001600160f81b0319167f0200000000000000000000000000000000000000000000000000000000000000145b1561386b5781515160151492915050565b815160008151811061387f5761387f614792565b60200101516001600160f81b0319167f0300000000000000000000000000000000000000000000000000000000000000036138c05781515160311492915050565b81516000815181106138d4576138d4614792565b60200101516001600160f81b0319167f040000000000000000000000000000000000000000000000000000000000000003613916576040825151111592915050565b610100825151111592915050565b6000825190506139348383612375565b50611b8c8382612ef8565b60008060208301815b845181101561397d5781519250821561396657506000949350505050565b60209182019161397690826153f2565b9050613948565b506001949350505050565b6000811560018114613b7c57700100000000000000000000000000000000600160401b640100000000620100006101006010600460026000198b019081041790810417908104179081041790810417908104179081041790810417600101926040517ff8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd81527ff5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe60208201527ff6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a827252361660408201527fc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff60608201527ff7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e60808201527fe39ed557db96902cd38ed14fad815115c786af479b7e8324736353433727170760a08201527fc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d236242260660c08201527f753a6d1b65325d0c552a4d1345224105391a310b29122104190a11030902010060e082015261010081016040527e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff600160f81b8082880204818160ff0385015104600160ff1b86116101000201965060001985018516613b72576001870196505b50505050506126d7565b50600092915050565b6000613b928260016153f2565b83511015613bb25760405162461bcd60e51b81526004016104f690615bb0565b828281518110613bc457613bc4614792565b602001015160f81c9392505050565b6000613be08260026153f2565b83511015613c005760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160f01c949350505050565b6000613c218260046153f2565b83511015613c415760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160e01c949350505050565b6000613c628260086153f2565b83511015613c825760405162461bcd60e51b81526004016104f690615bb0565b60008260200184015160c01c949350505050565b6040518061016001604052806060815260200160006001600160401b0316815260200160001515815260200160608152602001600060070b8152602001600060070b815260200160008152602001600081526020016000815260200160006001600160401b03168152602001613d2b604051608081016040908152606080835260006020840181905291830182905282015290565b905290565b604051806101600160405280613d50604051602081016040526060815290565b815260200160006001600160401b03168152602001600015158152602001613d82604051602081016040526060815290565b8152602001613d9b604051602081016040526060815290565b8152602001613dbb60405160408082019052606081526000602082015290565b8152602001600060070b8152602001600060070b8152602001613def60405160408082019052606081526000602082015290565b8152602001613e0f60405160408082019052606081526000602082015290565b8152602001613d2b60405160408082019052606081526000602082015290565b6040518060400160405280613e5560405160408082019052606081526000602082015290565b8152602001600081525090565b6001600160401b0381165b82525050565b602081016105058284613e62565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b0382111715613ebc57613ebc613e81565b6040525050565b6000613ed26000604051905090565b90506124f28282613e97565b60006001600160401b03821115613ef757613ef7613e81565b601f19601f83011660200192915050565b82818337506000910152565b6000613f27613f2284613ede565b613ec3565b905082815260208101848484011115613f4257613f42600080fd5b613f4d848285613f08565b509392505050565b600082601f830112613f6957613f69600080fd5b81356110cf848260208601613f14565b600060208284031215613f8e57613f8e600080fd5b81356001600160401b03811115613fa757613fa7600080fd5b6110cf84828501613f55565b60006001600160a01b038216610505565b613fcd81613fb3565b8114610d2e57600080fd5b803561050581613fc4565b80613fcd565b803561050581613fe3565b6000806040838503121561400a5761400a600080fd5b60006140168585613fd8565b925050602061402785828601613fe9565b9150509250929050565b80613e6d565b602081016105058284614031565b60006020828403121561405a5761405a600080fd5b60006110cf8484613fe9565b801515613e6d565b6040810161407c8285614031565b6105286020830184614066565b613e6d81613fb3565b602081016105058284614089565b60005b838110156140bb5780820151838201526020016140a3565b50506000910152565b60006140d4826000815192915050565b8084526020840193506140eb8185602086016140a0565b601f01601f19169290920192915050565b6020808252810161052881846140c4565b60008083601f84011261412257614122600080fd5b5081356001600160401b0381111561413c5761413c600080fd5b602083019150836001820283011115612b2757612b27600080fd5b6000806020838503121561416d5761416d600080fd5b82356001600160401b0381111561418657614186600080fd5b6141928582860161410d565b92509250509250929050565b600060408301825184820385526141b582826140c4565b9150506020830151613f4d6020860182614066565b60208082528101610528818461419e565b6001600160401b038116613fcd565b8035610505816141db565b60008060006060848603121561420d5761420d600080fd5b600061421986866141ea565b935050602061422a868287016141ea565b92505060408401356001600160401b0381111561424957614249600080fd5b61425586828701613f55565b9150509250925092565b63ffffffff8116613e6d565b60608101614279828661425f565b6142866020830185613e62565b8181036040830152611ee681846140c4565b613e6d8160070b90565b600060808301825184820385526142b982826140c4565b91505060208301516142ce6020860182613e62565b5060408301516142e16040860182614066565b506060830151613f4d6060860182614066565b600061016083018251848203855261430c82826140c4565b91505060208301516143216020860182613e62565b5060408301516143346040860182614066565b506060830151848203606086015261434c82826140c4565b91505060808301516143616080860182614298565b5060a083015161437460a0860182614298565b5060c083015161438760c0860182614031565b5060e083015161439a60e0860182614031565b506101008301516143af610100860182614031565b506101208301516143c4610120860182613e62565b50610140830151848203610140860152611ee682826142a2565b6020808252810161052881846142f4565b634e487b7160e01b600052602160045260246000fd5b60058110610d2e57610d2e6143ef565b806124f281614405565b600061050582614415565b613e6d8161441f565b60208101610505828461442a565b6101608082528101614453818e6140c4565b9050614462602083018d613e62565b61446f604083018c614066565b8181036060830152614481818b6140c4565b9050614490608083018a614298565b61449d60a0830189614298565b6144aa60c0830188614031565b6144b760e0830187614031565b6144c5610100830186614031565b6144d3610120830185613e62565b8181036101408301526144e681846142a2565b9d9c50505050505050505050505050565b600061016082840312156126d7576126d7600080fd5b60006020828403121561452257614522600080fd5b81356001600160401b0381111561453b5761453b600080fd5b6110cf848285016144f7565b6040820181516145578482614031565b506020820151611b8c6020850182614066565b604081016105058284614547565b6040808252810161458981856140c4565b90506105286020830184614066565b604881526000602082017f50726f626c656d7320636f6e76657274696e672077697468647261772062616c81527f616e636520696e746f2042696720496e742c206d617920636175736520616e2060208201527f6f766572666c6f77000000000000000000000000000000000000000000000000604082015291505b5060600190565b6020808252810161050581614598565b600061463b826000815192915050565b6146498185602086016140a0565b9290920192915050565b6000610528828461462b565b602481526000602082017f6e6f206465616c207075626c697368656420666f72207468697320706965636581527f2063696400000000000000000000000000000000000000000000000000000000602082015291505b5060400190565b602080825281016105058161465f565b60006146d9838584613f08565b50500190565b60006110cf8284866146cc565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061471657607f821691505b6020821081036126d7576126d76146ec565b603281526000602082017f7468652066696c65636f696e206d6574686f642074686174207761732063616c81527f6c6564206973206e6f742068616e646c65640000000000000000000000000000602082015291506146b5565b6020808252810161050581614728565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19368590030181126147c3576147c3600080fd5b8084019250823591506001600160401b038211156147e3576147e3600080fd5b6020830192506001820236038313156147fe576147fe600080fd5b509250929050565b602981526000602082017f6465616c2077697468207468697320706965636543696420616c72656164792081527f7075626c69736865640000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614806565b600061050561487c8381565b90565b61488883614870565b81546008840282811b60001990911b908116901990911617825550505050565b600061211381848461487f565b8181101561061c576148c86000826148a8565b6001016148b5565b601f821115612113576148ee81600081815281906020902092915050565b6020601f850104810160208510156149035750805b6149156020601f8601048301826148b5565b5050505050565b826001600160401b0381111561493457614934613e81565b61493e8254614702565b6149498282856148d0565b6000601f83116001811461497d57600084156149655750858201355b600019600886021c19811660028602178655506149e3565b601f19841661499786600081815281906020902092915050565b60005b828110156149ba578885013582556020948501946001909201910161499a565b868310156149d657600019601f88166008021c19858a01351682555b6001600288020188555050505b50505050505050565b61211383838361491c565b60008135610505816141db565b60006001600160401b03835b81169019929092169190911792915050565b60006001600160401b038216610505565b614a3c82614a22565b614a47818354614a04565b8255505050565b801515613fcd565b6000813561050581614a4e565b600068ff0000000000000000614a108460401b90565b6000811515610505565b614a8c82614a79565b614a47818354614a63565b613fcd8160070b90565b6000813561050581614a97565b6000610505614ac061487c8460070b90565b60070b90565b614a3c82614aae565b60006fffffffffffffffff0000000000000000614a108460401b90565b614af582614aae565b614a47818354614acf565b6000813561050581613fe3565b600060001983614a10565b614b2182614870565b614a47818354614b0d565b60008235607e1936849003018112614b4657614b46600080fd5b9190910192915050565b600069ff000000000000000000614a108460481b90565b614b7082614a79565b614a47818354614b50565b8082614b8781806147a8565b614b928183866149ec565b50505050600181016020830180614ba8816149f7565b9050614bb48184614a33565b505050600181016040830180614bc981614a56565b9050614bd58184614a83565b505050600181016060830180614bea81614a56565b90506149158184614b67565b61061c8282614b7b565b8082614c0c81806147a8565b614c178183866149ec565b50505050600181016020830180614c2d816149f7565b9050614c398184614a33565b505050600181016040830180614c4e81614a56565b9050614c5a8184614a83565b5050506002810160608301614c6f81856147a8565b614c7a8183866149ec565b50505050600381016080830180614c9081614aa1565b9050614c9c8184614ac6565b5050506003810160a0830180614cb181614aa1565b9050614cbd8184614aec565b5050506004810160c0830180614cd281614b00565b9050614cde8184614b18565b5050506005810160e0830180614cf381614b00565b9050614cff8184614b18565b50505060068101610100830180614d1581614b00565b9050614d218184614b18565b50505060078101610120830180614d37816149f7565b9050614d438184614a33565b505050600881016101408301614d598185614b2c565b6149158184614bf6565b61061c8282614c00565b60006105058260601b90565b600061050582614d6d565b613e6d614d9082613fb3565b614d79565b6000614da18286614031565b602082019150614db18285614d84565b601482019150614dc18284614031565b506020019392505050565b803561050581614a4e565b600060208284031215614dec57614dec600080fd5b60006110cf8484614dcc565b600060208284031215614e0d57614e0d600080fd5b60006110cf84846141ea565b60408101614e278285613e62565b6105286020830184614031565b7f040a00000000000000000000000000000000000000000000000000000000000081526002016000614e668284614d84565b50601401919050565b6000610505825190565b6000614e89826000815192915050565b60208301614e9681614e6f565b925060208210156124d757614eb2600019836020036008021b90565b9092169392505050565b601881526000602082017f70726f706f73616c4964206e6f7420617661696c61626c650000000000000000815291505b5060200190565b6020808252810161050581614ebc565b602781526000602082017f6d73672e73656e646572206e6565647320746f206265206d61726b657420616381527f746f722066303500000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614f03565b602a81526000602082017f706965636520636964206d757374206265206164646564206265666f7265206181527f7574686f72697a696e6700000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581614f6d565b603b81526000602082017f6465616c206661696c656420706f6c69637920636865636b3a2070726f76696481527f657220616c726561647920636c61696d65642074686973206369640000000000602082015291506146b5565b6020808252810161050581614fd7565b601c81526000602082017f76657269666965645f6465616c20706172616d206d69736d617463680000000081529150614eec565b6020808252810161050581615041565b604181526000602082017f49737375657320636f6e76657274696e672075696e7432353620746f2042696781527f496e742c206d6179206e6f7420686176652061636375726174652076616c756560208201527f730000000000000000000000000000000000000000000000000000000000000060408201529150614614565b6020808252810161050581615085565b602981526000602082017f73746f726167652070726963652067726561746572207468616e20726571756581527f737420616d6f756e740000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615115565b602d81526000602082017f636c69656e7420636f6c6c61746572616c2067726561746572207468616e207281527f65717565737420616d6f756e7400000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161517f565b600c81526000602082017f496e76616c69642043424f52000000000000000000000000000000000000000081529150614eec565b60208082528101610505816151e9565b61523b826000815192915050565b6001600160401b0381111561525257615252613e81565b61525c8254614702565b6152678282856148d0565b6020601f83116001811461529c5760008415615284578287015190505b600019600886021c1981166002860217865550615302565b601f1984166152b686600081815281906020902092915050565b60005b828110156152d957848901518255602094850194600190920191016152b9565b868310156152f55784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b602881526000602082017f6d73672e73656e646572206e6565647320746f2062652064617461636170206181527f63746f7220663037000000000000000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161530a565b601181526000602082017f446174614361702052656365697665642100000000000000000000000000000081529150614eec565b6020808252810161050581615374565b60008082525b5060010190565b60006153d0826153b8565b9150610528828461462b565b634e487b7160e01b600052601160045260246000fd5b80820180821115610505576105056153dc565b60006154118284614031565b50602001919050565b613e6d81614a22565b60c081016154318289613e62565b61543e6020830188614031565b61544b6040830187613e62565b6154586060830186613e62565b818103608083015261546a81856140c4565b9050611dfc60a083018461541a565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826154b4576154b461548f565b500690565b81810381811115610505576105056153dc565b600060001982036153be576153be6153dc565b60006154eb8260070b90565b91506154f78360070b90565b925050818103677fffffffffffffff198112677fffffffffffffff82131715610505576105056153dc565b6000808252600182019150610528828461462b565b60408101614e278285614031565b60008151905061050581613fe3565b600081519050610505816141db565b6000615571613f2284613ede565b90508281526020810184848401111561558c5761558c600080fd5b613f4d8482856140a0565b600082601f8301126155ab576155ab600080fd5b81516110cf848260208601615563565b6000806000606084860312156155d3576155d3600080fd5b60006155df8686615545565b93505060206155f086828701615554565b92505060408401516001600160401b0381111561560f5761560f600080fd5b61425586828701615597565b602e81526000602082017f696e76616c6964206d616a20286578706563746564204d616a546167206f722081527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015291506146b5565b602080825281016105058161561b565b8181028060008312600160ff1b851416156156a2576156a26153dc565b82820584148315176156b6576156b66153dc565b5092915050565b601f81526000602082017f696e76616c6964206d616a20286578706563746564204d616a4172726179290081529150614eec565b60208082528101610505816156bd565b602881526000602082017f6578706563746564206d616a6f72207479706520746167207768656e2070617281527f73696e6720636964000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615701565b60208082527f657870656374656420746167203432207768656e2070617273696e672063696491019081526000614eec565b602080825281016105058161576b565b602c81526000602082017f6578706563746564206669727374206279746520746f2062652030207768656e81527f2070617273696e67206369640000000000000000000000000000000000000000602082015291506146b5565b60208082528101610505816157ad565b602581526000602082017f696e76616c6964206d616a20286578706563746564204d616a556e7369676e6581527f64496e7429000000000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615817565b601f81526000602082017f696e76616c6964206d616a20286578706563746564204d616a4f74686572290081529150614eec565b6020808252810161050581615881565b603581526000602082017f696e76616c6964206d616a20286578706563746564204d616a4279746553747281527f696e67206f72204d616a54657874537472696e67290000000000000000000000602082015291506146b5565b60208082528101610505816158c5565b8181028082158382048514176156b6576156b66153dc565b602581526000602082017f63616e6e6f742068616e646c652068656164657273207769746820657874726181527f203e203237000000000000000000000000000000000000000000000000000000602082015291506146b5565b6020808252810161050581615947565b600c81526000602082017f696e76616c69642063626f72000000000000000000000000000000000000000081529150614eec565b60208082528101610505816159b1565b80825b6001851115615a3457808604811115615a1357615a136153dc565b6001851615615a2157908102905b8002615a2d8560011c90565b94506159f8565b94509492505050565b600082615a4c57506001610528565b81615a5957506000610528565b8160018114615a6f5760028114615a7957615aa6565b6001915050610528565b60ff841115615a8a57615a8a6153dc565b8360020a915084821115615aa057615aa06153dc565b50610528565b5060208310610133831016604e8410600b8410161715615ad9575081810a83811115615ad457615ad46153dc565b610528565b615ae684848460016159f5565b92509050818404811115615afc57615afc6153dc565b0292915050565b60006105286000198484615a3d565b603581526000602082017f696e76616c6964206d616a20286578706563746564204d616a5369676e65644981527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015291506146b5565b6020808252810161050581615b12565b601481526000602082017f736c6963696e67206f7574206f662072616e676500000000000000000000000081529150614eec565b6020808252810161050581615b7c56fea2646970667358221220fa1ed04421fc46af5688b833cc2a1931f0ce664c79dc503984c40afde48a460a64736f6c63430008110033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"errors": {
"ActorError(int256)": [
{
"notice": "the called actor returned an error as part of its expected behaviour"
}
],
"ActorNotFound()": [
{
"notice": "the actor is not found"
}
],
"FailToCallActor()": [
{
"notice": "an error happened trying to call the actor"
}
],
"InvalidCodec(uint64)": [
{
"notice": "the codec received is not valid"
}
],
"InvalidResponseLength()": [
{
"notice": "the response received is not correct. In some case no response is expected and we received one, or a response was indeed expected and we received none."
}
],
"NotEnoughBalance(uint256,uint256)": [
{
"notice": "the smart contract has no enough balance to transfer"
}
]
},
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 8335,
"contract": "contracts/DealClient.sol:DealClient",
"label": "dealRequestIdx",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_bytes32,t_struct(RequestIdx)8204_storage)"
},
{
"astId": 8339,
"contract": "contracts/DealClient.sol:DealClient",
"label": "dealRequests",
"offset": 0,
"slot": "1",
"type": "t_array(t_struct(DealRequest)8233_storage)dyn_storage"
},
{
"astId": 8344,
"contract": "contracts/DealClient.sol:DealClient",
"label": "pieceRequests",
"offset": 0,
"slot": "2",
"type": "t_mapping(t_bytes_memory_ptr,t_struct(RequestId)8199_storage)"
},
{
"astId": 8349,
"contract": "contracts/DealClient.sol:DealClient",
"label": "pieceProviders",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_bytes_memory_ptr,t_struct(ProviderSet)8209_storage)"
},
{
"astId": 8353,
"contract": "contracts/DealClient.sol:DealClient",
"label": "pieceDeals",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_bytes_memory_ptr,t_uint64)"
},
{
"astId": 8358,
"contract": "contracts/DealClient.sol:DealClient",
"label": "pieceStatus",
"offset": 0,
"slot": "5",
"type": "t_mapping(t_bytes_memory_ptr,t_enum(Status)8330)"
},
{
"astId": 8374,
"contract": "contracts/DealClient.sol:DealClient",
"label": "owner",
"offset": 0,
"slot": "6",
"type": "t_address"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(DealRequest)8233_storage)dyn_storage": {
"base": "t_struct(DealRequest)8233_storage",
"encoding": "dynamic_array",
"label": "struct DealRequest[]",
"numberOfBytes": "32"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_bytes_memory_ptr": {
"encoding": "bytes",
"label": "bytes",
"numberOfBytes": "32"
},
"t_bytes_storage": {
"encoding": "bytes",
"label": "bytes",
"numberOfBytes": "32"
},
"t_enum(Status)8330": {
"encoding": "inplace",
"label": "enum DealClient.Status",
"numberOfBytes": "1"
},
"t_int64": {
"encoding": "inplace",
"label": "int64",
"numberOfBytes": "8"
},
"t_mapping(t_bytes32,t_struct(RequestIdx)8204_storage)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => struct RequestIdx)",
"numberOfBytes": "32",
"value": "t_struct(RequestIdx)8204_storage"
},
"t_mapping(t_bytes_memory_ptr,t_enum(Status)8330)": {
"encoding": "mapping",
"key": "t_bytes_memory_ptr",
"label": "mapping(bytes => enum DealClient.Status)",
"numberOfBytes": "32",
"value": "t_enum(Status)8330"
},
"t_mapping(t_bytes_memory_ptr,t_struct(ProviderSet)8209_storage)": {
"encoding": "mapping",
"key": "t_bytes_memory_ptr",
"label": "mapping(bytes => struct ProviderSet)",
"numberOfBytes": "32",
"value": "t_struct(ProviderSet)8209_storage"
},
"t_mapping(t_bytes_memory_ptr,t_struct(RequestId)8199_storage)": {
"encoding": "mapping",
"key": "t_bytes_memory_ptr",
"label": "mapping(bytes => struct RequestId)",
"numberOfBytes": "32",
"value": "t_struct(RequestId)8199_storage"
},
"t_mapping(t_bytes_memory_ptr,t_uint64)": {
"encoding": "mapping",
"key": "t_bytes_memory_ptr",
"label": "mapping(bytes => uint64)",
"numberOfBytes": "32",
"value": "t_uint64"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(DealRequest)8233_storage": {
"encoding": "inplace",